:root {
  --cream: #fdfaf3;
  --cream-deep: #f5efe1;
  --ink: #15110f;
  --ink-soft: #3a3530;
  --pink: #ff3d83;
  --blue: #2563eb;
  --lime: #d8ff3d;
  --paper: #ffffff;
  --rule: #e8e2d4;

  --display: 'Bricolage Grotesque', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 14px;
  --radius-lg: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* paper grid texture — VERY subtle dotted noise so it doesn't feel like a flat template */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(21,17,15,0.04) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* ───────── NAV ───────── */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(253, 250, 243, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 200ms;
}
.nav-links a:hover { color: var(--ink); }
.cta {
  background: var(--lime);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), background 200ms;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cta:hover { transform: translateY(-2px) rotate(-1deg); background: var(--pink); color: var(--paper); }
.cta svg { width: 14px; height: 14px; }

/* ───────── BIG EDITORIAL HERO ───────── */
.hero-big {
  position: relative;
  z-index: 1;
  padding: 60px 64px 120px;
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  /* Isolate the hero from any scroll-driven layout shifts in sections below.
     Without this, the sheet fan was responding to changes in containing
     block as the user scrolled. */
  contain: layout;
}
.hero-headline {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 168px);
  /* 0.92 was too tight at giant sizes — italic descenders ("into stickers")
     and letters with deep tails were getting clipped by the line box.
     Loosening to 1.02 preserves the editorial feel without cutoff. */
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 32px 0 24px;
  color: var(--ink);
  /* Italic strokes can lean past the bounding box at this size; padding
     gives them room without disturbing layout. */
  padding-bottom: 0.08em;
  overflow: visible;
}
.hero-headline-2 {
  margin: 24px 0 0;
}
.hero-headline .line {
  display: block;
  overflow: visible;
}
.hero-headline .line.spacer {
  height: 0.4em;
}
.hero-headline .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: word-in 720ms cubic-bezier(.2,.8,.2,1) forwards;
  /* Italic words ("into", "stickers") need a tiny bit of trailing space
     and visible overflow so the slanted strokes aren't clipped. */
  padding: 0 0.04em;
  overflow: visible;
}
/* "into stickers" beat — softer than the rest of the headline. Originally
   italic, but the heavy-italic glyphs were extending past the line box and
   getting clipped. Lighter weight + softer color + slightly smaller gives
   the same "this is the quiet middle of the sentence" feel without slant. */
.hero-headline .w.italic {
  font-style: normal;
  font-weight: 500;
  font-size: 0.85em;
  color: var(--ink-soft);
  letter-spacing: -0.02em;
}
.hero-headline .accent-pink { color: var(--pink); }
.hero-headline .accent-blue { color: var(--blue); }
/* Stagger every word — set delays manually since :nth-child doesn't see across .line groups.
   First headline (above the fan): plays first. Second headline (below): plays after the fan settles. */
.hero-headline .line:nth-child(1) .w:nth-child(1) { animation-delay: 60ms; }
.hero-headline .line:nth-child(1) .w:nth-child(2) { animation-delay: 140ms; }
.hero-headline .line:nth-child(2) .w:nth-child(1) { animation-delay: 220ms; }
.hero-headline .line:nth-child(2) .w:nth-child(2) { animation-delay: 300ms; }
.hero-headline .line:nth-child(3) .w:nth-child(1) { animation-delay: 380ms; }
.hero-headline .line:nth-child(3) .w:nth-child(2) { animation-delay: 460ms; }
/* Second headline starts after the fan finishes coming in (~1.7s). */
.hero-headline-2 .line:nth-child(1) .w:nth-child(1) { animation-delay: 1900ms; }
.hero-headline-2 .line:nth-child(1) .w:nth-child(2) { animation-delay: 1980ms; }
.hero-headline-2 .line:nth-child(1) .w:nth-child(3) { animation-delay: 2060ms; }
.hero-headline-2 .line:nth-child(2) .w:nth-child(1) { animation-delay: 2140ms; }
.hero-headline-2 .line:nth-child(2) .w:nth-child(2) { animation-delay: 2220ms; }
.hero-headline-2 .line:nth-child(3) .w:nth-child(1) { animation-delay: 2300ms; }
.hero-headline-2 .line:nth-child(3) .w:nth-child(2) { animation-delay: 2380ms; }
@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 32px auto 32px;
  opacity: 0;
  animation: fade-up 700ms 2600ms cubic-bezier(.2,.8,.2,1) forwards;
}
.hero-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.hero-meta .price {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.01em;
}
/* The original price ($4.99): starts un-struck, then a pink line draws
   across it from left to right. We can't animate `<s>` text-decoration's
   width, so we fake it with a linear-gradient background that grows. */
.hero-meta .price s {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  opacity: 0.6;
  /* Disable native strike — replaced by an animated overlay. */
  text-decoration: none;
}
/* Strike line — pink horizontal stroke that draws across $4.99 when the
   price block scrolls into view. */
.hero-meta .price s::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--pink);
  transform: translateY(-50%);
  transition: width 480ms cubic-bezier(.5,.05,.3,1) 100ms;
}
.hero-meta.in-view .price s::after { width: 110%; }

/* Discounted price ($2.99) — drops in with a small bounce on scroll-in */
.hero-meta .price strong {
  display: inline-block;
  font-weight: 700;
  color: var(--ink);
  opacity: 0;
  transform: translateY(-12px) scale(0.9);
  transition: opacity 520ms cubic-bezier(.2,.8,.2,1) 500ms,
              transform 520ms cubic-bezier(.2,.8,.2,1.4) 500ms;
}
.hero-meta.in-view .price strong { opacity: 1; transform: translateY(0) scale(1); }

/* "Launch price" badge — pops in slightly tilted, settles flat */
.hero-meta .price-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.6) rotate(-6deg);
  transition: opacity 460ms cubic-bezier(.2,.8,.2,1.3) 900ms,
              transform 460ms cubic-bezier(.2,.8,.2,1.3) 900ms;
}
.hero-meta.in-view .price-tag { opacity: 1; transform: scale(1) rotate(0); }

/* "No subscription headaches" — fades up below */
.hero-meta .price-note {
  text-transform: uppercase;
  font-size: 12px;
  /* Force "NO SUBSCRIPTION HEADACHES" onto its own line by claiming the
     full row width inside the wrapping flex container. */
  width: 100%;
  text-align: left;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms cubic-bezier(.2,.8,.2,1) 1300ms,
              transform 500ms cubic-bezier(.2,.8,.2,1) 1300ms;
}
.hero-meta.in-view .price-note { opacity: 1; transform: translateY(0); }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ───────── SHEET FAN ───────── */
.sheet-fan {
  position: relative;
  width: 100%;
  /* Wide enough that the spread (5 cards side-by-side at ±220% from center)
     stays inside the hover hit-region. At max card size (420px), spread
     extent is ~5×420 = 2100px; we cap container at viewport width. */
  max-width: min(2200px, 96vw);
  /* Tall enough that the rotated cards never clip vertically. Cards are
     squares scaled by --size; rotated ±12° they extend beyond a square's
     height by ~20%, so we give the container ~140% of card height. */
  height: clamp(380px, 50vw, 620px);
  margin: 0 auto;
  perspective: 1200px;
}
.sheet-fan .sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(260px, 32vw, 420px);
  aspect-ratio: 1 / 1;
  /* Pivot from the bottom-center so cards splay outwards from a shared
     "base" — reads as a hand of cards being fanned. */
  transform-origin: center 100%;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 30px 60px -30px rgba(21,17,15,0.35), 0 10px 20px -10px rgba(21,17,15,0.18);
  overflow: hidden;
  opacity: 0;
  animation: fade-in 700ms cubic-bezier(.2,.8,.2,1) forwards;
  /* Transition transform, shadow, AND a ::before glow — but NEVER touch
     position-affecting properties (translate's X/Y stays constant). The
     hover only changes scale + box-shadow, keeping the cursor's hit
     region anchored to where the user clicked, eliminating hover thrash. */
  transition: transform 320ms cubic-bezier(.2,.8,.2,1),
              box-shadow 320ms ease;
}
.sheet-fan .sheet img { width: 100%; height: 100%; object-fit: cover; }
/* Fan layout — pivot from bottom of each card so cards splay from a shared
   lower fulcrum like a hand of cards. The "rest" state is tightly stacked
   (small rotations); the "spread" state (on hover of the container) opens
   them wide. Hovering the container — not individual cards — eliminates
   hover thrash since the container's bounds don't change. */
.sheet-fan .sheet-1 { transform: translate(-50%, -50%) rotate(-12deg); animation-delay: 1100ms; }
.sheet-fan .sheet-2 { transform: translate(-50%, -50%) rotate(-6deg);  animation-delay: 1200ms; z-index: 2; }
.sheet-fan .sheet-3 { transform: translate(-50%, -50%) rotate(0deg);   animation-delay: 1300ms; z-index: 3; }
.sheet-fan .sheet-4 { transform: translate(-50%, -50%) rotate(6deg);   animation-delay: 1400ms; z-index: 2; }
.sheet-fan .sheet-5 { transform: translate(-50%, -50%) rotate(12deg);  animation-delay: 1500ms; }

/* Spread on container hover — translate cards horizontally so all 5
   become fully visible side-by-side. No rotation in the spread state so
   each sheet shows its full square content. Step distance is 105% of card
   width which gives a small visible gap between adjacent cards. */
.sheet-fan:hover .sheet-1 { transform: translate(calc(-50% - 210%), -50%) rotate(0deg); }
.sheet-fan:hover .sheet-2 { transform: translate(calc(-50% - 105%), -50%) rotate(0deg); }
.sheet-fan:hover .sheet-3 { transform: translate(-50%, -50%)              rotate(0deg); z-index: 4; }
.sheet-fan:hover .sheet-4 { transform: translate(calc(-50% + 105%), -50%) rotate(0deg); }
.sheet-fan:hover .sheet-5 { transform: translate(calc(-50% + 210%), -50%) rotate(0deg); }
.sheet-fan:hover .sheet { box-shadow: 0 30px 60px -25px rgba(21,17,15,0.35), 0 10px 20px -8px rgba(255,61,131,0.16); }
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  animation: fade-up 700ms 3100ms cubic-bezier(.2,.8,.2,1) forwards;
}
.scroll-hint svg { width: 14px; height: 14px; animation: bounce 2.4s ease-in-out infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0);} 50%{transform:translateY(4px);} }

/* ───────── SCROLL STORY: drop / slice / peel ───────── */
.story {
  position: relative;
  z-index: 1;
}
.story-track {
  /* 4.2 viewports tall — gives 4 acts (drop / slice / peel / send) plenty
     of scroll room without rushing */
  height: 420vh;
  position: relative;
}
.story-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Acts label row — only the active act is fully opaque + colored */
.story-acts {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.story-acts .act { opacity: 0.35; transition: opacity 320ms, color 320ms; }
.story-acts .act.active { opacity: 1; color: var(--ink); }
.story-acts .act-1.active { color: var(--pink); }
.story-acts .act-2.active { color: var(--blue); }
.story-acts .act-3.active { color: var(--ink); }
.story-acts .act-4.active { color: #25D366; } /* WhatsApp green */

/* Workbench — a centered "card" where the chosen sheet lands */
.workbench {
  position: relative;
  width: clamp(320px, 45vw, 580px);
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 30px 60px -30px rgba(21,17,15,0.25),
    0 10px 20px -10px rgba(21,17,15,0.10);
  padding: 6%;
  overflow: visible;
}

/* The 3×3 grid of originals + peels lives directly on the workbench
   surface. Hidden by default; drop act fades it in from a slight scale-down
   to read as "the originals just landed." */
.workbench-grid {
  position: absolute;
  inset: 6%;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-15%) scale(0.92);
  transition: opacity 600ms cubic-bezier(.2,.8,.2,1), transform 600ms cubic-bezier(.2,.8,.2,1);
}
.story-stage.act-drop .workbench-grid {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.wb-tile {
  position: relative;
}
.wb-tile .orig,
.wb-tile .peel {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88%;
  height: 88%;
  object-fit: contain;
  pointer-events: none;
}
/* Original sticker: visible during drop + slice acts, fades out during peel */
.wb-tile .orig {
  z-index: 1;
  opacity: 1;
  transition: opacity 500ms cubic-bezier(.2,.8,.2,1);
}
/* Peeled overlay: hidden until peel act, then lifts off the surface */
.wb-tile .peel {
  z-index: 2;
  opacity: 0;
  transform: translate(0, 0) rotate(0) scale(0.96);
  transform-origin: 70% 80%;
  transition: opacity 600ms cubic-bezier(.22,.9,.28,1.1), transform 700ms cubic-bezier(.22,.9,.28,1.1), filter 600ms ease;
  filter: drop-shadow(0 0 0 transparent);
}
.wb-div {
  position: absolute;
  background: var(--ink);
  opacity: 0;
  transition: opacity 320ms ease, transform 600ms cubic-bezier(.2,.8,.2,1);
}
.wb-div.h { left: 0; right: 0; height: 2px; transform: scaleX(0); transform-origin: left center; }
.wb-div.v { top: 0; bottom: 0; width: 2px; transform: scaleY(0); transform-origin: center top; }
.wb-div.h.one { top: 33.333%; }
.wb-div.h.two { top: 66.666%; }
.wb-div.v.one { left: 33.333%; }
.wb-div.v.two { left: 66.666%; }

.story-stage.act-slice .wb-div.h { opacity: 1; transform: scaleX(1); }
.story-stage.act-slice .wb-div.v { opacity: 1; transform: scaleY(1); }
.story-stage.act-slice .wb-div.h.one { transition-delay: 0ms; }
.story-stage.act-slice .wb-div.h.two { transition-delay: 120ms; }
.story-stage.act-slice .wb-div.v.one { transition-delay: 240ms; }
.story-stage.act-slice .wb-div.v.two { transition-delay: 360ms; }

/* Peel act — each original fades, the peel layer lifts off the surface,
   and the dividers fade away too (the cuts are done). */
.story-stage.act-peel .wb-tile .orig { opacity: 0; }
.story-stage.act-peel .wb-div { opacity: 0; transition-duration: 600ms; }
.story-stage.act-peel .wb-tile .peel {
  opacity: 1;
  transform: translate(-6%, -18%) rotate(-7deg) scale(1.04);
  filter: drop-shadow(0 14px 22px rgba(21,17,15,0.28));
}
/* Diagonal cascade for the peels */
.story-stage.act-peel .wb-tile:nth-child(1) .peel { transition-delay: 0ms; }
.story-stage.act-peel .wb-tile:nth-child(2) .peel { transition-delay: 80ms; }
.story-stage.act-peel .wb-tile:nth-child(3) .peel { transition-delay: 160ms; }
.story-stage.act-peel .wb-tile:nth-child(4) .peel { transition-delay: 80ms; }
.story-stage.act-peel .wb-tile:nth-child(5) .peel { transition-delay: 160ms; }
.story-stage.act-peel .wb-tile:nth-child(6) .peel { transition-delay: 240ms; }
.story-stage.act-peel .wb-tile:nth-child(7) .peel { transition-delay: 160ms; }
.story-stage.act-peel .wb-tile:nth-child(8) .peel { transition-delay: 240ms; }
.story-stage.act-peel .wb-tile:nth-child(9) .peel { transition-delay: 320ms; }

.workbench-label {
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.workbench-label > span { display: none; }
.story-stage.act-drop  .workbench-label .lbl-1 { display: inline; }
.story-stage.act-slice .workbench-label .lbl-2 { display: inline; color: var(--blue); }
.story-stage.act-peel  .workbench-label .lbl-3 { display: inline; color: var(--pink); }
.story-stage.act-send  .workbench-label .lbl-4 { display: inline; color: #25D366; }
/* Send act overrides peel: when act-send is active we still have act-peel
   class on the stage, so we hide its label explicitly. */
.story-stage.act-send  .workbench-label .lbl-3 { display: none; }

/* ───────── CHAT SHELL (Send act) ───────── */
.chat-shell {
  position: absolute;
  /* Sits where the workbench was — centered on the stage. */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: clamp(300px, 30vw, 380px);
  background: #efeae3; /* WhatsApp paper-tone */
  border-radius: 22px;
  border: 1px solid var(--rule);
  box-shadow: 0 30px 60px -25px rgba(21,17,15,0.4), 0 12px 24px -10px rgba(21,17,15,0.18);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms cubic-bezier(.2,.8,.2,1), transform 600ms cubic-bezier(.2,.8,.2,1);
  z-index: 5;
}
.story-stage.act-send .chat-shell {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #075E54; /* WhatsApp header green */
  color: #fff;
}
.chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.chat-name strong {
  display: block;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.chat-name span {
  display: block;
  font-size: 10px;
  opacity: 0.72;
  margin-top: 1px;
}
.chat-body {
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 220px;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(circle at 75% 70%, rgba(255,255,255,0.35), transparent 40%),
    #efeae3;
}
.bubble {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 11px;
  border-radius: 14px;
  max-width: 80%;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}
.bubble.incoming {
  align-self: flex-start;
  background: #fff;
  border-bottom-left-radius: 4px;
}
.bubble.outgoing {
  align-self: flex-end;
  background: #DCF8C6; /* WhatsApp outgoing green */
  border-bottom-right-radius: 4px;
}
/* The sticker bubble holds the peeled sticker that flies in during the send
   act. Empty until activated, then animates in. */
.sticker-bubble {
  padding: 4px;
  background: transparent;
  box-shadow: none;
  align-self: flex-end;
}
.sticker-bubble img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  /* Start state: scaled up and offset above-and-left, as if just lifted off
     the workbench that was here a moment ago. */
  opacity: 0;
  transform: translate(-180px, -200px) rotate(-12deg) scale(1.8);
  transition: opacity 520ms cubic-bezier(.22,.9,.28,1.1) 200ms,
              transform 720ms cubic-bezier(.22,.9,.28,1.1) 200ms;
}
.story-stage.act-send .sticker-bubble img {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg) scale(1);
}
/* Tiny "typing" indicator dots — just decoration to feel alive */
.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 3px;
  padding: 8px 11px;
  background: #fff;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 320ms ease 800ms;
}
.story-stage.act-send .chat-typing { opacity: 1; }
.chat-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-soft);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 200ms; }
.chat-typing span:nth-child(3) { animation-delay: 400ms; }
@keyframes typing-dot { 0%,100%{opacity:0.3;} 50%{opacity:1;} }

/* During send act, the workbench fades out so the chat shell takes its place */
.workbench {
  transition: opacity 600ms cubic-bezier(.2,.8,.2,1), transform 600ms cubic-bezier(.2,.8,.2,1);
}
.story-stage.act-send .workbench {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

/* ───────── (legacy hero/demo styles below intentionally unused; kept harmlessly) ───────── */
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.eyebrow .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pink);
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1; transform:scale(1);} 50%{opacity:.4; transform:scale(1.4);} }

h1 {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 24px;
}
h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: word-in 700ms cubic-bezier(.2,.8,.2,1) forwards;
}
h1 .word:nth-child(1){ animation-delay: 80ms; }
h1 .word:nth-child(2){ animation-delay: 180ms; }
h1 .word:nth-child(3){ animation-delay: 280ms; color: var(--blue); }
h1 .word:nth-child(4){ animation-delay: 380ms; }
h1 .word:nth-child(5){ animation-delay: 480ms; color: var(--pink); }
@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.5;
  opacity: 0;
  animation: fade-up 700ms 600ms cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 700ms 750ms cubic-bezier(.2,.8,.2,1) forwards;
}
.app-store-badge {
  background: var(--ink);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1);
}
.app-store-badge:hover { transform: translateY(-2px) scale(1.02); }
.app-store-badge svg { width: 26px; height: 26px; }
.app-store-badge .tiny { display: block; font-size: 11px; opacity: .7; line-height: 1.2; }
.app-store-badge .big { display: block; font-size: 18px; font-family: var(--display); font-weight: 700; line-height: 1.1; }

/* ───────── HERO DEMO (animated 3x3 grid) ───────── */
.demo-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 520px;
  justify-self: end;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff7ee, #ffe9f0 50%, #e9f0ff);
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 30px 60px -30px rgba(21,17,15,0.25),
    0 10px 20px -10px rgba(255,61,131,0.12);
  overflow: hidden;
  padding: 8%;
}
.demo-stage::after {
  /* sparkles top-right */
  content: '✦';
  position: absolute;
  top: 18px; right: 22px;
  font-size: 22px;
  color: var(--pink);
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.demo-grid {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  gap: 0;
  border-radius: var(--radius);
  overflow: visible;
}
.demo-tile {
  position: relative;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(28px, 4.4vw, 44px);
  border: 0 solid var(--paper);
  transition: border-radius 600ms cubic-bezier(.2,.8,.2,1);
  animation: tile-cycle 9s cubic-bezier(.2,.8,.2,1) infinite;
  filter: drop-shadow(0 0 0 transparent);
}
/* Peeled cells get higher stacking so a sticker lifting off doesn't slip
   beneath an adjacent unpeeled cell. They also skip the cell-level scale +
   white-ring beat (the peel animation does the visual work instead) and
   fade their white card background out so the stage's paper gradient
   shows through where the sticker used to be. */
.demo-tile:has(.peel) {
  z-index: 3;
  animation: cell-paper 9s cubic-bezier(.2,.8,.2,1) infinite;
  transform: none;
  background: transparent;
}
@keyframes cell-paper {
  0%,   30% { background-color: var(--paper); }
  55%, 75%  { background-color: transparent; }
  92%, 100% { background-color: var(--paper); }
}
.demo-tile img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88%;
  height: 88%;
  object-fit: contain;
  pointer-events: none;
}
/* Peeled layer sits on top of the sheet sticker; hidden until the "slice"
   beat fires. Origin at bottom-left so the curl reads as "pulled from the
   corner". */
.demo-tile .peel {
  z-index: 2;
  opacity: 0;
  transform-origin: 70% 80%;
  transform: translate(0, 0) rotate(0deg) scale(0.96);
  filter: drop-shadow(0 0 0 transparent);
  animation: peel-cycle 9s cubic-bezier(.22,.9,.28,1.1) infinite;
}
/* Cascade the peels diagonally across the 3x3 grid so it reads as a wave
   rather than 9 things firing at once. Top-left first, bottom-right last.
   The cell's paper-fade and the sheet's fade-out share the same delay so
   each cell reveals its peel and empties its background in sync. */
.demo-tile:nth-child(1) .peel,
.demo-tile:nth-child(1) .sheet,
.demo-tile:nth-child(1)        { animation-delay: 0ms; }
.demo-tile:nth-child(2) .peel,
.demo-tile:nth-child(2) .sheet,
.demo-tile:nth-child(2)        { animation-delay: 80ms; }
.demo-tile:nth-child(3) .peel,
.demo-tile:nth-child(3) .sheet,
.demo-tile:nth-child(3)        { animation-delay: 160ms; }
.demo-tile:nth-child(4) .peel,
.demo-tile:nth-child(4) .sheet,
.demo-tile:nth-child(4)        { animation-delay: 80ms; }
.demo-tile:nth-child(5) .peel,
.demo-tile:nth-child(5) .sheet,
.demo-tile:nth-child(5)        { animation-delay: 160ms; }
.demo-tile:nth-child(6) .peel,
.demo-tile:nth-child(6) .sheet,
.demo-tile:nth-child(6)        { animation-delay: 240ms; }
.demo-tile:nth-child(7) .peel,
.demo-tile:nth-child(7) .sheet,
.demo-tile:nth-child(7)        { animation-delay: 160ms; }
.demo-tile:nth-child(8) .peel,
.demo-tile:nth-child(8) .sheet,
.demo-tile:nth-child(8)        { animation-delay: 240ms; }
.demo-tile:nth-child(9) .peel,
.demo-tile:nth-child(9) .sheet,
.demo-tile:nth-child(9)        { animation-delay: 320ms; }
.demo-tile .sheet {
  z-index: 1;
  transition: opacity 600ms ease;
  animation: sheet-cycle 9s cubic-bezier(.2,.8,.2,1) infinite;
}
/* The peel — lift, rotate slightly, drop a shadow as it leaves the surface */
@keyframes peel-cycle {
  0%,   30% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.96); filter: drop-shadow(0 0 0 transparent); }
  40%       { opacity: 1; transform: translate(-2%, -8%) rotate(-3deg) scale(1.0); filter: drop-shadow(0 4px 6px rgba(21,17,15,0.18)); }
  55%, 75%  { opacity: 1; transform: translate(-6%, -18%) rotate(-7deg) scale(1.04); filter: drop-shadow(0 14px 20px rgba(21,17,15,0.28)); }
  85%       { opacity: 1; transform: translate(-3%, -10%) rotate(-4deg) scale(1.01); filter: drop-shadow(0 6px 10px rgba(21,17,15,0.20)); }
  92%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.96); filter: drop-shadow(0 0 0 transparent); }
}
/* Sheet fades fully out while the peel is up, so the cell reads as empty
   paper — the sticker has been cut away. */
@keyframes sheet-cycle {
  0%,   30% { opacity: 1; }
  55%, 75%  { opacity: 0; }
  92%, 100% { opacity: 1; }
}
/* tiles separate during the "slice" beat (3.5s-7s) — staggered scale + outline */
@keyframes tile-cycle {
  0%,   25% { transform: scale(1) translate(0,0); border-radius: 0; box-shadow: 0 0 0 0 var(--paper); filter: drop-shadow(0 0 0 transparent); }
  35%       { border-radius: 12px; box-shadow: 0 0 0 4px var(--paper); }
  45%, 75%  { transform: scale(0.92) translate(0,0); border-radius: 14px; box-shadow: 0 0 0 5px var(--paper), 0 8px 20px -8px rgba(21,17,15,0.25); }
  85%, 100% { transform: scale(1); border-radius: 0; box-shadow: 0 0 0 0 var(--paper); }
}
.demo-tile:nth-child(1){ animation-delay: 0ms; }
.demo-tile:nth-child(2){ animation-delay: 80ms; }
.demo-tile:nth-child(3){ animation-delay: 160ms; }
.demo-tile:nth-child(4){ animation-delay: 100ms; }
.demo-tile:nth-child(5){ animation-delay: 200ms; }
.demo-tile:nth-child(6){ animation-delay: 280ms; }
.demo-tile:nth-child(7){ animation-delay: 200ms; }
.demo-tile:nth-child(8){ animation-delay: 280ms; }
.demo-tile:nth-child(9){ animation-delay: 360ms; }

/* dividers — drawn with strokes */
.demo-divider {
  position: absolute;
  background: var(--ink);
  opacity: 0;
  animation: divider-draw 9s cubic-bezier(.2,.8,.2,1) infinite;
}
.demo-divider.h { left: 0; right: 0; height: 2px; }
.demo-divider.v { top: 0; bottom: 0; width: 2px; }
.demo-divider.h.one  { top: 33.333%; animation-delay: 1.6s; }
.demo-divider.h.two  { top: 66.666%; animation-delay: 1.8s; }
.demo-divider.v.one  { left: 33.333%; animation-delay: 2.0s; }
.demo-divider.v.two  { left: 66.666%; animation-delay: 2.2s; }
@keyframes divider-draw {
  0%,15%  { opacity: 0; transform: scaleX(0); transform-origin: left center; }
  18%,30% { opacity: 1; transform: scaleX(1); }
  35%     { opacity: 1; }
  85%     { opacity: 0; }
  100%    { opacity: 0; }
}
.demo-divider.v { transform-origin: center top; }
@keyframes divider-draw-v {
  0%,15%  { opacity: 0; transform: scaleY(0); transform-origin: center top; }
  18%,30% { opacity: 1; transform: scaleY(1); }
  85%,100%{ opacity: 0; }
}
.demo-divider.v { animation-name: divider-draw-v; }

.demo-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 6px;
}

/* ───────── HOW IT WORKS ───────── */
section.how {
  position: relative;
  z-index: 1;
  padding: 120px 64px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--ink);
}
.section-title {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 80px;
  max-width: 760px;
}
.section-title em { font-style: normal; color: var(--pink); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step {
  position: relative;
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
.step.in-view { opacity: 1; transform: translateY(0); }
.step:nth-child(2) { transition-delay: 100ms; }
.step:nth-child(3) { transition-delay: 200ms; }
.step-num {
  font-family: var(--display);
  font-size: 96px;
  line-height: 0.85;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  display: inline-block;
}
.step:nth-child(1) .step-num { color: var(--pink); }
.step:nth-child(2) .step-num { color: var(--blue); }
.step:nth-child(3) .step-num { color: var(--ink); -webkit-text-stroke: 0; background: linear-gradient(180deg, var(--lime), #b3d92a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.step h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.step p { color: var(--ink-soft); font-size: 16px; line-height: 1.55; }

/* ───────── FEATURES ───────── */
section.features {
  position: relative;
  z-index: 1;
  padding: 120px 64px;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--cream-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Decorative peeled stickers — placed on top of section content as visual
   punctuation. Rotated, soft drop shadows, gentle float animation. */
.deco-sticker {
  position: absolute;
  width: clamp(120px, 14vw, 180px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 14px 22px rgba(21,17,15,0.22));
  animation: float-bob 5s ease-in-out infinite;
  z-index: 5; /* Sit on top of section content */
}
/* Top-left: sitting on the section's top border (half above, half below)
   so the heading content stays unobstructed. */
.deco-1 {
  top: 0;
  left: 8%;
  transform: translateY(-50%) rotate(-14deg);
  animation-delay: 0s;
}
/* Right side: positioned slightly above center on the right edge, half
   spilling outside the section so it reads as "stuck to the right". No
   float animation — sits in place. */
.deco-2 {
  top: 15%;
  right: 0;
  transform: translate(50%, -50%) rotate(8deg);
  animation: none;
}
@keyframes float-bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}
/* Hide on narrow screens — they crowd the headline. */
@media (max-width: 720px) {
  .deco-sticker { display: none; }
}

/* Footer bridge — single sticker sitting on the seam between content and
   the dark footer, anchored to the left side. */
.footer-bridge {
  position: relative;
  height: 100px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  padding-left: 0;
  pointer-events: none;
}
.deco-bridge {
  position: relative;
  width: clamp(140px, 16vw, 200px);
  height: auto;
  transform: translate(-10%, 20%) rotate(-6deg);
  filter: drop-shadow(0 18px 28px rgba(21,17,15,0.25));
  animation: none;
  z-index: 5;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms;
  opacity: 0;
  transform: translateY(16px);
}
.feature.in-view { opacity: 1; transform: translateY(0); transition: opacity 600ms cubic-bezier(.2,.8,.2,1), transform 600ms cubic-bezier(.2,.8,.2,1); }
.feature:hover { transform: translateY(-4px) rotate(-0.5deg); box-shadow: 0 20px 40px -20px rgba(21,17,15,0.18); }
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.feature-icon svg { width: 26px; height: 26px; stroke-width: 1.8; }
.feature:nth-child(1) .feature-icon { background: rgba(255,61,131,0.12); color: var(--pink); }
.feature:nth-child(2) .feature-icon { background: rgba(37,99,235,0.12); color: var(--blue); }
.feature:nth-child(3) .feature-icon { background: rgba(216,255,61,0.4); color: var(--ink); }
.feature:nth-child(4) .feature-icon { background: rgba(21,17,15,0.08); color: var(--ink); }
.feature:nth-child(5) .feature-icon { background: rgba(255,61,131,0.12); color: var(--pink); }
.feature:nth-child(6) .feature-icon { background: rgba(37,99,235,0.12); color: var(--blue); }

.feature h4 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature p { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }

/* ───────── FAQ ───────── */
section.faq {
  position: relative;
  z-index: 1;
  padding: 120px 64px;
  max-width: 880px;
  margin: 0 auto;
}
.faq-list { border-top: 1px solid var(--rule); }
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 200ms;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--pink); }
.faq-item .chev {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), background 200ms;
}
.faq-item[open] .chev { transform: rotate(45deg); background: var(--pink); }
.faq-item .answer {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 640px;
}
.faq-item .answer a { color: var(--blue); text-decoration: underline; }

/* ───────── FOOTER ───────── */
footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--cream);
  padding: 80px 64px 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.footer-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 22px; font-weight: 700; }
.footer-brand img { width: 36px; height: 36px; border-radius: 8px; }
.footer p.copy { color: rgba(253, 250, 243, 0.55); font-size: 13px; margin-top: 14px; max-width: 340px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-links a { color: rgba(253, 250, 243, 0.7); transition: color 200ms; }
.footer-links a:hover { color: var(--lime); }
.footer-links h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253, 250, 243, 0.4);
  margin-bottom: 10px;
  font-weight: 500;
}

/* ───────── RESPONSIVE ───────── */
@media (max-width: 960px) {
  nav { padding: 14px 22px; }
  .nav-links { gap: 18px; }
  .nav-links .hidden-mobile { display: none; }
  .hero { grid-template-columns: 1fr; padding: 60px 24px 80px; gap: 48px; }
  .demo-stage { justify-self: center; max-width: 420px; }
  section.how, section.features, section.faq { padding: 80px 24px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  footer { padding: 60px 24px 40px; }
}

@media (max-width: 540px) {
  .nav-links { gap: 14px; }
  h1 { font-size: clamp(40px, 11vw, 56px); }
  .step-num { font-size: 72px; }
  .step h3, .feature h4 { font-size: 20px; }
}

/* ───────── REDUCED MOTION ───────── */
@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;
  }
  .demo-tile, .demo-divider { animation: none; }
  h1 .word, .hero-sub, .hero-actions { opacity: 1; transform: none; }
  .step, .feature { opacity: 1; transform: none; }
  /* New layout: hero headline words, fan sheets, CTA, and scroll hint must
     all be visible immediately when reduced motion is on. */
  .hero-headline .w,
  .hero-cta-row,
  .scroll-hint,
  .sheet-fan .sheet { opacity: 1; transform: none; }
  /* But preserve the inline rotated transforms on fan sheets, so the fan
     still LOOKS like a fan even with motion off. */
  .sheet-fan .sheet-1 { transform: translate(-50%, -50%) rotate(-12deg) !important; }
  .sheet-fan .sheet-2 { transform: translate(-50%, -50%) rotate(-6deg)  !important; }
  .sheet-fan .sheet-3 { transform: translate(-50%, -50%) rotate(0deg)   !important; }
  .sheet-fan .sheet-4 { transform: translate(-50%, -50%) rotate(6deg)   !important; }
  .sheet-fan .sheet-5 { transform: translate(-50%, -50%) rotate(12deg)  !important; }
}
