/* ------------------------------------------------------------------
   Bedtime Bible · bedtimebiblekids.com
   Night is the brand. One palette, three typefaces, slow light.
   ------------------------------------------------------------------ */

/* ---------- Fonts (self-hosted, latin subsets) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono.woff2") format("woff2");
}
/* metric-matched fallbacks: the page must not shift when the real fonts arrive */
@font-face {
  font-family: "Fraunces-fb";
  src: local("Georgia");
  size-adjust: 88.08%;
  ascent-override: 111.27%;
  descent-override: 29.52%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter-fb";
  src: local("Arial");
  size-adjust: 106.01%;
  ascent-override: 91.5%;
  descent-override: 22.64%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --midnight: #0B1026;
  --surface: #141A36;
  --card: #1C2344;
  --vellum: #F3EBDA;
  --muted: #A9B0CC;
  --amber: #E8B761;
  --amber-deep: #C8873A;
  --edge: rgba(232, 214, 177, 0.12);
  --edge-strong: rgba(232, 214, 177, 0.24);
  --glow-08: rgba(232, 183, 97, 0.08);
  --glow-18: rgba(232, 183, 97, 0.18);
  --glow-25: rgba(232, 183, 97, 0.25);

  --display: "Fraunces", "Fraunces-fb", Georgia, serif;
  --body: "Inter", "Inter-fb", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  /* nightfall: JS interpolates this from dusk to deep night */
  --sky: #11163245;
  --sky-now: #111632;

  --w: min(1180px, calc(100vw - 2 * var(--gutter)));
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(96px, 13vh, 150px);

  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* tighter vertical rhythm on phones: shrink section padding so stacked
   sections stop leaving large empty bands between them */
@media (max-width: 759px) {
  :root { --section: clamp(48px, 8vh, 84px); }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* decorative glows bleed past the viewport; clip at the root so
     iOS Safari never rubber-bands sideways */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background-color: var(--midnight);
  color: var(--vellum);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--glow-25); color: var(--vellum); }

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

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--vellum); }
/* in-text links must not rely on color alone */
.page p a, .page li a, .answer a, .shelf-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--edge-strong);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- Night layers (fixed, behind everything) ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: var(--sky-now, #111632);
  transition: none;
}
.sky::after {
  /* dusk warmth at the horizon, fades as JS dims --dusk-glow */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(232, 183, 97, 0.14), transparent 60%);
  opacity: var(--dusk-glow, 1);
}

.stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: var(--stars-on, 0.25);
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(243, 235, 218, 0.9), transparent 100%),
    radial-gradient(1px 1px at 31% 9%,  rgba(243, 235, 218, 0.55), transparent 100%),
    radial-gradient(1.5px 1.5px at 47% 31%, rgba(243, 235, 218, 0.75), transparent 100%),
    radial-gradient(1px 1px at 63% 14%, rgba(243, 235, 218, 0.5), transparent 100%),
    radial-gradient(1px 1px at 78% 27%, rgba(243, 235, 218, 0.85), transparent 100%),
    radial-gradient(1.5px 1.5px at 89% 7%,  rgba(243, 235, 218, 0.6), transparent 100%),
    radial-gradient(1px 1px at 7% 58%,  rgba(243, 235, 218, 0.6), transparent 100%),
    radial-gradient(1px 1px at 24% 73%, rgba(243, 235, 218, 0.45), transparent 100%),
    radial-gradient(1.5px 1.5px at 41% 64%, rgba(243, 235, 218, 0.7), transparent 100%),
    radial-gradient(1px 1px at 58% 82%, rgba(243, 235, 218, 0.5), transparent 100%),
    radial-gradient(1px 1px at 72% 56%, rgba(243, 235, 218, 0.75), transparent 100%),
    radial-gradient(1.5px 1.5px at 91% 71%, rgba(243, 235, 218, 0.55), transparent 100%),
    radial-gradient(1px 1px at 17% 91%, rgba(243, 235, 218, 0.6), transparent 100%),
    radial-gradient(1px 1px at 84% 92%, rgba(243, 235, 218, 0.7), transparent 100%);
  background-size: 1100px 760px;
  background-repeat: repeat;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

.kicker {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.4rem;
}
.kicker .dim { color: var(--muted); }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 34em;
}

/* ---------- Layout primitives ---------- */
.wrap {
  width: var(--w);
  margin-inline: auto;
}
section { position: relative; }

/* ---------- Header ---------- */
.site-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  padding: clamp(18px, 3vw, 30px) 0;
}
.site-head .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--vellum);
}
.wordmark:hover { color: var(--amber); }
.head-link {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--edge);
  padding-bottom: 3px;
  transition: color 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft);
}
.head-link:hover { color: var(--amber); border-color: var(--edge-strong); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  align-items: center;
  /* no forced full-height on phones: it left a tall empty band under the
     copy. desktop re-asserts 100svh below for the full-bleed banner. */
  padding: clamp(88px, 13vh, 128px) 0 clamp(24px, 5vh, 44px);
  overflow: clip;
}
.hero .wrap {
  display: grid;
  gap: clamp(40px, 6vw, 56px);
}
.hero-copy { position: relative; z-index: 2; max-width: 620px; }

/* candle halo behind the headline */
.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 130%;
  height: 130%;
  top: -20%;
  left: -25%;
  background: radial-gradient(closest-side, var(--glow-08), transparent 70%);
}

.hero h1 {
  font-size: clamp(3.25rem, 2.4rem + 4.2vw, 6rem);
  margin: 0 0 1.6rem;
}
.hero h1 em {
  font-style: italic;
  font-variation-settings: "opsz" 144;
  color: var(--amber);
}
.hero .lede { margin: 0 0 2.4rem; }

.hero-art {
  position: relative;
  margin-inline: calc(-1 * var(--gutter));
}
.hero-art img {
  width: 100%;
  max-height: clamp(320px, 48svh, 460px);
  object-fit: cover;
  object-position: 50% 24%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 82%, transparent 100%);
}

@media (min-width: 960px) {
  /* full-bleed landscape banner: the image fills the hero and the copy
     sits over the starry left side behind a scrim that keeps it legible */
  .hero { min-height: 100svh; padding-top: 0; position: relative; }
  /* keep .wrap static: the absolute .hero-art must resolve against .hero
     (a position:relative section) so it fills the full viewport width,
     not this centered 1180px container. .hero-copy keeps its own z-index. */
  .hero-copy { max-width: 33rem; }
  .hero-art {
    position: absolute;
    inset: 0;
    margin: 0;
    height: 100%;
    z-index: 0;
  }
  .hero-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 94%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 94%, transparent 100%);
  }
  .hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
      #0B1026 0%,
      rgba(11, 16, 38, 0.85) 27%,
      rgba(11, 16, 38, 0.42) 47%,
      rgba(11, 16, 38, 0.08) 63%,
      transparent 73%);
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3.5vh, 34px);
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.8;
}
@media (max-width: 959px) { .scroll-cue { display: none; } }

/* ---------- App Store badge + CTA ---------- */
.store-cta { display: inline-flex; flex-direction: column; gap: 1.1rem; }
.store-badge {
  position: relative;
  display: inline-block;
  /* clear space: quarter of badge height on all sides */
  padding: 12px;
  margin: -12px;
}
.store-badge img { height: 48px; width: auto; }
.store-badge::before {
  /* candle glow behind the primary CTA, flickers gently */
  content: "";
  position: absolute;
  inset: -34px -44px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-18), transparent 72%);
  animation: candle 5.2s ease-in-out infinite;
}
@keyframes candle {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  38%      { opacity: 1;    transform: scale(1.05); }
  62%      { opacity: 0.85; transform: scale(0.99); }
  80%      { opacity: 0.95; transform: scale(1.03); }
}
.cta-meta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Outcomes ---------- */
.outcomes { padding: var(--section) 0; }
.outcome {
  padding: clamp(2.2rem, 5vh, 3.4rem) 0;
  border-top: 1px solid var(--edge);
  max-width: 30em;
}
.outcome:last-child { border-bottom: 1px solid var(--edge); }
.outcome h3 {
  font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.125rem);
  margin-bottom: 0.7rem;
}
.outcome p { color: var(--muted); margin: 0; max-width: 30em; }
/* desktop: one calm editorial row, three outcomes shoulder to shoulder */
@media (min-width: 960px) {
  .outcomes .wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(36px, 4.5vw, 64px);
  }
  .outcome,
  .outcome:last-child {
    border-bottom: 0;
    max-width: none;
    padding: 2.4rem 0 0.6rem;
  }
}

/* ---------- Ritual ---------- */
.ritual { padding: var(--section) 0; }
.ritual .wrap {
  display: grid;
  gap: clamp(56px, 7vw, 96px);
}
@media (min-width: 960px) {
  .ritual .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}

.ritual-steps { position: relative; padding-left: clamp(34px, 4vw, 48px); }
.thread {
  position: absolute;
  left: 8px;
  top: 0.5em;
  width: 2px;
  /* explicit height: an svg with top+bottom alone collapses to its
     viewBox ratio (100px) and the thread stops after step one */
  height: calc(100% - 1em);
  overflow: visible;
}
.thread line {
  stroke: var(--amber);
  stroke-width: 1.5;
}
/* dim, unlit track: the path is always hinted the whole way down */
.thread-track { opacity: 0.16; }
/* bright fill that draws downward as you scroll, glowing like candlelight.
   if JS/GSAP is off it simply renders fully lit over the track. */
.thread-line {
  opacity: 0.95;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px var(--glow-25));
}
.step { padding: clamp(2rem, 5vh, 3.2rem) 0; position: relative; }
.step::before {
  /* the small flame on the thread */
  content: "";
  position: absolute;
  left: calc(-1 * clamp(34px, 4vw, 48px) + 3px);
  top: calc(clamp(2rem, 5vh, 3.2rem) + 0.55em);
  width: 11px;
  height: 11px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  box-shadow: 0 0 18px 4px var(--glow-25);
}
.step h3 {
  font-size: clamp(1.625rem, 1.2rem + 2vw, 2.625rem);
  margin-bottom: 0.65rem;
}
.step p { color: var(--muted); margin: 0; max-width: 26em; }

.ritual-scene {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 540px;
  border: 1px solid var(--edge);
  align-self: start;
}
@media (min-width: 960px) {
  .ritual-scene { position: sticky; top: 8vh; }
}
@media (max-width: 759px) {
  .ritual-scene { min-height: 400px; }
}
.ritual-scene > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
.ritual-scene::after {
  /* vignette so the phone sits in candlelight */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(85% 70% at 50% 58%, transparent 30%, rgba(11, 16, 38, 0.78) 100%),
    linear-gradient(to top, rgba(11, 16, 38, 0.55), transparent 45%);
}
.phone-slot {
  position: absolute;
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  z-index: 2;
  width: min(248px, 58%);
  aspect-ratio: 1179 / 2412;
  border: 1px dashed var(--edge-strong);
  border-radius: 36px;
  background: rgba(11, 16, 38, 0.6);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}
.phone-slot span {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.9;
}

/* ---------- Showcase ---------- */
.showcase { padding: var(--section) 0; }
.showcase-head { max-width: 620px; margin-bottom: clamp(48px, 7vh, 84px); }
.showcase-head h2 { font-size: clamp(2.125rem, 1.4rem + 3.6vw, 4.25rem); margin-bottom: 1.2rem; }
.showcase-head p { color: var(--muted); margin: 0; }

.shelf {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2.4vw, 28px);
}
@media (min-width: 760px) { .shelf { grid-template-columns: repeat(4, 1fr); } }
/* mobile: a storybook rhythm, full plates between pairs, never a cramped grid */
@media (max-width: 759px) {
  .story:nth-child(1),
  .story:nth-child(4) {
    grid-column: span 2;
    aspect-ratio: 941 / 740;
  }
  .story:nth-child(1) img, .story:nth-child(4) img { object-position: 50% 22%; }
}

.story {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--surface);
  aspect-ratio: 941 / 1400;
}
.story img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease-soft);
}
@media (hover: hover) {
  .story:hover img { transform: scale(1.035); }
}
.story figcaption {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: clamp(2.6rem, 5vw, 5rem) clamp(0.8rem, 1.6vw, 1.1rem) clamp(0.75rem, 1.6vw, 1.05rem);
  background: linear-gradient(to top, rgba(11, 16, 38, 0.92) 22%, transparent);
}
.story figcaption b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(0.9375rem, 0.78rem + 0.75vw, 1.45rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.story figcaption span {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(0.5625rem, 0.5rem + 0.3vw, 0.625rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
@media (max-width: 759px) {
  .story figcaption span { letter-spacing: 0.08em; }
  /* the two-up cards were cramped and tall: make them shorter so the art
     reads larger and bump the title so it stops wrapping to four lines */
  .story { aspect-ratio: 4 / 5; }
  .story.story-more { aspect-ratio: auto; }
  .story figcaption {
    padding: clamp(2.8rem, 12vw, 3.6rem) 0.95rem 0.9rem;
  }
  .story figcaption b {
    font-size: 1.18rem;
    line-height: 1.16;
  }
}
/* editorial offsets: the shelf is a skyline, not a grid of cards */
@media (min-width: 760px) {
  .story:nth-child(4n + 2) { transform: translateY(clamp(28px, 4vw, 56px)); }
  .story:nth-child(4n + 3) { transform: translateY(clamp(-20px, -1.6vw, -12px)); }
  .story:nth-child(4n)     { transform: translateY(clamp(16px, 2.4vw, 36px)); }
  @media (hover: hover) {
    .story:nth-child(4n + 2):hover, .story:nth-child(4n + 3):hover, .story:nth-child(4n):hover { /* keep offsets on hover */ }
  }
}
.story.story-more {
  border: 1px solid var(--edge);
  background: radial-gradient(120% 90% at 50% 110%, var(--glow-08), transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  text-align: center;
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  aspect-ratio: auto;
  min-height: 240px;
}
.story-more p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.8rem);
  line-height: 1.25;
  color: var(--vellum);
  margin: 0;
}
.story-more p em { font-style: italic; color: var(--amber); }
.story-more ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2.2;
}

.shelf-note {
  margin-top: clamp(40px, 6vh, 64px);
  color: var(--muted);
  max-width: 36em;
}
.shelf-note em {
  font-family: var(--display);
  font-style: italic;
  color: var(--vellum);
  font-size: 1.15em;
}

/* ---------- Scripture divider ---------- */
.verse {
  padding: var(--section) 0;
  text-align: center;
  overflow: clip;
}
.verse blockquote {
  margin: 0 auto;
  max-width: 42em;
  position: relative;
}
.verse blockquote::before {
  content: "";
  position: absolute;
  inset: -30% -20%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--glow-08), transparent 70%);
}
.verse p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.875rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}
.verse cite {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ---------- Numbers ---------- */
.numbers { padding: var(--section) 0; }
.numbers .wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--edge);
}
@media (min-width: 760px) { .numbers .wrap { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: clamp(1.8rem, 4vh, 2.8rem) 1.2rem clamp(1.8rem, 4vh, 2.8rem) 0; border-bottom: 1px solid var(--edge); }
.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.stat span {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Trust: a letter, not a feature list ---------- */
.trust { padding: var(--section) 0; }
.trust .wrap { max-width: 820px; }
.letter {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.4rem, 6vw, 4.5rem) clamp(2.2rem, 6vw, 3.6rem);
  overflow: hidden;
}
.letter::before {
  /* lamplight falling across the page */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 60% at 18% 0%, var(--glow-08), transparent 65%);
  pointer-events: none;
}
.letter .kicker { margin-bottom: 2rem; }
.trust h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.8vw, 3.2rem);
  margin-bottom: 1.6rem;
}
.trust p { color: var(--muted); max-width: 36em; margin: 0 0 1.2rem; position: relative; }
.trust p strong { color: var(--vellum); font-weight: 500; }
.letter .signoff {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--vellum);
  margin: 2.2rem 0 0;
}

/* ---------- FAQ ---------- */
.faq { padding: var(--section) 0; }
.faq .wrap { display: grid; gap: clamp(36px, 5vw, 72px); }
@media (min-width: 960px) { .faq .wrap { grid-template-columns: 4fr 7fr; align-items: start; } }
.faq h2 { font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); }
.faq-list { border-top: 1px solid var(--edge); }
.faq-list details { border-bottom: 1px solid var(--edge); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.35rem 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.4s var(--ease-soft);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--amber); }
.faq-list summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--amber);
  flex: none;
  transition: transform 0.45s var(--ease-soft);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list .answer {
  color: var(--muted);
  max-width: 36em;
  padding: 0 0 1.5rem;
  margin: 0;
}

/* ---------- Final CTA ---------- */
.finale {
  padding: var(--section) 0;
  text-align: center;
}
.finale h2 {
  font-size: clamp(2.4rem, 1.6rem + 5vw, 6rem);
  max-width: 10em;
  margin: 0 auto 1.4rem;
}
.finale .lede { margin: 0 auto 3rem; }
.finale-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.qr-slot {
  display: none;
  width: 124px;
  height: 124px;
  border: 1px dashed var(--edge-strong);
  border-radius: 12px;
  place-items: center;
  text-align: center;
  padding: 0.6rem;
}
.qr-slot span {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.9;
}
@media (min-width: 960px) {
  .finale-cta { flex-direction: row; justify-content: center; gap: 3.2rem; }
  .qr-slot { display: grid; }
  .finale-pair { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
}

/* ---------- Footer ---------- */
.site-foot {
  border-top: 1px solid var(--edge);
  padding: clamp(40px, 7vh, 64px) 0 clamp(36px, 6vh, 56px);
}
.site-foot .wrap {
  display: grid;
  gap: 2.2rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  align-items: baseline;
  justify-content: space-between;
}
.foot-row nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.site-foot a {
  color: var(--muted);
  font-size: 0.9375rem;
  transition: color 0.4s var(--ease-soft);
}
.site-foot a:hover { color: var(--amber); }
.foot-legal {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.8;
  max-width: 52em;
  margin: 0;
  opacity: 0.8;
}

/* ---------- Subpages (privacy, terms, support) ---------- */
.page { padding: clamp(140px, 20vh, 220px) 0 var(--section); }
.page .wrap { max-width: 720px; }
.page h1 { font-size: clamp(2.4rem, 1.8rem + 3vw, 4rem); margin-bottom: 0.8rem; }
.page-meta {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
}
.page h2 {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  margin: 2.8rem 0 0.9rem;
}
.page p, .page li { color: var(--muted); }
.page p strong { color: var(--vellum); font-weight: 500; }
.page ul { padding-left: 1.2em; }
.draft-note {
  border: 1px solid var(--edge-strong);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 3rem;
}

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

/* ---------- Reveal choreography ----------
   Content is fully visible by default. JS adds .js-anim only when
   motion is allowed, and GSAP takes it from there. */
.js-anim [data-reveal] { opacity: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .store-badge::before { animation: none; opacity: 0.85; }
  .stars { opacity: 0.18; }
}
