/* Rational Believer - design preview stylesheet (shared by every page).
   Colour tokens live in :root. Black and white dominate; accents are rare. */

:root {
  /* BLACKS (night) */
  --black: #000000;
  --ink-950: #050507;
  --ink-900: #0a0a0d;
  --ink-800: #121217;
  --ink-700: #1c1c23;
  --ink-600: #2a2a33;
  /* WHITES (paper) */
  --white: #ffffff;
  --paper-50: #fbfbfa;
  --paper-100: #f4f3f0;
  --paper-200: #e8e6e1;
  --paper-300: #d6d3cc;
  /* TEXT (all pairs checked against WCAG AA) */
  --on-dark: #f1efeb;        /* 17.2:1 on ink-900 */
  --on-dark-muted: #b4b4bf;  /* 9.6:1 on ink-900 */
  --on-light: #0c0c0f;       /* 17.6:1 on paper-100 */
  --on-light-muted: #4b4b55; /* 7.8:1 on paper-100 */
  /* HAIRLINES */
  --hair-dark: rgba(255, 255, 255, 0.14);
  --hair-light: rgba(0, 0, 0, 0.14);
  /* ACCENTS (from the thumbnails; glows and one CTA only) */
  --cyan: #3de7ff;
  --violet: #8b3df0;
  --magenta: #e04bff;
  --gold: #f5d052;           /* the one CTA colour */
  --link-on-light: #5a1fc4;  /* 7.8:1 on paper-100 */
  --glow: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  /* TYPE (system fonts only; a proper font is an open question) */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* LAYOUT */
  --gutter: clamp(12px, 4vw, 64px);
  --gap: clamp(12px, 2.4vw, 28px);
  --radius: clamp(24px, 4.2vw, 52px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); background: var(--black); }
body {
  margin: 0; background: var(--black); color: var(--on-dark);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  overflow-x: clip; /* clip, not hidden: keeps sticky positioning working */
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

/* Focus: visible on every surface */
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.box--light :focus-visible { outline-color: var(--link-on-light); }

.skip {
  position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px;
  background: var(--white); color: var(--black); border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Fixed night sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(120% 90% at 50% 0%, #0d0d14 0%, var(--black) 60%); }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.galaxy { position: absolute; will-change: transform; }
.galaxy i { display: block; width: 100%; height: 100%; animation: drift 90s ease-in-out infinite alternate; }
.galaxy--a { width: 150vmax; height: 52vmax; left: -35vmax; top: 4vh; rotate: -24deg; }
.galaxy--a i {
  background:
    radial-gradient(ellipse 22% 38% at 50% 50%, rgba(255, 255, 255, 0.26), transparent 70%),
    radial-gradient(ellipse 36% 30% at 36% 52%, rgba(61, 231, 255, 0.17), transparent 70%),
    radial-gradient(ellipse 36% 30% at 64% 48%, rgba(224, 75, 255, 0.15), transparent 70%),
    radial-gradient(ellipse 50% 14% at 50% 50%, rgba(255, 255, 255, 0.07), transparent 100%);
}
.galaxy--b { width: 80vmax; height: 60vmax; right: -30vmax; top: 120vh; rotate: 18deg; }
.galaxy--b i {
  animation-duration: 120s;
  background:
    radial-gradient(ellipse 30% 30% at 50% 50%, rgba(255, 255, 255, 0.13), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(139, 61, 240, 0.12), transparent 70%);
}
@keyframes drift { from { transform: translate3d(-2%, 0, 0) scale(1); opacity: 0.8; } to { transform: translate3d(3%, 2%, 0) scale(1.06); opacity: 1; } }

/* ---------- Preview ribbon (REMOVE AT LAUNCH) ---------- */
.preview-ribbon {
  position: fixed; right: 10px; bottom: 10px; z-index: 90; pointer-events: none;
  padding: 4px 10px; border-radius: 999px; font: 600 10px/1.4 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); background: rgba(0, 0, 0, 0.78); border: 1px solid rgba(245, 208, 82, 0.5);
}

/* ---------- Sticky menu ---------- */
.site-nav {
  position: fixed; z-index: 60; left: var(--gutter); right: var(--gutter); top: max(10px, env(safe-area-inset-top));
  max-width: 1100px; margin-inline: auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; border-radius: 999px;
  background: rgba(8, 8, 12, 0.8); border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.7s var(--ease), opacity 0.5s ease, visibility 0s;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; flex: none; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.nav-links {
  display: flex; gap: 2px; margin: 0 0 0 auto; padding: 0 10px; list-style: none; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; text-decoration: none; color: var(--on-dark-muted); white-space: nowrap; transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.nav-links a[aria-current="true"] { color: var(--white); background: rgba(255, 255, 255, 0.1); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 5px; height: 2px; border-radius: 2px; background: var(--glow); box-shadow: 0 0 10px rgba(61, 231, 255, 0.7);
}
.nav-progress { position: absolute; left: 26px; right: 26px; bottom: -1px; height: 2px; overflow: hidden; border-radius: 2px; }
.nav-progress i { display: block; height: 100%; background: var(--glow); transform: scaleX(0); transform-origin: left; }
@media (max-width: 560px) {
  :root { --nav-h: 58px; }
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } /* logo only on phones */
  .site-nav { padding-left: 10px; }
  .nav-links a { padding: 0 11px; font-size: 0.85rem; }
}

/* ---------- Hero sequence: 3 steps driven by scroll position ----------
   STEP 1 (html[data-hero="1"], page top): island image + question on the LEFT, arrow points to the centre. No menu.
   STEP 2 (data-hero="2", scrolled past 40px): Earth image + second line on the RIGHT, arrow points left. Menu slides in.
   STEP 3 (data-hero="3", about 40% of a screen further): hero fades away, night sky shows, the first box scrolls in.
   data-hero="0" is the instant before step 1 starts (lets the entrance animation run on load).
   Scrolling back up replays the steps because every effect is a CSS transition keyed to data-hero, not a one-shot.
   No JavaScript, a script error: default rules = step 2 final state (hero 2, text, menu). */
.hero-stage { position: relative; height: calc(140vh + 40px); height: calc(140svh + 40px); z-index: 1; } /* = 100svh pinned + step-3 distance (40px + 40svh), see REVEAL_AT in site.js */
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background-color: var(--black); transition: background-color 0.6s ease; }
/* Hero images: no text inside the pictures. They fill the screen (cover), centred; sides may crop. Subject in the central ~60%. */
.hero-img { position: absolute; inset: 0; overflow: hidden; background: var(--black); transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.hero-img img { position: relative; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.06); transition: transform 1.3s var(--ease); } /* 1.06 hides any image border */
.hero-1 img { animation: slowzoom 24s ease-out forwards; }
.hero-2 img { transform: scale(calc(1.06 + var(--p, 0) * 0.08)); transition: none; }
@keyframes slowzoom { from { scale: 1; } to { scale: 1.07; } }
/* Step 1 scrim: a soft darkening from the text side (left; top on portrait phones) so the type reads even over bright water. */
.hero-1::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 4, 12, 0.5) 0%, rgba(0, 4, 12, 0.28) 34%, rgba(0, 4, 12, 0) 58%); }

/* Overlay text (HTML, easy to edit). Warm white on image 1 (line 2 in a soft sand tint taken from the island), pale cyan on image 2.
   Vertical position (Round 4): the text block sits at one quarter of the free space, i.e. half the empty space it would have
   if it were centred (grid rows 1fr / auto / 3fr), never above --top-min (menu zone on step 2). Portrait phones override below. */
.hero-1 { --hero-ink: #fff4e2; --sand-ink: #f1d3a1; --glow-rgb: 255, 244, 226; --base: 0.5s; --step: 70ms; --arrow-at: 2.1s; }
.hero-2 { --hero-ink: #c6f3ff; --glow-rgb: 150, 232, 255; --base: 0.25s; --step: 60ms; --arrow-at: 1.05s; }
.hero-text {
  position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(var(--top-min, 0px), 1fr) auto 3fr;
  padding: 0 clamp(24px, 5.5vw, 110px); color: var(--hero-ink);
  transition: opacity 0.35s ease, transform 0.6s var(--ease);
}
.hero-1 .hero-text { justify-items: start; --top-min: max(22px, calc(env(safe-area-inset-top, 0px) + 12px)); } /* no menu on step 1 */
.hero-2 .hero-text { justify-items: end; --top-min: calc(max(10px, env(safe-area-inset-top, 0px)) + var(--nav-h) + 18px); } /* keep clear of the menu pill */
.hero-text-inner { grid-row: 2; position: relative; min-width: 0; max-width: 100%; }
.hero-2 .hero-text-inner { text-align: right; }
.hero-line {
  margin: 0 0 0.35em; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.35rem, min(3.4vw, 7.2svh), 3.7rem);
  line-height: 1.1; letter-spacing: -0.012em; overflow-wrap: break-word; text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7);
}
.hero-line .ln { display: block; }  /* one span per line (step 1); each line keeps its words together unless the screen is too narrow */
.hero-line .ln--sand { color: var(--sand-ink); } /* #f1d3a1, sampled from the sunlit sand; 12.5:1 on the deep ocean, see design-notes */
.hero-2 .hero-line { max-width: 8.2em; margin-left: auto; margin-bottom: 0; text-wrap: balance; }
.hero-subrow { position: relative; width: fit-content; max-width: 100%; }
.hero-sub {
  margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(0.95rem, min(1.7vw, 3.6svh), 1.7rem); line-height: 1.35; letter-spacing: 0.01em;
  text-transform: lowercase; color: var(--hero-ink); text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}
/* Arrow (same size as before). Its TAIL is anchored right next to the text (left/top below); site.js sets --aim so it points at the
   centre of the image. transform-origin and translate keep the tail on the anchor while it rotates. Without JS the --aim defaults are used. */
.hero-arrow {
  position: absolute; width: clamp(60px, 8vw, 140px); height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.75)); pointer-events: none;
  transform-origin: 2.5% 17.5%; translate: -2.5% -17.5%; rotate: var(--aim, 4deg);
}
.hero-1 .hero-arrow { left: calc(100% + clamp(14px, 1.4vw, 22px)); top: 50%; }              /* tail just after "past?" */
.hero-2 .hero-arrow { left: calc(-1 * clamp(14px, 1.4vw, 22px)); top: 58%; transform-origin: 97.5% 17.5%; translate: -97.5% -17.5%; rotate: var(--aim, -8deg); } /* tail just left of the block (path is drawn mirrored) */

/* Entrance states. Only with JavaScript (.js.has-hero); without it the plain visible text above IS the final state. */
.js.has-hero .hero-text { opacity: 0; }
.js.has-hero .hero-1 .hero-text { transform: translateX(-5vw); }
.js.has-hero .hero-2 .hero-text { transform: translateX(5vw); }
.js.has-hero .hero-line .w { display: inline-block; opacity: 0; transform: translateY(0.55em); transition: opacity 0.3s ease, transform 0.3s ease; }
.js.has-hero .hero-sub { opacity: 0; transition: opacity 0.3s ease; }
.js.has-hero .hero-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.3s ease, opacity 0.3s ease; }

.js.has-hero[data-hero="1"] .hero-1 .hero-text, .js.has-hero[data-hero="2"] .hero-2 .hero-text { opacity: 1; transform: none; }
.js.has-hero[data-hero="1"] .hero-1 .hero-line .w,
.js.has-hero[data-hero="2"] .hero-2 .hero-line .w {
  opacity: 1; transform: none;
  transition: opacity 0.8s ease calc(var(--base) + var(--i, 0) * var(--step)), transform 0.95s var(--ease) calc(var(--base) + var(--i, 0) * var(--step));
}
.js.has-hero[data-hero="1"] .hero-1 .hero-sub { opacity: 1; transition: opacity 1.1s ease 1.8s; animation: glow-warm 3.6s ease-out 1.8s both; }
.js.has-hero[data-hero="1"] .hero-1 .hero-arrow path,
.js.has-hero[data-hero="2"] .hero-2 .hero-arrow path { stroke-dashoffset: 0; opacity: 1; }
.js.has-hero[data-hero="1"] .hero-1 .a-line, .js.has-hero[data-hero="2"] .hero-2 .a-line { transition: stroke-dashoffset 0.9s ease-in-out var(--arrow-at), opacity 0.1s linear var(--arrow-at); }
.js.has-hero[data-hero="1"] .hero-1 .a-head, .js.has-hero[data-hero="2"] .hero-2 .a-head { transition: stroke-dashoffset 0.35s ease-out calc(var(--arrow-at) + 0.8s), opacity 0.1s linear calc(var(--arrow-at) + 0.8s); }
.js.has-hero[data-hero="2"] .hero-2 .hero-line { animation: glow-cool 3.4s ease-out 1.3s both; }
@keyframes glow-warm {
  0% { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 0 rgba(255, 244, 226, 0); }
  45% { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 26px rgba(255, 244, 226, 0.75), 0 0 6px rgba(255, 244, 226, 0.35); }
  100% { text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 244, 226, 0.3); }
}
@keyframes glow-cool {
  0% { text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7), 0 0 0 rgba(150, 232, 255, 0); }
  45% { text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7), 0 0 28px rgba(150, 232, 255, 0.6), 0 0 6px rgba(150, 232, 255, 0.3); }
  100% { text-shadow: 0 2px 22px rgba(0, 0, 0, 0.7), 0 0 18px rgba(150, 232, 255, 0.28); }
}

/* Which image shows. Default (no JS) = image 2. */
.hero-1 { opacity: 0; visibility: hidden; }
.hero-2 { opacity: 1; }
.js.has-hero:is([data-hero="0"], [data-hero="1"]) .hero-1 { opacity: 1; visibility: visible; transition-delay: 0s; }
.js.has-hero:is([data-hero="0"], [data-hero="1"]) .hero-2 { opacity: 0; visibility: hidden; }
.js.has-hero:is([data-hero="2"], [data-hero="3"]) .hero-1 img { transform: scale(1.15); }   /* image 1 pushes away as it fades */
.js.has-hero[data-hero="2"] .hero-2 { transition: opacity 0.9s ease, visibility 0s; }
.js.has-hero[data-hero="3"] .hero-2 { opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0s linear 0.6s; }
.js.has-hero[data-hero="3"] .hero-pin { background-color: transparent; } /* night sky shows behind the first box */
/* Menu and Scroll cue */
.js.has-hero:not(.is-revealed) .site-nav { transform: translateY(-180%); opacity: 0; visibility: hidden; transition: transform 0.5s ease, opacity 0.3s ease, visibility 0s 0.5s; }
.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 20px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 44px; min-height: 44px;
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; color: rgba(255, 255, 255, 0.85); text-shadow: 0 1px 8px #000;
  transition: opacity 0.5s ease; opacity: 0; pointer-events: none; visibility: hidden;
}
.scroll-cue::after { content: ""; width: 1px; height: 38px; background: linear-gradient(var(--white), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.js.has-hero:is([data-hero="0"], [data-hero="1"]) .scroll-cue { opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 3.4s; } /* tiny cue after the text has settled */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* Mid-page reload: jump straight to the right state with no animation. */
.hero-instant *, .hero-instant *::before, .hero-instant *::after { transition: none !important; animation: none !important; }

/* Short landscape phones: shrink the arrow and tuck the text toward the edge. */
@media (max-height: 480px) and (min-aspect-ratio: 5/4) {
  .hero-text { padding-left: 4vw; padding-right: 4vw; }
  .hero-arrow { width: 42px; stroke-width: 3; }
  .hero-sub { font-size: 0.88rem; }
}
@media (max-height: 340px) and (min-aspect-ratio: 5/4) { .hero-arrow { width: 34px; } }

/* Portrait phones and narrow windows (aspect ratio 4:5 or narrower): step 1 text at the top, arrow below it pointing down to the
   island; step 2 text in the lower part, arrow beside it pointing up to the Earth. Text positions are set from the old values
   (step 1: half of the old top space; step 2: moved up as far as the Earth allows, see design-notes Round 4). */
@media (max-aspect-ratio: 4/5) {
  .hero-line { font-size: clamp(1.5rem, 8vw, 2.7rem); }
  .hero-2 .hero-line { max-width: 9.6em; }
  .hero-sub { font-size: clamp(1.05rem, 4.8vw, 1.6rem); }
  .hero-1 .hero-text { grid-template-rows: auto 1fr; align-content: start; padding: calc(max(4.5svh, 38px) + env(safe-area-inset-top, 0px)) 22px 0; }
  .hero-1 .hero-text-inner { grid-row: 1; }
  .hero-2 .hero-text { grid-template-rows: auto 1fr; align-content: start; padding: calc(66svh + 36px) 22px 0; }   /* just below the Earth (its halo ends near 66svh) */
  .hero-2 .hero-text-inner { grid-row: 1; }
  .hero-arrow { width: clamp(60px, 17vw, 100px); stroke-width: 3; }
  .hero-1 .hero-arrow { left: 14%; top: calc(100% + 12px); rotate: var(--aim, 32deg); }   /* below the text, points down toward the island */
  .hero-2 .hero-arrow { left: -14px; top: 70%; rotate: var(--aim, 127deg); }              /* beside the text, points up toward the Earth */
  .hero-1::after { background: linear-gradient(180deg, rgba(0, 4, 12, 0.55) 0%, rgba(0, 4, 12, 0.3) 38%, rgba(0, 4, 12, 0) 60%); }
  .js.has-hero .hero-1 .hero-text { transform: translateX(-8vw); }
  .js.has-hero .hero-2 .hero-text { transform: translateX(8vw); }
}

/* ---------- Section boxes ---------- */
main { position: relative; z-index: 2; }
.box {
  position: relative; margin: 0 var(--gutter) var(--gap); padding: clamp(32px, 6.5vw, 96px) clamp(20px, 5.5vw, 88px);
  border-radius: var(--radius); border: 1px solid var(--hair); overflow: hidden;
  background-color: var(--box-bg); color: var(--fg); scroll-margin-top: calc(var(--nav-h) + 22px);
}
.hero-stage + .box { margin-top: var(--gap); }
.box-inner { position: relative; max-width: 1080px; margin-inline: auto; }
.box--dark {
  --box-bg: var(--ink-900); --fg: var(--on-dark); --fg-muted: var(--on-dark-muted); --hair: var(--hair-dark); --card: rgba(255, 255, 255, 0.045); --link: var(--cyan);
  background-image:
    radial-gradient(90% 55% at 50% -10%, rgba(255, 255, 255, 0.07), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 5px);
}
.box--light {
  --box-bg: var(--paper-100); --fg: var(--on-light); --fg-muted: var(--on-light-muted); --hair: var(--hair-light); --card: rgba(255, 255, 255, 0.7); --link: var(--link-on-light);
  background-image:
    radial-gradient(90% 55% at 50% -10%, rgba(255, 255, 255, 0.95), transparent 70%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 5px);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-muted); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.box h2 { font-size: clamp(2rem, 5.2vw, 3.9rem); max-width: 16em; }
.lead { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--fg-muted); max-width: 40rem; }
.box a:not(.btn):not(.card) { color: var(--link); text-underline-offset: 3px; }
.sample-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px dashed currentColor; border-radius: 999px; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; vertical-align: middle; opacity: 0.9; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

/* Buttons: one CTA colour (gold), one quiet outline */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.98rem var(--font-body); text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.3s ease, background 0.3s;
}
.btn-primary { background: var(--gold); color: #0c0c0f; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 28px rgba(245, 208, 82, 0.22); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 12px 36px rgba(245, 208, 82, 0.4); }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.7s var(--ease); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { color: inherit; border-color: currentColor; background: transparent; }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(128, 128, 128, 0.16); }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; background: transparent; color: var(--fg-muted); border: 1px dashed currentColor; box-shadow: none; transform: none; }
.btn[disabled]::after { display: none; }

/* Cards */
.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card {
  display: block; position: relative; padding: 24px; border-radius: 22px; border: 1px solid var(--hair); background: var(--card); text-decoration: none; color: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s;
}
a.card:hover { transform: translateY(-5px); border-color: rgba(61, 231, 255, 0.55); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(61, 231, 255, 0.25), 0 0 34px rgba(224, 75, 255, 0.14); }
.box--light a.card:hover { border-color: rgba(90, 31, 196, 0.6); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(90, 31, 196, 0.25); }
.card p { color: var(--fg-muted); margin-bottom: 0; }
.card--media { padding: 0; overflow: hidden; }
.card--media .card-img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--ink-700); }
.card--media .card-body { padding: 22px 24px 26px; }
.card-ph { aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-muted);
  background: repeating-linear-gradient(45deg, rgba(128, 128, 128, 0.14) 0 1px, transparent 1px 8px), var(--card); }
.card .more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 0.92rem; color: var(--link); }
.card[aria-disabled="true"] { opacity: 0.7; }

/* ---------- Home ---------- */
.pillars { counter-reset: p; margin-top: 44px; }
.pillars .card::before { counter-increment: p; content: "0" counter(p); display: block; margin-bottom: 18px; font: 600 2.6rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px var(--fg-muted); }
.box .btn-row { margin-top: 34px; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1.25fr 1fr; } }
.mark-wrap { position: relative; width: min(100%, 360px); margin-inline: auto; aspect-ratio: 1; }
.mark-wrap svg { width: 100%; height: 100%; overflow: visible; }
.mark-ring { transform-origin: 50% 50%; animation: spin 80s linear infinite; }
.mark-ring.r2 { animation-duration: 120s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.mark-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(61, 231, 255, 0.2), rgba(224, 75, 255, 0.12) 55%, transparent 72%); filter: blur(18px); animation: breathe 7s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: 0.4; transform: scale(0.94); } to { opacity: 0.95; transform: scale(1.06); } }
blockquote.pull { margin: 28px 0 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--fg-muted); font: italic 500 clamp(1.15rem, 2vw, 1.5rem)/1.4 var(--font-display); }

/* ---------- Community ---------- */
.ladder { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 26px; counter-reset: s; }
.ladder li { position: relative; padding-left: 68px; counter-increment: s; }
.ladder li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--fg); font: 600 1.1rem var(--font-display); background: var(--box-bg); }
.ladder li:not(:last-child)::after { content: ""; position: absolute; left: 22.5px; top: 52px; bottom: -22px; width: 1px; background: var(--fg-muted); transform-origin: top; transition: transform 0.9s var(--ease) 0.3s; }
.js .ladder:not(.in) li::after { transform: scaleY(0); }
.ladder h3 { margin-bottom: 4px; }
.ladder p { margin: 0; color: var(--fg-muted); }
@media (min-width: 860px) {
  .ladder { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .ladder li { padding: 64px 0 0; }
  .ladder li:not(:last-child)::after { left: 52px; right: -22px; top: 22.5px; bottom: auto; width: auto; height: 1px; transform-origin: left; }
  .js .ladder:not(.in) li::after { transform: scaleX(0); }
}
.subhead { margin: clamp(48px, 7vw, 84px) 0 6px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.involve { margin-top: 24px; }

/* ---------- Donate ---------- */
.callout { margin: 28px 0; padding: 18px 22px; border-radius: 18px; border: 1px solid var(--hair); background: var(--card); max-width: 44rem; }
.callout strong { color: var(--fg); }
.panel-grid { display: grid; gap: clamp(14px, 2vw, 24px); margin-top: 8px; }
@media (min-width: 900px) { .panel-grid { grid-template-columns: 1fr 1fr; } }
.panel { padding: clamp(22px, 3vw, 34px); border-radius: 24px; border: 1px solid var(--hair); background: var(--card); }
.panel h3 { font-size: 1.25rem; }
.raised { font: 600 clamp(2.4rem, 6vw, 3.8rem)/1 var(--font-display); }
.raised small { font: 500 1rem var(--font-body); color: var(--fg-muted); }
.meter { height: 14px; margin: 18px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--hair); overflow: hidden; }
.meter .bar-fill { height: 100%; border-radius: 999px; background: var(--glow); box-shadow: 0 0 22px rgba(61, 231, 255, 0.55); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform 1.8s var(--ease) 0.15s; }
.js .meter:not(.in) .bar-fill { transform: scaleX(0); }
.split { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.split li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 0.97rem; }
.split .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.split .track i { display: block; height: 100%; border-radius: 6px; background: var(--white); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform 1.3s var(--ease) 0.2s; }
.js .split:not(.in) .track i { transform: scaleX(0); }
.split span:last-child { color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.ledger { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ledger caption { text-align: left; color: var(--fg-muted); padding-bottom: 8px; font-size: 0.88rem; }
.ledger th, .ledger td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--hair); }
.ledger th { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); font-weight: 600; }
.ledger td:last-child, .ledger th:last-child { text-align: right; }
@media (max-width: 640px) {
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ledger tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .ledger td { display: flex; justify-content: space-between; gap: 16px; border: 0; padding: 4px 0; text-align: right !important; }
  .ledger td::before { content: attr(data-label); color: var(--fg-muted); text-align: left; }
}
.donate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.fine { font-size: 0.88rem; color: var(--fg-muted); max-width: 40rem; }

/* value helpers (avoid inline styles so a strict CSP can be used later) */
.v10 { --v: 0.10; } .v15 { --v: 0.15; } .v20 { --v: 0.20; } .v25 { --v: 0.25; } .v40 { --v: 0.40; }
.mt-grid { margin-top: clamp(14px, 2vw, 24px); }
.mt-cards { margin-top: 36px; }
.fine.flush { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 2; margin: 0 var(--gutter) 28px; padding: 22px 26px; border-radius: 28px; border: 1px solid var(--hair-dark); background: rgba(8, 8, 12, 0.8); font-size: 0.92rem; color: var(--on-dark-muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--on-dark); }

/* ---------- Resource pages ---------- */
.inner main > .box:first-child { margin-top: calc(var(--nav-h) + 34px); }
.back { display: inline-block; margin-top: 28px; }
.src-list { padding-left: 1.1em; }
.src-list li { margin-bottom: 8px; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.grid > .reveal:nth-child(2) { --d: 0.1s; }
.grid > .reveal:nth-child(3) { --d: 0.2s; }
.ladder > .reveal:nth-child(2) { --d: 0.12s; }
.ladder > .reveal:nth-child(3) { --d: 0.24s; }
.ladder > .reveal:nth-child(4) { --d: 0.36s; }

/* ---------- Reduced motion: same three steps, but no word animation, arrow drawing, sliding, zoom or glow.
   Text is fully visible at once; images only cross-fade quickly. ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-img { transition: opacity 0.35s ease, visibility 0s linear 0.35s !important; }
  .js.has-hero[data-hero="2"] .hero-2 { transition: opacity 0.35s ease, visibility 0s !important; }
  .js.has-hero .hero-text, .js.has-hero .hero-1 .hero-text, .js.has-hero .hero-2 .hero-text { transform: none !important; }
  .js.has-hero .hero-line .w { opacity: 1; transform: none; }
  .js.has-hero .hero-sub { opacity: 1; }
  .js.has-hero .hero-arrow path { stroke-dashoffset: 0; opacity: 1; }
  .hero-img img, .hero-2 img, .js.has-hero:is([data-hero="2"], [data-hero="3"]) .hero-1 img { transform: scale(1.06); }
  .js .reveal { opacity: 1; transform: none; }
  .js .ladder:not(.in) li::after, .js .meter:not(.in) .bar-fill, .js .split:not(.in) .track i { transform: none; }
  .js.has-hero:not(.is-revealed) .site-nav { transform: none; }
  .scroll-cue { display: none !important; }
  .galaxy i { animation: none; }
}

/* h1/h2 sizing on inner pages and cards */
.box h1 { font-size: clamp(2rem, 5.2vw, 3.9rem); max-width: 16em; }
.card h2 { font-size: 1.35rem; }
