/* ============================================
   PIXER — PREMIUM LIGHT DESIGN SYSTEM
   ============================================ */

@layer reset, tokens, base, components, utilities;

/* ============ RESET ============ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { font-family: var(--font-sans); }
  [hidden] { display: none !important; }
  img, svg, video { display: block; max-width: 100%; }
  button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
  a { color: inherit; text-decoration: none; }
  ul, ol { list-style: none; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
}

/* ============ TOKENS ============ */
@layer tokens {
  :root {
    /* Surfaces — warm-ivory, not sterile white */
    --bg:        #FBFAF7;
    --bg-soft:   #F5F2EC;
    --surface:   #FFFFFF;
    --ink:       #11151E;
    --ink-2:     #3F4756;
    --ink-3:     #6B7382;
    --ink-4:     #9CA3AF;
    --line:      rgba(17, 21, 30, 0.07);
    --line-2:    rgba(17, 21, 30, 0.12);

    /* Accent — refined coral, not pure orange */
    --accent:        #F25C2B;
    --accent-2:      #FF8E53;
    --accent-3:      #C5402F;
    --accent-soft:   rgba(242, 92, 43, 0.08);

    /* Editorial gradient stops in oklch — perceptually uniform */
    --grad-warm:  linear-gradient(135deg, oklch(76% 0.15 50) 0%, oklch(65% 0.20 35) 50%, oklch(52% 0.21 28) 100%);
    --grad-quiet: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 100%);
    --grad-text:  linear-gradient(96deg, #FF8E53 0%, #F25C2B 45%, #C5402F 100%);

    /* Typography */
    --font-sans:    'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif:   'Instrument Serif', 'Times New Roman', Georgia, serif;

    /* Type scale (fluid) */
    --t-display:  clamp(48px, 8vw, 124px);
    --t-h1:       clamp(40px, 6vw, 88px);
    --t-h2:       clamp(34px, 5vw, 64px);
    --t-h3:       clamp(20px, 2.2vw, 26px);
    --t-lead:     clamp(17px, 1.4vw, 20px);
    --t-body:     16px;

    /* Spacing — generous, premium */
    --space-section: clamp(80px, 10vw, 160px);

    /* Radii */
    --r-xs: 8px;
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 24px;
    --r-xl: 32px;

    /* Shadows — multi-layer, warm */
    --shadow-1: 0 1px 2px rgba(17, 21, 30, 0.04), 0 1px 3px rgba(17, 21, 30, 0.06);
    --shadow-2: 0 4px 12px -2px rgba(17, 21, 30, 0.06), 0 12px 28px -8px rgba(17, 21, 30, 0.10);
    --shadow-3: 0 12px 32px -6px rgba(17, 21, 30, 0.10), 0 24px 64px -16px rgba(17, 21, 30, 0.16);
    --shadow-glow: 0 12px 40px -8px rgba(242, 92, 43, 0.35);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-fast: 200ms;
    --dur-base: 400ms;
    --dur-slow: 700ms;
  }
}

/* ============ BASE ============ */
@layer base {
  body {
    background: var(--bg);
    color: var(--ink);
    font-size: var(--t-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
  }

  /* Subtle paper-grain noise across the whole page */
  .noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.08 0 0 0 0 0.10 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 240px;
  }

  /* Editorial color orbs in background */
  .orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
  }
  .orb-1 {
    top: -10%; right: -8%;
    width: 540px; height: 540px;
    background: radial-gradient(circle at 35% 35%, #FFD9A5 0%, #FFB783 35%, transparent 70%);
  }
  .orb-2 {
    top: 38%; left: -12%;
    width: 480px; height: 480px;
    background: radial-gradient(circle at 50% 50%, #FFCFCF 0%, #F8B8A0 40%, transparent 75%);
    opacity: 0.4;
  }

  .container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 2;
  }

  /* Editorial text gradient — green variant for positive metrics */
  .grad-green {
    background: linear-gradient(96deg, #4ADE80, #16A34A 45%, #15803D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 200% 100%;
    animation: gradient-flow 8s ease-in-out infinite;
  }

  /* Editorial text gradient */
  .grad {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 200% 100%;
    animation: gradient-flow 8s ease-in-out infinite;
  }
  @keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
  }

  /* Reveal-on-scroll baseline (GSAP enhances) */
  [data-reveal], [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(24px);
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-2);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: var(--shadow-1);
  }

  .section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .section-head h2 {
    font-size: var(--t-h2);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
  }
  .section-head .lead {
    font-size: var(--t-lead);
    color: var(--ink-3);
    max-width: 580px;
  }
}

/* ============ COMPONENTS ============ */

/* — BUTTONS — */
@layer components {
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    transition: transform var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out),
                background var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out);
    will-change: transform;
  }
  .btn-lg { padding: 16px 28px; font-size: 15px; }
  .btn-block { display: flex; width: 100%; }
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0) scale(0.985); }

  .btn-primary {
    background: var(--ink);
    color: var(--bg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.18), 0 8px 20px -4px rgba(17, 21, 30, 0.25);
  }
  .btn-primary:hover {
    background: #000;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 14px 32px -6px rgba(17, 21, 30, 0.35);
  }
  .btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-2);
    box-shadow: var(--shadow-1);
  }
  .btn-secondary:hover {
    border-color: var(--ink);
    box-shadow: var(--shadow-2);
  }
  .btn-ghost {
    color: var(--ink-2);
  }
  .btn-ghost:hover {
    color: var(--ink);
    background: var(--bg-soft);
  }

  .link-quiet {
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--dur-fast) var(--ease-out);
  }
  .link-quiet:hover { color: var(--ink); }
}

/* — NAV — */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(251, 250, 247, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.nav.scrolled { border-color: var(--line); background: rgba(251, 250, 247, 0.9); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.logo-mark {
  display: inline-block;
  color: var(--ink); /* drives bracket stroke via currentColor */
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-links a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur-fast);
}

/* — HERO (centered, side-by-side demo) — */
.hero {
  padding: clamp(40px, 5vw, 72px) 0 clamp(72px, 7vw, 112px);
  position: relative;
  text-align: center;
}
.hero-center .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 28px;
  box-shadow: var(--shadow-1);
}
/* Variant: when the eyebrow sits AFTER the CTA, tighten it down */
.hero-eyebrow-after-cta {
  margin: 6px 0 36px;
  font-size: 12.5px;
  padding: 7px 14px;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  position: relative;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.35);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.6); opacity: 0; }
}

.hero-title {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  max-width: none; /* let the title use the full container; we control wrap below */
  text-wrap: balance;
}
.hero-title .line { display: block; }
@media (min-width: 720px) {
  /* On desktop, honor the explicit line breaks in HTML — never auto-wrap. */
  .hero-title .line { white-space: nowrap; }
}

.hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-3);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 0 56px;
}

/* ─── BEFORE/AFTER DEMO ─── */
.ba-demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  width: 100%;
  max-width: 1100px;
  margin: 0 0 48px;
}

.ba-side {
  position: relative;
  display: flex;
  flex-direction: column;
}
.ba-frame {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.ba-frame:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3), 0 24px 48px -16px rgba(17,21,30,0.18);
}
.ba-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s var(--ease-out), transform 1.2s var(--ease-out);
  will-change: opacity, transform;
}
.ba-photo.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}
/* after-skirt: shift image right so left-side infographic text isn't cropped */
.ba-photo[src*="after-skirt"] {
  object-position: 20% 50%;
}

/* Carousel pagination dots — span the full demo width, centered below */
.ba-dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
.bc-dot {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-2);
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background var(--dur-fast) var(--ease-out);
}
.bc-dot:hover { background: var(--ink-3); }
.bc-dot.is-active {
  background: var(--line-2);
}
.bc-dot.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-text);
  border-radius: inherit;
  transform-origin: left;
  animation: bc-progress var(--bc-dur, 5000ms) linear forwards;
}
@keyframes bc-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Headers row — pills/badges sit ABOVE each frame, not on the photo */
.ba-headers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 28px;
}
.ba-side-before .ba-headers { justify-content: flex-start; }

/* Step pill — circled number + bold label, used for "1 Drop your photo" / "2 Get a stunning listing image" */
.ba-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(17, 21, 30, 0.04);
}
.ba-pill-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
/* When the step pill is a link (step 1) — adds hover affordance */
.ba-pill-link {
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.ba-pill-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(17, 21, 30, 0.15);
}
.ba-pill-link:hover .ba-pill-num {
  background: var(--accent);
}

/* "After" frame — premium glow + soft warm spotlight */
.ba-side-after {
  position: relative;
}
.ba-side-after::before {
  /* Warm radial spotlight that bleeds out behind the "after" frame */
  content: "";
  position: absolute;
  inset: -10% -8%;
  background: radial-gradient(ellipse 70% 60% at 50% 55%,
              rgba(255, 153, 80, 0.32) 0%,
              rgba(255, 153, 80, 0.10) 40%,
              transparent 75%);
  z-index: -1;
  filter: blur(10px);
  pointer-events: none;
}
.ba-side-after .ba-frame {
  box-shadow: var(--shadow-3),
              0 24px 56px -12px rgba(242, 92, 43, 0.28);
  border-color: rgba(242, 92, 43, 0.2);
}

/* Conversion-lift stat pill — same family as the step pill, but bigger,
   using the semantic "positive metric" color (deep emerald) instead of brand coral.
   Green is universal UI shorthand for growth — readers parse it before reading the number.
   Scoped here only; brand coral remains the primary accent everywhere else. */
.ba-lift-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 18px 8px 14px;
  border-radius: 999px;
  line-height: 1;
  box-shadow:
    0 1px 2px rgba(17, 21, 30, 0.04),
    0 6px 18px -4px rgba(4, 120, 87, 0.22);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.ba-lift-badge:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 2px rgba(17, 21, 30, 0.04),
    0 12px 28px -6px rgba(4, 120, 87, 0.32);
}
.ba-lift-icon {
  display: inline-flex;
  align-items: center;
  color: #047857;
  flex-shrink: 0;
}
.ba-lift-num {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(96deg, #10B981 0%, #047857 55%, #064E3B 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 8s ease-in-out infinite;
}
.ba-lift-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}

/* Arrow in the middle. Photos have a header pill row above them (~40px),
   so push the arrow down by half that to visually center it on the photo itself.
   Also acts as a button — clicking advances the carousel to the next pair. */
.ba-arrow {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transform: translateY(20px);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.3s var(--ease-out), filter var(--dur-fast) var(--ease-out);
}
.ba-arrow:hover {
  transform: translateY(20px) scale(1.08);
  filter: drop-shadow(0 8px 16px rgba(17,21,30,0.25));
}
.ba-arrow:active {
  transform: translateY(20px) scale(0.96);
}
.ba-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.ba-arrow svg {
  filter: drop-shadow(0 6px 14px rgba(17,21,30,0.18));
  animation: arrow-pulse 3.6s ease-in-out infinite;
}
@keyframes arrow-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
/* Image-load failure fallback — keep layout stable */
.ba-frame.img-fail {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #FAF7F1, #ECE6DA);
  color: var(--ink-3);
  font-size: 14px;
  font-style: italic;
}
.ba-frame.img-fail .ba-photo { display: none; }
.ba-side-before .ba-frame.img-fail::before {
  content: "Drop your raw photo here";
}
.ba-side-after .ba-frame.img-fail::before {
  content: "Studio-grade output";
}

/* ─── SINGLE CTA ─── */
.hero-main-cta {
  margin-bottom: 10px;
  font-size: 16px;
  padding: 16px 28px;
}
.hero-cta-micro {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-bottom: 24px;
  letter-spacing: -0.005em;
}

/* ─── Avatar stack in eyebrow (replaces single pulse dot) ─── */
.avatars-stack {
  display: inline-flex;
  align-items: center;
}
.avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  margin-left: -6px;
  position: relative;
  z-index: 1;
}
.avatar:first-child { margin-left: 0; }
.av-1 { background: linear-gradient(135deg, #F59E0B, #EA580C); z-index: 4; }
.av-2 { background: linear-gradient(135deg, #8B5CF6, #6366F1); z-index: 3; }
.av-3 { background: linear-gradient(135deg, #10B981, #059669); z-index: 2; }
.av-4 { background: linear-gradient(135deg, #EC4899, #DB2777); z-index: 1; }

/* ─── 4-FEATURE ROW ─── */
.hero-feats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 3vw, 40px);
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
}
.hero-feats li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.feat-ic {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* ============================================
   STORY (right side) — 3-stage cinematic loop
   ============================================ */
.hero-right {
  position: relative;
  perspective: 1400px;
}

.story {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  isolation: isolate;
}
.story::before {
  /* gentle ambient highlight */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 30%);
  pointer-events: none;
}

.stage {
  position: relative;
  aspect-ratio: 1.05 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #FAF7F1 0%, #F2EDE3 100%);
  display: grid;
  place-items: center;
}
.stage:not(.stage-1) {
  position: absolute;
  inset: 22px;
  inset-block-end: auto;
  height: auto;
  pointer-events: none;
}
.story[data-stage] .stage {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
  transform: scale(1.02);
}
.story[data-stage="1"] .stage-1,
.story[data-stage="2"] .stage-2,
.story[data-stage="3"] .stage-3 {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}

/* === STAGE 1 — DROPZONE === */
.dropzone {
  position: relative;
  width: 88%;
  height: 86%;
  border: 2px dashed rgba(242, 92, 43, 0.4);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 200, 150, 0.4), transparent 65%),
    var(--bg-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px;
}
.dz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 380px;
}
.dz-photo {
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 8px 8px 10px;
  box-shadow: var(--shadow-2);
  transform-origin: center bottom;
  animation: dz-drop 1.2s var(--ease-out) backwards;
}
.story[data-stage="1"] .dz-photo-1 { animation-delay: 0.1s; transform: rotate(-6deg); }
.story[data-stage="1"] .dz-photo-2 { animation-delay: 0.3s; transform: rotate(2deg) translateY(-10px); }
.story[data-stage="1"] .dz-photo-3 { animation-delay: 0.5s; transform: rotate(5deg); }
@keyframes dz-drop {
  0% { opacity: 0; transform: translateY(-50px) rotate(0); }
  60% { opacity: 1; }
  100% { opacity: 1; }
}
.dz-img {
  aspect-ratio: 1;
  border-radius: 6px;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}
.dz-img-1 {
  background:
    radial-gradient(ellipse at 30% 70%, rgba(0,0,0,0.4), transparent 60%),
    linear-gradient(160deg, #5A4D3F 0%, #322820 100%);
}
.dz-img-1::after {
  content: "";
  position: absolute;
  left: 30%; top: 35%;
  width: 45%; height: 50%;
  background: linear-gradient(160deg, #B85F22, #6F2F0E);
  border-radius: 8px;
  transform: rotate(-5deg);
  filter: blur(0.5px);
}
.dz-img-2 {
  background:
    radial-gradient(ellipse at 60% 30%, rgba(255,200,100,0.18), transparent 60%),
    linear-gradient(180deg, #4D453A 0%, #2C2620 100%);
}
.dz-img-2::after {
  content: "";
  position: absolute;
  left: 25%; top: 30%;
  width: 50%; height: 55%;
  background: linear-gradient(160deg, #C26E2C, #7A330F);
  border-radius: 10px 10px 14px 14px;
  transform: rotate(3deg);
  filter: blur(0.4px);
}
.dz-img-3 {
  background:
    radial-gradient(ellipse at 80% 80%, rgba(150,100,60,0.18), transparent 50%),
    linear-gradient(160deg, #3F3528 0%, #221C14 100%);
}
.dz-img-3::after {
  content: "";
  position: absolute;
  left: 28%; top: 32%;
  width: 48%; height: 52%;
  background: linear-gradient(160deg, #A35820, #5C2807);
  border-radius: 10px;
  transform: rotate(-3deg);
  filter: blur(0.6px);
}
.dz-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--ink-3);
  font-family: ui-monospace, 'SF Mono', monospace;
  letter-spacing: -0.01em;
}
.dz-size { color: var(--ink-4); }

.dz-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  animation: dz-bounce 1.6s var(--ease-out) infinite;
}
@keyframes dz-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.dz-hint {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

/* === STAGE 2 — TRANSFORM === */
.transform-wrap {
  position: relative;
  width: 90%;
  height: 88%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.t-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 420px;
}
.t-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #F4F1EA 100%);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
  animation: t-pop 0.7s var(--ease-out) backwards;
}
.story[data-stage="2"] .t-tile-1 { animation-delay: 0.1s; }
.story[data-stage="2"] .t-tile-2 { animation-delay: 0.3s; }
.story[data-stage="2"] .t-tile-3 { animation-delay: 0.5s; }
@keyframes t-pop {
  0% { opacity: 0; transform: scale(0.85) translateY(20px); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
.t-tile-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(0,0,0,0.06), transparent 60%);
}
.t-tile-prod {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56%;
  height: 64%;
  transform: translate(-50%, -50%);
  border-radius: 16% 16% 32% 32%;
  box-shadow:
    inset 0 -12px 18px rgba(0,0,0,0.18),
    inset 6px 4px 12px rgba(255,255,255,0.3),
    0 6px 14px rgba(245, 92, 43, 0.18);
}
.t-prod-1 {
  background: linear-gradient(160deg, #FFB783 0%, #F25C2B 50%, #963A1F 100%);
}
.t-prod-2 {
  background: linear-gradient(150deg, #FFD9A5 0%, #FF9A4D 55%, #B85B22 100%);
  border-radius: 18% 18% 30% 30%;
}
.t-prod-3 {
  background: linear-gradient(170deg, #FFC68A 0%, #E0561F 50%, #8C2E15 100%);
  border-radius: 14% 14% 36% 36%;
}
.t-tile-shadow {
  position: absolute;
  bottom: 14%;
  left: 50%;
  width: 50%;
  height: 5%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0,0,0,0.25), transparent 70%);
  filter: blur(5px);
}

/* AI scan-line passing through */
.t-scan {
  position: absolute;
  top: 0;
  left: -10%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 142, 83, 0.45), transparent);
  filter: blur(20px);
  z-index: 10;
  animation: t-scan-sweep 2.4s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes t-scan-sweep {
  0%   { left: -20%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

.t-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.spk {
  position: absolute;
  color: var(--accent);
  font-size: 16px;
  opacity: 0;
  animation: spk-twinkle 2.4s var(--ease-out) infinite;
}
.spk-1 { top: 18%; left: 22%; animation-delay: 0.2s; font-size: 12px; }
.spk-2 { top: 12%; right: 28%; animation-delay: 0.6s; }
.spk-3 { bottom: 20%; left: 18%; animation-delay: 0.9s; font-size: 14px; }
.spk-4 { bottom: 28%; right: 22%; animation-delay: 1.2s; font-size: 18px; }
.spk-5 { top: 50%; left: 50%; animation-delay: 1.5s; font-size: 10px; }
@keyframes spk-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1.2); }
}

.t-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  box-shadow: var(--shadow-2);
}
.t-badge-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(242, 92, 43, 0.2);
  border-top-color: var(--accent);
  animation: t-spin 0.8s linear infinite;
}
@keyframes t-spin {
  to { transform: rotate(360deg); }
}

/* === STAGE 3 — LIVE LISTING + +40% === */
.live-listing {
  width: 92%;
  height: 88%;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
  align-items: center;
}
.ll-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ll-hero-img {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #F4F1EA 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
/* Reuse old .prod-* shapes inside ll-hero-img */
.ll-hero-img .prod-glow {
  position: absolute; left: 50%; top: 50%; width: 70%; height: 70%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,200,150,0.45), transparent 70%);
  filter: blur(20px);
}
.ll-hero-img .prod-shape {
  position: absolute; left: 50%; top: 50%; width: 56%; height: 64%;
  transform: translate(-50%, -50%);
  background: linear-gradient(160deg, #FFB783 0%, #F25C2B 50%, #963A1F 100%);
  border-radius: 14% 14% 32% 32%;
  box-shadow:
    inset 0 -16px 24px rgba(0,0,0,0.18),
    inset 6px 4px 12px rgba(255,255,255,0.25),
    0 6px 14px rgba(245, 92, 43, 0.18);
}
.ll-hero-img .prod-rim {
  position: absolute; left: 50%; top: 26%; width: 56%; height: 7%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(255,255,255,0.45), transparent);
  border-radius: 50% 50% 12% 12% / 60% 60% 12% 12%;
}
.ll-hero-img .prod-shadow {
  position: absolute; left: 50%; bottom: 16%; width: 50%; height: 5%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0,0,0,0.25), transparent 70%);
  filter: blur(6px);
}
.ll-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.ll-thumb {
  aspect-ratio: 1;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #F4F1EA);
  border: 1px solid var(--line);
  position: relative;
}
.ll-thumb::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 50%; height: 55%;
  transform: translate(-50%, -50%);
  background: linear-gradient(160deg, #FFB783, #F25C2B 60%, #C5402F);
  border-radius: 16% 16% 30% 30%;
  box-shadow: inset 0 -4px 6px rgba(0,0,0,0.18);
}
.ll-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.ll-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  position: relative;
}
.ll-stars {
  font-size: 13px;
  color: #F59E0B;
  letter-spacing: 0.04em;
}
.ll-stars span {
  color: var(--ink-3);
  font-size: 11px;
  margin-left: 6px;
  letter-spacing: 0;
}
.ll-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.ll-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.ll-price {
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 700;
}
.ll-cur { color: var(--ink-3); font-size: 13px; }
.ll-amt { font-size: 26px; letter-spacing: -0.03em; }
.ll-cents { color: var(--ink-3); font-size: 12px; }
.ll-prime {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563EB;
  background: #DBEAFE;
  padding: 2px 6px;
  border-radius: 3px;
}
.ll-buy {
  display: inline-block;
  background: linear-gradient(180deg, #FFD27A, #F0AD2A);
  color: #1A1306;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #C28A1B;
  width: fit-content;
  margin-top: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.1);
}

/* Conversion chart */
.ll-chart {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-2);
  position: relative;
  animation: ll-chart-in 0.9s var(--ease-out) backwards;
  animation-delay: 0.5s;
}
.story[data-stage="3"] .ll-chart { animation-play-state: running; }
@keyframes ll-chart-in {
  0% { opacity: 0; transform: translateY(12px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.ll-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.ll-chart-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ll-chart-pct {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ll-chart-svg {
  width: 100%;
  height: 36px;
  margin: 4px 0;
  overflow: visible;
}
.story[data-stage="3"] .chart-line {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: chart-draw 1.6s var(--ease-out) forwards;
  animation-delay: 0.7s;
}
@keyframes chart-draw {
  to { stroke-dashoffset: 0; }
}
.story[data-stage="3"] .chart-area {
  opacity: 0;
  animation: chart-fill 0.6s var(--ease-out) forwards;
  animation-delay: 2.1s;
}
@keyframes chart-fill { to { opacity: 1; } }
.story[data-stage="3"] .chart-dot {
  opacity: 0;
  animation: chart-dot-in 0.4s var(--ease-out) forwards;
  animation-delay: 2.2s;
}
@keyframes chart-dot-in { to { opacity: 1; } }
.chart-dot-pulse {
  animation: chart-dot-pulse 1.6s ease-in-out infinite;
  transform-origin: 200px 4px;
  transform-box: fill-box;
}
@keyframes chart-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(2.2); opacity: 0; }
}
.ll-chart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
}
.ll-chart-trend {
  font-weight: 700;
  color: #047857;
}
.ll-chart-period { color: var(--ink-4); }

/* === STORY NAV === */
.story-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
}
.sn-btn {
  padding: 0;
  cursor: pointer;
  background: none;
  border: 0;
  text-align: left;
  position: relative;
}
.sn-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: all var(--dur-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.sn-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  flex-shrink: 0;
  line-height: 1;
}
.sn-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  line-height: 1.2;
}
.sn-btn.active .sn-pill {
  background: var(--surface);
  border-color: var(--line-2);
  box-shadow: var(--shadow-2);
}
.sn-btn.active .sn-num {
  color: var(--accent);
}
.sn-btn.active .sn-label {
  color: var(--ink);
}
.sn-btn:hover .sn-pill {
  background: var(--surface);
}
/* progress fill bar */
.sn-btn.active .sn-pill::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--grad-text);
  animation: sn-progress 4s linear forwards;
}
@keyframes sn-progress { to { width: 100%; } }


/* — MARQUEE — */
.marquee-section {
  padding: 56px 0;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 2;
}
.marquee-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.marquee {
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 28px;
  padding-left: 28px;
  white-space: nowrap;
  animation: marquee 50s linear infinite;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.marquee-track span:nth-child(even) { color: var(--ink-4); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* — BIG STAT — */
.big-stat {
  padding: var(--space-section) 0;
}
.big-stat-inner {
  text-align: center;
  max-width: 980px;
}
.big-stat-eye {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-1);
}
.big-stat-h {
  font-size: var(--t-h1);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.big-stat-h .line { display: block; }
.big-stat-h sup { font-size: 0.5em; vertical-align: super; color: var(--ink-3); }
.big-stat-foot {
  margin-top: 36px;
  font-size: 14px;
  color: var(--ink-3);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* — STAT CHART — */
.stat-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 48px;
}
.stat-chart-cols {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}
.stat-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.stat-bar-wrap {
  height: 160px;
  display: flex;
  align-items: flex-end;
}
.stat-bar {
  width: 80px;
  border-radius: 10px 10px 0 0;
  position: relative;
  height: 0;
}
.stat-bar--before {
  background: rgba(17, 21, 30, 0.1);
}
.stat-bar--after {
  background: linear-gradient(180deg, #4ADE80 0%, #16A34A 100%);
  box-shadow:
    0 -4px 16px -4px rgba(22, 163, 74, 0.35),
    0 0 0 1px rgba(22, 163, 74, 0.15);
}
.stat-bar-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat-bar-label em {
  font-style: italic;
  font-family: 'Instrument Serif', serif;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.stat-bar-delta {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(22, 163, 74, 0.1);
  color: #15803D;
  border: 1px solid rgba(22, 163, 74, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0;
}
.stat-chart-axis {
  width: 200px;
  height: 1px;
  background: rgba(17, 21, 30, 0.1);
  margin-top: 0;
}

/* — BENTO — */
.bento {
  padding: var(--space-section) 0;
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.b-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.b-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.b-large {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.b-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--ink);
  margin-bottom: 18px;
}
.b-icon-hero {
  background: linear-gradient(135deg, #FFB783, #F25C2B);
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
}
.b-card h3 {
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.b-card p {
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.55;
}

.b-visual {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #FFF6EE 0%, #FFEDD8 100%);
  overflow: hidden;
}
.hero-tile,
.hero-tile-2,
.hero-tile-3 {
  position: absolute;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.hero-tile {
  width: 50%;
  height: 75%;
  top: 12%;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background:
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(0,0,0,0.05), transparent 50%),
    linear-gradient(180deg, #fff 0%, #F4F1EA 100%);
}
.hero-tile::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  height: 60%;
  transform: translate(-50%, -50%);
  background: linear-gradient(160deg, #FFB783, #F25C2B 60%, #C5402F);
  border-radius: 18% 18% 30% 30%;
  box-shadow: inset 0 -8px 12px rgba(0,0,0,0.16);
}
.hero-tile-2 {
  width: 38%;
  height: 60%;
  top: 22%;
  left: 8%;
  transform: rotate(-8deg);
  opacity: 0.55;
  background: linear-gradient(180deg, #fff, #F4F1EA);
}
.hero-tile-3 {
  width: 38%;
  height: 60%;
  top: 22%;
  right: 8%;
  transform: rotate(8deg);
  opacity: 0.55;
  background: linear-gradient(180deg, #fff, #F4F1EA);
}

.b-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.chip {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
}

.b-swatch-row {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}
.sw {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-1);
}

/* — HOW — */
.how {
  padding: var(--space-section) 0;
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}
.step::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
.step:hover::after { transform: scaleX(1); }
.step-num {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--ink);
  margin-bottom: 24px;
  font-style: italic;
}
.step h3 {
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.step p {
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.55;
}

/* — AMAZON — */
.amazon { padding: var(--space-section) 0; }
.amazon-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: start;
}
.amazon-copy h2 {
  font-size: var(--t-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 24px 0 24px;
}
.amazon-copy h2 .line { display: block; }
.amazon-copy .lead {
  color: var(--ink-3);
  font-size: var(--t-lead);
  line-height: 1.55;
  margin-bottom: 36px;
  max-width: 540px;
}
.amazon-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}
.amazon-list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}
.amazon-list li:last-child { border-bottom: 1px solid var(--line); }
.amazon-list strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.comply {
  position: sticky;
  top: 100px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-2);
}
.comply-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.comply-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: #047857;
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.comply-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  position: relative;
}
.comply-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.3);
  animation: pulse 2.4s ease-in-out infinite;
}
.comply-asin {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 12px;
  color: var(--ink-3);
}
.comply-list { display: flex; flex-direction: column; gap: 14px; }
.comply-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
}
.ck {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34D399, #059669);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.comply-foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

/* — TESTIMONIALS — */
.t-section {
  padding: var(--space-section) 0;
}
.t-marquee {
  overflow: hidden;
  margin-top: 48px;
  -webkit-mask: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
          mask: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}
.t-track {
  display: inline-flex;
  gap: 24px;
  padding-left: 24px;
  animation: t-scroll 60s linear infinite;
}
.t-track:hover { animation-play-state: paused; }
@keyframes t-scroll {
  to { transform: translateX(-50%); }
}
.t-card {
  flex-shrink: 0;
  width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-1);
}
.t-rating {
  font-size: 14px;
  color: #F59E0B;
  letter-spacing: 0.08em;
}
.t-card blockquote {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.t-card figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
}
.t-card figcaption div {
  display: flex;
  flex-direction: column;
}
.t-card figcaption strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.t-card figcaption span {
  font-size: 12px;
  color: var(--ink-3);
}
.t-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.t-av-1 { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.t-av-2 { background: linear-gradient(135deg, #8B5CF6, #6366F1); }
.t-av-3 { background: linear-gradient(135deg, #10B981, #059669); }
.t-av-4 { background: linear-gradient(135deg, #EC4899, #DB2777); }
.t-av-5 { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.t-av-6 { background: linear-gradient(135deg, #F43F5E, #E11D48); }

/* — PRICING — */
.pricing {
  padding: var(--space-section) 0;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

/* — Billing toggle — */
/* — Pricing mode switcher — */
.pricing-mode {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 20px;
}
.pricing-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.pricing-mode-btn:hover { color: var(--ink); }
.pricing-mode-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.pricing-mode-btn svg { opacity: 0.6; }
.pricing-mode-btn.is-active svg { opacity: 1; }

/* Pack cards use same .plan layout, small overrides */
.pack .plan-credits { border-top: 1px solid var(--line); padding-top: 14px; }

/* Transition between grids */
#plansGrid, #topupGrid {
  transition: opacity 0.2s var(--ease-out);
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.billing-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  transition: color var(--dur-base);
}
.billing-label.active { color: var(--ink); }
.billing-save {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 5px;
  vertical-align: middle;
}
.billing-switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: background var(--dur-base), border-color var(--dur-base);
  flex-shrink: 0;
}
.billing-switch.on {
  background: var(--ink);
  border-color: var(--ink);
}
.billing-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base);
}
.billing-switch.on .billing-knob {
  transform: translateX(20px);
  background: var(--bg);
}
.plan-price .amt {
  transition: opacity 0.15s;
}
.plan-price .amt.switching {
  opacity: 0;
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.plan {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  transition: transform var(--dur-base) var(--ease-out);
}
.plan-feat {
  background:
    linear-gradient(180deg, rgba(255, 142, 83, 0.05), transparent 40%),
    var(--bg);
  border: 0;
  position: relative;
  transform: translateY(-12px);
  box-shadow: var(--shadow-3), 0 0 0 1.5px transparent;
}
.plan-feat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  padding: 1.5px;
  background: var(--grad-text);
  -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;
}
.plan-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan header { display: flex; flex-direction: column; gap: 12px; }
.plan-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plan-price .dol { font-size: 24px; color: var(--ink-3); font-weight: 600; }
.plan-price .amt {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.plan-price .per { color: var(--ink-3); font-size: 16px; margin-left: 6px; }
.plan-credits {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
  padding: 10px 0;
  border-block: 1px solid var(--line);
  border-bottom: 0;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
}
.plan ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding-top: 4px;
}
.plan ul li {
  font-size: 14.5px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 22px;
  position: relative;
}
.plan ul li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34D399, #059669);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5L4 7L8 3' stroke='white' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #34D399, #059669);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 70%, cover;
}
.plan ul li.muted {
  color: var(--ink-4);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.2);
}
.plan ul li.muted::before {
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  background-image: none;
}

/* — Pack cards (pay as you go grid) — */
.pack-qty {
  font-size: 13px;
  color: var(--ink-3);
}

/* — FAQ — */
.faq { padding: var(--space-section) 0; }
.faq-inner { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.faq-item:hover { border-color: var(--line-2); }
.faq-item[open] {
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 26px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  letter-spacing: -0.005em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 14px;
  height: 14px;
  background-image:
    linear-gradient(var(--ink), var(--ink)),
    linear-gradient(var(--ink), var(--ink));
  background-size: 14px 1.5px, 1.5px 14px;
  background-position: center, center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  background-size: 14px 1.5px, 0 0;
}
.faq-item p {
  padding: 0 26px 24px;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.65;
}

/* — FINAL CTA — */
.cta-final {
  padding: var(--space-section) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 142, 83, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(245, 92, 43, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.cta-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.cta-final h2 {
  font-size: var(--t-h1);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-final h2 .line { display: block; }
.cta-final p {
  font-size: var(--t-lead);
  color: var(--ink-3);
  margin-bottom: 36px;
}
.cta-buttons {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* — FOOTER — */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-brand p {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 14px;
  max-width: 280px;
  line-height: 1.5;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-cols h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.footer-cols a {
  display: block;
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 5px 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-cols a:hover { color: var(--ink); }
.footer-fine {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.dis { max-width: 720px; line-height: 1.5; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .nav-links, .nav-cta .link-quiet { display: none; }
  .nav-toggle { display: flex; }
  .ba-demo { gap: 16px; }
  .ba-arrow svg { width: 36px; height: 36px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .b-large { grid-column: span 2; grid-row: span 1; }
  .steps { grid-template-columns: 1fr; }
  .amazon-inner { grid-template-columns: 1fr; gap: 48px; }
  .amazon-list li { grid-template-columns: 1fr; gap: 8px; }
  .plans { grid-template-columns: 1fr; }
  .plan-feat { transform: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 700px) {
  /* Stack before/after vertically on mobile, rotate the arrow */
  .ba-demo {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ba-arrow svg { transform: rotate(90deg); }
  .ba-frame { aspect-ratio: 16/11; }
  .hero-feats { gap: 14px 24px; font-size: 13px; }
}
@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .hero-main-cta { width: 100%; }
  .bento-grid { grid-template-columns: 1fr; }
  .b-large { grid-column: span 1; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .t-card { width: 300px; }
}

/* ============ MOTION SAFEGUARD ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; }
}

/* ============================================================
   APP PAGE — /upload.html (drop zone, style picker, sign-in modal)
   ============================================================ */

.page-app {
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(255, 200, 150, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 90%, rgba(255, 180, 160, 0.16), transparent 65%),
    var(--bg);
  min-height: 100vh;
}

/* — App nav — */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(251, 250, 247, 0.85);
  border-bottom: 1px solid var(--line);
}
.app-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.app-nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
  line-height: 1;
}
.credit-pill strong { color: var(--ink); font-weight: 700; }
.credit-pill .cp-label { color: var(--ink-3); }
.cp-spark {
  font-size: 14px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

/* — App main — */
.app-main {
  padding: clamp(20px, 2vw, 32px) 0 clamp(56px, 6vw, 96px);
  position: relative;
  z-index: 2;
}

/* Slim title row above the working grid — replaces the old centered editorial header */
.app-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto 20px;
}
.app-toprow h1 {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}
.app-toprow-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.app-cost-chip,
.app-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1;
}
.app-cost-chip {
  color: var(--ink);
  font-weight: 600;
}
.app-cost-chip svg {
  color: var(--accent);
}
.app-time-chip {
  color: var(--ink-3);
}

/* — App grid: drop card + settings card — */
.app-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}
.app-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(17,21,30,0.04), 0 12px 32px -12px rgba(17,21,30,0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-card-head h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.app-card-step {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  color: var(--ink-2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}
.app-card-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin-top: -8px;
}

/* — Drop zone — */
.dz {
  position: relative;
  border: 2px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--bg-soft) 0%, rgba(245, 242, 236, 0.4) 100%);
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 32px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.dz:hover, .dz:focus-visible {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 240, 230, 0.5) 0%, var(--bg-soft) 100%);
}
.dz.is-dragging {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 225, 200, 0.6) 0%, rgba(255, 240, 230, 0.4) 100%);
  transform: scale(0.995);
}
.dz.is-shake {
  animation: dz-shake 0.45s ease-in-out;
  border-color: #DC2626;
}
@keyframes dz-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* HTML [hidden] must win over our display: flex/grid rules below */
.dz-empty[hidden], .dz-filled[hidden] { display: none !important; }

.dz-empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dz-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px -2px rgba(17,21,30,0.08);
  transition: transform var(--dur-base) var(--ease-out);
}
.dz:hover .dz-icon, .dz.is-dragging .dz-icon {
  transform: translateY(-2px) scale(1.05);
  color: var(--accent);
  border-color: rgba(242, 92, 43, 0.3);
}
.dz-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dz-sub {
  font-size: 14px;
  color: var(--ink-3);
}
.dz-choose {
  background: none;
  border: 0;
  padding: 0;
  color: #2563EB;
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dz-choose:hover { color: #1D4ED8; }

.dz-required-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px 3px 7px;
  margin-top: 2px;
}
.dz-required-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Filled state */
.dz-filled {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 256px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.dz-preview {
  width: 100%;
  height: 100%;
  min-height: 256px;
  object-fit: contain;
  background: var(--bg-soft);
  display: block;
}
.dz-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(17, 21, 30, 0.85);
  color: #fff;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 2;
}
.dz-clear:hover { background: var(--ink); }
.dz-filled-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dz-filled-name {
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dz-filled-size { color: var(--ink-3); flex-shrink: 0; }

/* Extra angles row */
.dz-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
}
.dz-extra-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dz-extra-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.dz-extra-label-hint {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
}
.dz-extra-label-mute {
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 4px;
}
.dz-extra-slots { display: inline-flex; gap: 10px; }
.dz-extra-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.dz-extra-opt {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0.7;
}
.dz-extra-slot {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-2);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: all var(--dur-fast) var(--ease-out);
}
.dz-extra-plus { width: 18px; height: 18px; }
.dz-extra-slot:hover,
.dz-extra-slot.is-dragging {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(242, 92, 43, 0.08);
}
.dz-extra-slot.is-dragging {
  transform: scale(1.05);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(242, 92, 43, 0.15);
}
.dz-extra-slot.is-filled {
  border-style: solid;
  border-color: var(--line-2);
  background: var(--surface);
}
.dz-extra-slot.is-filled .dz-extra-plus { display: none; }
.dz-extra-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dz-extra-thumb[hidden],
.dz-extra-remove[hidden] { display: none !important; }
.dz-extra-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: rgba(17, 21, 30, 0.9);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.dz-extra-remove:hover { background: var(--ink); }
.dz-extra-slot:not(.is-filled) .dz-extra-remove { display: none !important; }

.dz-foot {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}

/* — Style grid — */
.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.style-card {
  position: relative;
  padding: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--dur-fast) var(--ease-out);
}
.style-card:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.style-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 92, 43, 0.12);
}
.style-thumb {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.style-thumb-marble {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.6), transparent 60%),
    linear-gradient(135deg, #F4F1EA, #DCD5C7);
}
.style-thumb-marble::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: linear-gradient(160deg, #FFB783, #F25C2B 60%, #C5402F);
  border-radius: 28%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.style-thumb-lifestyle {
  background:
    radial-gradient(ellipse at 70% 30%, rgba(255,230,200,0.7), transparent 60%),
    linear-gradient(160deg, #FFE8D1, #F8C9A1);
}
.style-thumb-lifestyle::after {
  content: "";
  position: absolute;
  left: 25%; top: 30%;
  width: 50%; height: 50%;
  background: linear-gradient(160deg, #C8A878, #8B5A30);
  border-radius: 30%;
}
.style-thumb-outdoor {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(150,200,230,0.6), transparent 60%),
    linear-gradient(180deg, #B8D8E8, #5A8AAB);
}
.style-thumb-outdoor::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: linear-gradient(160deg, #D9B68B, #8B6238);
  border-radius: 28%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.22);
}
.style-thumb-white {
  background: linear-gradient(180deg, #FFFFFF, #F4F1EA);
  border: 1px solid var(--line);
}
.style-thumb-white::after {
  content: "";
  position: absolute;
  inset: 30%;
  background: linear-gradient(160deg, #2A2A2A, #0A0A0A);
  border-radius: 28%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.style-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 4px;
}
.style-desc {
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 0 4px;
  line-height: 1.4;
  margin-top: -4px;
}
.style-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(17, 21, 30, 0.85);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.style-tag-amazon {
  background: linear-gradient(135deg, #FF8E53, #F25C2B);
}

/* — Custom notes — */
.custom-notes-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.custom-notes-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.custom-notes-label-mute {
  font-weight: 400;
  color: var(--ink-4);
}
.custom-notes {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font: 13px/1.5 var(--font-sans);
  color: var(--ink);
  resize: vertical;
  min-height: 60px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.custom-notes:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 92, 43, 0.10);
}
.custom-notes::placeholder {
  color: var(--ink-4);
}

/* — Cost card — */
.cost-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-2);
}
.cost-row strong {
  font-weight: 700;
  color: var(--ink);
}
.cost-row-after {
  padding-top: 8px;
  border-top: 1px dashed var(--line-2);
  color: var(--ink-3);
}
.cost-row-after strong { color: var(--ink-2); }

.generate-micro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* — Sign-in modal — */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 21, 30, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 64px -12px rgba(17,21,30,0.32);
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.modal.is-open .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.modal-panel h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.modal-lead {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  margin-bottom: 24px;
}
.modal-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--ink-3);
}
.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.modal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242,92,43,0.12);
}
.modal-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 200, 150, 0.14), rgba(242, 92, 43, 0.08));
  border: 1px solid rgba(242, 92, 43, 0.18);
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 16px;
}
.modal-help svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}
.modal-help p {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.modal-help strong { color: var(--ink); font-weight: 600; }
.modal-tos {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}
.modal-tos a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.modal-tos a:hover { color: var(--ink); }

/* — App responsive — */
@media (max-width: 880px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-nav-right .app-back { display: none; }
  .style-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .app-nav-right { gap: 10px; }
  .credit-pill .cp-label { display: none; }
  .modal-panel { padding: 28px 22px; }
  .dz { min-height: 260px; padding: 24px; }
  .dz-extra { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* — Result overlay — */
#resultOverlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
#resultOverlay[hidden] { display: none; }
.result-panel {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 24px;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  box-shadow: var(--shadow-3);
}
.result-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}
.result-img {
  width: 100%;
  border-radius: var(--r-lg);
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--surface);
}
.result-download {
  text-align: center;
}

/* — Loading overlay — */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
#loadingOverlay[hidden] { display: none; }
.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
  text-align: center;
}
.loading-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.loading-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}
.loading-dots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}
