/* =======================================================================
   RISE — Design Tokens & Base Styles
   v1.0
   ======================================================================= */

:root {
  /* --- Palette ---------------------------------------------------------- *
   *  Document-toned palette. Ledger Blue is the only accent of evidence.
   *  Counsel Red is reserved exclusively for the prosecution-side
   *  comparisons (used five times in the document).
   * -------------------------------------------------------------------- */
  --paper:        #EEEAE0;
  --bone:         #F5F0E5;   /* cards, panels — rarely used in redesign */
  --vellum:       #E4DDCD;   /* dividers, wells */
  --ink:          #15171C;   /* primary text, full-bleed dark chapter */
  --ink-soft:     #2E323A;   /* secondary text */
  --ink-mute:     #6B7180;   /* marginalia, captions */
  --stone:        #B89978;
  --stone-soft:   #D9C5A6;
  --ledger:       #26487B;   /* Ledger Blue — evidence accent */
  --ledger-deep:  #173256;
  --ledger-soft:  #6580A6;
  --counsel:      #9C3422;   /* Counsel Red — prosecution side only */
  /* --- Aliases for backwards compatibility ----------------------------- */
  --moss:         #26487B;
  --moss-deep:    #173256;
  --moss-soft:    #6580A6;
  --rust:         #9C3422;

  /* --- Semantic -------------------------------------------------------- */
  --bg:           var(--paper);
  --fg:           var(--ink);
  --fg-mute:      var(--ink-mute);
  --rule:         #C9C1AF;
  --rule-strong:  #A89F88;
  --rule-faint:   #DCD5C2;

  /* --- Type ------------------------------------------------------------ *
   *  Display: Newsreader — high-contrast serif, used ONLY for
   *           four chapter moments (cover headline, the parable's
   *           closing line, the final-section repeat, the colophon).
   *  Sans:    Switzer — body, headings, marginalia, UI. One family.
   *  Mono:    Geist Mono — figures, citations, footnote markers.
   * -------------------------------------------------------------------- */
  --font-sans:    'Inter', 'Switzer', 'Söhne', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Newsreader', 'GT Sectra', 'Lyon Display', Georgia, 'Times New Roman', serif;
  --font-mono:    'Geist Mono', 'Söhne Mono', ui-monospace, monospace;

  /* Backwards-compat alias — Fraunces is gone */
  --font-italic:  var(--font-display);

  /* Modular scale, base 16px, ratio ~1.25 */
  --t-mono:       0.75rem;    /* 12 — labels, eyebrows */
  --t-caption:    0.8125rem;  /* 13 — fine print */
  --t-small:      0.9375rem;  /* 15 — secondary body */
  --t-body:       1.0625rem;  /* 17 — body */
  --t-lead:       1.3125rem;  /* 21 — lede */
  --t-h6:         1.0625rem;  /* 17 */
  --t-h5:         1.3125rem;  /* 21 */
  --t-h4:         1.625rem;   /* 26 */
  --t-h3:         2.125rem;   /* 34 */
  --t-h2:         3rem;       /* 48 */
  --t-h1:         4.25rem;    /* 68 */
  --t-display:    6.5rem;     /* 104 */
  --t-mega:       10.5rem;    /* 168 */

  --leading-tight: 0.96;
  --leading-snug:  1.1;
  --leading-norm:  1.45;
  --leading-loose: 1.6;

  /* --- Space ----------------------------------------------------------- */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:   12px;
  --s-4:   16px;
  --s-5:   24px;
  --s-6:   32px;
  --s-7:   48px;
  --s-8:   64px;
  --s-9:   96px;
  --s-10:  128px;
  --s-11:  192px;
  --s-12:  240px;

  /* --- Layout ---------------------------------------------------------- */
  --gutter:     clamp(20px, 4vw, 56px);
  --max:        1600px;
  --max-prose:  68ch;

  /* --- Misc ------------------------------------------------------------ */
  --radius-sm: 0;
  --radius:    0;
  --radius-lg: 0;
  --radius-pill: 0;
  --ease:      cubic-bezier(.2, .7, .2, 1);
  --shadow-sm: none;
  --shadow:    none;
  --shadow-lg: none;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--leading-norm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11", "kern";
  font-variant-numeric: tabular-nums lining-nums;
  position: relative;
}

/* Paper grain — applied to body via a near-invisible noise layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

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

/* =======================================================================
   Typography
   ======================================================================= */
.font-mono   { font-family: var(--font-mono); }
.font-sans   { font-family: var(--font-sans); }
.font-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.015em; }
.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--t-caption);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.section-no {
  font-family: var(--font-sans);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
}

.display {
  font-size: clamp(2.5rem, 6vw, var(--t-display));
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  font-weight: 500;
}

.h1 {
  font-size: clamp(2.25rem, 5vw, var(--t-h1));
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(1.75rem, 3.6vw, var(--t-h2));
  line-height: var(--leading-snug);
  letter-spacing: -0.02em;
  font-weight: 500;
  text-wrap: pretty;
}

.h3 {
  font-size: clamp(1.375rem, 2.4vw, var(--t-h3));
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
  font-weight: 500;
  text-wrap: balance;
}

.h4 {
  font-size: var(--t-h4);
  line-height: var(--leading-snug);
  letter-spacing: -0.01em;
  font-weight: 500;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.body  { font-size: var(--t-body); line-height: var(--leading-norm); }
.small { font-size: var(--t-small); line-height: var(--leading-norm); color: var(--ink-soft); }
.caption {
  font-family: var(--font-sans);
  font-size: var(--t-caption);
  color: var(--ink-mute);
  letter-spacing: 0;
  font-weight: 400;
}

.prose { max-width: var(--max-prose); }
.prose p + p { margin-top: 1.1em; }
.prose p { text-wrap: pretty; }

/* =======================================================================
   Layout primitives
   ======================================================================= */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-block: clamp(36px, 4.5vw, 84px);
}

.section--flush { padding-block: 0; }

.section--bone { background: var(--bone); }
.section--vellum { background: var(--vellum); }

.section--dark {
  background: var(--ink);
  color: var(--paper);
}
.section--dark .eyebrow,
.section--dark .section-no { color: var(--stone-soft); }
.section--dark .lead { color: rgba(255,255,255,0.78); }
.section--dark .rule { background: rgba(255,255,255,0.14); }

.section--moss {
  background: var(--moss);
  color: var(--bone);
}
.section--moss .eyebrow,
.section--moss .section-no { color: var(--moss-soft); }
.section--moss .lead { color: rgba(247, 243, 234, 0.82); }

/* Section header pattern — conversational, dropped the section-no chrome */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-bottom: var(--s-8);
  max-width: 80ch;
}
.section-head__meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.section-head__kicker {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--s-4);
  padding: 0;
  background: transparent;
  color: var(--ledger);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Full-width sticky section bar */
.section__bar {
  position: sticky;
  top: var(--nav-h, 73px);
  z-index: 8;
  width: 100%;
  background: var(--paper);
}
.section__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
.section--bone .section__bar { background: var(--bone); }
.section--funders .section__bar { background: #E8ECF1; }
.section__bar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--ledger);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section__bar-inner::before {
  content: "";
  flex: none;
  width: 32px;
  height: 1px;
  background: var(--ledger);
}
.final .section__bar { position: static; }
.section-head__kicker::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--ledger);
}
.section--dark .section-head__kicker { color: var(--stone-soft); }
.section--dark .section-head__kicker::before { background: var(--stone-soft); }
.section--moss .section-head__kicker { color: var(--bone); }
.section--moss .section-head__kicker::before { background: var(--bone); }

/* Generic grids — explicit column counts at breakpoints (no auto-fit overpacking) */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.rule-thick {
  height: 2px;
  background: var(--ink);
  width: 56px;
  border: 0;
}

/* =======================================================================
   Feature blocks — number + heading + body
   ======================================================================= */
.features {
  display: grid;
  gap: var(--s-7);
}
.feature {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: var(--s-4);
  row-gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--ink);
}
.feature__no {
  font-family: var(--font-sans);
  font-size: var(--t-caption);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-mute);
  padding-top: 4px;
}
.feature > h3,
.feature > p { grid-column: 2; }
.feature > div { grid-column: 2; }
.feature h3 { margin: 0; }
.feature p { margin: 0; }
.section--dark .feature { border-top-color: var(--paper); }
.section--dark .feature__no,
.section--moss .feature__no { color: var(--stone-soft); }

.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-7);
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.cta-banner h3 { margin: 0; max-width: 24ch; }
.section--bone .cta-banner { background: var(--paper); }

/* =======================================================================
   Buttons
   ======================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-family: var(--font-sans);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--moss); border-color: var(--moss); }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover { background: var(--ink); color: var(--paper); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: var(--bone); }

.btn--moss {
  background: var(--moss);
  color: var(--bone);
  border-color: var(--moss);
}
.btn--moss:hover { background: var(--moss-deep); border-color: var(--moss-deep); }

.btn--lg {
  padding: 20px 30px;
  font-size: var(--t-body);
}

.section--dark .btn--secondary { color: var(--paper); border-color: var(--paper); }
.section--dark .btn--secondary:hover { background: var(--paper); color: var(--ink); }

/* Arrow chip */
.btn .arrow { display: inline-block; transition: transform 200ms var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Underline link */
.link-u {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: opacity 200ms var(--ease);
}
.link-u:hover { opacity: 0.6; }

/* =======================================================================
   Cards & callouts
   ======================================================================= */
.card {
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--s-7);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.card--bare {
  border: 0;
  background: transparent;
  padding: 0;
}
.card--interactive:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* Stat block — friendlier, bolder than the underlined stat */
.stat-block {
  background: var(--bone);
  border-radius: var(--radius);
  padding: var(--s-7);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  position: relative;
  overflow: hidden;
  min-height: 260px;
}
.stat-block--moss { background: var(--moss); color: var(--bone); }
.stat-block--ink { background: var(--ink); color: var(--paper); }
.stat-block--vellum { background: var(--vellum); }
.stat-block__num {
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: auto;
}
.stat-block--moss .stat-block__num,
.stat-block--ink .stat-block__num { color: var(--paper); }
.stat-block__label {
  font-size: var(--t-small);
  color: var(--ink-soft);
  max-width: 32ch;
  line-height: 1.45;
}
.stat-block--moss .stat-block__label { color: rgba(247,243,234,0.85); }
.stat-block--ink .stat-block__label { color: rgba(255,255,255,0.78); }
.stat-block__tag {
  font-size: var(--t-caption);
  color: var(--ink-mute);
  font-weight: 500;
}
.stat-block--moss .stat-block__tag { color: var(--stone-soft); }
.stat-block--ink .stat-block__tag { color: var(--stone-soft); }

/* Legacy stat (underlined) — kept for compat */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--rule);
}
.stat__num {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: var(--ink);
}
.stat__label {
  font-size: var(--t-small);
  color: var(--ink-soft);
  max-width: 28ch;
}

.section--dark .stat { border-top-color: rgba(255,255,255,0.18); }
.section--dark .stat__num { color: var(--paper); }
.section--dark .stat__label { color: rgba(247, 243, 234, 0.72); }

.pullquote-block {
  margin: 0 auto;
  padding-block: clamp(48px, 7vw, 96px);
  padding-inline: var(--s-5);
  max-width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section--dark .pullquote-block,
.section--moss .pullquote-block { max-width: 90%; }

.pullquote {
  position: relative;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: clamp(28px, 3.8vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 300;
  text-wrap: balance;
  max-width: 90%;
  margin: 0 auto;
  padding-top: 1.1em;
  text-align: center;
}
.pullquote::before {
  content: "\201C";
  position: absolute;
  top: -0.05em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-italic);
  font-style: italic;
  font-size: clamp(4rem, 8vw, 6.5rem);
  line-height: 0.7;
  color: var(--moss);
  opacity: 0.4;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  pointer-events: none;
}
.section--dark .pullquote::before,
.section--moss .pullquote::before { color: var(--stone-soft); opacity: 0.55; }
.pullquote--wide { max-width: 90%; }

.attribution {
  font-family: var(--font-sans);
  font-size: var(--t-small);
  color: var(--ink-mute);
  letter-spacing: -0.005em;
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  text-align: center;
  width: 100%;
  max-width: 36ch;
}
.section--dark .attribution,
.section--moss .attribution { color: var(--stone-soft); border-top-color: rgba(255,255,255,0.18); }

/* =======================================================================
   Nav + Footer
   ======================================================================= */
/* Anchor scroll offset — keep section tops clear of the sticky nav */
[data-chapter] { scroll-margin-top: 80px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  transition: background 240ms var(--ease), color 240ms var(--ease), border-color 240ms var(--ease);
}

/* Transparent overlay state \u2014 used on pages with a full-bleed hero */
.nav--on-image {
  background: linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--bone);
}
.nav--on-image .nav__brand,
.nav--on-image .logo-wordmark { color: var(--bone); }
.nav--on-image .nav__links a { color: rgba(247, 243, 234, 0.78); }
.nav--on-image .nav__links a:hover,
.nav--on-image .nav__links a[aria-current="page"] { color: var(--bone); }
.nav--on-image .btn--primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.nav--on-image .btn--primary:hover { background: var(--moss); color: var(--paper); border-color: var(--moss); }
.nav--on-image .nav__toggle { color: var(--bone); border-color: rgba(255,255,255,0.5); }

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  position: relative;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 17px;
}

.nav__brand-mark {
  width: 22px;
  height: 22px;
  display: inline-block;
}

.nav__links {
  display: none;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-size: var(--t-small);
  color: var(--ink-soft);
  transition: color 180ms var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--ink); }

@media (min-width: 980px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none !important; }
}

.nav__cta { display: flex; gap: 10px; align-items: center; }
.nav__cta .btn { padding: 12px 20px; }

.nav__toggle {
  appearance: none;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: var(--t-small);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  content: "";
  height: 1.5px; background: currentColor; border-radius: 1px;
}

.nav--open .nav__sheet { display: flex; }
.nav__sheet {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  gap: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-4) var(--gutter) var(--s-6);
  box-shadow: var(--shadow);
}
.nav__sheet a {
  padding: var(--s-4) 0;
  font-size: var(--t-h5);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.01em;
}
.nav__sheet a:last-child { border-bottom: 0; }
@media (min-width: 980px) {
  .nav--open .nav__sheet { display: none; }
}

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-9) var(--gutter) var(--s-7);
  border-top: 1px solid var(--ink);
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
}
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer h6 {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--stone-soft);
  margin: 0 0 var(--s-5);
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--paper); opacity: 0.78; transition: opacity 180ms var(--ease); font-size: var(--t-small); }
.footer a:hover { opacity: 1; }
.footer__base {
  max-width: var(--max);
  margin: var(--s-8) auto 0;
  padding-top: var(--s-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  color: rgba(247, 243, 234, 0.6);
}

/* =======================================================================
   Logo / Mark
   ======================================================================= */
.logo-wordmark {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 18px;
  color: var(--ink);
}

/* SVG mark — horizon rising */
.mark { display: inline-block; }

/* =======================================================================
   Placeholders (photo, illustration)
   ======================================================================= */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(26, 24, 18, 0.04) 0,
      rgba(26, 24, 18, 0.04) 1px,
      transparent 1px,
      transparent 11px
    ),
    var(--vellum);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--t-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
}
.placeholder::before {
  content: attr(data-label);
  text-align: center;
  padding: 1em;
}

/* =======================================================================
   Helpers / utilities
   ======================================================================= */
.hide-mobile { display: none; }
@media (min-width: 900px) { .hide-mobile { display: initial; } .hide-desktop { display: none; } }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }
.gap-6 { gap: var(--s-6); }
.gap-7 { gap: var(--s-7); }
.text-center { text-align: center; }

.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mt-8 { margin-top: var(--s-8); }

/* Scroll reveal — pure CSS animation, content always visible by default. */
[data-reveal] {
  animation: rise-fade-in 700ms var(--ease) both;
}
@keyframes rise-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { animation: none; }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

/* =======================================================================
   Interaction primitives — custom cursor, scroll ribbon, kinetic words
   ======================================================================= */

/* Scroll progress ribbon */
.rise-ribbon {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 99;
  pointer-events: none;
  background: transparent;
}
.rise-ribbon__fill {
  position: absolute;
  inset: 0;
  background: var(--ledger, var(--moss));
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 80ms linear;
}
.rise-ribbon__ticks {
  position: absolute;
  inset: 0;
}
.rise-ribbon__tick {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 1px;
  background: var(--ink);
  opacity: 0.32;
}

/* Kinetic word reveal */
.k-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.k-word.is-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .k-word { opacity: 1; transform: none; transition: none; }
}

/* Tablet + mobile — keep dark bands off the screen edge */
@media (max-width: 899px) {
  .research-band { padding-left: 6% !important; padding-right: 6% !important; }
  .research-band__inner { max-width: 100% !important; }
  .quote-band { padding-left: 6% !important; padding-right: 6% !important; }
  .quote-band__inner { max-width: 100% !important; }
  .footer { padding-left: 6% !important; padding-right: 6% !important; }
}

/* =======================================================================
   Mobile — widen the 80% content wrappers to ~95% on small screens
   ======================================================================= */
@media (max-width: 639px) {
  .problem__head, .problem__layout, .problem__stats,
  .approach__head, .approach__prose,
  .research-band__inner,
  .model__head, .model__lede, .model__track,
  .song .section-head, .song__prose,
  .quote-band__inner, .quote-band__quote,
  .different__head, .compare-table,
  .outcomes__head, .outcomes__qual, .outcomes__quant-stats,
  .for-das__head, .das__lede, .das__pillars, .das__cta,
  .funders__head, .funders__cascade, .funders__bridge, .funders__pillars, .funders__cta,
  .leadership__head, .leaders,
  .press__head, .press__grid,
  .section-divider {
    max-width: 95% !important;
  }
  #problem .section-head,
  #different .section-head,
  #for-funders .section-head { max-width: 95% !important; }

  /* Override desktop inline margins that crush content on mobile */
  .section-head,
  .funders__bridge,
  .problem__lede p,
  .funders__lede { margin-left: 0 !important; margin-right: 0 !important; }
  .funders__bridge { max-width: 95% !important; }
  .container { padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }

  /* Dark bands need comfortable interior gutters, not the tight 95% */
  .research-band__inner,
  .quote-band__inner { max-width: 100% !important; }
  .research-band { padding-left: 6%; padding-right: 6%; }
  .quote-band { padding-left: 6%; padding-right: 6%; }
  .footer { padding-left: 6% !important; padding-right: 6% !important; }
}

