/* ==========================================================================
   Just Cooked — site design system (redesign proof of concept, v3)
   Warm, calm, premium. Cream paper, burnt orange, sage. Buildless modern CSS.
   The home page is one pinned stage ("the play"): scrolling drives a timeline,
   the page itself never moves. Performance rules: no backdrop-filter outside
   the nav/menu, no filter blur, no blend modes, animate transform/opacity/clip.
   ========================================================================== */

@layer reset, tokens, base, layout, components, play, pages, motion, utilities;

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100svh; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  img, picture, svg, video, canvas { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  a { color: inherit; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  h1, h2, h3, h4 { overflow-wrap: anywhere; }
  summary { list-style: none; }
  summary::-webkit-details-marker { display: none; }
}

/* --------------------------------------------------------------------------
   Tokens (from the V1.2c rebrand spec)
   -------------------------------------------------------------------------- */
@layer tokens {
  :root {
    color-scheme: light;

    --cream-base: #F5EFE6;
    --cream-raised: #FBF6EC;
    --cream-pressed: #EDE5D6;
    --cream-shadow: #E0D5C2;
    --paper: #FCF8F0;

    --ink: #1A1815;
    --ink-body: #3A342E;
    --ink-muted: #8B847C;

    --orange: #E94B1F;
    --orange-hot: #FF6B35;
    --orange-warm: #F39568;
    --orange-soft: #FBE3D2;
    --orange-ink: #7A2410;

    --sage: #9CB58A;
    --sage-soft: #E4ECDC;
    --sage-ink: #4A5C3D;
    --sage-btn: #6B8159;
    --sage-btn-hot: #5A7048;

    --sky-light: #C2DCE8;
    --sky-ink: #3A5567;
    --butter-soft: #FAF1D4;
    --butter-ink: #6B5A24;
    --rose-soft: #F8E4E4;
    --rose-ink: #7A3F3F;

    --night: #0B1326;
    --dark-ink: #FBF6EC;
    --dark-body: rgba(245, 239, 230, 0.78);
    --dark-muted: rgba(245, 239, 230, 0.55);

    --edge: rgba(224, 213, 194, 0.7);
    --surface: rgba(251, 246, 236, 0.92);

    --shadow-pill: 0 2px 8px rgba(26, 24, 21, 0.04);
    --shadow-soft: 0 6px 18px rgba(26, 24, 21, 0.07);
    --shadow-card: 0 12px 24px rgba(26, 24, 21, 0.08);
    --shadow-card-lg: 0 16px 33px rgba(26, 24, 21, 0.13);
    --shadow-accent: 0 8px 16px rgba(233, 75, 31, 0.32);

    --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 24px; --r-xxl: 32px; --r-pill: 999px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --fs-display: clamp(2.6rem, 1.2rem + 5.4vw, 5.6rem);
    --fs-h2: clamp(1.9rem, 1.1rem + 3.2vw, 3.6rem);
    --fs-h3: clamp(1.25rem, 1.08rem + 0.7vw, 1.55rem);
    --fs-lede: clamp(1.05rem, 0.98rem + 0.45vw, 1.3rem);
    --fs-body: 1rem;
    --fs-small: 0.9rem;
    --fs-label: 0.8125rem;

    --container: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --section: clamp(80px, 12vw, 176px);
    --nav-h: 62px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
@layer base {
  html {
    font-family: var(--font);
    font-optical-sizing: auto;
    color: var(--ink);
    background: var(--cream-base);
    scroll-behavior: smooth;
    scrollbar-color: color-mix(in srgb, var(--orange) 70%, var(--cream-shadow)) var(--cream-pressed);
    scrollbar-width: thin;
  }
  body { background: transparent; color: var(--ink); font-size: var(--fs-body); overflow-x: clip; text-rendering: optimizeLegibility; }

  ::selection { background: var(--orange-soft); color: var(--orange-ink); }

  h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; color: var(--ink); text-wrap: balance; }
  p { text-wrap: pretty; }
  a { text-decoration: none; }
  :focus-visible { outline: 3px solid color-mix(in srgb, var(--orange) 70%, transparent); outline-offset: 3px; border-radius: 6px; }
  em { font-style: normal; }

  /* Fixed backdrop: soft cream gradient mesh + a whisper of grain. One compositor layer, painted once. */
  .bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
    background:
      radial-gradient(60% 50% at 12% 6%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 60%),
      radial-gradient(45% 40% at 90% 8%, rgba(251, 227, 210, 0.6) 0%, rgba(251, 227, 210, 0) 65%),
      radial-gradient(50% 45% at 85% 92%, rgba(228, 236, 220, 0.7) 0%, rgba(228, 236, 220, 0) 65%),
      radial-gradient(40% 40% at 8% 88%, rgba(251, 227, 210, 0.5) 0%, rgba(251, 227, 210, 0) 60%),
      linear-gradient(180deg, #FCF8F1 0%, #F5EFE6 55%, #F0E8DA 100%); }
  .bg__blob { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform; }
  .bg__blob--a { width: 70vmax; height: 70vmax; left: -22vmax; top: -32vmax; background: radial-gradient(circle, rgba(251, 227, 210, 0.95) 0%, rgba(251, 227, 210, 0) 62%); animation: drift-a 28s ease-in-out infinite alternate; }
  .bg__blob--b { width: 62vmax; height: 62vmax; right: -26vmax; top: 6vmax; background: radial-gradient(circle, rgba(228, 236, 220, 0.95) 0%, rgba(228, 236, 220, 0) 62%); animation: drift-b 34s ease-in-out infinite alternate; }
  .bg__blob--c { width: 56vmax; height: 56vmax; left: 18vmax; bottom: -32vmax; background: radial-gradient(circle, rgba(250, 241, 212, 0.95) 0%, rgba(250, 241, 212, 0) 62%); animation: drift-c 40s ease-in-out infinite alternate; }
  @keyframes drift-a { to { transform: translate(9vmax, 7vmax) scale(1.08); } }
  @keyframes drift-b { to { transform: translate(-8vmax, 9vmax) scale(1.1); } }
  @keyframes drift-c { to { transform: translate(10vmax, -7vmax) scale(1.06); } }
  @media (prefers-reduced-motion: reduce) { .bg__blob { animation: none; } }
  .bg__grain { position: absolute; inset: 0; opacity: 0.035;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.16 0 0 0 0 0.1 0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 220px 220px; }

  .skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--cream-raised); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
  .skip:focus { top: 16px; }

  .scene3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
@layer layout {
  .container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
  .container--narrow { max-width: 860px; }
  .section { padding-block: var(--section); position: relative; }
  .section--tight { padding-block: calc(var(--section) * 0.6); }
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */
@layer components {

  /* ---- Type roles ---- */
  .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); margin-bottom: 18px; }
  .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
  .eyebrow--sage { color: var(--sage-btn); }
  .eyebrow--muted { color: var(--ink-muted); }
  .eyebrow--light { color: #FFB07A; }
  .h2 { font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.032em; }
  .h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.02em; }
  .lede { font-size: var(--fs-lede); line-height: 1.6; color: var(--ink-body); max-width: 58ch; }
  .muted { color: var(--ink-muted); }
  .small { font-size: var(--fs-small); }

  /* ---- Buttons ---- */
  .btn {
    --btn-bg: var(--orange); --btn-fg: var(--cream-raised); --btn-shadow: var(--shadow-accent);
    position: relative; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    height: 56px; padding: 0 26px; border-radius: var(--r-pill);
    background: var(--btn-bg); color: var(--btn-fg);
    font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; white-space: nowrap;
    box-shadow: var(--btn-shadow);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.2s, color 0.2s;
    overflow: hidden;
  }
  .btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.28) 50%, rgba(255, 255, 255, 0) 70%); transform: translateX(-120%); transition: transform 0.7s var(--ease-out); }
  .btn:hover { background: var(--orange-hot); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(233, 75, 31, 0.34); }
  .btn:hover::after { transform: translateX(120%); }
  .btn:active { transform: scale(0.97); }
  .btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.35s var(--ease-out); }
  .btn:hover svg { transform: translateX(3px); }
  .btn--lg { height: 62px; padding: 0 30px; font-size: 1.125rem; }
  .btn--sm { height: 42px; padding: 0 18px; font-size: 0.9375rem; }
  .btn--ghost { --btn-bg: transparent; --btn-fg: var(--orange-ink); --btn-shadow: none; border: 1.5px solid rgba(233, 75, 31, 0.35); }
  .btn--ghost:hover { background: var(--orange-soft); box-shadow: none; border-color: var(--orange); }
  .btn--ghost::after { display: none; }
  .btn--block { width: 100%; }
  .text-link { color: var(--orange); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--orange) 40%, transparent); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
  .text-link:hover { text-decoration-color: var(--orange); }

  /* ---- Store badges ---- */
  .stores { display: flex; flex-wrap: wrap; gap: 12px; }
  .store { display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 20px 10px 16px; border-radius: 16px; text-decoration: none; line-height: 1.05; transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.2s; }
  .store svg { width: 26px; height: 26px; flex: none; }
  .store small { display: block; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-bottom: 2px; }
  .store strong { display: block; font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
  .store--apple { background: var(--ink); color: #fff; box-shadow: var(--shadow-card); }
  .store--google { background: var(--cream-raised); color: var(--ink); border: 1px solid var(--cream-shadow); box-shadow: var(--shadow-pill); }
  .store:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-lg); }
  .store:active { transform: translateY(0) scale(0.98); }

  /* ---- Chips & icons ---- */
  .chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; background: var(--orange-soft); color: var(--orange-ink); border: 1px solid rgba(233, 75, 31, 0.14); white-space: nowrap; }
  .chip svg { width: 14px; height: 14px; }
  .chip--sage { background: var(--sage-soft); color: var(--sage-ink); border-color: rgba(107, 129, 89, 0.2); }
  .chip--sky { background: var(--sky-light); color: var(--sky-ink); border-color: rgba(58, 85, 103, 0.18); }
  .chip--butter { background: var(--butter-soft); color: var(--butter-ink); border-color: rgba(107, 90, 36, 0.18); }
  .chip--rose { background: var(--rose-soft); color: var(--rose-ink); border-color: rgba(122, 63, 63, 0.18); }

  .icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; flex: none; background: var(--orange-soft); color: var(--orange); border: 1px solid rgba(233, 75, 31, 0.14); }
  .icon svg { width: 24px; height: 24px; }
  .icon--sage { background: var(--sage-soft); color: var(--sage-btn); border-color: rgba(107, 129, 89, 0.22); }
  .icon--sky { background: var(--sky-light); color: var(--sky-ink); border-color: rgba(58, 85, 103, 0.18); }
  .icon--butter { background: var(--butter-soft); color: var(--butter-ink); border-color: rgba(107, 90, 36, 0.18); }
  .icon--rose { background: var(--rose-soft); color: var(--rose-ink); border-color: rgba(122, 63, 63, 0.18); }

  .check-list { display: grid; gap: 14px; }
  .check-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-body); line-height: 1.55; }
  .check-list li strong { color: var(--ink); }
  .check-list .tick { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-btn); display: inline-grid; place-items: center; margin-top: 1px; }
  .check-list .tick svg { width: 14px; height: 14px; }

  /* ---- Cards (solid, no blur) ---- */
  .card { position: relative; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r-xl); box-shadow: var(--shadow-card); padding: clamp(22px, 3vw, 34px); transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.3s; }
  .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 38%); }
  .card--solid { background: var(--cream-raised); }
  .card--hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-lg); border-color: rgba(233, 75, 31, 0.28); }
  .card--tilt { transform-style: preserve-3d; }
  .card > * { position: relative; }

  /* ---- Nav ---- */
  .nav { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: 12px; pointer-events: none; view-transition-name: nav; }
  .nav__bar { pointer-events: auto; width: min(calc(100% - 24px), var(--container)); margin-inline: auto; height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 10px 0 20px; border-radius: 22px;
    background: rgba(251, 246, 236, 0.66); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.55); box-shadow: 0 10px 30px rgba(26, 24, 21, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: background 0.4s, box-shadow 0.4s, border-color 0.4s, transform 0.5s var(--ease-out); }
  .nav.is-scrolled .nav__bar { background: rgba(251, 246, 236, 0.88); box-shadow: 0 14px 36px rgba(26, 24, 21, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6); border-color: rgba(233, 75, 31, 0.16); }
  .nav.is-hidden .nav__bar { transform: translateY(-120%); }
  .nav__brand { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; transition: transform 0.3s var(--ease-out); }
  .nav__brand img { height: 26px; width: auto; transition: filter 0.4s; }
  .nav__brand:hover { transform: scale(1.03); }
  .nav__links { grid-column: 2; display: none; align-items: center; gap: 2px; }
  .nav__links a { position: relative; display: inline-block; padding: 9px 16px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.005em; color: var(--ink-body); transition: color 0.2s, background 0.2s; }
  .nav__links a:hover { color: var(--ink); background: rgba(26, 24, 21, 0.05); }
  .nav__links a[aria-current="page"] { color: var(--orange); }
  .nav__links a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); transform: translateX(-50%); }
  .nav__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 8px; }
  .nav__cta { display: none; }
  .nav__toggle { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; color: var(--ink); transition: background 0.2s; }
  .nav__toggle:hover { background: rgba(26, 24, 21, 0.06); }
  .nav__toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.4s var(--ease-out), opacity 0.2s; grid-area: 1 / 1; }
  .nav__toggle span:first-child { transform: translateY(-4px); }
  .nav__toggle span:last-child { transform: translateY(4px); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
  @media (min-width: 820px) {
    .nav__links { display: flex; }
    .nav__cta { display: inline-flex; }
    .nav__toggle { display: none; }
    .nav__brand img { height: 28px; }
  }
  /* night glass: while the dark passage of the home page is on screen the bar turns blue-violet (set by js/site.js) */
  .nav.is-night .nav__bar { background: rgba(26, 30, 80, 0.62); border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 10px 30px rgba(4, 7, 18, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
  .nav.is-night .nav__brand img { filter: brightness(0) invert(1); }
  .nav.is-night .nav__links a { color: rgba(245, 239, 230, 0.8); }
  .nav.is-night .nav__links a:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.08); }
  .nav.is-night .nav__links a[aria-current="page"] { color: #CFC4FF; }
  .nav.is-night .nav__links a[aria-current="page"]::after { background: #CFC4FF; }
  .nav.is-night .nav__toggle { color: var(--cream-raised); }
  .nav.is-night .nav__toggle:hover { background: rgba(255, 255, 255, 0.1); }
  .nav.is-night .nav__cta { background: var(--cream-raised); color: var(--night); box-shadow: 0 6px 16px rgba(4, 7, 18, 0.25); }
  .nav.is-night .nav__cta:hover { background: #FFFFFF; }

  .menu { pointer-events: auto; position: fixed; inset: 0; z-index: 45; padding: calc(var(--nav-h) + 28px) 16px 24px; background: rgba(245, 239, 230, 0.96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); display: flex; flex-direction: column; justify-content: space-between; opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease-out), visibility 0.35s; }
  .menu.is-open { opacity: 1; visibility: visible; }
  .menu__links { display: grid; gap: 4px; }
  .menu__links a { display: flex; align-items: center; justify-content: space-between; padding: 18px 12px; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); border-bottom: 1px solid var(--cream-shadow); transform: translateY(18px); opacity: 0; transition: transform 0.5s var(--ease-out), opacity 0.4s; }
  .menu__links a[aria-current="page"] { color: var(--orange); }
  .menu__links a svg { width: 22px; height: 22px; color: var(--orange); }
  .menu.is-open .menu__links a { transform: none; opacity: 1; }
  .menu.is-open .menu__links a:nth-child(2) { transition-delay: 0.05s; }
  .menu.is-open .menu__links a:nth-child(3) { transition-delay: 0.1s; }
  .menu.is-open .menu__links a:nth-child(4) { transition-delay: 0.15s; }
  .menu__foot { display: grid; gap: 14px; }
  .menu__foot .stores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .menu__foot .store { justify-content: center; padding-inline: 10px; }
  .menu__legal { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--ink-muted); }
  .menu__legal a:hover { color: var(--orange); }
  @media (min-width: 820px) { .menu { display: none; } }
  body.menu-open { overflow: hidden; }

  /* ---- Phone slot: the 3D phone lands here; the <img> is the no-WebGL fallback ---- */
  .phone-slot { position: relative; aspect-ratio: 1274 / 2668; height: min(60vh, 540px); margin-inline: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  .phone-slot__img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(26, 24, 21, 0.22)); transition: opacity 0.6s var(--ease-out); -webkit-user-drag: none; }
  .webgl .phone-slot__img { opacity: 0; }
  .webgl .phone-slot { cursor: grab; }
  .webgl .phone-slot:active { cursor: grabbing; }

  /* ---- FAQ ---- */
  .faq { border-radius: var(--r-l); border: 1px solid var(--edge); background: var(--surface); box-shadow: var(--shadow-soft); transition: border-color 0.3s, box-shadow 0.3s; }
  .faq[open] { border-color: rgba(233, 75, 31, 0.3); box-shadow: var(--shadow-card); }
  .faq summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; cursor: pointer; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); }
  .faq summary:hover { color: var(--orange-ink); }
  .faq summary .faq__ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-pressed); color: var(--ink-body); transition: transform 0.45s var(--ease-out), background 0.3s, color 0.3s; }
  .faq summary .faq__ic svg { width: 16px; height: 16px; }
  .faq[open] summary .faq__ic { transform: rotate(45deg); background: var(--orange); color: var(--cream-raised); }
  .faq__body { padding: 0 22px 22px; color: var(--ink-body); line-height: 1.65; max-width: 70ch; }
  @supports (interpolate-size: allow-keywords) {
    .faq { interpolate-size: allow-keywords; }
    .faq::details-content { height: 0; overflow: clip; transition: height 0.45s var(--ease-out), content-visibility 0.45s allow-discrete; }
    .faq[open]::details-content { height: auto; }
  }
  .faq-group + .faq-group { margin-top: 48px; }
  .faq-group h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
  .faq-group h2 .icon { width: 40px; height: 40px; border-radius: 12px; }
  .faq-group h2 .icon svg { width: 20px; height: 20px; }
  .faq-group .stack { display: grid; gap: 10px; }
  .faq-nav { position: sticky; top: calc(var(--nav-h) + 40px); display: none; }
  .faq-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-weight: 600; color: var(--ink-body); transition: background 0.2s, color 0.2s; }
  .faq-nav a:hover, .faq-nav a.is-active { background: var(--surface); color: var(--orange-ink); }
  .faq-nav a .n { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted); }
  @media (min-width: 1000px) {
    .faq-layout { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
    .faq-nav { display: grid; gap: 4px; }
  }

  /* ---- Policy reader ---- */
  .policy { display: grid; gap: 40px; align-items: start; }
  .toc { display: grid; gap: 2px; }
  .toc__title { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; }
  .toc a { display: block; padding: 8px 12px; border-left: 2px solid var(--cream-shadow); font-size: 0.875rem; font-weight: 500; color: var(--ink-body); line-height: 1.35; transition: color 0.2s, border-color 0.2s; }
  .toc a:hover { color: var(--ink); }
  .toc a.is-active { color: var(--orange-ink); border-color: var(--orange); font-weight: 600; }
  .toc-mobile { border: 1px solid var(--edge); border-radius: var(--r-l); background: var(--surface); padding: 4px 16px; }
  .toc-mobile summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-weight: 700; cursor: pointer; }
  .toc-mobile summary svg { width: 18px; height: 18px; transition: transform 0.3s; }
  .toc-mobile[open] summary svg { transform: rotate(180deg); }
  .toc-mobile .toc { padding-bottom: 12px; }
  .toc-desktop { display: none; }
  @media (min-width: 1000px) {
    .policy { grid-template-columns: 250px minmax(0, 1fr); gap: 64px; }
    .toc-desktop { display: block; position: sticky; top: calc(var(--nav-h) + 36px); max-height: calc(100vh - var(--nav-h) - 60px); overflow: auto; scrollbar-width: thin; }
    .toc-mobile { display: none; }
  }
  .paper { background: var(--paper); border: 1px solid var(--edge); border-radius: var(--r-xxl); box-shadow: var(--shadow-card-lg); padding: clamp(24px, 4.5vw, 56px); }
  .paper__meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--ink-muted); font-size: 0.9rem; }
  .policy-body { color: var(--ink-body); font-size: 1.0625rem; line-height: 1.75; }
  .policy-body h2 { font-size: 1.45rem; letter-spacing: -0.02em; color: var(--ink); margin: 44px 0 14px; scroll-margin-top: 110px; }
  .policy-body h3 { font-size: 1.1rem; color: var(--ink); margin: 28px 0 10px; scroll-margin-top: 110px; }
  .policy-body h4 { font-size: 1rem; color: var(--ink); margin: 22px 0 8px; }
  .policy-body p { margin: 0 0 16px; }
  .policy-body ol { margin: 0 0 16px; padding-left: 1.5rem; }
  .policy-body ul { margin: 0 0 16px; padding-left: 1.5rem; list-style: none; }
  .policy-body ul > li { position: relative; margin-bottom: 8px; }
  .policy-body ul > li::before { content: ""; position: absolute; left: -1.15rem; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
  .policy-body ol > li { margin-bottom: 8px; }
  .policy-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--orange) 45%, transparent); }
  .policy-body a:hover { text-decoration-color: var(--orange); }
  .policy-body strong { color: var(--ink); font-weight: 700; }
  .policy-body hr { border: 0; border-top: 1px solid var(--cream-shadow); margin: 36px 0; }
  .policy-body blockquote { border-left: 4px solid var(--orange); background: rgba(233, 75, 31, 0.05); padding: 14px 18px; margin: 20px 0; border-radius: 0 12px 12px 0; font-style: italic; }
  .policy-body blockquote p:last-child { margin-bottom: 0; }
  .policy-body .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 18px; border: 1px solid var(--cream-shadow); border-radius: 12px; }
  .policy-body table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9rem; }
  .policy-body thead { background: var(--cream-pressed); }
  .policy-body th, .policy-body td { border-bottom: 1px solid var(--cream-shadow); padding: 10px 12px; text-align: left; vertical-align: top; }
  .policy-body th { font-weight: 700; color: var(--ink); }
  .policy-body tr:last-child td { border-bottom: 0; }
  .legal-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
  .legal-links a { padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--cream-shadow); background: var(--cream-raised); font-size: 0.85rem; font-weight: 600; color: var(--ink-body); transition: border-color 0.2s, color 0.2s; }
  .legal-links a:hover, .legal-links a[aria-current="page"] { border-color: var(--orange); color: var(--orange-ink); }

  /* ---- Interior page hero ---- */
  .page-hero { padding: calc(var(--nav-h) + clamp(56px, 10vw, 120px)) 0 clamp(32px, 5vw, 56px); }
  .page-hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.5vw, 4.6rem); letter-spacing: -0.035em; line-height: 1; }
  .page-hero .lede { margin-top: 20px; }

  /* ---- Contact tiles ---- */
  .contact { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: var(--cream-raised); border: 1px solid var(--cream-shadow); transition: border-color 0.2s, transform 0.4s var(--ease-out), box-shadow 0.4s; }
  .contact:hover { border-color: rgba(233, 75, 31, 0.4); transform: translateY(-3px); box-shadow: var(--shadow-card); }
  .contact small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
  .contact strong { display: block; font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; }

  /* ---- QR ---- */
  .qr { display: grid; place-items: center; gap: 12px; padding: 22px; border-radius: 24px; background: #fff; border: 1px solid var(--cream-shadow); box-shadow: var(--shadow-card); }
  .qr img { width: 168px; height: 168px; }
  .qr small { font-size: 0.8rem; font-weight: 600; color: var(--ink-muted); text-align: center; }

  /* ---- Footer (interior pages) ---- */
  .footer { position: relative; margin-top: var(--section); padding: clamp(56px, 8vw, 96px) 0 32px; background: rgba(251, 246, 236, 0.8); border-top: 1px solid var(--cream-shadow); overflow: clip; }
  .footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(233, 75, 31, 0.4), transparent); }
  .footer__top { display: grid; gap: 28px; padding-bottom: clamp(36px, 5vw, 64px); margin-bottom: clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--cream-shadow); }
  .footer__tag { font-size: clamp(2rem, 1.1rem + 4vw, 4.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; color: var(--ink); max-width: 14ch; }
  .footer__tag em { color: var(--orange); }
  .footer__grid { display: grid; gap: 32px 24px; grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand img { height: 26px; width: auto; }
  .footer__brand p { margin-top: 16px; color: var(--ink-muted); font-size: 0.95rem; line-height: 1.6; max-width: 32ch; }
  .footer__col h4 { font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 14px; font-weight: 700; }
  .footer__col ul { display: grid; gap: 10px; }
  .footer__col a { font-weight: 600; color: var(--ink-body); font-size: 0.95rem; transition: color 0.2s; overflow-wrap: anywhere; }
  .footer__col a:hover { color: var(--orange); }
  .footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; margin-top: clamp(36px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--cream-shadow); color: var(--ink-muted); font-size: 0.8rem; }
  .footer__big { position: absolute; left: 50%; bottom: -0.22em; transform: translateX(-50%); font-size: clamp(5rem, 22vw, 22rem); font-weight: 900; letter-spacing: -0.05em; line-height: 1; color: rgba(26, 24, 21, 0.035); white-space: nowrap; pointer-events: none; user-select: none; }
  @media (min-width: 820px) {
    .footer__top { grid-template-columns: 1fr auto; align-items: end; }
    .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
    .footer__brand { grid-column: auto; }
  }
  .footer--compact { margin-top: 0; padding-top: 40px; }
}

/* --------------------------------------------------------------------------
   The play: one pinned stage, scroll drives a timeline (home page)
   -------------------------------------------------------------------------- */
@layer play {
  html.play-page { scrollbar-width: none; }
  html.play-page::-webkit-scrollbar { width: 0; height: 0; display: none; }

  .play { position: relative; height: 1000vh; }
  .play__stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: clip; isolation: isolate; }

  /* atmosphere, bottom to top: dusk veil, night sky (painted in behind the shooting star by a soft mask whose edge
     is the --sweep variable), stars, then the day sheet of the finale. All sit under the 3D canvas. */
  .play__dusk { position: absolute; inset: 0; z-index: 1; opacity: 0; background: linear-gradient(180deg, #EFE5EF 0%, #DACAE3 55%, #C9B4D8 100%); will-change: opacity; }
  .play__night { position: absolute; inset: 0; z-index: 2; opacity: 0; will-change: opacity; --sweep: -20%; /* the mask's angle must match SWEEP in js/site.js */
    -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--sweep) - 20%), transparent var(--sweep));
    mask-image: linear-gradient(100deg, #000 calc(var(--sweep) - 20%), transparent var(--sweep));
    background: linear-gradient(180deg, #17214F 0%, #0F1737 45%, #0B1128 100%); }
  /* the nebula and the vignette live on their own layer so the clipped sky stays cheap to repaint while it spreads */
  .play__glow { position: absolute; inset: 0; z-index: 2; opacity: 0; will-change: opacity;
    background: radial-gradient(45% 40% at 78% 16%, rgba(140, 110, 210, 0.34) 0%, rgba(140, 110, 210, 0) 70%),
                radial-gradient(50% 45% at 16% 88%, rgba(196, 150, 232, 0.22) 0%, rgba(196, 150, 232, 0) 70%),
                radial-gradient(60% 50% at 50% 48%, rgba(120, 140, 220, 0.12) 0%, rgba(120, 140, 220, 0) 70%),
                radial-gradient(90% 80% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(4, 7, 18, 0.5) 100%); }
  .play__stars { position: absolute; inset: 0; z-index: 3; opacity: 0; overflow: hidden; will-change: opacity; }
  .play__stars i { position: absolute; inset: -8%; background: url('/assets/stars-a.svg') center / cover no-repeat; animation: twinkle 4.6s ease-in-out infinite alternate, drift-a 36s ease-in-out infinite alternate; }
  .play__stars i + i { background-image: url('/assets/stars-b.svg'); animation: twinkle 3.3s ease-in-out -1.7s infinite alternate-reverse, drift-b 50s ease-in-out -18s infinite alternate; }
  .play__stars b { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 calc(var(--s) * 2.4) calc(var(--s) * 0.4) rgba(255, 255, 255, 0.5); animation: star-pulse var(--p) ease-in-out var(--d) infinite alternate; }
  /* the sky only twinkles while it can be seen (js/site.js sets .is-on when the night arrives), so a hidden sky costs nothing */
  .play__stars:not(.is-on) i, .play__stars:not(.is-on) b { animation-play-state: paused; }
  @keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }
  @keyframes drift-a { from { transform: translate(-4%, -2%) rotate(-1.2deg); } to { transform: translate(4%, 2%) rotate(1.2deg); } }
  @keyframes drift-b { from { transform: translate(3%, 2.5%) rotate(0.9deg); } to { transform: translate(-3%, -2.5%) rotate(-0.9deg); } }
  @keyframes star-pulse { from { opacity: 0.08; transform: scale(0.45); } to { opacity: 1; transform: scale(1.35); } }
  @media (prefers-reduced-motion: reduce) { .play__stars i, .play__stars b { animation: none; opacity: 0.8; } }
  /* the day sheet: in the finale the cream page returns over the night with one clean curved edge, never a blend.
     On phones it rises from below (its top edge a soft hill); on desktop it slides in from the right (a bowed left edge). */
  .play__sheet { position: absolute; z-index: 4; left: -40vw; right: -40vw; top: 48vh; top: 48dvh; bottom: -20vh; bottom: -20dvh; border-radius: 90vw 90vw 0 0 / 30vh 30vh 0 0; pointer-events: none; opacity: 0; visibility: hidden; will-change: transform;
    background: linear-gradient(180deg, #FCF8F1 0%, #F6F0E7 55%, #F0E8DA 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 -10px 60px rgba(176, 158, 255, 0.3), 0 -30px 140px rgba(120, 100, 220, 0.22); }
  @media (min-width: 900px) {
    .play__sheet { left: 39vw; right: -12vw; top: -40vh; bottom: -40vh; border-radius: 42vw 0 0 42vw / 90vh 0 0 90vh;
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), -10px 0 60px rgba(176, 158, 255, 0.3), -30px 0 140px rgba(120, 100, 220, 0.22); }
  }
  /* the shooting star: drawn on its own canvas (js/star.js), over the sky and over the wish, only while in flight */
  .play__star { position: absolute; inset: 0; z-index: 8; width: 100%; height: 100%; pointer-events: none; opacity: 0; visibility: hidden; }

  /* layout anchors: invisible boxes, laid out in the flow of their scene, that tell the timeline where the phone rests */
  .play__anchor { flex: none; pointer-events: none; visibility: hidden; position: relative; height: var(--ah); width: calc(var(--ah) * 0.4775); --ah: 41vh; --ah: min(41dvh, calc(100dvh - 330px)); }
  .play__aura { position: absolute; left: 50%; top: 50%; width: 320%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none; z-index: -1; visibility: visible;
    background: radial-gradient(50% 50% at 50% 50%, rgba(233, 75, 31, 0.18) 0%, rgba(243, 149, 104, 0.11) 35%, rgba(156, 181, 138, 0.07) 55%, transparent 72%);
    animation: aura 16s ease-in-out infinite alternate; }
  @keyframes aura { 0% { transform: translate(-4%, 2%) scale(1); } 100% { transform: translate(5%, -4%) scale(1.12); } }

  /* the one phone slot: a resting box, GSAP owns its transform (no CSS translate here) */
  .play .phone-slot { --ph: 41vh; --ph: min(41dvh, calc(100dvh - 330px)); --cy: 33vh; --cy: 33dvh; position: absolute; height: var(--ph); width: calc(var(--ph) * 0.4775); aspect-ratio: auto; left: calc(50% - var(--ph) * 0.4775 / 2); top: calc(var(--cy) - var(--ph) / 2); margin: 0; z-index: 7; }
  .play .phone-slot::before { content: ""; position: absolute; inset: -16% -40%; z-index: -1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(50% 50% at 50% 46%, rgba(233, 75, 31, 0.16), rgba(243, 149, 104, 0.07) 45%, transparent 76%); }

  /* scenes: on phones the phone sits on top and the words fit underneath; on desktop they sit side by side */
  .scene { position: absolute; inset: 0; z-index: 6; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 56vh 16px 4vh; padding: 56dvh 16px 4dvh; }
  .scene > * { pointer-events: auto; }
  .scene > .play__anchor { pointer-events: none; }
  .scene--hero, .scene--download { padding: 12vh 16px 3vh; padding: max(12dvh, calc(var(--nav-h) + 30px)) 16px 3dvh; gap: 14px; }
  .scene--hero .play__anchor { order: -1; }
  .scene__block { width: 100%; max-width: 560px; text-align: center; }
  .scene__block .lede { margin-inline: auto; }
  .scene__num { position: absolute; right: 12px; top: 10vh; top: 10dvh; font-size: 4.5rem; font-weight: 900; letter-spacing: -0.06em; line-height: 1; color: var(--orange); opacity: 0.08; pointer-events: none; }

  /* hero copy */
  .scene--hero h1 { font-size: min(var(--fs-display), 9.2vh); line-height: 0.98; letter-spacing: -0.04em; }
  .scene--hero h1 em { color: var(--orange); }
  .scene--hero .lede { margin-top: 14px; max-width: 46ch; }
  .scene--hero .cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
  .scene--hero .trust { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 16px; color: var(--ink-muted); font-weight: 600; font-size: 0.875rem; }
  .scene--hero .trust span { display: inline-flex; align-items: center; gap: 7px; }
  .scene--hero .trust svg { width: 16px; height: 16px; color: var(--sage-btn); }
  @media (max-width: 899px) {
    .scene--hero h1 { font-size: clamp(2.1rem, 1.4rem + 4vw, 2.8rem); }
    .scene--hero .lede { font-size: 1rem; margin-top: 10px; }
    .scene--hero .cta { margin-top: 14px; }
    .scene--hero .btn--ghost { display: none; }
    .scene--hero .cta .btn { width: 100%; max-width: 360px; }
    .scene--hero .trust { display: none; }
  }
  /* tall phones (toolbars tucked away): bigger words to fill the room */
  @media (max-width: 899px) and (min-height: 780px) {
    .scene--hero h1 { font-size: clamp(2.4rem, 1.6rem + 4.4vw, 3rem); }
    .scene--hero .lede { font-size: 1.05rem; }
    .scene--step .scene__block h2 { font-size: 1.9rem; }
    .scene--step .scene__block p { font-size: 1.02rem; }
    .scene--hub h2 { font-size: 1.95rem; }
    .scene--hub .hub > p:not(.eyebrow) { font-size: 0.98rem; }
    .finale__title { font-size: 2.3rem; }
  }
  @media (max-width: 899px) and (max-height: 620px) {
    .scene--hero .play__anchor, .scene--download .play__anchor { --ah: 30dvh; }
    .scene--hero .lede, .scene--download p, .play__foot .copy { display: none; }
    .scene--hero, .scene--download { gap: 8px; }
    .finale__title { font-size: 1.5rem; }
    .scene--step .scene__block p { font-size: 0.86rem; }
    .scene--step .things { display: none; } /* the smallest phones keep the caption and drop the pills */
  }
  @media (max-width: 899px) and (max-height: 720px) {
    .scene--hero h1 { font-size: 2rem; }
    .scene--hero .lede { font-size: 0.92rem; margin-top: 8px; }
    .scene--hero .cta { margin-top: 12px; }
    .scene--hero .cta .btn { height: 52px; }
    .scene--step .scene__block h2 { font-size: 1.45rem; }
    .scene--step .scene__block p { font-size: 0.92rem; }
    /* shorter phones: two compact pills per step, so the step never runs off the bottom */
    .scene--step .things { gap: 6px; }
    .scene--step .thing { padding: 8px 12px; font-size: 0.8rem; }
    .scene--step .thing:nth-child(3) { display: none; }
  }
  /* the shortest of those (older Androids, 640 tall): a slightly smaller phone in the hero, so the button clears the edge */
  @media (max-width: 899px) and (max-height: 660px) and (min-height: 621px) {
    .scene--hero .play__anchor { --ah: min(37dvh, calc(100dvh - 360px)); }
  }

  /* step captions + the nice things around the phone */
  .scene--step .scene__block h2 { font-size: clamp(1.6rem, 1rem + 3vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.04; }
  .scene--step .scene__block p { margin-top: 10px; color: var(--ink-body); font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.15rem); line-height: 1.5; max-width: 40ch; margin-inline: auto; }
  .things { margin-top: auto; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .thing { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow-card); font-weight: 600; font-size: 0.85rem; color: var(--ink); white-space: nowrap; }
  .thing svg { width: 16px; height: 16px; color: var(--orange); flex: none; }
  .thing--sage svg { color: var(--sage-btn); }
  .thing--note { display: none; }

  /* the wish: a soft speech bubble in the middle of the stage, the thing someone says before the star */
  .scene--wish { justify-content: center; padding: 0 16px; }
  /* the bubble dissolves left to right under the shooting star: a soft mask whose edge (--wipe, set from the star's
     head in js/site.js) sweeps across it. The padding (cancelled by the negative margins) brings the tail and the
     soft shadow inside the masked box, so they go with it. */
  .wish { --wipe: -30%; width: calc(min(92vw, 760px) + 140px); padding: 50px 70px 100px; margin: -50px -70px -100px; pointer-events: none;
    -webkit-mask-image: linear-gradient(100deg, transparent calc(var(--wipe) - 10%), #000 calc(var(--wipe) + 8%));
    mask-image: linear-gradient(100deg, transparent calc(var(--wipe) - 10%), #000 calc(var(--wipe) + 8%)); }
  .wish__box { position: relative; padding: 28px 30px 30px; border-radius: 34px; background: #FFFDF9; color: var(--ink); text-align: center;
    box-shadow: 0 28px 70px rgba(60, 40, 120, 0.2), 0 2px 6px rgba(60, 40, 120, 0.08), inset 0 1px 0 #FFFFFF; }
  .wish__tail { position: absolute; left: 50px; bottom: -24px; width: 44px; height: 31px; color: #FFFDF9; }
  .wish__text { font-size: clamp(1.55rem, 1.05rem + 2.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.2; text-wrap: balance; }
  .wish__text em { color: #5A4EC8; }
  /* the typewriter: untyped letters keep their space; a caret follows the last letter typed, and blinks once it rests */
  .wish__text .ww { display: inline-block; white-space: nowrap; }
  .wish__text .ch { position: relative; }
  .wish__text .ch.is-off { color: transparent; }
  .wish__text .ch.is-caret::after, .wish__text .ch.is-caret-start::after { content: ""; position: absolute; top: 0.12em; bottom: 0.06em; width: 0.08em; border-radius: 2px; background: #5A4EC8; animation: caret 1s steps(1, end) infinite; }
  .wish__text .ch.is-caret::after { left: 100%; margin-left: 0.06em; }
  .wish__text .ch.is-caret-start::after { right: 100%; margin-right: 0.06em; }
  @keyframes caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

  /* support title: the words land in the middle of the night once the star has crossed */
  .scene--title { justify-content: center; padding: 0 16px; }
  .scene--title h2 { font-size: clamp(2.1rem, 1.2rem + 4.2vw, 5rem); color: var(--dark-ink); letter-spacing: -0.04em; line-height: 1.02; }
  .scene--title h2 em { color: #CFC4FF; }
  .scene--title .eyebrow, .scene--hub .eyebrow { color: #B9C6FF; }
  .scene--title p { margin-top: 16px; color: var(--dark-body); font-size: var(--fs-lede); font-weight: 600; max-width: 34ch; margin-inline: auto; }
  @media (max-width: 899px) and (max-height: 720px) { .scene--title h2 { font-size: 2rem; } .scene--title p { font-size: 1rem; margin-top: 10px; } }
  @media (max-width: 379px) { .scene--title .eyebrow { font-size: 0.7rem; letter-spacing: 0.08em; margin-bottom: 12px; } }

  /* the Support hub: two screens, two messages (stacked in one grid cell), the goals beside the settings screen */
  .scene--hub .scene__block { max-width: 520px; display: grid; }
  .scene--hub .hub { grid-area: 1 / 1; }
  .hub__side { margin-top: auto; width: 100%; display: grid; }
  .hub__side > * { grid-area: 1 / 1; }
  .hub__aside { display: none; }
  .scene--hub h2 { font-size: clamp(1.6rem, 1rem + 3vw, 3.2rem); color: var(--dark-ink); letter-spacing: -0.03em; line-height: 1.04; }
  .scene--hub h2 em { color: #CFC4FF; }
  .scene--hub .hub > p:not(.eyebrow) { margin-top: 12px; color: var(--dark-body); font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.1rem); line-height: 1.55; max-width: 42ch; margin-inline: auto; }
  .goals { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-self: end; gap: 8px; }
  .goal { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); color: var(--dark-ink); font-weight: 600; font-size: 0.85rem; white-space: nowrap; box-shadow: 0 0 0 0 rgba(255, 176, 122, 0); }
  .goal::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #D3DEFF; box-shadow: 0 0 10px rgba(190, 205, 255, 0.85); }
  @media (max-width: 899px) {
    .scene--hub .hub > p:not(.eyebrow) { font-size: 0.92rem; line-height: 1.5; max-width: 38ch; }
    .scene--hub .eyebrow { margin-bottom: 12px; }
    .goal:nth-child(n+5) { display: none; }
  }
  /* short phone screens (Safari with its toolbars): the settings message keeps its goals, drops its paragraph */
  @media (max-width: 899px) and (max-height: 720px) { .scene--hub .hub > p:not(.eyebrow) { font-size: 0.88rem; } .hub--b > p:not(.eyebrow) { display: none; } }
  @media (max-width: 899px) and (max-height: 600px) { .scene--hub .hub > p:not(.eyebrow) { display: none; } }

  /* finale */
  .scene--download .scene__block { max-width: 600px; }
  .finale__title { font-size: clamp(2rem, 1.2rem + 3.6vw, 4.2rem); line-height: 1; letter-spacing: -0.035em; }
  .finale__title em { display: block; color: var(--orange); }
  .scene--download p { margin-top: 12px; color: var(--ink-body); font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem); line-height: 1.55; max-width: 42ch; margin-inline: auto; }
  .finale__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 20px; }
  .finale__row .stores { justify-content: center; }
  .qr-tile { display: none; }
  .finale__trust { display: none; }
  @media (max-width: 899px) {
    .finale__title { font-size: clamp(1.7rem, 1.1rem + 3vw, 2.2rem); }
    .scene--download p { font-size: 0.95rem; }
    .finale__row { margin-top: 14px; }
    .play__foot { font-size: 0.66rem; bottom: 8px; gap: 2px 10px; }
  }
  @media (max-width: 599px) {
    .scene--download .store { min-height: 50px; padding: 8px 14px 8px 12px; gap: 8px; border-radius: 14px; }
    .scene--download .store svg { width: 22px; height: 22px; }
    .scene--download .store strong { font-size: 0.95rem; }
    .scene--download .store small { font-size: 0.55rem; }
  }
  .play__foot { position: absolute; left: 16px; right: 16px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 0.72rem; font-weight: 600; color: var(--ink-muted); }
  .play__foot a:hover { color: var(--orange); }
  .play__foot a.extra { display: none; }
  .play__foot .copy { width: 100%; text-align: center; font-weight: 500; margin-top: 2px; }

  @media (min-width: 900px) {
    .play .phone-slot { --ph: min(74vh, 720px); --ph: min(74dvh, 720px); --cy: 50vh; --cy: 50dvh; }

    .scene { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 6vw; }
    .scene--hero, .scene--download { justify-content: center; gap: clamp(36px, 4.5vw, 80px); padding: var(--nav-h) 5vw 0; }
    .scene--download { gap: clamp(64px, 8vw, 130px); } /* the phone stays on the night side of the sheet's edge, the words on the cream */
    .scene--hero .play__anchor { order: 0; --ah: min(74vh, 700px); --ah: min(74dvh, 700px); }
    .scene--download .play__anchor { --ah: min(64vh, 620px); --ah: min(64dvh, 620px); }
    .scene__block { width: min(40vw, 580px); max-width: none; text-align: left; }
    .scene__block .lede { margin-inline: 0; }
    .scene--hero .scene__block { width: min(40vw, 560px); }
    .scene__num { left: 4vw; right: auto; top: 6%; font-size: clamp(7rem, 16vw, 15rem); opacity: 0.07; }
    .scene--hero .cta { justify-content: flex-start; }
    .scene--hero .trust { justify-content: flex-start; }
    .scene--step .scene__block { width: 28vw; }
    .scene--step .scene__block p { margin-inline: 0; }
    .things { margin-top: 0; width: 28vw; display: grid; gap: 12px; justify-items: start; justify-content: start; }
    .things .thing:nth-child(2) { margin-left: 28px; }
    .things .thing:nth-child(3) { margin-left: 10px; }
    .things .thing:nth-child(4) { margin-left: 34px; }
    .thing { font-size: 0.95rem; padding: 11px 16px; }
    .thing--note { display: block; background: transparent; border: 0; box-shadow: none; padding: 4px 0 0; color: var(--ink-muted); font-weight: 500; font-size: 0.9rem; white-space: normal; max-width: 26ch; margin-left: 0 !important; }

    .scene--title { justify-content: center; }
    .scene--title .scene__block { width: min(80vw, 900px); text-align: center; }
    .scene--wish { justify-content: center; }
    .wish__box { padding: 40px 56px 44px; border-radius: 44px; }
    .wish__tail { left: 72px; }
    .scene--title p { margin-inline: auto; }
    .scene--hub .scene__block { width: 30vw; max-width: 520px; }
    .scene--hub .hub > p:not(.eyebrow) { margin-inline: 0; }
    .hub__side { margin-top: 0; width: 26vw; align-items: center; }
    .hub__aside { display: block; font-size: clamp(1.5rem, 0.9rem + 1.9vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; color: var(--dark-ink); }
    .hub__aside span { display: block; margin-top: 12px; font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1.5; color: var(--dark-body); max-width: 26ch; }
    .goals { width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-start; align-content: center; align-self: center; gap: 10px; }
    .goal { font-size: 0.95rem; padding: 11px 16px; }

    .note { width: min(26vw, 340px); left: auto; right: auto; top: calc(50% - 110px); text-align: left; }
    .note__ic { margin: 0 0 12px; }
    .note::after { display: block; position: absolute; top: 50%; width: 6vw; height: 1px; background: linear-gradient(90deg, rgba(255, 176, 122, 0.6), rgba(255, 176, 122, 0)); }
    .note--l { left: 7vw; }
    .note--r { right: 7vw; }
    .note--l::after { left: 100%; margin-left: 12px; }
    .note--r::after { right: 100%; margin-right: 12px; transform: scaleX(-1); }

    .scene--download .scene__block { width: min(42vw, 600px); max-width: none; }
    .scene--download p { margin-inline: 0; }
    .finale__row { justify-content: flex-start; }
    .finale__row .stores { justify-content: flex-start; }
    .qr-tile { display: inline-flex; align-items: center; gap: 14px; margin-top: 14px; padding: 10px 18px 10px 10px; border-radius: 20px; background: var(--cream-raised); border: 1px solid var(--cream-shadow); box-shadow: var(--shadow-card); }
    .qr-tile img { width: 84px; height: 84px; border-radius: 12px; }
    .qr-tile strong { display: block; font-size: 0.92rem; color: var(--ink); }
    .qr-tile span { display: block; font-size: 0.76rem; color: var(--ink-muted); margin-top: 3px; }
    .finale__trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; color: var(--ink-muted); font-weight: 600; font-size: 0.875rem; }
    .finale__trust span { display: inline-flex; align-items: center; gap: 7px; }
    .finale__trust svg { width: 16px; height: 16px; color: var(--sage-btn); }
    .play__foot { bottom: 18px; left: calc(46vw + 24px); right: 24px; } /* on the cream side of the sheet's edge */
    .play__foot a.extra { display: inline; }
  }
  /* short desktop windows: the finale keeps the badges, drops the extras */
  @media (min-width: 900px) and (max-height: 760px) {
    .qr-tile, .finale__trust { display: none; }
    .finale__title { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); }
  }

  /* static fallback (no JS, no GSAP, or reduced motion): scenes stack like a normal page */
  html:not(.js) .play, .play--static { height: auto; }
  html:not(.js) .play__stage, .play--static .play__stage { position: static; height: auto; display: grid; gap: 56px; padding: calc(var(--nav-h) + 48px) var(--gutter) 48px; }
  html:not(.js) .play__night, .play--static .play__night, html:not(.js) .play__anchor, .play--static .play__anchor,
  html:not(.js) .play__dusk, .play--static .play__dusk, html:not(.js) .play__stars, .play--static .play__stars, html:not(.js) .play__sheet, .play--static .play__sheet, html:not(.js) .play__glow, .play--static .play__glow, html:not(.js) .scene__num, .play--static .scene__num { display: none; }
  html:not(.js) .scene, .play--static .scene { position: static; padding: 0; flex-direction: column; }
  html:not(.js) .scene > *, .play--static .scene > * { position: static !important; width: auto !important; max-width: 640px; margin-inline: auto; text-align: center; }
  html:not(.js) .scene--title, .play--static .scene--title, html:not(.js) .scene--hub, .play--static .scene--hub { background: var(--night); border-radius: var(--r-xxl); padding: 48px 24px; }
  html:not(.js) .goals, .play--static .goals { margin-top: 16px; display: flex; justify-content: center; }
  html:not(.js) .play__star, .play--static .play__star, html:not(.js) .scene--wish, .play--static .scene--wish { display: none; }
  html:not(.js) .scene--hub .scene__block, .play--static .scene--hub .scene__block { display: block; }
  html:not(.js) .hub + .hub, .play--static .hub + .hub { margin-top: 36px; }
  html:not(.js) .play .phone-slot, .play--static .phone-slot { position: static; height: min(60vh, 540px); width: auto; aspect-ratio: 1274 / 2668; margin-inline: auto; order: 1; }
  html:not(.js) .things, .play--static .things { margin-top: 12px; display: flex; justify-content: center; }
}

/* --------------------------------------------------------------------------
   Other pages
   -------------------------------------------------------------------------- */
@layer pages {
  .download { padding: calc(var(--nav-h) + clamp(48px, 9vw, 112px)) 0 0; }
  .download__card { display: grid; gap: 36px; align-items: center; padding: clamp(28px, 5vw, 56px); }
  .download__icon { width: 84px; height: 84px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-card-lg); margin-bottom: 24px; }
  .download__icon img { width: 100%; height: 100%; }
  .download__meta { margin-top: 18px; color: var(--ink-muted); font-size: 0.9rem; font-weight: 500; }
  @media (min-width: 820px) { .download__card { grid-template-columns: 1.3fr 0.9fr; } }

  .lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 40px) var(--gutter) 60px; }
  .lost__num { font-size: clamp(6rem, 25vw, 16rem); font-weight: 900; letter-spacing: -0.06em; line-height: 0.9; color: var(--orange); opacity: 0.9; }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
@layer motion {
  /* Reveal states only apply when JS is present, so content is never trapped hidden. */
  .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 0; transform: translateY(28px); }
  .js .is-revealed[data-reveal], .js .is-revealed[data-reveal-stagger] > * { opacity: 1; transform: none; }
  .js.io [data-reveal], .js.io [data-reveal-stagger] > * { transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
  .js.io [data-reveal-stagger] > :nth-child(2) { transition-delay: 0.08s; }
  .js.io [data-reveal-stagger] > :nth-child(3) { transition-delay: 0.16s; }
  .js.io [data-reveal-stagger] > :nth-child(n+4) { transition-delay: 0.24s; }

  /* split headlines: each word in an overflow mask so it can rise in */
  .is-split .wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
  .is-split .wi { display: inline-block; }

  /* Cross-document view transitions: a soft crossfade between pages, the nav stays put. */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 0.22s ease-out both vt-out; }
  ::view-transition-new(root) { animation: 0.32s var(--ease-out) both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 1; transform: none; transition: none; }
    .play__aura { animation: none !important; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    .btn::after { display: none; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
  }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
@layer utilities {
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
  .center { text-align: center; }
  .stack-6 { display: grid; gap: 24px; }
  .stack-4 { display: grid; gap: 16px; }
  .cols-2 { display: grid; gap: 18px; }
  @media (min-width: 720px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
  .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
  .hide-mobile { display: none; }
  @media (min-width: 820px) { .hide-mobile { display: initial; } }
}
