/* ==========================================================================
   OvOdyssey — shared design system  ("Celestial field journal")
   Used by index.html, support.html, privacy.html, terms.html.

   Contents
   1.  Tokens (:root)
   2.  Reset & base
   3.  i18n visibility (see js/site.js header for the mechanism)
   4.  Typography helpers
   5.  Layout primitives (.wrap, .section, .chart-grid, .coords)
   6.  Header / nav / language toggle
   7.  Buttons & App Store badge
   8.  Ornaments (sparkle divider, fig captions, dotted connectors, orbits)
   9.  Hero (landing)
   9b. Observatory note (intro card)
   10. Chapters (missions)
   12. Crew plates & categories
   14. Closing CTA ("le petit nid")
   15. Page head for secondary pages (.page-head)
   16. .prose — long-form legal / FAQ text
   17. FAQ accordion (<details class="faq">)
   18. Footer
   19. Reveal-on-scroll & motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Palette (from the app's CosmicPalette) */
  --night-1: #030314;
  --night-3: #060524;
  --night-8: #170f42;
  --lilac: #d1adff;        /* accent77 */
  --violet: #8047ff;       /* accent47 */
  --lilac-pale: #f0d4ff;   /* accent88 */
  --blush: #ffc7f0;        /* blush86 */
  --rose: #ff94c7;         /* blush74 */
  --gold: #ffc75c;         /* gold83 */
  --ivory: #faf0ff;        /* ivory96 */

  /* Semantic colours */
  --bg: var(--night-1);
  --surface: rgba(23, 15, 66, 0.55);          /* night8, translucent */
  --surface-solid: #0e0a33;
  --ink: var(--ivory);                         /* body text: ~18:1 on bg */
  --ink-soft: #d9c9f2;                         /* secondary text: ~12:1 */
  --ink-muted: #a996cc;                        /* labels/captions: ~7:1 */
  --line: rgba(209, 173, 255, 0.22);
  --line-faint: rgba(209, 173, 255, 0.08);
  --focus: var(--gold);

  /* Gradients */
  --grad-title: linear-gradient(175deg, var(--ivory) 15%, var(--lilac-pale) 45%, var(--lilac) 90%);
  --grad-glow: radial-gradient(closest-side, rgba(128, 71, 255, 0.35), rgba(128, 71, 255, 0) 70%);
  --grad-blush: radial-gradient(closest-side, rgba(255, 148, 199, 0.28), rgba(255, 148, 199, 0) 70%);

  /* Type */
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --fs-2xl: clamp(2.5rem, 1.8rem + 3.4vw, 4.75rem);
  --tracking-caps: 0.18em;

  /* Space & layout */
  --gutter: 16px;
  --maxw: 1240px;
  --maxw-prose: 42rem;
  --header-h: 64px;
  --radius: 18px;
  --radius-lg: 28px;
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: clamp(5rem, 3rem + 8vw, 10rem);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
@media (min-width: 720px) {
  :root { --gutter: clamp(24px, 4vw, 56px); --header-h: 72px; }
}

/* 2. Reset & 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);
  overflow-x: clip;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(120% 60% at 80% -10%, rgba(128, 71, 255, 0.20), transparent 60%),
    radial-gradient(90% 50% at -10% 30%, rgba(255, 148, 199, 0.07), transparent 60%),
    linear-gradient(180deg, var(--night-3) 0%, var(--night-1) 55%, var(--night-3) 100%);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
em, i, cite, address { font-style: normal; } /* no italics anywhere: emphasis is colour only */
a { color: var(--lilac); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--lilac-pale); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.05; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--violet); color: var(--ivory); }

/* Visible focus everywhere (gold, high contrast on night) */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--ivory); color: var(--night-1); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Twinkling star field canvas (created by site.js) */
#sky {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* 3. i18n visibility --------------------------------------------------------
   Copy is written twice as siblings: <span lang="fr">…</span><span lang="en">…</span>.
   Whichever language is NOT on <html lang> is hidden. Works for any element
   (span, p, li, div…). Without JS, <html lang="fr"> shows French only. */
html[lang="fr"] body [lang="en"],
html[lang="en"] body [lang="fr"] { display: none !important; }

/* 4. Typography helpers ---------------------------------------------------- */
.display {                    /* big Cormorant headline with app-title gradient */
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--grad-title);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.caps {                       /* wide-tracked small caps label (DM Sans) */
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.eyebrow {                    /* section kicker: "✦ Chapitre I" */
  display: inline-flex; align-items: center; gap: 0.6em;
  color: var(--lilac);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
}
.eyebrow::before { content: "✦"; color: var(--gold); letter-spacing: 0; }
.h-section {                  /* section title */
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.005em;
}
.h-section em { font-style: normal; color: var(--lilac); }
.lede { font-size: var(--fs-md); color: var(--ink-soft); max-width: 36rem; }
.muted { color: var(--ink-muted); }
.italic-serif { font-family: var(--font-display); font-style: normal; }

/* 5. Layout primitives ----------------------------------------------------- */
.wrap {                       /* centred content column with side gutters */
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: calc(var(--maxw-prose) + 2 * var(--gutter)); }
.section { position: relative; padding-block: var(--s-6); }
.section__head { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); }
.section__head .lede { margin-top: var(--s-1); }

/* Thin star-chart grid layer; put inside a position:relative parent */
.chart-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 80%);
}

/* Margin coordinates ("α 04h 12m", "δ +23°"); hidden on small screens */
.coords {
  position: absolute;
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  white-space: nowrap;
  pointer-events: none;
  display: none;
}
.coords--left { left: calc(var(--gutter) * 0.35); top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; }
.coords--right { right: calc(var(--gutter) * 0.35); top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; }
.coords--top { top: 1.25rem; left: var(--gutter); }
@media (min-width: 1100px) { .coords { display: block; } }

/* 6. Header / nav / language toggle ---------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: linear-gradient(180deg, rgba(3, 3, 20, 0.88), rgba(3, 3, 20, 0.62));
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-faint);
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: var(--s-2); row-gap: 0;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(128, 71, 255, 0.35); }
.brand__name {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600;
  letter-spacing: 0.02em; line-height: 1;
}
.brand__name b { font-weight: 600; color: var(--lilac); }  /* the "O" in OvO */
.site-nav {
  order: 3; width: 100%;
  display: flex; gap: 1.25rem; justify-content: flex-start;
  padding-block: 0 0.7rem;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ivory); border-bottom-color: var(--lilac); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
@media (min-width: 820px) {
  .site-nav { order: 0; width: auto; padding: 0; gap: 1.75rem; margin-right: var(--s-2); }
}

/* FR / EN segmented toggle: <div class="lang-toggle" role="group"> with two
   <button data-set-lang="fr|en" aria-pressed> — wired by site.js */
.lang-toggle {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(23, 15, 66, 0.5);
}
.lang-toggle button {
  min-width: 2.4rem; min-height: 2rem; padding: 0 0.55rem;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--ink-muted); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em;
}
.lang-toggle button[aria-pressed="true"] { background: var(--lilac); color: var(--night-1); }
.lang-toggle button:not([aria-pressed="true"]):hover { color: var(--ivory); }

/* 7. Buttons & App Store badge -------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.4rem;
  border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}
.btn:hover { border-color: var(--lilac); background: rgba(209, 173, 255, 0.08); color: var(--ivory); }
.btn--primary { background: var(--lilac); color: var(--night-1); border-color: var(--lilac); }
.btn--primary:hover { background: var(--lilac-pale); color: var(--night-1); }

/* "Download on the App Store" style badge-button.
   Markup: <a class="store-badge" href="…"><svg class="store-badge__logo">…</svg>
   <span class="store-badge__text"><small>…</small><strong>App Store</strong></span></a>
   Add .store-badge--sm for the compact header version. */
.store-badge {
  display: inline-flex; align-items: center; gap: 0.65rem;
  min-height: 54px; padding: 0.5rem 1.25rem 0.5rem 1rem;
  border-radius: 14px;
  background: #000; color: #fff;
  border: 1px solid rgba(250, 240, 255, 0.55);
  text-decoration: none; line-height: 1.05;
  box-shadow: 0 0 0 0 rgba(209, 173, 255, 0), 0 10px 30px -12px rgba(128, 71, 255, 0.7);
  transition: box-shadow 0.3s, transform 0.3s var(--ease-out), border-color 0.3s;
}
.store-badge:hover { color: #fff; border-color: var(--lilac); transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(209, 173, 255, 0.15), 0 16px 40px -14px rgba(128, 71, 255, 0.9); }
.store-badge__logo { width: 24px; height: 28px; flex: none; fill: currentColor; }
.store-badge__text { display: grid; }
.store-badge__text small { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em; }
.store-badge__text strong { font-family: -apple-system, "SF Pro Display", var(--font-body); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.store-badge--sm { min-height: 38px; padding: 0.3rem 0.8rem 0.3rem 0.65rem; border-radius: 10px; gap: 0.45rem; }
.store-badge--sm .store-badge__logo { width: 16px; height: 19px; }
.store-badge--sm .store-badge__text small { font-size: 0.56rem; }
.store-badge--sm .store-badge__text strong { font-size: 0.95rem; }
@media (max-width: 479px) {
  /* small phones: header keeps brand + language toggle; the hero/closing
     badges (and the apple-itunes-app smart banner) carry the download CTA */
  .site-header .store-badge--sm { display: none; }
}
.platform-note { font-size: var(--fs-xs); color: var(--ink-muted); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }

/* 8. Ornaments ------------------------------------------------------------- */
.sparkle-divider {            /* ——— ✦ ——— */
  display: flex; align-items: center; gap: 1rem;
  color: var(--gold); font-size: 0.9rem;
  margin-block: var(--s-4);
}
.sparkle-divider::before, .sparkle-divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.fig {                        /* "fig. 01 — caption" */
  font-family: var(--font-display); font-style: normal;
  font-size: 1rem; color: var(--ink-muted); line-height: 1.35;
}
.fig b { font-family: var(--font-body); font-style: normal; font-weight: 600; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--lilac); margin-right: 0.4em; }
.dots {                       /* dotted "•••" connector between steps */
  display: inline-block; width: 28px; height: 6px; flex: none;
  background: radial-gradient(circle, var(--lilac) 1.6px, transparent 2px) 0 50% / 9px 6px repeat-x;
  opacity: 0.8;
}
.halo { position: relative; isolation: isolate; }
.halo::before {               /* soft violet glow behind an illustration */
  content: ""; position: absolute; inset: -18%; z-index: -1;
  background: var(--grad-glow); border-radius: 50%;
}
.ring-medallion {             /* circular framed illustration (steps, stages, crew) */
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(128, 71, 255, 0.28), rgba(23, 15, 66, 0.6) 60%, rgba(6, 5, 36, 0.9));
  box-shadow: inset 0 0 0 1px var(--line), 0 0 0 6px rgba(209, 173, 255, 0.04), 0 0 40px -10px rgba(209, 173, 255, 0.45);
}
.ring-medallion img { width: 78%; height: 78%; object-fit: contain; }

/* 9. Hero ------------------------------------------------------------------ */
.hero { position: relative; padding-top: clamp(2rem, 6vw, 5rem); padding-bottom: var(--s-5); isolation: isolate; }
.hero__bg {
  position: absolute; inset: 0 0 -10% 0; z-index: -2;
  background: url("../assets/bg-starry.webp") center 30% / cover no-repeat;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
}
.hero__grid { display: grid; gap: var(--s-4); align-items: center; }
.hero__plate > :last-child { display: none; }
@media (min-width: 640px) { .hero__plate > :last-child { display: inline; } }
.hero__plate { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-muted); margin-bottom: var(--s-3); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.84;
  letter-spacing: -0.01em;
}
.hero__title span { display: block; }
.hero__title .t-caps {
  font-size: clamp(2.6rem, 1.2rem + 7vw, 6.4rem);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.hero__title .t-ital {
  font-size: clamp(5rem, 2rem + 16vw, 13.5rem);
  font-style: normal; font-weight: 400;
  margin-left: 0.18em; margin-block: -0.04em 0.02em;
  letter-spacing: -0.02em;
}
.hero__title .t-end {
  font-size: clamp(2rem, 1rem + 5vw, 4.6rem);
  text-transform: uppercase; letter-spacing: 0.22em; font-weight: 500;
  text-align: right;
}
.hero__sub {
  display: flex; gap: 0.9rem; align-items: baseline;
  margin-top: var(--s-4);
  font-size: var(--fs-lg); color: var(--ink-soft); max-width: 30rem;
}
.hero__sub::before { content: "✦"; color: var(--gold); font-size: 0.9em; flex: none; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: var(--s-3); padding-left: 1.6rem; }

/* Orrery: swimmer in rotating SVG orbits, ovule as destination */
.orrery { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin-inline: auto; }
.orrery__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orrery__svg .orbit { fill: none; stroke: var(--lilac); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0.45; }
.orrery__svg .orbit--dash { stroke-dasharray: 2 7; opacity: 0.6; }
.orrery__svg .path { fill: none; stroke: var(--blush); stroke-width: 1.4; stroke-dasharray: 1 8; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.8; }
.orrery__svg .planet { fill: var(--lilac-pale); }
.orrery__svg .planet--gold { fill: var(--gold); }
.orrery__svg .tick { stroke: var(--ink-muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.orrery__svg .label { fill: var(--ink-muted); font: 500 9px var(--font-body); letter-spacing: 0.2em; text-transform: uppercase; }
.spin { transform-box: view-box; transform-origin: 50% 50%; animation: spin 90s linear infinite; }
.spin--rev { animation-duration: 140s; animation-direction: reverse; }
.orrery__swimmer {
  position: absolute; left: 30%; top: 38%; width: 22%;
  filter: drop-shadow(0 0 24px rgba(209, 173, 255, 0.55));
  animation: swimmer-drift 12s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.orrery__ovule {
  position: absolute; right: -2%; top: -2%; width: 26%;
  filter: drop-shadow(0 0 20px rgba(255, 148, 199, 0.35));
  animation: ovule-breathe 6.5s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.orrery__caption { position: absolute; left: 0; bottom: 2%; max-width: 13rem; }

/* Table of contents strip: I … II … III */
.toc {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-top: var(--s-5); padding-top: var(--s-3);
  border-top: 1px solid var(--line-faint);
  list-style: none;
}
.toc li { display: flex; align-items: center; gap: 0.5rem; flex: 0 1 auto; }
.toc li + li::before {        /* dotted connector between steps */
  content: ""; width: clamp(26px, 5vw, 60px); height: 6px; margin-bottom: 2.2rem;
  background: radial-gradient(circle, var(--lilac) 1.6px, transparent 2px) 0 50% / 9px 6px repeat-x;
  opacity: 0.8;
}
.toc a {
  display: grid; justify-items: center; gap: 0.6rem; text-align: center;
  color: var(--ink-soft); text-decoration: none; font-size: var(--fs-sm);
  flex: 0 1 8rem;
}
.toc a:hover { color: var(--ivory); }
.toc .ring-medallion { width: clamp(64px, 18vw, 104px); transition: transform 0.4s var(--ease-out); }
.toc a:hover .ring-medallion { transform: translateY(-4px) scale(1.04); }
.toc__num { font-family: var(--font-display); font-style: normal; color: var(--lilac); font-size: 1.05rem; margin-right: 0.2em; }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .hero__text { padding-top: var(--s-4); }
  .toc { justify-content: flex-start; gap: 1.5rem; }
}

/* 9b. Observatory note (intro card between hero and chapters) -------------- */
.obs-note { position: relative; padding-block: var(--s-3) var(--s-2); }
.obs-note__card {
  max-width: 42rem; margin-inline: auto; text-align: center;
  padding: var(--s-4) var(--s-3);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(23, 15, 66, 0.5), rgba(6, 5, 36, 0.3));
}
.obs-note__label { justify-content: center; margin-bottom: 0.9rem; }
.obs-note__text { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 400; color: var(--ink); line-height: 1.5; }
.obs-note__disclaimer {
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed var(--line);
  font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.6; max-width: 36rem; margin-inline: auto;
}

/* 10. Chapters ------------------------------------------------------------- */
.chapters { display: grid; gap: var(--s-6); }
.chapter { position: relative; isolation: isolate; display: grid; gap: var(--s-4); align-items: center; }
.chapter__numeral {
  position: absolute; z-index: -1; top: -0.3em; right: 0.12em; /* keep the numeral inside the viewport on phones */
  font-family: var(--font-display); font-weight: 300; font-style: normal;
  font-size: clamp(7rem, 4rem + 22vw, 22rem); line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(209, 173, 255, 0.34);
  background: linear-gradient(180deg, rgba(128, 71, 255, 0.10), transparent 75%); -webkit-background-clip: text; background-clip: text;
  pointer-events: none; user-select: none;
}
.chapter__media { display: grid; justify-items: center; gap: 1rem; }
.chapter__body { display: grid; gap: var(--s-2); max-width: 34rem; }
.chapter__meta { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-muted); }
.chapter__meta .rule { flex: 1; height: 1px; background: var(--line); max-width: 8rem; }
.chapter__title { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 500; line-height: 0.95; }
.chapter__title em { font-style: normal; color: var(--lilac); }
.chapter__desc { font-size: var(--fs-md); color: var(--ink-soft); }
.instructions { list-style: none; display: grid; gap: 0.5rem; margin-top: var(--s-1); }
.instructions li {
  display: flex; gap: 0.75rem; align-items: center;
  padding: 0.7rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(23, 15, 66, 0.45);
  font-weight: 500; font-size: var(--fs-sm);
  width: fit-content;
}
.instructions li::before { content: "✦"; color: var(--gold); font-size: 0.8em; }

/* Phone frame around an app screenshot */
.phone {
  position: relative; width: min(72vw, 290px);
  padding: 9px; border-radius: 44px;
  background: linear-gradient(145deg, #2a2160, #0b0826 40%, #1c1450);
  box-shadow: inset 0 0 0 1px rgba(250, 240, 255, 0.18), 0 40px 80px -30px rgba(128, 71, 255, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.phone img { width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; border-radius: 36px; background: var(--night-3); }
.phone::after {               /* dynamic island */
  content: ""; position: absolute; top: 20px; left: 50%; width: 30%; height: 20px;
  transform: translateX(-50%); border-radius: 999px; background: #000;
}
.phone--tilt-l { transform: rotate(-3deg); }
.phone--tilt-r { transform: rotate(3deg); }

@media (min-width: 900px) {
  .chapter { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-5); }
  .chapter__media { justify-items: end; }
  .chapter--flip .chapter__media { order: 2; justify-items: start; }
  /* numeral sits on the phone's side, never behind the text */
  .chapter__numeral { right: auto; left: -0.04em; top: -0.15em; }
  .chapter--flip .chapter__numeral { left: auto; right: -0.04em; }
  .chapter--flip .chapter__body { justify-self: end; }
  .chapter:nth-child(2) { margin-top: -2rem; }
  .chapter__body { padding-block: var(--s-4); }
}

/* 12. Crew plates ---------------------------------------------------------- */
.plate {                      /* bordered naturalist "plate" */
  position: relative;
  padding: var(--s-3) var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(23, 15, 66, 0.55), rgba(6, 5, 36, 0.35));
}
.plate__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; margin-bottom: var(--s-3); padding-bottom: 0.9rem; border-bottom: 1px dashed var(--line); }
.plate__title { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500; }
.plate__title em { color: var(--lilac); }
.categories { display: grid; gap: var(--s-3); }
.category {
  padding: var(--s-3) var(--s-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(23, 15, 66, 0.55), rgba(6, 5, 36, 0.35));
}
.category__head { display: flex; gap: 1rem; align-items: flex-start; }
.category__icon { width: 52px; height: 52px; flex: none; filter: drop-shadow(0 0 14px rgba(209, 173, 255, 0.4)); }
.category__name { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; }
.category__desc { margin-top: 0.4rem; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.55; }
.category__strip {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px dashed var(--line);
}
.category__strip li { display: grid; justify-items: center; gap: 0.5rem; text-align: center; width: calc(50% - var(--s-2) / 2); }
.category__strip .ring-medallion { width: min(100%, 100px); transition: transform 0.5s var(--ease-out); }
.category__strip li:hover .ring-medallion { transform: translateY(-4px) rotate(-3deg); }
.category__strip--photo img { width: min(100%, 100px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 0 0 4px rgba(209, 173, 255, 0.05), 0 14px 34px -16px rgba(128, 71, 255, 0.7); transition: transform 0.5s var(--ease-out); }
.category__strip--photo li:hover img { transform: translateY(-4px); }
.category__item-name { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); line-height: 1.2; }
.sparks { display: grid; gap: var(--s-3); align-items: center; }
.sparks__art { width: 120px; filter: drop-shadow(0 0 28px rgba(255, 199, 92, 0.5)); animation: float 8s ease-in-out infinite; }
.sparks__list { list-style: none; display: grid; gap: 0.7rem; }
.sparks__list li { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; color: var(--ink-soft); }
.sparks__list li::before { content: "✦"; color: var(--gold); }
.sparks__list strong { color: var(--ivory); font-weight: 600; }
@media (min-width: 480px) {
  .category__strip li { width: calc(25% - var(--s-2) * 3 / 4); }
}
@media (min-width: 640px) {
  .plate { padding: var(--s-4); }
  .category { padding: var(--s-4); }
  .sparks { grid-template-columns: auto 1fr; gap: var(--s-4); }
}
@media (min-width: 760px) {
  .categories { grid-template-columns: 1fr 1fr; }
}

/* 14. Closing CTA ---------------------------------------------------------- */
/* The landed blastocyst (assets/end-landed.webp, 941x1672 portrait) is shown
   whole, full section height and centred, never zoomed: the title + CTA sit in
   its sky and the blastocyst lands below them. Its dark sky blends into the
   page; the left/right edges and the top are feathered away. */
.nest {
  position: relative; isolation: isolate; text-align: center; overflow: hidden;
  padding-top: var(--s-5); padding-bottom: var(--s-5);
  min-height: clamp(900px, 150vw, 1180px);
  display: flex; flex-direction: column; justify-content: flex-start;
}
.nest::before {               /* extra top fade so title text stays legible over the sky */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, var(--night-1) 0%, rgba(3, 3, 20, 0.5) 25%, transparent 50%);
}
.nest__art {
  position: absolute; z-index: -2; top: 0; bottom: 0; left: 50%;
  height: 100%; width: auto; max-width: none; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 66%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 30%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 66%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 30%);
  mask-composite: intersect;
  pointer-events: none;
}
.nest::after {                /* purple halo: a blurred, widened copy of the art fills the full section width */
  content: ""; position: absolute; z-index: -3; pointer-events: none;
  left: -10%; right: -10%; top: 0; bottom: -5%;
  background: url("../assets/end-landed.webp") center bottom / cover no-repeat;
  filter: blur(80px) saturate(1.1) brightness(0.45);
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(60% 75% at 50% 100%, #000 25%, transparent 100%);
  mask-image: radial-gradient(60% 75% at 50% 100%, #000 25%, transparent 100%);
}
@media (max-width: 719px) {   /* on phones the image is wider than the screen: no side feather needed */
  .nest__art { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%); mask-image: linear-gradient(180deg, transparent 0%, #000 30%); }
}
.nest__glow { position: absolute; left: 50%; bottom: 6%; width: 90vw; height: 50vw; max-width: 900px; max-height: 450px; transform: translateX(-50%); z-index: -1; background: var(--grad-blush); }
.nest__title { font-family: var(--font-display); font-size: clamp(3rem, 1.5rem + 7vw, 7.5rem); font-weight: 500; line-height: 0.9; text-shadow: 0 4px 26px rgba(3, 3, 20, 0.75); }
.nest__title em { display: block; font-style: normal; font-weight: 400; }
.nest .lede { margin: var(--s-3) auto 0; text-shadow: 0 2px 16px rgba(3, 3, 20, 0.85); }
.nest__cta { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: var(--s-4); position: relative; z-index: 1; }
.nest__cta .platform-note { color: var(--ink-soft); text-shadow: 0 1px 3px rgba(3, 3, 20, 0.95), 0 2px 16px rgba(3, 3, 20, 0.9); }

/* 15. Secondary page header ----------------------------------------------- */
/* <header class="page-head wrap"><p class="eyebrow">…</p><h1 class="page-head__title display">…</h1><p class="lede">…</p></header> */
.page-head { position: relative; padding-top: var(--s-5); padding-bottom: var(--s-4); }
/* Breathing room between a content page's last block and the footer */
main > .wrap:last-child { padding-bottom: var(--s-6); }
.page-head__title { font-size: var(--fs-2xl); line-height: 0.95; margin-top: var(--s-2); }
.page-head .lede { margin-top: var(--s-2); }
.page-head .lede + .caps { margin-top: var(--s-2); }
.page-head__meta { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--ink-muted); }

/* 16. .prose — long-form text (privacy, terms, support answers) ------------ */
.prose { max-width: var(--maxw-prose); color: var(--ink-soft); font-size: var(--fs-base); line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.25em; padding-top: 1.5em; border-top: 1px dashed var(--line);
  font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.1; color: var(--ivory);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.card + .prose { margin-top: var(--s-4); }
.prose h3 { margin-top: 2em; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--lilac-pale); line-height: 1.2; }
.prose p, .prose li { max-width: 68ch; }
.prose strong { color: var(--ivory); font-weight: 600; }
.prose a { color: var(--lilac); text-decoration: underline; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: none; padding-left: 1.3em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: "✦"; position: absolute; left: -1.3em; top: 0.1em; color: var(--gold); font-size: 0.75em; }
.prose li + li { margin-top: 0.45em; }
.prose ol > li::marker { color: var(--lilac); font-family: var(--font-display); font-style: normal; }
.prose blockquote, .prose .note {
  margin-inline: 0; padding: 1rem 1.25rem; border-left: 2px solid var(--lilac);
  border-radius: 0 var(--radius) var(--radius) 0; background: rgba(23, 15, 66, 0.5); color: var(--ink-soft);
}
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ivory); font-weight: 600; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.5em; }
.prose code { font-size: 0.9em; padding: 0.1em 0.35em; border-radius: 6px; background: rgba(209, 173, 255, 0.1); color: var(--lilac-pale); }

/* 17. FAQ accordion --------------------------------------------------------
   <div class="faq-list">
     <details class="faq"><summary>Question</summary><div class="faq__body prose">Answer</div></details>
   </div> */
.faq-list { border-top: 1px solid var(--line); max-width: 52rem; padding-top: var(--s-4); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  display: flex; gap: 1rem; align-items: baseline;
  padding: 1.25rem 2.75rem 1.25rem 0;
  font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.25; color: var(--ivory);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "✦"; flex: none; color: var(--gold); font-size: 0.7em; transform: translateY(-0.15em); transition: transform 0.4s var(--ease-out); }
.faq summary::after {        /* plus / minus */
  content: ""; position: absolute; right: 0.25rem; top: 50%; width: 22px; height: 22px; margin-top: -11px;
  border-radius: 50%; border: 1px solid var(--line);
  background:
    linear-gradient(var(--lilac), var(--lilac)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--lilac), var(--lilac)) center / 1.5px 10px no-repeat;
  transition: transform 0.3s var(--ease-out);
}
.faq[open] summary::after { background: linear-gradient(var(--lilac), var(--lilac)) center / 10px 1.5px no-repeat; transform: rotate(180deg); }
.faq[open] summary::before { transform: translateY(-0.15em) rotate(45deg); }
.faq summary:hover { color: var(--lilac-pale); }
.faq__body { padding: 0 0 1.5rem 1.6rem; }
.faq-group + .faq-group { margin-top: var(--s-5); }
.faq-group__title { margin-bottom: var(--s-2); }

/* Contact card (support page) */
.card { padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }

/* 18. Footer --------------------------------------------------------------- */
.site-footer { position: relative; border-top: 1px solid var(--line-faint); padding-block: var(--s-5) var(--s-4); background: linear-gradient(180deg, transparent, rgba(3, 3, 20, 0.85)); font-size: var(--fs-sm); color: var(--ink-muted); }
.site-footer__grid { display: grid; gap: var(--s-4); }
.site-footer .brand { margin: 0; }
.site-footer__tag { margin-top: 0.8rem; font-family: var(--font-display); font-style: normal; font-size: 1.15rem; color: var(--ink-soft); }
.footer-nav { display: grid; gap: 0.2rem; list-style: none; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; display: inline-block; padding-block: 0.3rem; }
.footer-nav a:hover { color: var(--ivory); text-decoration: underline; }
.footer-col__title { margin-bottom: 0.6rem; color: var(--lilac); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line-faint); }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* 19. Reveal-on-scroll & motion ------------------------------------------- */
/* Add .reveal to any block; site.js adds .is-visible when it enters the viewport.
   Hidden state only applies when JS is running (html.js). Use style="--d:120ms" to stagger. */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out) var(--d, 0ms), transform 0.9s var(--ease-out) var(--d, 0ms); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
/* Swimmer: a livelier drift along the orbit toward the ovule, with a wiggle/tilt */
@keyframes swimmer-drift {
  0%   { transform: translate(0%, 0%) rotate(-6deg); }
  30%  { transform: translate(6%, -8%) rotate(5deg); }
  55%  { transform: translate(11%, -3%) rotate(-4deg); }
  80%  { transform: translate(4%, 4%) rotate(7deg); }
  100% { transform: translate(0%, 0%) rotate(-6deg); }
}
/* Ovule: a slow breathing pulse with a soft glow pulse */
@keyframes ovule-breathe {
  0%, 100% { transform: scale(0.92); filter: drop-shadow(0 0 20px rgba(255, 148, 199, 0.35)); }
  50%      { transform: scale(1.08); filter: drop-shadow(0 0 42px rgba(255, 148, 199, 0.75)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
