/* =========================================================================
   STACKLY — Digital Products Marketplace Theme
   Hand-written styles & animations (100% original)
   Dark developer-marketplace aesthetic. Works alongside Tailwind CSS.
   MIT-style license — you own this code.
   ========================================================================= */

:root {
  --brand: #8b5cf6;
  --brand-600: #7c3aed;
  --cyan: #22d3ee;
  --base: #08080f;
  --surface: #0e0e1a;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: #e2e8f0;
  background: var(--base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

::selection { background: var(--brand); color: #fff; }

/* ---------- Custom dark scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0b16; }
::-webkit-scrollbar-thumb { background: #2a2a3d; border-radius: 999px; border: 2px solid #0b0b16; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* Hide scrollbar for specific elements */
.hide-scrollbar { -ms-overflow-style: none !important; scrollbar-width: none !important; }
.hide-scrollbar::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }

/* ---------- Gradient text (animated) ---------- */
.text-gradient {
  background: linear-gradient(90deg, #a78bfa, #22d3ee, #a78bfa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 6s linear infinite;
}
@keyframes hue { to { background-position: 200% center; } }

/* ---------- Grid backdrop ---------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Glow orbs ---------- */
.orb { position: absolute; border-radius: 9999px; filter: blur(80px); pointer-events: none; }

/* ---------- Glass surfaces ---------- */
.glass { background: rgba(255,255,255,.04); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.08); }

/* ---------- Gradient-border cards ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.07);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(139,92,246,.45);
  box-shadow: 0 30px 60px -28px rgba(139,92,246,.45);
}
.card .card-img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-img { transform: scale(1.05); }
.card .quick { opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.card:hover .quick { opacity: 1; transform: none; }

/* ---------- Glow button ---------- */
.btn-glow { box-shadow: 0 10px 30px -8px rgba(124,58,237,.6); }
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: ""; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
}
.btn-shine:hover::after { left: 130%; transition: left .8s ease; }

/* ---------- Browser mockup chrome ---------- */
.browser-bar { background: #141422; }
.browser-dot { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- Code window ---------- */
.code-window { background: #0c0c18; border: 1px solid rgba(255,255,255,.08); }
.code-line { height: 8px; border-radius: 4px; }

/* ---------- Tech chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: 11px; font-weight: 600;
  padding: .25rem .6rem; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #cbd5e1;
}

/* ---------- Wishlist ---------- */
.wish-btn.is-active svg { fill: #f43f5e; stroke: #f43f5e; }
.wish-btn.is-active { animation: pop .35s ease; }
@keyframes pop { 0%{transform:scale(1)} 40%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; }
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Header on scroll ---------- */
.site-header { transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease; z-index: 40; overflow: visible; }
.site-header.scrolled { background: rgba(8,8,15,.8); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: rgba(255,255,255,.08); }
.site-header > div { overflow: visible; }
.header-bar-default,
.header-bar-search { overflow: visible; }

/* Mobile search mode — swap entire toolbar row */
.header-bar-search { display: none; }
.header-search-mobile { display: inline-flex; align-items: center; justify-content: center; }
.header-search-desktop { display: none; flex: 1; min-width: 0; max-width: 42rem; }
@media (min-width: 768px) {
  .header-search-mobile { display: none !important; }
  .header-search-desktop { display: flex !important; }
  .header-bar-search { display: none !important; }
}
@media (max-width: 767px) {
  .header-brand img { display: none; }
  .header-brand .inline-flex { gap: 0; }
  .site-header.is-search-open .header-bar-default { display: none; }
  .site-header.is-search-open .header-bar-search { display: flex; }
}

/* ---------- Drawers / overlay / menu ---------- */
.drawer { transition: transform .42s cubic-bezier(.4,0,.2,1); }
.overlay { transition: opacity .35s ease; }
.mobile-menu { transition: transform .4s cubic-bezier(.4,0,.2,1); }
.filter-panel { transition: transform .4s cubic-bezier(.4,0,.2,1); }

/* ---------- Cart badge bump ---------- */
.cart-count.bump { animation: bump .4s ease; }
@keyframes bump { 0%{transform:scale(1)} 50%{transform:scale(1.4)} 100%{transform:scale(1)} }

/* ---------- Stars ---------- */
.stars { color: #fbbf24; letter-spacing: 1px; }

/* ---------- Accordion ---------- */
.acc-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }

/* ---------- Range slider ---------- */
input[type="range"].brand-range { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 999px; background: #2a2a3d; outline: none; }
input[type="range"].brand-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); cursor: pointer; box-shadow: 0 0 0 4px rgba(139,92,246,.25); }
input[type="range"].brand-range::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--brand); cursor: pointer; }

/* ---------- Link underline ---------- */
.link-underline { position: relative; }
.link-underline::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--brand); transition: width .3s ease; }
.link-underline:hover::after { width: 100%; }

/* ---------- Float ---------- */
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* ---------- Toast ---------- */
.toast { transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }

/* ---------- No scroll ---------- */
body.no-scroll { overflow: hidden; }

/* ---------- Hero slider ---------- */
.hero-slider {
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  width: 100%;
  aspect-ratio: 982 / 500;
}
.hero-slider.is-grabbing { cursor: grabbing; }
.hero-track {
  display: flex;
  height: 100%;
  transition: transform .5s cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
}
.hero-track.is-dragging { transition: none; }
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  -webkit-user-drag: none;
  user-select: none;
}
.hero-shade {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.hero-shade::before,
.hero-shade::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
}
.hero-shade::before {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .16) 42%, transparent 100%);
}
.hero-shade::after {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .16) 42%, transparent 100%);
}

/* ---------- Banner outer light frame (homepage hero) ---------- */
.banner-frame-wrap {
  position: relative;
  border-radius: 1rem;
  isolation: isolate;
}
.banner-frame-wrap .hero-slider {
  position: relative;
  z-index: 2;
}
.banner-frame-wrap.banner-frame--light-ring {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 22px rgba(139, 92, 246, 0.18),
    0 0 44px rgba(139, 92, 246, 0.08);
}
.banner-frame-wrap.banner-frame--soft-glow {
  animation: banner-frame-glow 3.6s ease-in-out infinite;
}
.banner-frame-wrap.banner-frame--soft-blink {
  animation: banner-frame-blink 2.4s ease-in-out infinite;
}
.banner-frame-wrap.banner-frame--shimmer::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(139, 92, 246, 0.15) 28%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(139, 92, 246, 0.15) 72%,
    transparent 100%
  );
  background-size: 260% 100%;
  animation: banner-frame-shimmer 4.2s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
@keyframes banner-frame-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.22),
      0 0 18px rgba(139, 92, 246, 0.22),
      0 0 36px rgba(139, 92, 246, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.38),
      0 0 28px rgba(139, 92, 246, 0.38),
      0 0 52px rgba(139, 92, 246, 0.16);
  }
}
@keyframes banner-frame-blink {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.14),
      0 0 14px rgba(139, 92, 246, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.32),
      0 0 26px rgba(139, 92, 246, 0.34);
  }
}
@keyframes banner-frame-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
html.light .banner-frame-wrap.banner-frame--light-ring {
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.32),
    0 0 18px rgba(124, 58, 237, 0.2),
    0 0 36px rgba(124, 58, 237, 0.1);
}
html.light .banner-frame-wrap.banner-frame--soft-glow {
  animation-name: banner-frame-glow-light;
}
html.light .banner-frame-wrap.banner-frame--soft-blink {
  animation-name: banner-frame-blink-light;
}
html.light .banner-frame-wrap.banner-frame--shimmer::before {
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(124, 58, 237, 0.18) 28%,
    rgba(167, 139, 250, 0.85) 50%,
    rgba(124, 58, 237, 0.18) 72%,
    transparent 100%
  );
}
@keyframes banner-frame-glow-light {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(124, 58, 237, 0.28),
      0 0 16px rgba(124, 58, 237, 0.2),
      0 0 32px rgba(124, 58, 237, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(124, 58, 237, 0.42),
      0 0 24px rgba(124, 58, 237, 0.3),
      0 0 44px rgba(124, 58, 237, 0.14);
  }
}
@keyframes banner-frame-blink-light {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(124, 58, 237, 0.24),
      0 0 14px rgba(124, 58, 237, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(124, 58, 237, 0.38),
      0 0 22px rgba(124, 58, 237, 0.26);
  }
}
@media (prefers-reduced-motion: reduce) {
  .banner-frame-wrap.banner-frame--soft-glow,
  .banner-frame-wrap.banner-frame--soft-blink,
  .banner-frame-wrap.banner-frame--shimmer::before {
    animation: none !important;
  }
  .banner-frame-wrap.banner-frame--soft-glow {
    box-shadow:
      0 0 0 1px rgba(196, 181, 253, 0.28),
      0 0 22px rgba(139, 92, 246, 0.24);
  }
  html.light .banner-frame-wrap.banner-frame--soft-glow {
    box-shadow:
      0 0 0 1px rgba(124, 58, 237, 0.32),
      0 0 18px rgba(124, 58, 237, 0.2);
  }
}

/* ---------- Account dropdown (header) ---------- */
[data-account-menu] { position: relative; z-index: 2; }
[data-account-menu].is-open { z-index: 80; }
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 90;
  min-width: 11.5rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(14, 14, 26, .95);
  padding: 0.25rem 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .55);
  backdrop-filter: blur(12px);
}
.account-dropdown--closed { display: none; }
.account-dropdown__link {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: background-color .15s ease, color .15s ease;
}
.account-dropdown__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
html.light .account-dropdown { background: rgba(255, 255, 255, .98); border-color: rgba(15, 23, 42, .1); }
html.light .account-dropdown__link { color: #475569; }
html.light .account-dropdown__link:hover { background: rgba(15, 23, 42, .05); color: #0f172a; }

/* ---------- Sold bar (flash sale) ---------- */
.sold-track { background: rgba(255,255,255,.1); border-radius: 999px; overflow: hidden; height: 14px; position: relative; }
.sold-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0033cc, #2563eb); }

/* ---------- Flash deals section & cards ---------- */
.flash-section {
  background: linear-gradient(155deg, #002894 0%, #0033cc 52%, #0048eb 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 22px 50px -28px rgba(0, 40, 140, .65);
}
.flash-section .cd-chip {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
}
.flash-section__head { min-height: 2.25rem; }
.flash-section__title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  line-height: 1.2;
  margin: 0;
  color: #fff;
}
.flash-section__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
  background: rgba(255, 255, 255, .15);
  color: #fff;
}
.flash-section__icon--lg {
  width: 2.25rem;
  height: 2.25rem;
}
@media (min-width: 640px) {
  .flash-section__icon--lg { width: 2.5rem; height: 2.5rem; }
}
.flash-section__link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .8125rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: opacity .2s ease;
}
.flash-section__link:hover {
  opacity: .85;
  text-decoration: underline;
}

.flash-deals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  align-items: stretch;
}
@media (min-width: 640px) {
  .flash-deals-grid { gap: 1rem; }
}
@media (min-width: 768px) {
  .flash-deals-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .flash-deals-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.flash-deals-grid--scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: .25rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  gap: .75rem;
  padding-bottom: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.flash-deals-grid--scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Banner-style flash deals carousel */
.flash-carousel {
  position: relative;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.flash-carousel.is-grabbing { cursor: grabbing; }
.flash-carousel__viewport {
  overflow: hidden;
  width: 100%;
}
.flash-carousel__track {
  display: flex;
  gap: .75rem;
  transition: transform .5s cubic-bezier(.25, .46, .45, .94);
  will-change: transform;
}
@media (min-width: 640px) {
  .flash-carousel__track { gap: 1rem; }
}
.flash-carousel__track.is-dragging { transition: none; }
.flash-carousel__slide {
  flex: 0 0 calc((100% - .75rem) / 2);
  min-width: 0;
}
@media (min-width: 768px) {
  .flash-carousel__slide { flex: 0 0 calc((100% - 2rem) / 3); }
}
@media (min-width: 1280px) {
  .flash-carousel__slide { flex: 0 0 calc((100% - 3rem) / 4); }
}
.flash-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .375rem;
  margin-top: 1rem;
  min-height: .375rem;
}
.flash-carousel__dots.is-hidden { display: none; }
.flash-carousel__dots [data-flash-dot] {
  height: .375rem;
  border-radius: 9999px;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width .3s ease, background-color .3s ease, opacity .3s ease;
}
.flash-carousel__dots [data-flash-dot].is-active {
  width: 1.25rem;
  background: #fff;
  opacity: 1;
}
.flash-carousel__dots [data-flash-dot]:not(.is-active) {
  width: .375rem;
  background: #fff;
  opacity: .45;
}

.flash-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 28px -12px rgba(0, 24, 90, .4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.flash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -14px rgba(0, 24, 90, .5);
}
.flash-card__media {
  position: relative;
  background: #f1f5f9;
  overflow: hidden;
}
.flash-card__img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.flash-card:hover .flash-card__img { transform: scale(1.04); }
.flash-card__badge {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 2;
  background: #0033cc;
  color: #fff;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .02em;
  padding: .2rem .45rem;
  border-radius: .35rem;
  line-height: 1.2;
}
.flash-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .7rem .75rem .45rem;
}
.flash-card__title {
  font-size: .8125rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2rem;
}
@media (min-width: 640px) {
  .flash-card__title { font-size: .875rem; min-height: 2.4rem; }
}
.flash-card__prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .35rem .45rem;
}
.flash-card__price {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0033cc;
  line-height: 1.1;
}
@media (min-width: 640px) {
  .flash-card__price { font-size: 1.125rem; }
}
.flash-card__compare {
  font-size: .6875rem;
  color: #94a3b8;
  text-decoration: line-through;
}
.flash-card__sold { margin-top: .1rem; }
.flash-card__sold-track {
  position: relative;
  height: 13px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.flash-card__sold-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0033cc, #3b82f6);
}
.flash-card__sold-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: .01em;
}
.flash-card__footer {
  padding: 0 .75rem .75rem;
  margin-top: auto;
}
.flash-card__btn {
  width: 100%;
  border-radius: .625rem;
  background: #0033cc;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .55rem .65rem;
  line-height: 1.2;
  transition: background .2s ease, transform .15s ease;
}
.flash-card__btn:hover { background: #002a9e; }
.flash-card__btn:active { transform: scale(.98); }

/* ---------- Category circle ---------- */
.cat-circle { transition: transform .25s ease; }
.cat-circle:hover { transform: translateY(-4px); }
.cat-circle:hover .cat-circle-img { box-shadow: 0 14px 28px -16px rgba(139, 92, 246, .85); border-color: rgba(139, 92, 246, .6); }
.cat-circle-img { transition: box-shadow .25s ease, border-color .25s ease; }

/* ---------- Category list (hero sidebar) ---------- */
.cat-link { transition: background-color .2s ease, color .2s ease, padding-left .2s ease; }
.cat-link:hover { background: rgba(255,255,255,.05); color: #fff; padding-left: 1.25rem; }

/* ---------- Mesh gradient (hero) ---------- */
.bg-mesh {
  background-color: #0b0b16;
  background-image:
    radial-gradient(at 18% 22%, rgba(124, 58, 237, .55) 0px, transparent 45%),
    radial-gradient(at 82% 14%, rgba(34, 211, 238, .42) 0px, transparent 45%),
    radial-gradient(at 70% 85%, rgba(139, 92, 246, .42) 0px, transparent 45%);
}

/* ---------- Countdown chip ---------- */
.cd-chip { background: #0e0e1a; color: #fff; border-radius: .5rem; }

/* ---------- Product license (purchase card) ---------- */
.license-heading {
  margin-top: 1.25rem;
  font-size: .875rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -.01em;
}
.license-options { margin-top: .75rem; display: flex; flex-direction: column; gap: .625rem; }
.license-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: .875rem;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.license-option--regular {
  border-color: rgba(139, 92, 246, .45);
  background: rgba(124, 58, 237, .12);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .08);
}
.license-option__title {
  display: block;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}
.license-option__desc {
  display: block;
  margin-top: .125rem;
  font-size: .75rem;
  color: #94a3b8;
  line-height: 1.35;
}
.license-option__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.license-option__link {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  font-size: .75rem;
  font-weight: 600;
  color: #a78bfa;
  white-space: nowrap;
  transition: color .2s ease;
}
.license-option__link:hover { color: #c4b5fd; }
.license-option__wa {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, .15);
  color: #34d399;
  transition: background .2s ease, transform .2s ease;
}
.license-option__wa:hover { background: rgba(16, 185, 129, .28); transform: scale(1.05); }
.license-option__wa svg { width: 1rem; height: 1rem; }

/* ---------- Product gallery full screen ---------- */
.gallery-main-wrap {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.gallery-main-wrap:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.gallery-main-wrap__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 8, 15, .55) 100%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.gallery-main-wrap:hover .gallery-main-wrap__overlay,
.gallery-main-wrap:focus-visible .gallery-main-wrap__overlay { opacity: 1; }
.gallery-main-wrap__badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .85rem;
  border-radius: 9999px;
  background: rgba(8, 8, 15, .72);
  border: 1px solid rgba(139, 92, 246, .45);
  color: #f8fafc;
  font-size: .75rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px -8px rgba(124, 58, 237, .5);
}
.gallery-main-wrap__badge svg { width: 1rem; height: 1rem; color: #a78bfa; }

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.gallery-lightbox.hidden { display: none; }
.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 15, .92);
  backdrop-filter: blur(12px);
}
.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.gallery-lightbox__close:hover {
  background: rgba(124, 58, 237, .35);
  transform: scale(1.05);
}
.gallery-lightbox__close svg { width: 1.25rem; height: 1.25rem; }
.gallery-lightbox__stage {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  animation: galleryLightboxIn .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes galleryLightboxIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
.gallery-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: .75rem;
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, .65);
  object-fit: contain;
}

/* ---------- License info modals ---------- */
.license-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 1rem; }
.license-modal.hidden { display: none; }
.license-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 8, 15, .72);
  backdrop-filter: blur(8px);
}
.license-modal__panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, .55);
  animation: licenseModalIn .32s cubic-bezier(.2, .8, .2, 1);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}
@keyframes licenseModalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.license-modal__head {
  position: relative;
  padding: 1.25rem 1.25rem 1.5rem;
  color: #fff;
}
.license-modal__head--regular {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 42%, #0891b2 100%);
}
.license-modal__head--extended {
  background: linear-gradient(135deg, #047857 0%, #059669 48%, #0d9488 100%);
}
.license-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .18);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.license-modal__badge svg { width: .75rem; height: .75rem; }
.license-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  transition: background .2s ease;
}
.license-modal__close:hover { background: rgba(255, 255, 255, .32); }
.license-modal__close svg { width: 1rem; height: 1rem; }
.license-modal__title {
  margin-top: .85rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.license-modal__subtitle {
  margin-top: .35rem;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, .82);
}
.license-modal__body {
  background: var(--surface);
  padding: 1.25rem;
  color: #e2e8f0;
}
.license-modal__alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem 1.125rem;
  border-radius: .75rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 0;
}
.license-modal__alert--deny {
  background: rgba(244, 63, 94, .12);
  border: 1px solid rgba(244, 63, 94, .35);
  color: #fb7185;
}
.license-modal__alert--allow {
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .35);
  color: #34d399;
}
.license-modal__alert svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.license-modal__body:has(.license-modal__cta) .license-modal__alert { margin-bottom: 1rem; }
.license-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand));
  color: #fff;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: .875rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 24px -12px rgba(124, 58, 237, .55);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.license-modal__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(124, 58, 237, .65);
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
}
.license-modal__cta svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.license-modal__note {
  margin-top: .75rem;
  text-align: center;
  font-size: .75rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .license-modal { align-items: center; }
}

/* =========================================================================
   LIGHT MODE
   Toggled by adding the `light` class to <html>. Dark is the default.
   Overrides flip page surfaces, borders and text; accent/gradient panels
   and solid accent buttons keep their colors so contrast stays correct.
   ========================================================================= */
html.light body { background: #f4f6fb; color: #1f2937; }

/* page + card surfaces */
html.light .bg-base { background-color: #f4f6fb !important; }
html.light .bg-base\/80 { background-color: rgba(244, 246, 251, .85) !important; }
html.light .bg-surface { background-color: #ffffff !important; }

/* custom components */
html.light .card { background: #ffffff; border-color: rgba(15, 23, 42, .08); }
html.light .card:hover { border-color: rgba(124, 58, 237, .4); box-shadow: 0 28px 56px -28px rgba(124, 58, 237, .28); }
html.light .glass { background: rgba(15, 23, 42, .03); border-color: rgba(15, 23, 42, .12); }
html.light .browser-bar { background: #eef1f6; }
html.light .code-window { background: #f4f6fb; border-color: rgba(15, 23, 42, .1); }
html.light .chip { background: rgba(15, 23, 42, .05); border-color: rgba(15, 23, 42, .12); color: #475569; }
html.light .sold-track { background: rgba(15, 23, 42, .08); }
html.light .site-header.scrolled { background: rgba(255, 255, 255, .85); box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .22); }

/* translucent white fills/borders -> dark-tinted */
html.light .bg-white\/5 { background-color: rgba(15, 23, 42, .04) !important; }
html.light .bg-white\/10 { background-color: rgba(15, 23, 42, .07) !important; }
html.light .border-white\/5 { border-color: rgba(15, 23, 42, .06) !important; }
html.light .border-white\/10 { border-color: rgba(15, 23, 42, .1) !important; }

/* muted text ramp */
html.light .text-slate-200 { color: #1e293b !important; }
html.light .text-slate-300 { color: #334155 !important; }
html.light .text-slate-400 { color: #475569 !important; }
html.light .text-slate-500 { color: #64748b !important; }
html.light .text-slate-600 { color: #94a3b8 !important; }

/* strong/white text -> near-black on the page */
html.light .text-white { color: #0f172a; }
html.light .hover\:text-white:hover { color: #0f172a; }

/* ...keep white where it sits on a colored/gradient/dark surface */
html.light .bg-mesh .text-white,
html.light [class*="bg-gradient-to"] .text-white,
html.light [class*="bg-gradient-to"].text-white,
html.light .bg-brand-700 .text-white,
html.light .bg-brand-600 .text-white,
html.light .bg-brand-500 .text-white { color: #fff; }
html.light .flash-section .text-white,
html.light .flash-section .flash-section__title,
html.light .flash-section .flash-section__link,
html.light .flash-section [data-countdown-to],
html.light .flash-section .text-white\/90,
html.light .flash-section .text-white\/75 { color: #fff !important; }
html.light .flash-section .text-white\/90 { color: rgba(255, 255, 255, .9) !important; }
html.light .flash-section .text-white\/75 { color: rgba(255, 255, 255, .75) !important; }

/* Checkout — earn points hint */
.checkout-earn-hint {
  border-radius: .75rem;
  background: rgba(245, 158, 11, .1);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, .28);
}
.checkout-earn-hint__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  color: rgba(254, 243, 199, .92);
}
.checkout-earn-hint__icon { color: #fcd34d; }
.checkout-earn-hint__pts { color: #fff; font-weight: 700; }
.checkout-earn-hint__meta { color: rgba(252, 211, 77, .85); }
html.light .checkout-earn-hint {
  background: #fffbeb;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .3);
}
html.light .checkout-earn-hint__inner { color: #92400e; }
html.light .checkout-earn-hint__icon { color: #d97706; }
html.light .checkout-earn-hint__pts { color: #78350f; }
html.light .checkout-earn-hint__meta { color: #b45309; }

/* Notice cards (account dashboard) */
.notice-card { color: #fff; }
.notice-card--brand   { background: linear-gradient(to bottom right, #7c3aed, #c026d3); }
.notice-card--cyan    { background: linear-gradient(to bottom right, #06b6d4, #2563eb); }
.notice-card--amber   { background: linear-gradient(to bottom right, #f59e0b, #ea580c); }
.notice-card--emerald { background: linear-gradient(to bottom right, #10b981, #0d9488); }
.notice-card--rose    { background: linear-gradient(to bottom right, #f43f5e, #db2777); }
.notice-card--slate   { background: linear-gradient(to bottom right, #334155, #0f172a); }
.notice-card__body { color: rgba(255, 255, 255, .9); }
html.light .notice-card,
html.light .notice-card .notice-card__title { color: #fff !important; }
html.light .notice-card .notice-card__body { color: rgba(255, 255, 255, .9) !important; }
html.light .notice-card .bg-white\/10 { background-color: rgba(255, 255, 255, .1) !important; }
html.light .notice-card .bg-white\/20 { background-color: rgba(255, 255, 255, .2) !important; }

/* ...but re-darken text inside light cards/glass that sit on accent panels */
html.light .card .text-white,
html.light .glass .text-white { color: #0f172a; }

/* ...solid accent buttons must always keep white text (highest priority) */
html.light .text-white.bg-brand-600,
html.light .text-white.bg-brand-500,
html.light .text-white.bg-brand-700 { color: #fff !important; }

/* accent text contrast on light */
html.light .text-brand-300, html.light .text-brand-400, html.light .hover\:text-brand-300:hover { color: #7c3aed !important; }
html.light .text-cyan-400, html.light .text-cyan-300 { color: #0891b2 !important; }
html.light .text-emerald-400, html.light .text-emerald-300 { color: #059669 !important; }

/* odd-ones-out */
#backToTop {
  background: var(--floating-action-bg);
  color: var(--floating-action-fg);
  box-shadow: var(--floating-action-shadow);
}
#backToTop:hover { background: var(--floating-action-hover-bg); }
html.light #toast { background: #0f172a !important; color: #fff !important; }

/* license blocks on light purchase card */
html.light .license-heading { color: #0f172a; }
html.light .license-option {
  background: #ffffff;
  border-color: rgba(15, 23, 42, .1);
}
html.light .license-option--regular {
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, .35);
  box-shadow: none;
}
html.light .license-option__title { color: #0f172a; }
html.light .license-option__desc { color: #64748b; }
html.light .license-option__link { color: #7c3aed; }
html.light .license-option__link:hover { color: #6d28d9; }

html.light .license-modal__body { background: #ffffff; }
html.light .license-modal__alert--deny {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}
html.light .license-modal__alert--allow {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}
html.light .license-modal__note { color: #64748b; }

/* ---------- Auth pages (login / register / forgot password) ---------- */
.auth-alert {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
}
.auth-alert--error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #fecdd3;
}
.auth-alert--success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #a7f3d0;
}
html.light .auth-alert--error {
  background: #fff1f2;
  border-color: #fecaca;
  color: #9f1239;
}
html.light .auth-alert--success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.password-field { position: relative; }
.password-field__toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #64748b;
  border-radius: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.password-field__toggle:hover,
.password-field__toggle:focus-visible {
  color: #475569;
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}
.password-field__toggle.is-visible {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.08);
}
.password-field__icon { grid-area: 1 / 1; }
.password-field__icon--hide { display: none; }
.password-field__toggle.is-visible .password-field__icon--show { display: none; }
.password-field__toggle.is-visible .password-field__icon--hide { display: block; }
html.light .password-field__toggle {
  color: #64748b;
  background: transparent;
  border-color: transparent;
}
html.light .password-field__toggle:hover,
html.light .password-field__toggle:focus-visible {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
  border-color: transparent;
}
html.light .password-field__toggle.is-visible {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border-color: transparent;
}

.auth-google-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  box-shadow: 0 10px 28px -16px rgba(0, 0, 0, 0.65);
}
.auth-google-btn:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(167, 139, 250, 0.45);
  color: #fff;
  box-shadow: 0 14px 32px -14px rgba(124, 58, 237, 0.45);
}
html.light .auth-google-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: #1e293b;
  box-shadow: 0 8px 22px -10px rgba(124, 58, 237, 0.28);
}
html.light .auth-google-btn:hover {
  background: linear-gradient(180deg, #faf5ff 0%, #f5f3ff 100%);
  border-color: rgba(124, 58, 237, 0.42);
  color: #5b21b6;
  box-shadow: 0 12px 28px -12px rgba(124, 58, 237, 0.35);
}

/* ---------- Floating chat (WhatsApp + Messenger) ---------- */
:root {
  --floating-action-right: 1.25rem;
  --floating-action-size: 3.5rem;
  --floating-action-gap: 0.75rem;
  --floating-action-bg: #fff;
  --floating-action-fg: #08080f;
  --floating-action-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --floating-action-hover-bg: #e2e8f0;
}
html.light {
  --floating-action-bg: #0f172a;
  --floating-action-fg: #fff;
  --floating-action-hover-bg: #1e293b;
}
.floating-chat {
  position: fixed;
  right: var(--floating-action-right);
  bottom: 1.125rem;
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
}
.floating-chat__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: scale(0.85) translateY(0.5rem);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.floating-chat__actions.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.floating-chat__btn,
.floating-chat__trigger {
  background: var(--floating-action-bg);
  color: var(--floating-action-fg);
  box-shadow: var(--floating-action-shadow);
  transition: transform .15s ease, background .15s ease;
}
.floating-chat__btn {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
}
.floating-chat__btn:hover,
.floating-chat__trigger:hover {
  transform: translateY(-2px);
  background: var(--floating-action-hover-bg);
}
.floating-chat__trigger {
  display: grid;
  place-items: center;
  width: var(--floating-action-size);
  height: var(--floating-action-size);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
}
.floating-chat__icon { grid-area: 1 / 1; }
.floating-chat__icon--close { display: none; }
.floating-chat__trigger[aria-expanded="true"] .floating-chat__icon--open { display: none; }
.floating-chat__trigger[aria-expanded="true"] .floating-chat__icon--close { display: block; }
body.has-floating-chat #backToTop {
  right: var(--floating-action-right);
  bottom: calc(1.125rem + var(--floating-action-size) + var(--floating-action-gap));
  width: var(--floating-action-size);
  height: var(--floating-action-size);
}
body.floating-chat-open #backToTop {
  opacity: 0;
  pointer-events: none;
}
@media (max-width: 480px) {
  :root {
    --floating-action-right: 1rem;
    --floating-action-size: 3.125rem;
  }
  .floating-chat { bottom: 0.625rem; }
  .floating-chat__btn { width: 2.625rem; height: 2.625rem; }
  .floating-chat__btn svg { width: 1.25rem; height: 1.25rem; }
  body.has-floating-chat #backToTop {
    bottom: calc(0.625rem + var(--floating-action-size) + var(--floating-action-gap));
  }
}
/* ---------- Live demo button (product page) ---------- */
.demo-live-btn--glow {
  position: relative;
  animation: demo-live-glow 2.2s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(34, 211, 238, .55),
    0 0 18px -2px rgba(34, 211, 238, .45);
}
.demo-live-btn--glow:hover {
  animation: none;
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, .22),
    0 0 24px -2px rgba(34, 211, 238, .55);
}
@keyframes demo-live-glow {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(34, 211, 238, .5),
      0 0 14px -2px rgba(34, 211, 238, .4);
    border-color: rgba(34, 211, 238, .45);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(34, 211, 238, 0),
      0 0 28px -2px rgba(34, 211, 238, .7);
    border-color: rgba(34, 211, 238, .85);
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo-live-btn--glow { animation: none; }
}
html.light .demo-live-btn--glow {
  box-shadow:
    0 0 0 0 rgba(8, 145, 178, .4),
    0 0 16px -2px rgba(8, 145, 178, .35);
}
html.light .demo-live-btn--glow:hover {
  box-shadow:
    0 0 0 3px rgba(8, 145, 178, .18),
    0 0 22px -2px rgba(8, 145, 178, .45);
}
@keyframes demo-live-glow-light {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(8, 145, 178, .35),
      0 0 12px -2px rgba(8, 145, 178, .3);
    border-color: rgba(8, 145, 178, .4);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(8, 145, 178, 0),
      0 0 24px -2px rgba(8, 145, 178, .55);
    border-color: rgba(8, 145, 178, .75);
  }
}
html.light .demo-live-btn--glow {
  animation-name: demo-live-glow-light;
}

/* ---------- Live demos page ---------- */
.demo-page__hero {
  background:
    radial-gradient(ellipse 80% 70% at 0% 0%, rgba(124, 58, 237, .18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(8, 145, 178, .12), transparent 50%),
    var(--surface);
}
.demo-page__hero:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, .07);
}
.demo-page__hero-grid {
  display: grid;
  gap: 0;
}
@media (min-width: 768px) {
  .demo-page__hero-grid {
    grid-template-columns: 240px 1fr;
    align-items: stretch;
  }
}
.demo-page__hero-media {
  background: rgba(255, 255, 255, .03);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  overflow: hidden;
}
@media (min-width: 768px) {
  .demo-page__hero-media {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, .07);
  }
}
.demo-page__hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
}
@media (min-width: 768px) {
  .demo-page__hero-img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 11rem;
  }
}
.demo-page__hero-body {
  padding: 1.25rem 1.25rem 1.35rem;
}
@media (min-width: 640px) {
  .demo-page__hero-body { padding: 1.5rem 1.75rem; }
}
.demo-page__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .65rem;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #22d3ee;
}
.demo-page__hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-top: 1.15rem;
}
.demo-page__back {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
  padding: .55rem 1rem;
  font-size: .8125rem;
  font-weight: 600;
  color: #cbd5e1;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.demo-page__back:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07);
}
.demo-page__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  background: #7c3aed;
  padding: .55rem 1.1rem;
  font-size: .8125rem;
  font-weight: 700;
  color: #fff;
  transition: background .15s ease;
}
.demo-page__cta:hover { background: #6d28d9; color: #fff; }

.demo-page__topics {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
.demo-page__separator {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.15rem;
}
.demo-page__separator-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .35), rgba(255, 255, 255, .08));
}
.demo-page__separator-line:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, .08), rgba(34, 211, 238, .35), transparent);
}
.demo-page__separator-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
  max-width: min(100%, 22rem);
  padding: .45rem .85rem .45rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(34, 211, 238, .28);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(124, 58, 237, .1));
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .05);
}
.demo-page__topic-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #67e8f9;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-page__topic-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .35rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, .2);
  color: #ecfeff;
  font-size: .6875rem;
  font-weight: 800;
  line-height: 1;
}

.demo-page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
}
@media (min-width: 640px) {
  .demo-page__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}
@media (min-width: 1024px) {
  .demo-page__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.demo-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, .08);
  background: var(--surface);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.demo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, .5);
  box-shadow: 0 24px 48px -24px rgba(124, 58, 237, .55);
}
.demo-card__chrome {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.demo-card__url {
  margin-left: .55rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .6875rem;
  color: #64748b;
}
.demo-card__body {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem .95rem 1.05rem;
}
.demo-card__initial {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: .75rem;
  background: linear-gradient(145deg, rgba(34, 211, 238, .18), rgba(124, 58, 237, .18));
  border: 1px solid rgba(34, 211, 238, .22);
  color: #22d3ee;
  font-weight: 800;
  font-size: .95rem;
}
.demo-card__text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.demo-card__name {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color .15s ease;
}
.demo-card:hover .demo-card__name { color: #c4b5fd; }
.demo-card__open {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  color: #22d3ee;
  opacity: .85;
  transition: opacity .15s ease, gap .15s ease;
}
.demo-card:hover .demo-card__open {
  opacity: 1;
  gap: .45rem;
}

html.light .demo-page__hero {
  background:
    radial-gradient(ellipse 80% 70% at 0% 0%, rgba(124, 58, 237, .1), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(8, 145, 178, .08), transparent 50%),
    #fff;
}
html.light .demo-page__hero:hover { border-color: rgba(15, 23, 42, .08); }
html.light .demo-page__hero-media {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, .08);
}
html.light .demo-page__eyebrow { color: #0891b2; }
html.light .demo-page__topic-title { color: #0e7490; }
html.light .demo-page__separator-line {
  background: linear-gradient(90deg, transparent, rgba(8, 145, 178, .3), rgba(15, 23, 42, .08));
}
html.light .demo-page__separator-line:last-child {
  background: linear-gradient(90deg, rgba(15, 23, 42, .08), rgba(8, 145, 178, .3), transparent);
}
html.light .demo-page__separator-label {
  border-color: rgba(8, 145, 178, .28);
  background: linear-gradient(135deg, rgba(8, 145, 178, .1), rgba(124, 58, 237, .06));
  box-shadow: 0 0 0 4px rgba(8, 145, 178, .04);
}
html.light .demo-page__topic-count {
  background: rgba(8, 145, 178, .15);
  color: #0e7490;
}
html.light .demo-page__back {
  border-color: rgba(15, 23, 42, .1);
  background: #f8fafc;
  color: #475569;
}
html.light .demo-page__back:hover {
  color: #0f172a;
  border-color: rgba(15, 23, 42, .18);
  background: #f1f5f9;
}
html.light .demo-card {
  background: #fff;
  border-color: rgba(15, 23, 42, .08);
}
html.light .demo-card:hover {
  border-color: rgba(124, 58, 237, .4);
  box-shadow: 0 24px 48px -28px rgba(124, 58, 237, .28);
}
html.light .demo-card__chrome { border-color: rgba(15, 23, 42, .06); }
html.light .demo-card__name { color: #0f172a; }
html.light .demo-card:hover .demo-card__name { color: #6d28d9; }
html.light .demo-card__open { color: #0891b2; }
html.light .demo-card__initial {
  color: #0891b2;
  border-color: rgba(8, 145, 178, .2);
  background: linear-gradient(145deg, rgba(8, 145, 178, .1), rgba(124, 58, 237, .08));
}

/* ---------- Theme toggle icon swap ---------- */
[data-theme-toggle] .theme-moon { display: none; }
html.light [data-theme-toggle] .theme-sun { display: none; }
html.light [data-theme-toggle] .theme-moon { display: inline-block; }

/* ---------- Light mode scrollbar ---------- */
html.light ::-webkit-scrollbar-track { background: #f1f5f9; }
html.light ::-webkit-scrollbar-thumb { background: #cbd5e1; border: 2px solid #f1f5f9; }
html.light ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
