/* ============================================================
   Artos — landing page
   Palette & type mirror src/constants/theme.ts (Indigo & Cream).
   ============================================================ */

:root {
  /* Indigo & Cream — light (the brand's daytime canvas) */
  --ink: #212842;          /* midnight indigo */
  --ink-soft: #555B70;     /* muted indigo-grey, AA on cream */
  --cream: #F0E7D5;        /* vanilla cream canvas */
  --ivory: #F8F2E6;        /* lifted ivory surface */
  --cream-deep: #E7DAC2;   /* deeper cream (selection) */
  --parchment: #EADCC2;    /* warm aged-parchment (sacred cards) */
  --border: #DBCDB2;       /* warm tonal hairline */
  --sage: #3A6B52;         /* muted sage (answered/success) */
  --terracotta: #A23E36;   /* muted terracotta (flame/alert) */
  --on-ink: #F0E7D5;       /* cream text on indigo — the signature reversal */

  /* Page roles */
  --bg: var(--cream);
  --surface: var(--ivory);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --rule: var(--border);
  --accent: var(--ink);
  --on-accent: var(--on-ink);

  /* Fonts */
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Greek display type — Fraunces has no Greek glyphs, EB Garamond does
     (incl. the polytonic Ἄ of Ἄρτος). */
  --serif-greek: 'EB Garamond', Georgia, 'Times New Roman', serif;

  /* Radii (theme.ts Radii) */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Soft elevation — shadow is indigo, never black */
  --shadow-soft: 0 4px 12px rgba(33, 40, 66, 0.06);
  --shadow-card: 0 10px 28px rgba(33, 40, 66, 0.10);
  --shadow-lifted: 0 22px 50px rgba(33, 40, 66, 0.16);

  /* Motion — ease-out carries the calm; one gentle spring is allowed on hovers */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-slow: 600ms;
  --dur-slower: 900ms;

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 64px);

  /* z-scale */
  --z-nav: 50;
  --z-aura: 0;

  /* Wheat-field scene (the Ἄρτος scroll story) + the band it hands to.
     Dedicated tokens because the scene is always night-into-dawn — it must
     NOT follow the ink/cream swap. */
  --scene-sky-night: #212842;
  --scene-sky-dusk: #303A5F;
  --scene-dawn-1: #E9BA8E;   /* horizon warmth */
  --scene-dawn-2: #4A466E;   /* upper dawn blend */
  --scene-field-far: #3A4166;
  --scene-field-mid: #2C3352;
  --scene-field-near: #1D2339;
  --scene-stalk: #1D2339;    /* wheat silhouettes share the near ridge */
  --scene-star: rgba(240, 231, 213, 0.92);
  --scene-mote: #F0E7D5;     /* drifting grain/flour motes */
  --scene-sun: #F3D9A4;
  --scene-loaf: #E8C48E;
  --scene-steam: rgba(240, 231, 213, 0.8);
  --scene-table: #454C74;
  --scene-text: #F0E7D5;
  --scene-text-soft: rgba(240, 231, 213, 0.74);
  --scene-rule: rgba(240, 231, 213, 0.16);
  --scene-sage: #6FAE8B;     /* checkmarks legible on the night band */

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Indigo & Cream — dark (charcoal night) */
    --ink: #F0E7D5;
    --ink-soft: #B3B0A8;
    --cream: #1A1B23;        /* deep charcoal, a whisper of indigo */
    --ivory: #24262F;        /* lifted charcoal surface */
    --cream-deep: #2F313C;
    --parchment: #2E2A26;    /* deep warm parchment-shadow */
    --border: #2D2F39;
    --sage: #5C9C7B;
    --terracotta: #D98A7E;
    --on-ink: #212842;

    --bg: var(--cream);
    --surface: var(--ivory);
    --text: var(--ink);
    --text-soft: var(--ink-soft);
    --rule: var(--border);
    --accent: var(--ink);       /* cream carries actions on the night */
    --on-accent: var(--on-ink); /* indigo ink on the cream button */

    --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.30);
    --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.38);
    --shadow-lifted: 0 24px 54px rgba(0, 0, 0, 0.50);

    /* Deeper night, muted dawn — the scene sits on the dark page quietly. */
    --scene-sky-night: #12131B;
    --scene-sky-dusk: #1C2030;
    --scene-dawn-1: #C9886A;
    --scene-dawn-2: #322E49;
    --scene-field-far: #242940;
    --scene-field-mid: #1B1F30;
    --scene-field-near: #121521;
    --scene-stalk: #121521;
    --scene-star: rgba(240, 231, 213, 0.95);
    --scene-mote: #E9DDC4;
    --scene-sun: #E2B37F;
    --scene-loaf: #D9A96B;
    --scene-steam: rgba(240, 231, 213, 0.75);
    --scene-table: #3A4059;
    --scene-text: #F0E7D5;
    --scene-text-soft: rgba(240, 231, 213, 0.70);
    --scene-rule: rgba(240, 231, 213, 0.14);
    --scene-sage: #5C9C7B;

    color-scheme: dark;
  }
}

/* ───────────────────────── Reset ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

/* overflow-x clip (not hidden): kills the sideways wiggle from the
   pre-reveal translateX offsets without creating a scroll container. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(16px, 1.05vw + 13px, 18px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
em { font-style: italic; }
strong { font-weight: 600; }

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

:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :focus-visible { outline-color: var(--cream); }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: 14px; }

/* Screen-reader-only text (the story section's real heading) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Shared headings */
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 18ch;
}

/* ───────────────────────── Nav ───────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
}
.nav[data-scrolled='true'] {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
/* The shipped app icon (assets/images/icon.png) — one mark everywhere. */
.brand__mark {
  flex: none;
  display: block;
  width: 30px; height: 30px;
  border-radius: 9px;
  /* the icon's own tile is cream — a hairline keeps it off the cream page */
  border: 1px solid var(--border);
}
.brand__word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.brand--footer .brand__mark { width: 32px; height: 32px; border-radius: 10px; }

.nav__links {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav__links a {
  color: var(--text-soft);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta { margin-left: 0; }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface); box-shadow: var(--shadow-soft); }

/* Store / platform buttons */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.store-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px 11px 16px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--on-ink);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-spring),
              box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
/* Light sheen that sweeps across on hover */
.store-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(105deg,
    transparent 38%,
    color-mix(in srgb, #fff 22%, transparent) 50%,
    transparent 62%);
  transform: translateX(-130%);
  pointer-events: none;
}
.store-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.store-btn:hover::before { animation: sheen 0.9s var(--ease-out); }
.store-btn:active { transform: translateY(0) scale(0.98); }
.store-btn__glyph {
  display: inline-flex;
  opacity: 0.95;
  transition: transform var(--dur-base) var(--ease-spring);
}
.store-btn:hover .store-btn__glyph { transform: translateY(-1.5px) scale(1.08); }
@keyframes sheen {
  to { transform: translateX(130%); }
}
.store-btn__text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-btn__text small { font-size: 0.68rem; opacity: 0.78; font-weight: 500; }
.store-btn__text strong { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.store-btn__soon {
  margin-left: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--on-ink) 18%, transparent);
  color: var(--on-ink);
  align-self: flex-start;
}
.store-btn__soon--live {
  background: var(--sage);
  color: #fff;
}
/* Web button: outlined, the live one stands apart from the "soon" stores */
.store-btn--web {
  background: var(--surface);
  color: var(--text);
  border-color: var(--rule);
}
.store-btn--web .store-btn__soon { background: var(--sage); color: #fff; }

/* Inverted store buttons (on the indigo CTA band) */
.cta .store-btn--invert {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}
.cta .store-btn--invert.store-btn--web {
  background: transparent;
  color: var(--cream);
  border-color: color-mix(in srgb, var(--cream) 45%, transparent);
}
.cta .store-btn--invert .store-btn__soon {
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  color: var(--ink);
}
.cta .store-btn--invert.store-btn--web .store-btn__soon { color: var(--cream); }
.cta .store-btn--invert .store-btn__soon--live { background: var(--sage); color: #fff; }

/* ───────────────────────── Hero ───────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero__aura {
  position: absolute;
  z-index: var(--z-aura);
  top: -22%;
  right: -8%;
  width: min(820px, 90vw);
  height: min(820px, 90vw);
  border-radius: 50%;
  background:
    radial-gradient(closest-side,
      color-mix(in srgb, var(--parchment) 75%, transparent),
      transparent 72%);
  filter: blur(8px);
  pointer-events: none;
  animation: aura-drift 22s ease-in-out infinite alternate;
}
@keyframes aura-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-5%, 4%, 0) scale(1.07); }
}

/* Hero entrance — pure CSS animations, so they play even if main.js fails;
   without JS the head script never adds .js-reveal and everything is static. */
.js-reveal .hero-item {
  animation: hero-rise var(--dur-slower) var(--ease-out) both;
  animation-delay: calc(120ms + var(--i, 0) * 110ms);
}
.js-reveal .hero__scene {
  animation: scene-in 1100ms var(--ease-out) both;
  animation-delay: 340ms;
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes scene-in {
  from { opacity: 0; transform: translateY(36px) scale(0.965); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-color-scheme: dark) {
  .hero__aura {
    background: radial-gradient(closest-side,
      color-mix(in srgb, #3b3550 55%, transparent), transparent 72%);
  }
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 92px) var(--gutter) clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__kicker {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--sage);
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.hero__lede {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-soft);
  max-width: 40ch;
  line-height: 1.62;
  text-wrap: pretty;
}
.hero__note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* Hero device */
.hero__device {
  position: relative;
  justify-self: center;
  /* --py is driven by the scroll-parallax in main.js (stays 0 without JS). */
  transform: translate3d(0, var(--py, 0px), 0);
}
.hero__scene { position: relative; }

.phone {
  position: relative;
  width: clamp(258px, 30vw, 320px);
  aspect-ratio: 9 / 19;
  background: var(--ink);
  border-radius: 42px;
  padding: 11px;
  box-shadow: var(--shadow-lifted),
              inset 0 0 0 2px color-mix(in srgb, var(--cream) 12%, transparent);
  animation: float-y 7s ease-in-out 1.6s infinite alternate;
}
@keyframes float-y {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}
.phone__notch {
  position: absolute;
  top: 11px; left: 50%;
  transform: translateX(-50%);
  width: 38%; height: 22px;
  background: var(--ink);
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--cream);
  border-radius: 32px;
  padding: 30px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
/* The mockup screens always show the app's LIGHT theme — they are screenshots. */
.phone__screen, .surface, .card-stack {
  --text: var(--ink);
  --text-soft: var(--ink-soft);
}
@media (prefers-color-scheme: dark) {
  .phone__screen {
    background: var(--cream);
  }
}

.app-top { display: flex; align-items: flex-start; justify-content: space-between; }
.app-top__eyebrow { font-size: 0.62rem; color: var(--ink-soft); font-weight: 600; letter-spacing: 0.02em; }
.app-top__title { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink); letter-spacing: -0.01em; }
.app-top__bell { position: relative; color: var(--ink); }
.badge-dot {
  position: absolute; top: -2px; right: -2px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--terracotta);
  border: 1.5px solid var(--cream);
  animation: pulse-dot 2.8s var(--ease-out) 2.4s infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(162, 62, 54, 0.45); }
  55%  { box-shadow: 0 0 0 7px rgba(162, 62, 54, 0); }
  100% { box-shadow: 0 0 0 0 rgba(162, 62, 54, 0); }
}

.verse-card {
  background: var(--parchment);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--r-md);
  padding: 14px 14px 12px;
}
.verse-card__ref { font-size: 0.6rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.verse-card__ref span { opacity: 0.7; }
.verse-card__text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--ink);
  margin-top: 6px;
  letter-spacing: -0.005em;
}
.verse-card__text.small { font-size: 0.96rem; }
.verse-card__tools { display: flex; gap: 10px; margin-top: 10px; }
.vtool { font-size: 0.64rem; font-weight: 600; color: var(--ink-soft); }

.journal {
  background: var(--ivory);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--r-md);
  padding: 12px 13px;
}
.journal__label { font-size: 0.62rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.03em; text-transform: uppercase; }
.journal__text { font-family: var(--serif); font-style: italic; font-size: 0.86rem; color: var(--ink); margin-top: 5px; line-height: 1.45; }

.pill-row { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; font-weight: 600; color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 11px;
}
.pill--done { color: var(--sage); border-color: color-mix(in srgb, var(--sage) 40%, var(--border)); }
.pill--done svg { color: var(--sage); }
.flames { display: inline-flex; color: var(--terracotta); }
.flames svg { transform-origin: 50% 88%; animation: flicker 2.6s ease-in-out infinite alternate; }
.flames svg:nth-child(2) { margin-left: -5px; opacity: 0.85; animation-delay: 0.9s; }
@keyframes flicker {
  from { transform: scale(1) rotate(0deg); }
  45%  { transform: scale(0.93) rotate(-2deg); }
  to   { transform: scale(1.05) rotate(1.5deg); }
}

.hero__chip {
  position: absolute;
  left: clamp(-64px, -4vw, -24px);
  bottom: 86px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 11px 14px;
  box-shadow: var(--shadow-card);
  max-width: 215px;
  animation: float-y 6s ease-in-out 2.4s infinite alternate-reverse;
}
.hero__chip p { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); }
.hero__chip span { font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--text); display: block; margin-top: 3px; line-height: 1.35; }
@media (max-width: 540px) { .hero__chip { display: none; } }

/* ─────────── The story of Ἄρτος (one Greek word → the app) ─────────── */
/* Static-first: this base layout is what no-JS, no-GSAP, and reduced-motion
   visitors read — a night wheat field above stacked prose beats. story.js
   pins and scrubs it only under `html.story-enhanced` (block further down). */
.story {
  background: var(--scene-sky-night);
  color: var(--scene-text);
  position: relative;
  overflow: hidden;
}
@keyframes glow-drift { /* shared with the CTA aura */
  from { transform: translate3d(-4%, 0, 0); }
  to   { transform: translate3d(5%, 6%, 0); }
}
.story__pin { position: relative; }

/* Scene layers — everything animates via transform/opacity only. */
.story__scene {
  position: relative;
  height: clamp(230px, 36vh, 400px);
  overflow: hidden;
}
.scene__sky { position: absolute; inset: 0; }
.scene__sky--night {
  background: linear-gradient(to bottom,
    var(--scene-sky-night) 0%,
    var(--scene-sky-dusk) 62%,
    color-mix(in srgb, var(--scene-dawn-1) 18%, var(--scene-sky-dusk)) 100%);
}
.scene__sky--dawn {
  background: linear-gradient(to bottom,
    var(--scene-dawn-2) 0%,
    color-mix(in srgb, var(--scene-dawn-1) 55%, var(--scene-dawn-2)) 58%,
    var(--scene-dawn-1) 100%);
  opacity: 0; /* cross-faded in by the timeline */
}
.scene__stars {
  position: absolute;
  inset: 0 0 24% 0;
  /* CSS starfield so the static page still has stars; story.js adds a
     twinkle layer of spans on top and fades the whole container at dawn. */
  background-image:
    radial-gradient(1px 1px at 6% 28%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 13% 62%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 19% 15%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 27% 44%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 34% 71%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 41% 22%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 49% 55%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 56% 12%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 63% 38%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 71% 66%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 25%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 85% 49%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 92% 18%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 97% 58%, var(--scene-star), transparent 60%);
}
.scene__stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--scene-star);
}
.scene__glow {
  position: absolute;
  top: -30%;
  left: 50%;
  width: 70vmin;
  height: 70vmin;
  transform: translateX(-50%);
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--scene-sun) 20%, transparent), transparent 72%);
  opacity: 0.3;
  pointer-events: none;
}
.scene__sun {
  position: absolute;
  left: 50%;
  bottom: 34%; /* clears the mid-dune crest once risen */
  width: clamp(64px, 9vw, 110px);
  aspect-ratio: 1;
  margin-left: calc(clamp(64px, 9vw, 110px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle,
    var(--scene-sun) 0%,
    color-mix(in srgb, var(--scene-sun) 55%, transparent) 55%,
    transparent 74%);
  opacity: 0; /* below the horizon until the timeline raises it */
}
.scene__field {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
}
.scene__field--far  { fill: var(--scene-field-far);  height: 74%; }
.scene__field--mid  { fill: var(--scene-field-mid);  height: 60%; }
.scene__field--near { fill: var(--scene-field-near); height: 46%; }
/* Wheat silhouettes on the near ridge; the <defs> stalk inherits currentColor. */
.scene__stalks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(70px, 34%, 130px);
  color: var(--scene-stalk);
}
.scene__stalks ellipse { fill: currentColor; }
.scene__stalks .stalk__stem { fill: none; stroke: currentColor; stroke-width: 3; }
.scene__stalks .stalk__awns { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.8; }
.scene__motes {
  position: absolute;
  inset: 0;
  opacity: 0; /* grain motes exist only in the enhanced timeline */
}
.scene__motes span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--scene-mote);
  box-shadow: 0 0 6px color-mix(in srgb, var(--scene-mote) 55%, transparent);
}
/* The set table at the story's close — revealed by the timeline only. */
.scene__table {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: min(340px, 46%);
  transform: translateX(-50%);
  opacity: 0;
}
.scene__table .table__loaf { fill: var(--scene-loaf); }
.scene__table .loaf__score {
  fill: none;
  stroke: color-mix(in srgb, var(--scene-sky-night) 45%, var(--scene-loaf));
  stroke-width: 2.5;
  stroke-linecap: round;
}
.scene__table .table__board { fill: var(--scene-table); }
.scene__table .table__steam path {
  fill: none;
  stroke: var(--scene-steam);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.65;
}

/* Beats — static: stacked prose on the night band. */
.story__beats {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(64px, 9vw, 120px);
  display: grid;
  gap: clamp(52px, 8vw, 96px);
  text-align: center;
}
.beat__ref {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  color: var(--scene-text-soft);
  margin-bottom: 14px;
}
.beat__line {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 3.4vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.beat__line--big {
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
}
/* Greek lines set in EB Garamond — Fraunces has no Greek glyphs. */
.beat__line--greek {
  font-family: var(--serif-greek);
  font-weight: 500;
  letter-spacing: 0;
}
.beat__line--title {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.beat__sub {
  margin: 16px auto 0;
  max-width: 52ch;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.66;
  color: var(--scene-text-soft);
  text-wrap: pretty;
}
.beat__sub + .beat__sub { margin-top: 10px; }
.beat__link {
  display: inline-block;
  margin-top: 26px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--scene-text);
  border-bottom: 1px solid var(--scene-text-soft);
  padding-bottom: 2px;
  transition: opacity var(--dur-fast) ease;
}
.beat__link:hover { opacity: 0.75; }

/* Enhanced mode — story.js adds `story-enhanced` to <html> only when GSAP +
   ScrollTrigger loaded AND motion is allowed. The scene becomes a pinned
   full-viewport stage and the beats overlap, cross-faded by the timeline. */
.story-enhanced .story__pin { height: 100svh; }
.story-enhanced .story__scene {
  position: absolute;
  inset: 0;
  height: auto;
}
.story-enhanced .story__beats {
  position: absolute;
  inset: 0;
  max-width: none;
  padding: 0;
  display: block;
}
.story-enhanced .story__beat {
  position: absolute;
  left: 50%;
  top: 50%;
  /* story.js centers via xPercent/yPercent so its y tweens compose cleanly */
  width: min(880px, calc(100% - 2 * var(--gutter)));
  margin: 0;
}
/* GSAP owns opacity/transform on the beats — the IO reveal must not fight it */
.story-enhanced .story .reveal { transition: none; }
/* Compositor hints only for the ~8 persistent scene layers */
.story-enhanced .scene__sky,
.story-enhanced .scene__field,
.story-enhanced .scene__stalks,
.story-enhanced .scene__sun,
.story-enhanced .scene__stars,
.story-enhanced .scene__motes,
.story-enhanced .scene__table { will-change: transform, opacity; }

/* Elements GSAP drives elsewhere on the page must not transition transform,
   or scrubbed updates smear. Hover keeps its shadow lift. */
.story-enhanced .card-stack { transition-property: box-shadow; }
.story-enhanced .section-title,
.story-enhanced .grace__title,
.story-enhanced .devices__title,
.story-enhanced .cta__title,
.story-enhanced .feature .reveal,
.story-enhanced .feature .feature__list li { transition: none; }

/* ──────────────── Translations marquee ──────────────── */
/* The story's night band carries straight through here and the features —
   the scene doesn't dissolve, the page walks out of it further down. */
.translations {
  padding: clamp(56px, 7vw, 88px) 0 clamp(20px, 3vw, 36px);
  overflow: hidden;
  background: var(--scene-sky-night);
  color: var(--scene-text);
}
/* Enhanced: the scene's near ridge (field silhouette) flows into the band. */
.story-enhanced .translations {
  background: linear-gradient(to bottom,
    var(--scene-field-near),
    var(--scene-sky-night) clamp(120px, 16vw, 200px));
}
.translations__caption {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--scene-text-soft);
  text-align: center;
  margin-bottom: clamp(22px, 3vw, 32px);
  padding: 0 var(--gutter);
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
/* Two identical groups inside one max-content track; sliding the track by
   exactly -50% (one group) loops seamlessly at any viewport width. */
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee__group {
  flex: none;
  display: flex;
  gap: 14px;
  padding-right: 14px;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.tchip {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.tchip strong { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; color: var(--text); }
.tchip span { font-size: 0.78rem; font-weight: 500; color: var(--text-soft); white-space: nowrap; }
/* Reduced motion: a static, centered, wrapped row instead of the crawl. */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; padding: 0 var(--gutter); }
  .marquee__track { width: auto; }
  .marquee__group { flex: 1; flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .marquee__group--dup { display: none; }
}

/* ───────────────────────── Features ───────────────────────── */
/* Still inside the story's night band: full-bleed scene background, app
   surfaces floating on it, and a dawn-to-day gradient hand-off at the end
   (the ::after strip) into the cream "How a morning looks". */
.features {
  position: relative;
  padding: clamp(64px, 10vw, 128px) var(--gutter)
           calc(clamp(160px, 22vw, 280px) + clamp(48px, 6vw, 96px));
  background: var(--scene-sky-night);
  color: var(--scene-text);
}
/* A faint continuation of the story's starfield, fading out downward. */
.features::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 8% 12%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 21% 31%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 33% 8%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 46% 24%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 15%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 69% 34%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 81% 10%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 93% 27%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 14% 52%, var(--scene-star), transparent 60%),
    radial-gradient(1px 1px at 52% 47%, var(--scene-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 87% 55%, var(--scene-star), transparent 60%);
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 80%);
          mask-image: linear-gradient(to bottom, #000 45%, transparent 80%);
  pointer-events: none;
  animation: band-twinkle 3.6s ease-in-out infinite alternate;
}
@keyframes band-twinkle {
  from { opacity: 0.3; }
  to   { opacity: 0.55; }
}
/* Dawn-to-day: the band brightens into the page background — the same
   sunrise the story just told, finishing across the page itself. */
.features::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(160px, 22vw, 280px);
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.features > .section-title,
.features .feature {
  position: relative; /* above the ::before starfield */
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}
.features > .section-title { margin-bottom: clamp(40px, 6vw, 72px); color: var(--scene-text); }
.features .feature__body { color: var(--scene-text-soft); }
.features .feature__list li { color: var(--scene-text); }
.features .feature__list li::before { background: var(--scene-sage); }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
}
.feature + .feature { border-top: 1px solid var(--scene-rule); }
.feature--a .feature__art { order: 2; }
.feature--b .feature__text { order: 2; }

.feature__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.feature__body {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 1.06rem;
  line-height: 1.62;
  max-width: 46ch;
  text-wrap: pretty;
}
.feature__list { margin-top: 22px; display: flex; flex-direction: column; gap: 11px; }
.feature__list li {
  position: relative;
  padding-left: 30px;
  font-size: 0.98rem;
  color: var(--text);
}
/* A single sage check, identical across prefixed and standard mask. */
.feature__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.28em;
  width: 17px; height: 17px;
  background: var(--sage);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M4 12.5l5 5 11-11'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M4 12.5l5 5 11-11'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Fallback for browsers without mask support: a small sage dot. */
@supports not ((-webkit-mask: url(#x)) or (mask: url(#x))) {
  .feature__list li::before {
    -webkit-mask: none; mask: none;
    width: 8px; height: 8px; top: 0.5em;
    border-radius: 50%;
  }
}

/* Feature art: floating app surfaces */
.feature__art { display: flex; justify-content: center; }
.card-stack {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 3vw, 30px);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-spring),
              box-shadow var(--dur-slow) var(--ease-out);
}
.card-stack:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: var(--shadow-lifted);
}
.surface {
  background: var(--cream);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--r-md);
  padding: 15px 16px;
  transition: transform var(--dur-slow) var(--ease-out);
}
/* Inner cards drift apart a touch for depth */
.card-stack:hover .surface:first-child { transform: translateY(-2px) rotate(0.4deg); }
.card-stack:hover .surface:last-child { transform: translateY(2px); }
@media (prefers-color-scheme: dark) {
  .card-stack { background: #20222b; }
  .surface { background: #191a22; border-color: #2c2e38; }
}
.surface--verse { background: var(--parchment); }
@media (prefers-color-scheme: dark) { .surface--verse { background: #2a2620; } }

/* Prayer surface */
.prayer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prayer__cat { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.prayer__name { font-family: var(--serif); font-weight: 500; font-size: 1.04rem; color: var(--ink); margin-top: 8px; letter-spacing: -0.01em; }
.prayer__testimony { font-family: var(--serif); font-style: italic; font-size: 0.86rem; color: var(--ink-soft); margin-top: 7px; line-height: 1.45; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 9px; border-radius: var(--r-pill);
}
.tag--answered { background: color-mix(in srgb, var(--sage) 16%, transparent); color: var(--sage); }
.tag--ongoing { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink-soft); }
.prayer__actions { display: flex; gap: 8px; margin-top: 13px; }
.ghost-btn {
  flex: 1; text-align: center;
  font-size: 0.7rem; font-weight: 600;
  padding: 8px 6px; border-radius: var(--r-sm);
  border: 1px solid var(--border); color: var(--ink);
}
.ghost-btn--solid { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .prayer__name, .app-top__title, .app-top__bell, .verse-card__text, .journal__text { color: #F0E7D5; }
  .ghost-btn { color: #F0E7D5; border-color: #34363f; }
  .ghost-btn--solid { background: #F0E7D5; color: #212842; }
}

/* Friend surface */
.friend { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
  background: var(--cream-deep); color: var(--ink);
}
.avatar--alt { background: color-mix(in srgb, var(--sage) 22%, var(--cream-deep)); }
.friend__body { flex: 1; min-width: 0; }
.friend__name { font-weight: 600; font-size: 0.96rem; color: var(--ink); }
.friend__meta { font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poke {
  flex: none;
  font-size: 0.72rem; font-weight: 600;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--on-ink);
}
.poke--soft { background: transparent; color: var(--ink); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) {
  .friend__name, .avatar { color: #F0E7D5; }
  .avatar { background: #2f313c; }
  .poke { background: #F0E7D5; color: #212842; }
  .poke--soft { background: transparent; color: #F0E7D5; border-color: #34363f; }
}

/* ──────────────── How a morning looks ──────────────── */
.morning {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(72px, 10vw, 128px);
}
.morning__head { margin-bottom: clamp(36px, 5vw, 56px); }
.morning__lede {
  margin-top: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-soft);
}
.morning__steps {
  position: relative;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
/* A quiet dashed thread joining the three movements (desktop only).
   An SVG (not a border) so story.js can scrub-draw it via clip-path;
   fully drawn by default for the static page. */
.morning__track { position: relative; }
.morning__thread {
  position: absolute;
  top: 26px;
  left: 8px;
  width: calc(100% - 16px);
  height: 2px;
  overflow: visible;
}
.morning__thread line {
  stroke: var(--rule);
  stroke-width: 1.5;
  stroke-dasharray: 6 8;
}
.morning__num {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--rule);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
}
.morning__step h3 {
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
}
.morning__step p {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.58;
  max-width: 34ch;
}
@media (max-width: 780px) {
  .morning__thread { display: none; }
}

/* ──────────────── Grace, not guilt ──────────────── */
.grace {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.grace__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 124px) var(--gutter);
}
.grace__lead { max-width: 60ch; }
.grace__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.grace__body { margin-top: 18px; font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--text-soft); line-height: 1.62; text-wrap: pretty; }
.grace__grid {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.grace__item { padding-top: 22px; border-top: 2px solid var(--ink); }
.grace__item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.28rem; letter-spacing: -0.01em; }
.grace__item p { margin-top: 10px; color: var(--text-soft); font-size: 1rem; line-height: 1.58; }

/* ──────────────── Secondary grid ──────────────── */
.more {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 124px) var(--gutter);
}
.more > .section-title { margin-bottom: clamp(36px, 5vw, 60px); }
/* A quiet feature index, not a card grid: hairline-topped rows with a
   restrained line icon, echoing the grace section's rule treatment. */
.more__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 44px) clamp(28px, 4vw, 56px);
}
.more__item {
  display: flex;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.more__icon {
  flex: none;
  color: var(--ink);
  margin-top: 2px;
  transition: transform var(--dur-base) var(--ease-spring),
              color var(--dur-base) var(--ease-out);
}
.more__item:hover .more__icon {
  transform: translateY(-2px) scale(1.12);
  color: var(--sage);
}
.more__item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.01em; }
.more__item p { margin-top: 8px; color: var(--text-soft); font-size: 0.98rem; line-height: 1.56; max-width: 38ch; }

/* ──────────────── Devices ──────────────── */
.devices {
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
/* Slim cross-device band: the one non-redundant idea (sync), no card grid. */
.devices__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 84px) var(--gutter);
  text-align: center;
}
.devices__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.devices__lede {
  margin: 16px auto 0;
  max-width: 54ch;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 1.3vw, 1.14rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.devices__platforms {
  margin: clamp(24px, 3vw, 34px) auto 0;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}
.dplat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.dplat svg { color: var(--ink); opacity: 0.85; }

/* ──────────────── Final CTA ──────────────── */
.cta {
  position: relative;
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
}
.cta__aura {
  position: absolute;
  inset: -25% -10%;
  background:
    radial-gradient(45% 40% at 50% 92%,
      color-mix(in srgb, #fff 10%, transparent), transparent 62%);
  pointer-events: none;
  animation: glow-drift 23s ease-in-out infinite alternate-reverse;
}
.cta__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 132px) var(--gutter);
  text-align: center;
}
.cta__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.cta__body {
  margin: 20px auto 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.6;
  color: color-mix(in srgb, var(--on-ink) 82%, transparent);
  text-wrap: pretty;
}
.store-row--cta { justify-content: center; margin-top: 34px; }

/* ──────────────── Footer ──────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--rule);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) var(--gutter) 36px;
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: clamp(32px, 5vw, 64px);
}
.brand--footer .brand__word { font-size: 1.5rem; }
.footer__tagline { font-family: var(--serif); font-style: italic; color: var(--text-soft); margin-top: 12px; font-size: 1.02rem; }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
}
.footer__col h4 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-soft); margin-bottom: 14px; }
.footer__col a {
  display: block;
  color: var(--text);
  font-size: 0.96rem;
  padding: 5px 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__col a:hover { color: var(--sage); }
.footer__fine { font-size: 0.84rem; color: var(--text-soft); line-height: 1.55; }
.footer__base {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-soft);
}
.footer__verse { font-family: var(--serif); font-style: italic; }

/* ───────────────────────── Reveal motion ───────────────────────── */
/* Content is visible by default. Only when JS confirms it can drive the
   reveal (the inline <head> script adds `.js-reveal` to <html>) do elements
   start hidden — so the page never ships blank if JS fails or is disabled. */
.reveal {
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  /* Siblings entering together stagger via --i (inline in the HTML, or
     assigned by main.js for elements without one). */
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js-reveal .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}
/* Directional variants — feature art and text approach from their own side */
.js-reveal .reveal--left:not(.is-in) { transform: translateX(-36px); }
.js-reveal .reveal--right:not(.is-in) { transform: translateX(36px); }
.js-reveal .reveal--scale:not(.is-in) { transform: translateY(14px) scale(0.96); }
.reveal.is-in { opacity: 1; transform: none; }

/* Checklist items cascade in after their feature block lands */
.feature__list li {
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(240ms + var(--i, 0) * 90ms);
}
.js-reveal .feature__text.reveal:not(.is-in) .feature__list li {
  opacity: 0;
  transform: translateY(14px);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .feature__list li, .hero-item, .hero__scene {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .store-btn:hover, .card-stack:hover, .btn:active, .store-btn:active,
  .store-btn:hover .store-btn__glyph, .more__item:hover .more__icon,
  .card-stack:hover .surface:first-child, .card-stack:hover .surface:last-child { transform: none; }
  .hero__device { transform: none !important; }
  * { animation: none !important; }
}

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 44px; }
  .hero__copy { display: flex; flex-direction: column; align-items: center; }
  .hero__lede { margin-left: auto; margin-right: auto; }
  .store-row { justify-content: center; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature--a .feature__art,
  .feature--b .feature__text { order: 0; }
  .feature__text { text-align: left; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .store-btn { flex: 1 1 100%; }
  .hero__title { font-size: clamp(2.2rem, 11vw, 3rem); }
  .footer__base { flex-direction: column; align-items: flex-start; }
}
