/* ==========================================================================
   NADI public site: design system v3 ("Tidewater")
   Calm blue-green palette with Day and Dusk themes. Owner: NADI LLC.
   Order: fonts, tokens, base, header, buttons, layout, hero, chapters,
   timeline, audience, forms, faq, footer, cookie, motion, print.
   ========================================================================== */

/* ---- Fonts (self hosted, SIL Open Font License) ---- */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Jost"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/jost-latin-wght-italic.woff2") format("woff2-variations"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2-variations"); }

/* ---- Tokens ---- */
/* Palette v3 "Tidewater": analogous blue-greens (hue 160-185) at low chroma,
   with a muted periwinkle as the single cool counterpoint (hero glow, focus ring).
   Day is the default; Dusk follows the visitor's system dark mode.
   Every text pair meets WCAG AA (4.5:1); borders and focus meet 3:1. */
:root {
  color-scheme: light;

  /* ground: morning mist, never pure white */
  --bg: #f2f5f3;
  --surface: #e7edea;
  --field: #fbfcfb;
  --field-focus: #ffffff;
  --line: #c9d6d1;
  --line-soft: #dde5e1;
  --field-border: #7a908a;

  /* hero light: sage from below, periwinkle from above */
  --glow-1: rgba(141, 196, 180, 0.42);
  --glow-2: rgba(170, 178, 222, 0.32);

  /* text: deep spruce, never pure black */
  --heading: #1b2a29;
  --text: #3a4a47;
  --mute: #596966;

  /* accent: deep sea teal */
  --accent: #2d6a63;
  --accent-hover: #22544e;
  --accent-deep: #5f8c84;
  --accent-glow: rgba(45, 106, 99, 0.16);
  --accent-wash: rgba(45, 106, 99, 0.06);
  --on-accent: #f6faf8;

  /* micro accent: periwinkle, for focus rings and one thread in the hero */
  --focus: #4a68c0;
  --field-line: 45, 106, 99;
  --field-thread: 74, 104, 192;

  --error: #a8452f;
  --ok: #2f6e48;
  --footer-end: #e9efec;
  --shadow: 0 20px 50px rgba(27, 42, 41, 0.14);

  /* type */
  --display: "Jost", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --fs-sm: 0.842rem;
  --fs-base: 1rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.563rem;
  --fs-xl: clamp(2rem, 4.2vw, 3.05rem);
  --fs-hero: clamp(3.6rem, 12vw, 10rem);

  /* layout: 8px rhythm */
  --s-1: 0.5rem; --s-2: 1rem; --s-3: 1.5rem; --s-4: 2rem; --s-6: 3rem; --s-8: 4rem;
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 62ch;
  --max: 1180px;
  --nav-h: 72px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.22s;
  --t-med: 0.5s;
  --t-slow: 0.9s;
}

/* Dusk: a deep blue-green night instead of black */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1716;
    --surface: #142120;
    --field: #1a2928;
    --field-focus: #1f302e;
    --line: #2c3d3b;
    --line-soft: #1f2d2b;
    --field-border: #5d7672;
    --glow-1: rgba(58, 104, 96, 0.5);
    --glow-2: rgba(84, 88, 140, 0.32);
    --heading: #e5eeea;
    --text: #b8c8c3;
    --mute: #8a9d98;
    --accent: #8fcabe;
    --accent-hover: #b2ddd3;
    --accent-deep: #4e8a81;
    --accent-glow: rgba(143, 202, 190, 0.16);
    --accent-wash: rgba(143, 202, 190, 0.06);
    --on-accent: #0e1716;
    --focus: #a3b8f5;
    --field-line: 143, 202, 190;
    --field-thread: 163, 184, 245;
    --error: #e8a390;
    --ok: #a6d2b5;
    --footer-end: #0b1312;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  }
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 19px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (max-width: 600px) { html { font-size: 17.5px; } }

body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--serif); font-weight: 400; line-height: 1.6;
  font-variation-settings: "opsz" 18;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--on-accent); }

a { color: var(--accent); text-decoration: none; text-underline-offset: 0.18em; transition: color var(--t-fast) var(--ease); }
a:hover { text-decoration: underline; color: var(--heading); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--display); font-weight: 300; line-height: 1.1; letter-spacing: 0.004em;
  margin: 0 0 0.6em; color: var(--heading); text-wrap: balance;
}
h1, h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); font-weight: 400; }
p { margin: 0 0 1.1em; max-width: var(--measure); text-wrap: pretty; }
p.lede { font-size: var(--fs-md); line-height: 1.5; color: var(--heading); font-variation-settings: "opsz" 24; }
small, .small { font-size: var(--fs-sm); }
ul { padding-left: 1.2em; }
li { margin: 0 0 0.45em; max-width: var(--measure); }
strong { color: var(--heading); font-weight: 500; }

.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--accent); color: var(--on-accent);
  padding: 0.5em 0.9em; font-family: var(--display); font-size: var(--fs-sm); z-index: 100; }
.skip:focus { top: 12px; text-decoration: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Wordmark ---- */
.wordmark {
  font-family: var(--display); font-weight: 200; letter-spacing: 0.42em; text-indent: 0.42em;
  text-transform: uppercase; color: var(--accent); line-height: 1; white-space: nowrap;
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid transparent; transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.nav { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; }
.nav .wordmark { font-size: 0.95rem; }
.nav .wordmark:hover { text-decoration: none; color: var(--heading); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; }
.nav-links a:not(.btn) {
  position: relative; font-family: var(--display); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.02em;
  color: var(--text); padding: 0.3em 0;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease-out);
}
.nav-links a:not(.btn):hover { color: var(--heading); text-decoration: none; }
.nav-links a:not(.btn):hover::after, .nav-links a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--heading); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--heading);
  font-family: var(--display); font-size: 0.8rem; padding: 0.45em 0.9em; cursor: pointer; border-radius: 2px; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: var(--nav-h); flex-direction: column;
    align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line-soft);
    padding: 0.5rem var(--gutter) 1rem; }
  .nav-links.is-open { display: flex; animation: menu-in var(--t-med) var(--ease-out); }
  .nav-links a:not(.btn) { display: block; padding: 0.85rem 0; font-size: 1rem; border-bottom: 1px solid var(--line-soft); }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav-links .btn { margin-top: 0.8rem; text-align: center; display: block; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- Buttons ---- */
.btn {
  position: relative; isolation: isolate; overflow: hidden; display: inline-block;
  font-family: var(--display); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.04em; line-height: 1.2;
  color: var(--accent); background: transparent; border: 1px solid var(--accent-deep); border-radius: 2px;
  padding: 0.9em 1.7em; cursor: pointer; text-decoration: none;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: translateY(101%); transition: transform var(--t-med) var(--ease-out); }
.btn:hover { color: var(--on-accent); border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-solid::before { background: var(--accent-hover); }
.btn-solid:hover { color: var(--on-accent); border-color: var(--accent-hover); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.65; cursor: progress; transform: none; }
.btn[aria-busy="true"]::after { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.6em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -0.1em;
  animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-link { font-family: var(--display); font-size: 0.85rem; font-weight: 400; letter-spacing: 0.02em; color: var(--text);
  border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color var(--t-fast), border-color var(--t-fast); }
.text-link:hover { color: var(--heading); border-bottom-color: var(--accent); text-decoration: none; }

/* ---- Layout ---- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.chapter { position: relative; padding: clamp(4rem, 9vw, 8rem) 0; }
.chapter + .chapter { border-top: 1px solid var(--line-soft); }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.chapter-grid h2 { margin-bottom: 0; }
.chapter-grid--form { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.chapter-grid--form aside { padding-top: 0.2rem; }
.chapter-grid--form aside h3 { margin-top: 0; }
.sticky { position: sticky; top: calc(var(--nav-h) + 2rem); }
@media (max-width: 860px) {
  .chapter-grid, .chapter-grid--form { grid-template-columns: 1fr; }
  .chapter-grid h2 { margin-bottom: 0.5em; }
  .sticky { position: static; }
}
.page-head { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(1.5rem, 4vw, 3rem); }
.page-head h1 { max-width: 16ch; }
.page-head .lede { margin-top: 1rem; }
.prose { padding-bottom: clamp(4rem, 9vw, 8rem); }
.prose h2 { font-size: var(--fs-lg); margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }

/* ---- Hero with the resonance field ---- */
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: calc(100svh - var(--nav-h));
  display: flex; align-items: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.field { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; display: block; }
.hero-light { position: absolute; inset: -10% -20% -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 42% at 74% 86%, var(--glow-1), transparent 70%),
    radial-gradient(ellipse 36% 30% at 16% 8%, var(--glow-2), transparent 70%);
  opacity: 0; animation: light-rise 2.8s var(--ease) 0.2s forwards;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%); }
.hero-inner { width: 100%; }
.hero .wordmark { display: block; font-size: var(--fs-hero); text-indent: 0; margin-left: -0.02em;
  margin-bottom: clamp(1.2rem, 3vw, 2.2rem); }
.hero .wordmark span { display: inline-block; opacity: 0; transform: translateY(0.18em);
  animation: letter-in 1.3s var(--ease-out) forwards; animation-delay: calc(0.12s + var(--i) * 0.11s); }
.hero-tagline { font-family: var(--serif); font-style: italic; font-weight: 300; font-variation-settings: "opsz" 48;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; color: var(--heading); margin: 0 0 1.2rem; max-width: 20ch; }
.hero-copy { max-width: 44ch; color: var(--text); font-size: var(--fs-md); line-height: 1.5; margin-bottom: 2rem;
  font-variation-settings: "opsz" 24; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; align-items: center; }
.hero-fade { opacity: 0; animation: fade-up 1.3s var(--ease-out) forwards; }
.hero-fade:nth-of-type(1) { animation-delay: 0.75s; }
.hero-tagline.hero-fade { animation-delay: 0.7s; }
.hero-copy.hero-fade { animation-delay: 0.9s; }
.hero-actions.hero-fade { animation-delay: 1.1s; }
.hero-hint { position: absolute; left: var(--gutter); bottom: 1.4rem; font-family: var(--display); font-size: 0.72rem;
  letter-spacing: 0.08em; color: var(--mute); opacity: 0; animation: fade-up 1.3s var(--ease-out) 1.8s forwards; }
.hero-hint::before { content: ""; display: inline-block; width: 1px; height: 2.2rem; background: var(--accent-deep);
  vertical-align: middle; margin-right: 0.9rem; transform-origin: top; animation: hint-line 2.4s var(--ease) infinite; }
@keyframes letter-in { to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes light-rise { to { opacity: 1; } }
@keyframes hint-line { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); transform-origin: top; } 46% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 600px) { .hero { min-height: calc(90svh - var(--nav-h)); } .hero-hint { display: none; } }

/* ---- Reveals (scroll) ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---- Day timeline ---- */
.day { position: relative; list-style: none; margin: 0.4rem 0 0; padding: 0 0 0 2.2rem; }
.day::before { content: ""; position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.6rem; width: 1px; background: var(--line); }
.day::after { content: ""; position: absolute; left: 0.45rem; top: 0.6rem; width: 1px; height: calc((100% - 1.2rem) * var(--p, 0));
  background: linear-gradient(to bottom, var(--accent-deep), var(--accent)); transition: height 0.25s linear; }
.moment { position: relative; padding: 0.9rem 0 1.4rem; max-width: none; margin: 0; }
.moment::before { content: ""; position: absolute; left: -2.2rem; top: 1.45rem; width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.moment time { display: block; font-family: var(--display); font-weight: 400; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--mute);
  margin-bottom: 0.25rem; transition: color var(--t-med) var(--ease); }
.moment h3 { margin: 0 0 0.3rem; font-size: var(--fs-md); color: var(--mute); transition: color var(--t-med) var(--ease); }
.moment p { margin: 0; color: var(--mute); max-width: 48ch; transition: color var(--t-med) var(--ease); }
.moment.is-lit::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-glow); }
.moment.is-lit time { color: var(--accent); }
.moment.is-lit h3 { color: var(--heading); }
.moment.is-lit p { color: var(--text); }
.day-close { margin-top: 1.6rem; max-width: 48ch; }

/* ---- Audience ---- */
.audience { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.audience li { position: relative; padding: 1.05rem 0 1.05rem 1.1rem; border-top: 1px solid var(--line-soft); max-width: none; margin: 0;
  font-size: var(--fs-md); line-height: 1.4; color: var(--heading); font-variation-settings: "opsz" 24; transition: padding-left var(--t-med) var(--ease-out); }
.audience li:last-child { border-bottom: 1px solid var(--line-soft); }
.audience li::before { content: ""; position: absolute; left: 0; top: 1.25rem; bottom: 1.25rem; width: 2px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform var(--t-med) var(--ease-out); }
.audience li:hover { padding-left: 1.5rem; }
.audience li:hover::before { transform: scaleY(1); }
.audience li span { display: block; font-size: var(--fs-base); color: var(--mute); margin-top: 0.2em; font-variation-settings: "opsz" 18; }

/* ---- Forms ---- */
.form { max-width: 34rem; }
.form-row { margin-bottom: 1.15rem; }
.form label, .form legend { display: block; font-family: var(--display); font-weight: 400; font-size: 0.85rem; color: var(--heading);
  margin-bottom: 0.45em; letter-spacing: 0.01em; }
.form label .opt { color: var(--mute); }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  width: 100%; font: inherit; font-family: var(--display); font-size: 0.95rem; color: var(--heading);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 2px; padding: 0.8em 0.95em; outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--accent-deep); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--field-focus); outline: none; }
.form .is-invalid { border-color: var(--error); }
.form select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.4em; }
.form select option { background: var(--field); color: var(--heading); }
.form textarea { min-height: 9rem; resize: vertical; }
.form .consent { display: flex; gap: 0.7em; align-items: flex-start; }
.form .consent input { margin-top: 0.3em; accent-color: var(--accent); width: 1.05em; height: 1.05em; flex: none; }
.form .consent label { display: inline; font-family: var(--serif); font-size: var(--fs-sm); color: var(--text); margin: 0; }
.form-help { font-size: var(--fs-sm); color: var(--mute); margin-top: 0.4em; }
.form-note { font-size: var(--fs-sm); color: var(--mute); max-width: 34rem; margin-top: 1rem; }
.form-msg { font-family: var(--display); font-size: 0.9rem; margin-top: 1rem; padding: 0.9em 1em; border: 1px solid var(--line);
  border-radius: 2px; max-width: 34rem; animation: fade-up var(--t-med) var(--ease-out); }
.form-msg.is-error { border-color: var(--error); color: var(--error); }
.form-msg.is-ok { border-color: var(--ok); color: var(--ok); }
.form-msg[hidden] { display: none; }
.form-done { max-width: 34rem; padding: 1.5rem 1.6rem; border: 1px solid var(--accent-deep); border-radius: 2px;
  background: linear-gradient(135deg, var(--accent-wash), transparent 60%); animation: fade-up var(--t-slow) var(--ease-out); }
.form-done h3 { margin-top: 0; color: var(--accent); }
.form-done p:last-child { margin-bottom: 0; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.inline-signup { display: flex; gap: 0.7rem; max-width: 34rem; }
.inline-signup input[type="email"] { flex: 1 1 auto; min-width: 0; font-family: var(--display); font-size: 0.95rem; color: var(--heading);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 2px; padding: 0.8em 0.95em;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.inline-signup input:hover { border-color: var(--accent-deep); }
.inline-signup input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); outline: none; }
@media (max-width: 520px) { .inline-signup { flex-direction: column; } }

/* ---- FAQ accordion ---- */
.faq { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.faq li { border-top: 1px solid var(--line-soft); margin: 0; max-width: none; }
.faq li:last-child { border-bottom: 1px solid var(--line-soft); }
.faq-q { width: 100%; display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; text-align: left;
  background: none; border: 0; cursor: pointer; padding: 1.15rem 0; font-family: var(--display); font-weight: 400;
  font-size: var(--fs-md); line-height: 1.3; color: var(--heading); transition: color var(--t-fast) var(--ease); }
.faq-q:hover { color: var(--accent); }
.faq-q .mark { flex: none; position: relative; width: 1em; height: 1em; }
.faq-q .mark::before, .faq-q .mark::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--accent); transition: transform var(--t-med) var(--ease-out); }
.faq-q .mark::before { width: 1em; height: 1px; transform: translate(-50%, -50%); }
.faq-q .mark::after { width: 1px; height: 1em; transform: translate(-50%, -50%); }
.faq-q[aria-expanded="true"] .mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-med) var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-a .answer { padding: 0 0 1.4rem; max-width: var(--measure); opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease-out); }
.faq-a.is-open { grid-template-rows: 1fr; }
.faq-a.is-open .answer { opacity: 1; transform: none; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---- Band ---- */
.band { border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%); }
.band .chapter-grid { align-items: center; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 3rem 0 2.5rem; color: var(--mute); font-size: var(--fs-sm);
  background: linear-gradient(180deg, var(--bg) 0%, var(--footer-end) 100%); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; align-items: start; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; list-style: none; margin: 0 0 1.6rem; padding: 0; }
.footer-nav li { margin: 0; }
.footer-nav a { font-family: var(--display); color: var(--text); font-size: 0.85rem; }
.footer-nav a:hover { color: var(--heading); text-decoration: none; }
.site-footer .wordmark { font-size: 0.9rem; }
.disclaimer { max-width: 60ch; }
.footer-meta { margin-top: 1.6rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Cookie notice ---- */
.cookie { position: fixed; left: var(--gutter); right: var(--gutter); bottom: 1rem; z-index: 60; max-width: 34rem; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 1rem 1.1rem; font-size: var(--fs-sm);
  color: var(--text); display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; box-shadow: var(--shadow);
  animation: fade-up var(--t-slow) var(--ease-out); }
.cookie p { margin: 0; flex: 1 1 16rem; }
.cookie .btn { padding: 0.6em 1.1em; font-size: 0.78rem; }
.cookie[hidden] { display: none; }

/* ---- Utilities ---- */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.muted { color: var(--mute); }
.list-plain { list-style: none; padding: 0; }
.not-found { min-height: 60vh; display: flex; align-items: center; }

/* ---- Page transitions (progressive enhancement) ---- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.25s var(--ease) both vt-out; }
::view-transition-new(root) { animation: 0.35s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-light, .hero .wordmark span, .hero-fade, .hero-hint, .cookie, .form-msg, .form-done { animation: none !important; opacity: 1; transform: none; }
  .hero-hint::before { animation: none; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn::before, .audience li, .audience li::before, .faq-a, .faq-a .answer, .nav-links a::after { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---- Print ---- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .cookie, .field, .hero-light, .hero-hint, .btn { display: none; }
  a { color: #000; }
}

/* FAQ heading wrapper carries no styling of its own */
.faq-h { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-q > span:first-child { flex: 1 1 auto; }
