/* ==========================================================================
   Sizmara (სიზმარა) — website styles, v2. One sheet for every page.

   Day: cream paper, plum ink, coral. Bedtime (dark scheme): deep indigo,
   lavender ink, peach. The hero card, the Plus plan and the closing call to
   action always wear the bedtime look. Colours mirror the app's
   constants/colors.ts; the type ramp mirrors its marketing steps in
   constants/typography.ts. See DESIGN.md for the plan and the motion map.

   Only transform and opacity animate. Springs are precomputed CSS linear()
   curves (tools/springs.mjs). Everything that moves stops under
   prefers-reduced-motion.
   ========================================================================== */

/* ---------- Fonts (served from /fonts, no third-party request) ---------- */

/* Google Sans Flex — the Android app's face — instanced at ROND 100 (fully
   rounded), opsz 18, wght 400–800, Latin only. OFL, see fonts/. */
@font-face {
  font-family: "Google Sans Flex Rounded";
  src: url("/fonts/google-sans-flex-rounded-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AB, U+00B7, U+00BB, U+00D7, U+2010-2015, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+20AC, U+2122, U+2190-2193, U+2212;
}

@font-face {
  font-family: "Noto Sans Georgian";
  src: url("/fonts/noto-sans-georgian-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
}

/* The lari sign (₾) only. */
@font-face {
  font-family: "Noto Sans Georgian";
  src: url("/fonts/noto-sans-georgian-lari.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+20BE;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* Day */
  --bg: #FFF8EE;
  --bg-2: #FBEEDD;
  --card: #FFFDF8;
  --ink: #2E2440;
  --ink-2: #5E5270;
  --ink-3: #6E6380;
  --line: rgba(46, 36, 64, 0.1);
  --line-2: rgba(46, 36, 64, 0.2);
  --accent: #E8603F;
  --accent-ink: #B24E2A;
  --accent-wash: #FFE3D6;
  --btn: #2E2440;
  --on-btn: #FFF8EE;
  --ghost: rgba(46, 36, 64, 0.06);
  --ghost-2: rgba(46, 36, 64, 0.1);

  /* The bedtime night, fixed in both schemes (hero, Plus, closing card). */
  --night-0: #2C2563;
  --night-1: #1E1B40;
  --night-2: #141230;
  --on-night: #F4F0FF;
  --on-night-2: #C9C1E6;
  --on-night-3: #A39BC4;
  --peach: #FFB38A;
  --moon: #FFD36E;
  --star: #FFF3D1;

  /* Candy pastels with a readable ink partner each. */
  --peach-bg: #FFD9C7;  --peach-ink: #9E401C;
  --mint-bg: #CFF2E2;   --mint-ink: #17663F;
  --lilac-bg: #E6DBFF;  --lilac-ink: #5A3DB3;
  --sky-bg: #D4ECFF;    --sky-ink: #235E9C;
  --butter-bg: #FFF0B8; --butter-ink: #735100;
  --pink-bg: #FFD9E8;   --pink-ink: #99295A;

  --shadow-1: 0 1px 2px rgba(62, 42, 20, 0.06), 0 10px 28px -16px rgba(62, 42, 20, 0.22);
  --shadow-2: 0 1px 2px rgba(62, 42, 20, 0.06), 0 34px 64px -34px rgba(46, 36, 64, 0.5);
  --phone-shadow: 0 2px 4px rgba(20, 14, 40, 0.16), 0 40px 70px -30px rgba(46, 36, 64, 0.55);

  --r-1: 14px;
  --r-2: 20px;
  --r-3: 28px;
  --r-4: 40px;

  --font: ui-rounded, "SF Pro Rounded", "Google Sans Flex Rounded", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type ramp (app marketing steps), fluid from 375 px to 1280 px wide. */
  --fs-display: clamp(48px, 33.08px + 3.978vw, 84px);
  --fs-section: clamp(36px, 29.37px + 1.768vw, 52px);
  --fs-feature: clamp(20px, 19.17px + 0.221vw, 22px);
  --fs-body: clamp(16px, 15.17px + 0.221vw, 18px);
  --fs-eyebrow: clamp(16px, 15.17px + 0.221vw, 18px);
  --fs-nav: 14px;
  --fs-button: 16px;
  --fs-meta: 13px;

  --gutter: 16px;
  --max: 1200px;
  --max-wide: 1280px;
  --header-h: 64px;
  --logo-n: 32;
  --logo: calc(var(--logo-n) * 1px);
  --section-gap: clamp(88px, 10vw, 144px);

  /* Motion. Springs: tools/springs.mjs. */
  --spring: linear(0, 0.0211, 0.0746, 0.1483, 0.2332, 0.3224, 0.411, 0.4957, 0.5744, 0.6457, 0.7091, 0.7645, 0.8122, 0.8527, 0.8865, 0.9144, 0.9372, 0.9554, 0.9697, 0.9809, 0.9893, 0.9956, 1.0001, 1.0033, 1.0053, 1.0065, 1.0071, 1.0072, 1.007, 1.0065, 1.006, 1.0054, 1.0047, 1.0041, 1.0035, 1.0029, 1.0024, 1.002, 1.0016, 1.0013, 1);
  --spring-t: 670ms;
  --spring-soft: linear(0, 0.0229, 0.0788, 0.1531, 0.2359, 0.3206, 0.4028, 0.48, 0.5507, 0.6143, 0.6708, 0.7204, 0.7636, 0.8008, 0.8327, 0.8599, 0.883, 0.9026, 0.919, 0.9328, 0.9444, 0.954, 0.9621, 0.9687, 0.9743, 0.9789, 0.9826, 0.9858, 0.9883, 0.9905, 0.9922, 0.9936, 0.9948, 0.9958, 0.9965, 0.9972, 0.9977, 0.9981, 0.9985, 0.9988, 1);
  --spring-soft-t: 880ms;
  --spring-pop: linear(0, 0.0313, 0.1127, 0.2267, 0.3583, 0.4953, 0.6281, 0.7499, 0.8561, 0.9442, 1.0136, 1.0648, 1.0993, 1.1192, 1.127, 1.1252, 1.1165, 1.1029, 1.0866, 1.0692, 1.052, 1.0361, 1.0219, 1.01, 1.0005, 0.9934, 0.9884, 0.9854, 0.984, 0.9839, 0.9848, 0.9864, 0.9884, 0.9906, 0.9928, 0.9949, 0.9967, 0.9983, 0.9996, 1.0006, 1.0013, 1.0018, 1.002, 1.0021, 1.002, 1.0018, 1.0016, 1.0013, 1);
  --spring-pop-t: 729ms;
  --spring-snappy: linear(0, 0.0211, 0.0745, 0.1481, 0.2327, 0.3216, 0.4098, 0.4941, 0.5723, 0.6433, 0.7064, 0.7616, 0.8091, 0.8495, 0.8833, 0.9113, 0.9341, 0.9524, 0.967, 0.9783, 0.987, 0.9935, 0.9983, 1.0016, 1.0038, 1.0052, 1.006, 1.0063, 1.0062, 1.0059, 1.0055, 1.005, 1.0044, 1.0039, 1.0033, 1.0028, 1.0024, 1.002, 1.0016, 1.0013, 1);
  --spring-snappy-t: 437ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* The landing intro holds the hero's entrance back by this much. */
  --intro-delay: 0.5s;
}

/* Browsers without linear() get a close cubic-bezier instead. */
@supports not (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: cubic-bezier(0.2, 0.9, 0.3, 1.02);
    --spring-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --spring-pop: cubic-bezier(0.3, 1.5, 0.5, 1);
    --spring-snappy: cubic-bezier(0.2, 0.9, 0.3, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141230;
    --bg-2: #1A1740;
    --card: #1E1B40;
    --ink: #F4F0FF;
    --ink-2: #C3BADF;
    --ink-3: #A39BC4;
    --line: rgba(244, 240, 255, 0.1);
    --line-2: rgba(244, 240, 255, 0.22);
    --accent: #FFB38A;
    --accent-ink: #FFB38A;
    --accent-wash: #3A2E55;
    --btn: #FFB38A;
    --on-btn: #141230;
    --ghost: rgba(244, 240, 255, 0.08);
    --ghost-2: rgba(244, 240, 255, 0.14);

    --peach-bg: #4E3148;  --peach-ink: #FFC4A8;
    --mint-bg: #23454A;   --mint-ink: #9FE8C8;
    --lilac-bg: #3A3170;  --lilac-ink: #D8CBFF;
    --sky-bg: #243D66;    --sky-ink: #AFD6FF;
    --butter-bg: #46402A; --butter-ink: #FFE08A;
    --pink-bg: #4D2C4C;   --pink-ink: #FFB8D6;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -16px rgba(0, 0, 0, 0.6);
    --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 34px 64px -30px rgba(0, 0, 0, 0.75);
    --phone-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 40px 70px -28px rgba(0, 0, 0, 0.8);
  }
}

@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 900px) {
  :root {
    --gutter: 32px;
    --header-h: 72px;
    --logo-n: 36;
    --fs-button: 14px;
    --fs-meta: 12px;
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.2; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }

a { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

::selection { background: var(--accent-wash); color: var(--ink); }

[hidden] { display: none !important; }

.nw { white-space: nowrap; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--btn);
  color: var(--on-btn);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.wrap--wide { width: min(100% - 2 * var(--gutter), var(--max-wide)); }

/* ---------- Type roles ---------- */

.t-display {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0;
}
.t-section {
  font-size: var(--fs-section);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}
.t-feature {
  font-size: var(--fs-feature);
  font-weight: 600;
  line-height: 1.3;
}
/* Latin keeps the app's tight marketing tracking and leading. */
:lang(en) .t-display, .t-display:lang(en) { line-height: 1.02; letter-spacing: -0.035em; }
:lang(en) .t-section, .t-section:lang(en) { line-height: 1.08; letter-spacing: -0.035em; }
:lang(en) .t-feature { line-height: 1.27; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-ink);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  line-height: 1.33;
}
.eyebrow .icon { width: 0.85em; height: 0.85em; color: var(--accent); }
:lang(en) .eyebrow { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; }

.lead { color: var(--ink-2); font-size: var(--fs-body); line-height: 1.55; }

.meta { color: var(--ink-3); font-size: var(--fs-meta); font-weight: 500; line-height: 20px; }

/* ---------- Pills and buttons ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  font: 600 var(--fs-button) / 20px var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--spring-snappy-t) var(--spring-snappy), background-color 0.2s ease;
}
.pill .icon { width: 18px; height: 18px; }
.pill:hover { transform: translateY(-1px); text-decoration: none; }
.pill:active { transform: scale(0.97); }
.pill--ghost { background: var(--ghost); color: var(--ink); }
.pill--ghost:hover { background: var(--ghost-2); }
.pill--solid { background: var(--btn); color: var(--on-btn); }
.pill--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* "Coming soon to the App Store": a store-style badge that is not a link. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 20px 9px 12px;
  border-radius: 14px;
  background: #0E0C1A;
  color: #FFFFFF;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.soon .icon { width: 30px; height: 30px; color: var(--moon); }
.soon small { display: block; font-size: 12px; font-weight: 600; opacity: 0.85; }
.soon strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.site-header.is-scrolled::before { opacity: 1; }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header::before { background: var(--bg); }
}

.site-header__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  border-radius: 12px;
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: var(--logo);
  height: var(--logo);
  flex: none;
  border-radius: 23%;
  box-shadow: 0 6px 14px -6px rgba(31, 24, 66, 0.55);
}
@media (min-width: 900px) { .brand { font-size: 20px; line-height: 24px; } }

.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; gap: 2px; justify-self: center; }
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: var(--fs-nav);
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav a:hover { background: var(--ghost); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ghost); color: var(--ink); font-weight: 600; }

.lang { grid-column: 3; justify-self: end; }
.lang .icon { width: 17px; height: 17px; }

/* ---------- Landing intro: the app icon pops, then flies to the logo ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  animation: intro-done 1ms 0.96s both;
}
.intro__veil {
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: fade-out 360ms var(--ease-out) 0.4s both;
}
/* Laid out at the header logo's exact spot, 120 px big; the start transform
   centres it on screen, the end transform shrinks it onto the logo. */
.intro__fly {
  position: absolute;
  left: max(var(--gutter), (100% - var(--max-wide)) / 2);
  top: calc((var(--header-h) - var(--logo)) / 2);
  width: 120px;
  height: 120px;
  transform-origin: 0 0;
  transform: translate(calc(50vw - 60px - max(var(--gutter), (100vw - var(--max-wide)) / 2)), calc(50vh - 60px - (var(--header-h) - var(--logo)) / 2)) scale(1);
  animation: intro-fly 560ms var(--spring) 0.42s forwards;
}
@supports (height: 1svh) {
  .intro__fly {
    transform: translate(calc(50vw - 60px - max(var(--gutter), (100vw - var(--max-wide)) / 2)), calc(50svh - 60px - (var(--header-h) - var(--logo)) / 2)) scale(1);
  }
}
.intro__pop {
  width: 100%;
  height: 100%;
  border-radius: 23%;
  box-shadow: 0 24px 50px -18px rgba(31, 24, 66, 0.6);
  animation: intro-pop var(--spring-pop-t) var(--spring-pop) 0s both;
}
.intro__pop svg { width: 100%; height: 100%; }
@keyframes intro-pop {
  from { opacity: 0; transform: scale(0.4); }
  25% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
@keyframes intro-fly {
  to { transform: translate(0, 0) scale(calc(var(--logo-n) / 120)); }
}
@keyframes intro-done { to { visibility: hidden; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* The real logo appears the moment the flying icon lands on it. */
.is-home .site-header .brand__mark { animation: fade-in 1ms 0.95s both; }

/* A deep link skips the intro and the hero waits for nothing. */
:root:has(:target) { --intro-delay: 0s; }
:root:has(:target) .intro { display: none; }
:root:has(:target) .is-home .site-header .brand__mark { animation: none; }

/* ---------- Hero card ---------- */

.hero { padding-top: 4px; }

.hero__card {
  position: relative;
  isolation: isolate;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
  padding: clamp(36px, 5.2vw, 76px) clamp(22px, 5vw, 72px) 0;
  border-radius: clamp(28px, 3vw, 40px);
  overflow: hidden;
  overflow: clip;
  color: var(--on-night);
  background:
    radial-gradient(70% 55% at 50% 102%, rgba(255, 179, 138, 0.26), transparent 70%),
    radial-gradient(60% 50% at 88% 0%, rgba(140, 120, 240, 0.28), transparent 70%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 52%, var(--night-2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px -40px rgba(20, 18, 48, 0.6);
}
@media (max-width: 599px) {
  .hero__card { width: calc(100% - 20px); }
}
@media (prefers-color-scheme: dark) {
  .hero__card { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
}

/* The faint checker of the reference, fading out from the stage. */
.hero__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.045) 0 25%, transparent 0 50%) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(75% 65% at 50% 78%, #000 10%, transparent 75%);
  mask-image: radial-gradient(75% 65% at 50% 78%, #000 10%, transparent 75%);
}

.hero__sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero__sky .icon {
  position: absolute;
  width: 14px;
  height: 14px;
  color: var(--star);
  opacity: 0.7;
  animation: twinkle 5.5s ease-in-out infinite;
}
.hero__sky .icon:nth-child(1) { top: 14%; left: 62%; width: 18px; height: 18px; }
.hero__sky .icon:nth-child(2) { top: 9%; left: 80%; width: 10px; height: 10px; animation-delay: -1.7s; }
.hero__sky .icon:nth-child(3) { top: 30%; left: 92%; width: 12px; height: 12px; animation-delay: -3.2s; }
.hero__sky .icon:nth-child(4) { top: 46%; left: 4%; width: 10px; height: 10px; animation-delay: -2.4s; }
.hero__sky .icon:nth-child(5) { top: 6%; left: 44%; width: 8px; height: 8px; animation-delay: -4.1s; }
.hero__sky .icon:nth-child(6) { top: 58%; left: 95%; width: 9px; height: 9px; animation-delay: -0.8s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(0.7); }
}
@media (max-width: 899px) {
  .hero__sky .icon:nth-child(1) { top: 4%; left: 78%; }
  .hero__sky .icon:nth-child(4), .hero__sky .icon:nth-child(6) { display: none; }
}

.hero__title { max-width: 12.5em; }
/* "ცოცხლდება" is the longest Georgian word in the headline (about 6.9 em):
   on narrow phones the size shrinks just enough for it to fit the card. */
.hero__title:lang(ka) { font-size: min(var(--fs-display), calc((100vw - 64px) / 6.9)); }
@media (max-width: 599px) {
  .hero__card { padding-inline: 20px; }
}
.hero__title .accent { color: var(--peach); }

/* Each word rises out of its own clipped line box. The clip reaches past the
   box so Georgian ascenders and descenders are never cut. */
.hero__title .w {
  display: inline-block;
  clip-path: inset(-0.25em -0.1em -0.3em -0.1em);
}
.hero__title .w > span {
  display: inline-block;
  animation: word-rise 1s var(--spring) both;
  animation-delay: calc(var(--intro-delay) + var(--d, 0s));
}
.hero__title .w:nth-child(2) > span { --d: 0.07s; }
.hero__title .w:nth-child(3) > span { --d: 0.14s; }
.hero__title .w:nth-child(4) > span { --d: 0.21s; }
.hero__title .w:nth-child(5) > span { --d: 0.28s; }
@keyframes word-rise { from { transform: translateY(118%); } }

.hero__row {
  display: grid;
  gap: 22px;
  align-items: end;
  margin-top: clamp(18px, 2.4vw, 28px);
}
@media (min-width: 900px) {
  .hero__row { grid-template-columns: minmax(0, 36em) auto; justify-content: space-between; gap: 40px; }
}
.hero__lead { margin: 0; color: var(--on-night-2); font-size: var(--fs-body); line-height: 1.55; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 14px;
  list-style: none;
  color: var(--on-night-3);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.hero__facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero__facts .icon { width: 12px; height: 12px; color: var(--peach); }

.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (max-width: 479px) {
  .hero__facts { font-size: 13px; }
  .hero__actions .pill { display: none; }
}
.hero__actions .pill--ghost { background: rgba(255, 255, 255, 0.1); color: var(--on-night); }
.hero__actions .pill--ghost:hover { background: rgba(255, 255, 255, 0.16); }

.hero__text, .hero__actions {
  animation: rise-in 0.9s var(--spring) both;
  animation-delay: calc(var(--intro-delay) + 0.3s);
}
.hero__actions { animation-delay: calc(var(--intro-delay) + 0.42s); }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }

/* The stage: three phones, clipped by the card's bottom edge. */
.hero__stage {
  --pw: clamp(184px, 11.2vw + 142px, 300px);
  position: relative;
  height: clamp(282px, 15.5vw + 224px, 440px);
  margin-top: clamp(30px, 4.4vw, 60px);
}
.hp {
  position: absolute;
  top: clamp(12px, 2.6vw, 34px);
  left: 50%;
  width: var(--pw);
  margin-left: calc(var(--pw) / -2);
}
.hp--center { z-index: 3; }
.hp--side { z-index: 2; }
.hp--side .phone { width: 88%; margin-inline: auto; }
.hp__rise {
  animation: phone-rise 1.05s var(--spring-soft) both;
  animation-delay: calc(var(--intro-delay) + 0.12s);
}
.hp__fan { transform-origin: 50% 100%; }
.hp--left .hp__fan {
  animation: fan-left 1s var(--spring) both;
  animation-delay: calc(var(--intro-delay) + 0.72s);
}
.hp--right .hp__fan {
  animation: fan-right 1s var(--spring) both;
  animation-delay: calc(var(--intro-delay) + 0.8s);
}
/* On desktop the whole card fits the first screen, so its bottom edge is
   what cuts the phones, as in the reference. */
@media (min-width: 900px) {
  .hero__card { padding-top: 56px; }
  .hero__row { margin-top: 22px; }
  .hero__stage { height: clamp(330px, calc(100vh - 522px), 440px); margin-top: 40px; }
  .hp { top: 24px; }
}
@supports (height: 1svh) {
  @media (min-width: 900px) {
    .hero__stage { height: clamp(330px, calc(100svh - 522px), 440px); }
  }
}
@keyframes phone-rise { from { transform: translateY(78%); } }
@keyframes fan-left {
  from { transform: none; }
  to { transform: translate(-82%, 9%) rotate(-8deg); }
}
@keyframes fan-right {
  from { transform: none; }
  to { transform: translate(82%, 9%) rotate(8deg); }
}

/* Scroll parallax on the hero phones, where scroll-driven animations exist. */
@supports (animation-timeline: scroll()) {
  .hp {
    animation: drift-up linear both;
    animation-timeline: scroll(root);
    animation-range: 0 75vh;
  }
  .hp--side { animation-name: drift-up-less; }
  @keyframes drift-up { to { transform: translateY(-46px); } }
  @keyframes drift-up-less { to { transform: translateY(-14px); } }
}

/* ---------- Phone mockup (Magic UI iPhone geometry, MIT) ---------- */

.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 433 / 882;
}
.phone::before {
  content: "";
  position: absolute;
  inset: 0.6% 1.2%;
  z-index: -1;
  border-radius: 16.5% / 8.1%;
  box-shadow: var(--phone-shadow);
}
/* The frame (titanium band, bezel, buttons, island) is one cached SVG laid
   over the screen. */
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url("/img/iphone.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}
.phone__screen {
  position: absolute;
  left: 4.907%;
  top: 2.182%;
  width: 89.954%;
  height: 95.635%;
  overflow: hidden;
  border-radius: 14.31% / 6.61%;
  background: #0B0A0E;
}
.phone__screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
.hero .phone::before { box-shadow: 0 30px 60px -20px rgba(5, 3, 20, 0.7); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-gap) 0; overflow-x: clip; }

/* Below the fold the browser skips layout, paint and lazy images until a
   section comes near; the placeholder sizes are rough heights. A #target
   (a deep link or a nav click) renders everything first, so jumps land
   exactly where they should. */
.is-home .features { content-visibility: auto; contain-intrinsic-size: auto 5200px; }
.is-home .ai { content-visibility: auto; contain-intrinsic-size: auto 2650px; }
.is-home .shelf { content-visibility: auto; contain-intrinsic-size: auto 980px; }
.is-home .pricing { content-visibility: auto; contain-intrinsic-size: auto 1870px; }
.is-home #faq { content-visibility: auto; contain-intrinsic-size: auto 1090px; }
.is-home .cta { content-visibility: auto; contain-intrinsic-size: auto 680px; }
@media (min-width: 900px) {
  .is-home .features { contain-intrinsic-size: auto 4200px; }
  .is-home .ai { contain-intrinsic-size: auto 1470px; }
  .is-home .shelf { contain-intrinsic-size: auto 1110px; }
  .is-home .pricing { contain-intrinsic-size: auto 1000px; }
  .is-home #faq { contain-intrinsic-size: auto 970px; }
  .is-home .cta { contain-intrinsic-size: auto 870px; }
}
:root:has(:target) .is-home :is(.features, .ai, .shelf, .pricing, #faq, .cta),
.cv-off .is-home :is(.features, .ai, .shelf, .pricing, #faq, .cta) { content-visibility: visible; }
/* Paint containment clips at the section edge, so the last phone's shadow
   needs room inside the features section. */
.is-home .features { padding-bottom: 72px; }
.is-home .ai { padding-top: calc(var(--section-gap) - 72px); padding-bottom: 32px; }
.is-home .shelf { padding-top: calc(var(--section-gap) - 32px); }

.section-head {
  max-width: 860px;
  margin: 0 auto clamp(44px, 6vw, 76px);
  text-align: center;
}
.section-head .lead { margin-top: 16px; }

/* ---------- How it works ---------- */

.how__list {
  display: grid;
  gap: 40px;
  list-style: none;
}
.how__item {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}
.how__phone { max-width: 210px; }
.how__num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 800;
}
.how__item h3 { margin-bottom: 6px; }
.how__item p { color: var(--ink-2); }
@media (min-width: 760px) {
  .how__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: start; }
  .how__item { grid-template-columns: none; gap: 26px; align-items: start; text-align: center; }
  .how__phone { width: min(100%, 268px); max-width: none; margin-inline: auto; }
  .how__num { margin-inline: auto; }
  .how__item:nth-child(1) { margin-top: 48px; }
  .how__item:nth-child(3) { margin-top: 96px; }
}
@supports (animation-timeline: view()) {
  @media (min-width: 760px) {
    .how__phone {
      animation: how-drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .how__item:nth-child(2) .how__phone { animation-name: how-drift-2; }
    .how__item:nth-child(3) .how__phone { animation-name: how-drift-3; }
    @keyframes how-drift { from { transform: translateY(24px); } to { transform: translateY(-24px); } }
    @keyframes how-drift-2 { from { transform: translateY(48px); } to { transform: translateY(-48px); } }
    @keyframes how-drift-3 { from { transform: translateY(10px); } to { transform: translateY(-10px); } }
  }
}

/* ---------- Features (zigzag) ---------- */

.features__list { display: grid; gap: clamp(72px, 10vw, 136px); }

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
}
.feature__media {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 8px;
}
/* A soft pastel moon behind each phone. */
.feature__media::before {
  content: "";
  position: absolute;
  width: min(92%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow, var(--peach-bg)), transparent);
  opacity: 0.9;
}
.feature:nth-child(2) .feature__media { --glow: var(--lilac-bg); }
.feature:nth-child(3) .feature__media { --glow: var(--mint-bg); }
.feature:nth-child(4) .feature__media { --glow: var(--sky-bg); }
.feature:nth-child(5) .feature__media { --glow: var(--butter-bg); }
.feature__phone { position: relative; width: min(64vw, 236px); }
.feature__caption {
  position: relative;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.feature__body { max-width: 34em; }
.feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--tone-bg, var(--peach-bg));
  color: var(--tone-ink, var(--peach-ink));
}
.feature__icon .icon { width: 24px; height: 24px; }
.feature:nth-child(2) .feature__icon { --tone-bg: var(--lilac-bg); --tone-ink: var(--lilac-ink); }
.feature:nth-child(3) .feature__icon { --tone-bg: var(--mint-bg); --tone-ink: var(--mint-ink); }
.feature:nth-child(4) .feature__icon { --tone-bg: var(--sky-bg); --tone-ink: var(--sky-ink); }
.feature:nth-child(5) .feature__icon { --tone-bg: var(--butter-bg); --tone-ink: var(--butter-ink); }
.feature__body h3 { margin-bottom: 12px; }
.feature__body p { color: var(--ink-2); }
.feature__body .more { margin-top: 14px; font-weight: 600; }

.checks {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  list-style: none;
}
.checks li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.checks .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--mint-ink); stroke-width: 2.4; }

@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 112px); }
  .feature:nth-child(even) .feature__media { order: 2; }
  .feature__phone { width: min(100%, 300px); }
}

/* ---------- Live player demos (inside the phone screen) ----------
   Sized in container units of the screen, so they scale with the phone. */

.player {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: inline-size;
  background: #241D3B;
  color: #2E2440;
  font-family: var(--font);
}
.player__art { position: absolute; inset: 0; }
.player__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform-origin: 50% 45%;
  transition: opacity 0.75s ease;
}
.player__frame.is-on { opacity: 1; }
.player__frame.is-on, .player__frame.is-leaving {
  animation: cam-push 5s linear both;
}
.player__frame[data-cam="pan-left"].is-on, .player__frame[data-cam="pan-left"].is-leaving { animation-name: cam-pan-left; }
.player__frame[data-cam="pan-right"].is-on, .player__frame[data-cam="pan-right"].is-leaving { animation-name: cam-pan-right; }
.player__frame[data-cam="drift-up"].is-on, .player__frame[data-cam="drift-up"].is-leaving { animation-name: cam-drift-up; }
@keyframes cam-push { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@keyframes cam-pan-left { from { transform: scale(1.1) translateX(3%); } to { transform: scale(1.1) translateX(-3%); } }
@keyframes cam-pan-right { from { transform: scale(1.1) translateX(-3%); } to { transform: scale(1.1) translateX(3%); } }
@keyframes cam-drift-up { from { transform: scale(1.08) translateY(2.5%); } to { transform: scale(1.08) translateY(-2.5%); } }

.player__top {
  position: absolute;
  inset: 13.5cqw 4.5cqw auto;
  display: flex;
  justify-content: space-between;
}
.player__btn {
  display: grid;
  place-items: center;
  width: 8.6cqw;
  height: 8.6cqw;
  border-radius: 50%;
  background: rgba(255, 244, 220, 0.88);
  color: #6B4A12;
  font-size: 3.6cqw;
  font-weight: 700;
  line-height: 1;
}
.player__btn .icon { width: 4.4cqw; height: 4.4cqw; stroke-width: 2.6; }

.player__dock {
  position: absolute;
  inset: auto 3.6cqw 6cqw;
  display: grid;
  gap: 2.4cqw;
}
.player__who {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 1.8cqw;
  padding: 0.9cqw 3cqw 0.9cqw 1cqw;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.9);
  font-size: 3.2cqw;
  font-weight: 700;
  line-height: 1.3;
  transition: opacity 0.3s ease;
}
.player__who img, .player__who .player__book {
  width: 5.4cqw;
  height: 5.4cqw;
  border-radius: 50%;
  object-fit: cover;
}
.player__book { display: grid; place-items: center; background: #E6DBFF; color: #6547BF; }
.player__book .icon { width: 3.4cqw; height: 3.4cqw; }
.player__cap {
  position: relative;
  min-height: calc(2 * 1.42 * 5.3cqw + 7cqw);
  padding: 3.5cqw 4.4cqw;
  border-radius: 5.4cqw;
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 1cqw 4cqw rgba(46, 36, 64, 0.18);
}
.player__line {
  margin: 0;
  color: #2E2440;
  font-size: 5.3cqw;
  font-weight: 700;
  line-height: 1.42;
  text-wrap: wrap;
}
.player__line[hidden] { display: none; }
.player__line .is-said { color: #E8603F; }
.player__line .is-now { color: #F2A48A; }
.player__bar {
  display: flex;
  align-items: center;
  gap: 2.6cqw;
  padding: 2.4cqw 3.6cqw;
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.9);
  color: #6E6380;
  font-size: 2.7cqw;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.player__track {
  position: relative;
  flex: 1;
  height: 1.2cqw;
  border-radius: 999px;
  background: rgba(46, 36, 64, 0.12);
}
.player__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #E8603F;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0.3));
}
.player__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 4.2cqw;
  height: 4.2cqw;
  margin: -2.1cqw 0 0 -2.1cqw;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 0 0.7cqw #E8603F;
}
.player__knob-wrap { position: absolute; inset: 0; transform: translateX(calc(var(--p, 0.3) * 100%)); }
.player__ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5.4cqw;
  margin-top: 1cqw;
}
.player__ctrl {
  display: grid;
  place-items: center;
  width: 10.4cqw;
  height: 10.4cqw;
  border-radius: 50%;
  background: rgba(255, 226, 160, 0.92);
  color: #7A5410;
}
.player__ctrl .icon { width: 5cqw; height: 5cqw; stroke-width: 2.2; }
.player__ctrl--cc { background: rgba(255, 220, 205, 0.7); color: #B24E2A; }
.player__ctrl--off { opacity: 0.55; }
.player__ctrl--main { width: 15cqw; height: 15cqw; background: #E8603F; color: #FFFFFF; box-shadow: 0 1.4cqw 4cqw rgba(232, 96, 63, 0.45); }
.player__ctrl--main .icon { width: 6cqw; height: 6cqw; }

/* The pictures-only demo: three scenes cross-fade with their camera moves. */
.reel .player__frame { opacity: 1; transition: none; animation: none; }
.reel.is-playing .player__frame, .reel .player__frame { animation-duration: 15s; animation-iteration-count: infinite; animation-timing-function: linear; animation-play-state: paused; }
.reel.is-playing .player__frame { animation-play-state: running; }
.reel .player__frame:nth-child(1) { animation-name: reel-a; }
.reel .player__frame:nth-child(2) { animation-name: reel-b; }
.reel .player__frame:nth-child(3) { animation-name: reel-c; }
@keyframes reel-a {
  0% { transform: scale(1.02); }
  40% { transform: scale(1.11); }
  40.1%, 100% { transform: scale(1.02); }
}
@keyframes reel-b {
  0%, 30% { opacity: 0; transform: scale(1.08) translateY(2.5%); }
  36% { opacity: 1; }
  70% { opacity: 1; transform: scale(1.08) translateY(-2.5%); }
  70.1%, 100% { opacity: 0; transform: scale(1.08) translateY(2.5%); }
}
@keyframes reel-c {
  0%, 63.3% { opacity: 0; transform: scale(1.03); }
  70% { opacity: 1; }
  94% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.12); }
}
.reel .player__fill { animation: reel-progress 15s linear infinite paused; }
.reel.is-playing .player__fill { animation-play-state: running; }
@keyframes reel-progress { from { transform: scaleX(0.04); } to { transform: scaleX(0.4); } }

/* ---------- My story (AI) ---------- */

.ai__card {
  position: relative;
  isolation: isolate;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
  padding: clamp(56px, 8vw, 104px) clamp(18px, 4.6vw, 72px) clamp(40px, 6vw, 80px);
  border-radius: clamp(28px, 3vw, 40px);
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(255, 217, 199, 0.9), transparent 70%),
    radial-gradient(55% 55% at 100% 40%, rgba(230, 219, 255, 0.95), transparent 70%),
    radial-gradient(50% 50% at 30% 100%, rgba(255, 240, 184, 0.7), transparent 70%),
    var(--card);
  box-shadow: var(--shadow-1);
}
@media (max-width: 599px) { .ai__card { width: calc(100% - 20px); } }
@media (prefers-color-scheme: dark) {
  .ai__card {
    background:
      radial-gradient(60% 50% at 12% 0%, rgba(255, 179, 138, 0.16), transparent 70%),
      radial-gradient(55% 55% at 100% 40%, rgba(140, 120, 240, 0.22), transparent 70%),
      var(--card);
    box-shadow: inset 0 0 0 1px var(--line);
  }
}

.ai__steps {
  display: grid;
  gap: 56px;
  list-style: none;
  counter-reset: step;
}
.ai-step { display: grid; gap: 22px; justify-items: center; text-align: center; }
.ai-step__visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 300px;
}
.ai-step h3 { margin-bottom: 8px; }
.ai-step h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 14px;
  font-weight: 800;
  vertical-align: 3px;
}
.ai-step p { max-width: 24em; margin-inline: auto; color: var(--ink-2); }

.ai-step__phone { width: 190px; }
.ai-chips {
  position: absolute;
  inset: auto 0 6%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
}
.ai-chips li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  box-shadow: 0 8px 20px -10px rgba(46, 36, 64, 0.45), inset 0 0 0 1.5px var(--line);
}
.ai-chips li:first-child { background: var(--btn); color: var(--on-btn); box-shadow: 0 8px 20px -10px rgba(46, 36, 64, 0.5); }

.ai-portrait {
  position: relative;
  width: min(100%, 300px);
  margin-bottom: 26px;
}
.ai-portrait img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
}
.ai-portrait__ask {
  position: absolute;
  left: 50%;
  bottom: -18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 16px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-1);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}
.ai-portrait__ask span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) { .ai-portrait__ask span { color: #241A3A; } }

.ai-scenes { position: relative; width: min(100%, 330px); height: 300px; }
.ai-scenes img {
  position: absolute;
  top: 6px;
  width: 52%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
}
.ai-scenes img:nth-child(1) { left: 4%; transform: rotate(-5deg); }
.ai-scenes img:nth-child(2) { right: 4%; top: 24px; transform: rotate(5deg); }
/* The two scenes start stacked and fan out once revealed. */
.ai-scenes.is-armed img:nth-child(1) { transform: translateX(42%) rotate(0deg); }
.ai-scenes.is-armed img:nth-child(2) { transform: translateX(-42%) rotate(0deg); }
.ai-scenes.is-armed.is-in img { transition: transform 1.1s var(--spring); }
.ai-scenes.is-armed.is-in img:nth-child(1) { transform: rotate(-5deg); transition-delay: calc(var(--stagger, 0s) + 0.25s); }
.ai-scenes.is-armed.is-in img:nth-child(2) { transform: rotate(5deg); transition-delay: calc(var(--stagger, 0s) + 0.3s); }
.ai-scenes__label {
  position: absolute;
  left: 50%;
  bottom: -2px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-1);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

@media (min-width: 960px) {
  .ai__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .ai-step { grid-template-rows: 430px auto auto; align-content: start; }
  .ai-step__visual { min-height: 0; height: 430px; place-items: end center; }
  .ai-step__phone { width: 200px; }
  .ai-portrait { margin-bottom: 40px; }
  .ai-scenes { margin-bottom: 20px; }
  .ai-step + .ai-step::after {
    /* a dotted path between the steps */
    content: "";
    position: absolute;
    top: 200px;
    left: -24px;
    width: 32px;
    height: 2px;
    background: radial-gradient(circle, var(--accent) 1px, transparent 1.5px) 0 50% / 8px 2px repeat-x;
  }
  .ai-step { position: relative; }
}

.ai__foot {
  display: grid;
  gap: 18px;
  max-width: 880px;
  margin: clamp(48px, 6vw, 72px) auto 0;
}
@media (min-width: 900px) { .ai__foot { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--r-2);
  background: var(--mint-bg);
  color: var(--ink);
}
.note > .icon { width: 26px; height: 26px; margin-top: 1px; color: var(--mint-ink); }
.note strong { display: block; margin-bottom: 2px; }
.note p { font-size: 15px; line-height: 1.5; }
.note a { color: var(--ink); font-weight: 600; }
.ai__price { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.ai__price strong { color: var(--ink); }
.ai__example { margin-top: 10px; color: var(--ink-3); font-size: 13px; line-height: 1.5; }

/* ---------- Story shelf (marquee) ---------- */

.shelf { padding-top: var(--section-gap); overflow: hidden; overflow: clip; }
.marquee { --gap: 16px; --card-w: 156px; display: grid; gap: 18px; }
@media (min-width: 900px) { .marquee { --gap: 22px; --card-w: 208px; gap: 26px; } }
/* Without home.js (or with reduced motion) each row is a plain scrollable
   shelf; once the script has added the copies, the rows glide. */
.marquee__row {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding-inline: var(--gutter);
  scrollbar-width: none;
}
.marquee__row::-webkit-scrollbar { display: none; }
.marquee__track {
  display: flex;
  flex: none;
  gap: var(--gap);
  padding-block: 10px 18px;
  list-style: none;
}
.marquee.is-ready .marquee__row {
  overflow: hidden;
  padding-inline: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee.is-ready .marquee__track {
  min-width: 100%;
  animation: marquee var(--dur, 64s) linear infinite;
}
.marquee.is-ready .marquee__row--reverse .marquee__track { animation-direction: reverse; --dur: 58s; }
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track,
.marquee.is-paused .marquee__track,
.marquee.is-offscreen .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }

.cover { position: relative; flex: none; width: var(--card-w); }
.cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-2);
  background: var(--bg-2);
  box-shadow: var(--shadow-1);
}
.cover figcaption { padding: 12px 4px 0; }
.cover strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.cover figcaption span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; font-weight: 500; line-height: 1.4; }
.cover__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  box-shadow: 0 2px 8px -2px rgba(20, 12, 30, 0.35);
}
.cover__badge--free { background: var(--mint-bg); color: var(--mint-ink); }
.cover__badge--bedtime { background: var(--lilac-bg); color: var(--lilac-ink); }

/* The pause control keeps its space even before the copies exist, so the
   shelf never changes height under the reader. */
.marquee__controls { display: flex; justify-content: center; margin-top: 8px; visibility: hidden; }
.marquee.is-ready .marquee__controls { visibility: visible; }
.marquee__toggle .icon-play { display: none; }
.marquee__toggle[aria-pressed="true"] .icon-play { display: block; }
.marquee__toggle[aria-pressed="true"] .icon-pause { display: none; }

/* ---------- Pricing ---------- */

.billing {
  display: inline-flex;
  margin: 0 auto clamp(28px, 4vw, 40px);
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--ghost);
}
.billing-wrap { display: flex; justify-content: center; }
.billing input { position: absolute; opacity: 0; pointer-events: none; }
.billing label {
  position: relative;
  min-width: 110px;
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.25s ease;
}
.billing input:checked + label { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
.billing input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }

.plans {
  display: grid;
  gap: 20px;
  max-width: 520px;
  margin-inline: auto;
  list-style: none;
}
@media (min-width: 960px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; align-items: stretch; }
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px 28px;
  border-radius: var(--r-3);
  background: var(--card);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
}
.plan h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.plan__price {
  margin: 18px 0 2px;
  font-size: clamp(40px, 34px + 1.2vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.plan__price small { margin-left: 6px; color: var(--ink-2); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.plan__alt { min-height: 24px; color: var(--ink-2); font-size: 15px; font-weight: 600; line-height: 24px; }
.plan .checks { padding-top: 22px; margin-top: 22px; border-top: 1px dashed var(--line-2); }
.plan--plus {
  color: var(--on-night);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(140, 120, 240, 0.35), transparent 70%),
    linear-gradient(180deg, var(--night-0), var(--night-2));
  box-shadow: 0 30px 60px -30px rgba(20, 18, 48, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.plan--plus .plan__price small, .plan--plus .plan__alt { color: var(--on-night-2); }
.plan--plus .checks { border-top-color: rgba(244, 240, 255, 0.22); }
.plan--plus .checks .icon { color: #9FE8C8; }
.plan__ribbon {
  position: absolute;
  top: 26px;
  right: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--peach);
  color: #3A1F12;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}
.plan__swap { display: grid; }
.plan__swap > * {
  grid-area: 1 / 1;
  transition: opacity 0.3s ease, transform var(--spring-t) var(--spring), visibility 0s linear 0s;
}
.plan__year { opacity: 0; visibility: hidden; transform: translateY(8px); }
.pricing:has(#bill-year:checked) .plan__year { opacity: 1; visibility: visible; transform: none; }
.pricing:has(#bill-year:checked) .plan__month { opacity: 0; visibility: hidden; transform: translateY(-8px); }

.fineprint {
  max-width: 820px;
  margin: 28px auto 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: 12px; max-width: 820px; margin-inline: auto; }
.faq-list details {
  border-radius: var(--r-2);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.25s ease;
}
.faq-list details[open] { box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.faq-list summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 20px 18px 22px;
  border-radius: var(--r-2);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
  stroke-width: 2.6;
  transition: transform var(--spring-t) var(--spring);
}
.faq-list details[open] summary .icon { transform: rotate(180deg); }
.faq-list .answer { padding: 0 22px 20px; color: var(--ink-2); }
.faq-list details[open] .answer { animation: rise-in 0.5s var(--spring) both; }
.faq-more { margin-top: 26px; color: var(--ink-2); text-align: center; }

/* ---------- Closing call to action ---------- */

.cta { padding-block: var(--section-gap) clamp(56px, 7vw, 96px); }
.cta__card {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100% - 2 * var(--gutter), var(--max-wide));
  margin-inline: auto;
  padding: clamp(56px, 8vw, 96px) clamp(22px, 5vw, 64px);
  border-radius: clamp(28px, 3vw, 40px);
  overflow: hidden;
  overflow: clip;
  color: var(--on-night);
  text-align: center;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(140, 120, 240, 0.35), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(255, 179, 138, 0.24), transparent 70%),
    linear-gradient(180deg, var(--night-0), var(--night-2));
}
@media (max-width: 599px) { .cta__card { width: calc(100% - 20px); } }
.cta__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.04) 0 25%, transparent 0 50%) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
}
.cta__icon {
  width: clamp(84px, 9vw, 112px);
  height: clamp(84px, 9vw, 112px);
  border-radius: 23%;
  box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-8px); } }
.cta .eyebrow { margin: 6px 0 0; color: var(--peach); }
.cta h2 { max-width: 16em; }
.cta p { color: var(--on-night-2); }
.cta p a { color: var(--on-night); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 8px 40px;
  color: var(--ink-2);
  font-size: 15px;
}
.footer__top {
  display: grid;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .footer__top { grid-template-columns: 1fr auto; align-items: start; } }
.footer__tag { max-width: 30em; margin-top: 12px; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
}
.footer__links a {
  display: inline-block;
  padding-block: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.footer__links a:hover { text-decoration: underline; }
.footer__links a[aria-current="page"] { color: var(--accent-ink); }
.contact-line { font-weight: 700; color: var(--ink); }
.contact-line a { overflow-wrap: anywhere; }
.footer__legal {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
}
.footer__legal p { margin: 0; }

/* ---------- Documents: privacy, terms, support ---------- */

.doc { padding-block: clamp(24px, 4vw, 56px) clamp(72px, 9vw, 120px); }
.doc .wrap { max-width: 800px; }
.doc__head {
  padding: clamp(36px, 6vw, 64px) clamp(22px, 5vw, 48px);
  margin-bottom: 12px;
  border-radius: var(--r-3);
  color: var(--on-night);
  background:
    radial-gradient(60% 70% at 100% 0%, rgba(140, 120, 240, 0.32), transparent 70%),
    linear-gradient(180deg, var(--night-0), var(--night-2));
}
.doc h1 { font-size: clamp(32px, 26px + 1.8vw, 44px); line-height: 1.18; }
:lang(en) .doc h1 { letter-spacing: -0.03em; line-height: 1.1; }
.doc__head .lead { margin-top: 14px; color: var(--on-night-2); }
.updated { margin-top: 14px; color: var(--on-night-3); font-size: 15px; font-weight: 600; }

.toc {
  margin: 24px 0 8px;
  padding: 22px 24px;
  border-radius: var(--r-2);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.toc h2 { margin: 0 0 10px; color: var(--ink-3); font-size: 15px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 220px; column-gap: 32px; }
.toc li { padding-block: 3px; break-inside: avoid; }
.toc li::marker { color: var(--accent); font-weight: 700; }
.toc a { color: var(--ink); font-weight: 600; text-decoration-color: var(--line-2); }

.doc section { padding-top: 12px; }
.doc section > h2 { margin: 36px 0 12px; font-size: 24px; line-height: 1.3; scroll-margin-top: calc(var(--header-h) + 20px); }
.doc h3 { margin: 24px 0 6px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent); }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); }

.summary {
  margin: 24px 0 0;
  padding: 22px 24px;
  border-radius: var(--r-2);
  background: var(--mint-bg);
}
.summary h2 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.summary ul { margin: 0; padding-left: 1.2em; }
.summary li { color: var(--ink); }
.summary li::marker { color: var(--mint-ink); }

.vendors { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.vendors li {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--r-1);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.vendors strong { display: block; }

.contact-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--r-2);
  background: var(--card);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line);
}
.contact-card h2 { margin: 0 0 8px; font-size: 20px; }

.doc .faq { display: grid; gap: 12px; margin-top: 12px; }
.doc .faq details {
  border-radius: var(--r-2);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
}
.doc .faq summary {
  position: relative;
  padding: 18px 58px 18px 20px;
  border-radius: var(--r-2);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}
.doc .faq summary::-webkit-details-marker { display: none; }
.doc .faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--accent-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B24E2A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform var(--spring-t) var(--spring);
}
.doc .faq details[open] summary::after { transform: rotate(180deg); }
.doc .faq .answer { padding: 0 20px 18px; }
.doc .faq details[open] .answer { animation: rise-in 0.5s var(--spring) both; }
@media (prefers-color-scheme: dark) {
  .doc .faq summary::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB38A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* ---------- 404 ---------- */

.lost { padding-block: clamp(48px, 10vw, 120px); text-align: center; }
.lost__icon { width: 112px; height: 112px; margin: 0 auto 24px; border-radius: 23%; box-shadow: var(--shadow-2); animation: float 6s ease-in-out infinite; }
.lost h1 { font-size: clamp(32px, 26px + 1.8vw, 44px); }
.lost p { margin-top: 12px; color: var(--ink-2); }
.lost .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ---------- Scroll reveals (armed by home.js, so nothing hides without it) ---------- */

.is-armed { opacity: 0; transform: translateY(26px); }
.is-armed[data-reveal="phone"] { transform: translateY(70px); }
.is-armed[data-reveal="left"] { transform: translate(-48px, 34px) rotate(-3deg); }
.is-armed[data-reveal="right"] { transform: translate(48px, 34px) rotate(3deg); }
@media (max-width: 899px) {
  .is-armed[data-reveal="left"] { transform: translate(-16px, 44px) rotate(-2deg); }
  .is-armed[data-reveal="right"] { transform: translate(16px, 44px) rotate(2deg); }
}
.is-armed[data-reveal="pop"] { transform: scale(0.82); }
.is-armed[data-reveal="develop"] { transform: scale(1.08); }
.is-armed[data-reveal="fan"] { transform: translateY(60px); }

.is-armed.is-in[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.95s var(--spring);
  transition-delay: var(--stagger, 0s);
}
.is-armed.is-in[data-reveal="phone"],
.is-armed.is-in[data-reveal="left"],
.is-armed.is-in[data-reveal="right"],
.is-armed.is-in[data-reveal="develop"],
.is-armed.is-in[data-reveal="fan"] {
  transition: opacity 0.8s var(--ease-out), transform 1.05s var(--spring-soft);
  transition-delay: var(--stagger, 0s);
}
.is-armed.is-in[data-reveal="pop"] {
  transition: opacity 0.4s var(--ease-out), transform var(--spring-pop-t) var(--spring-pop);
  transition-delay: var(--stagger, 0s);
}

/* ---------- Reduced motion: everything still, nothing hidden ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { --intro-delay: 0s; }
  .intro { display: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
  }
  .hero__sky .icon, .cta__icon, .lost__icon, .hp, .how__phone { animation: none !important; }
  .reel .player__frame:not(:first-child) { opacity: 0; }
  .marquee__track { animation: none !important; }
}

/* ---------- Print ---------- */

@media print {
  body { background: #FFFFFF; color: #000000; }
  .site-header, .skip-link, .intro, .toc, .footer__links { display: none; }
  .doc__head, .hero__card, .cta__card { background: none; color: #000000; }
  a { color: #000000; }
}
