/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Mona Sans";
  src: url("../assets/fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../assets/fonts/atkinson-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../assets/fonts/atkinson-700-latin.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../assets/fonts/atkinson-400i-latin.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --lapis: #1E35A8;
  --lapis-deep: #152679;
  --pomegranate: #C8213F;
  --gold: #F0B323;
  --reed: #2F6B4F;
  --chalk: #F2F3EF;
  --ink: #16182B;
  --ink-soft: #4A4D63;
  --mist: #C9CBD6;

  --display: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  --text: "Atkinson Hyperlegible", system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.2vw, 2.2rem);
  --stat: clamp(2.6rem, 1.8rem + 3.6vw, 4.8rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur: .8s;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--text);
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.cq { container-type: inline-size; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--chalk); padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Controlled headlines ----------
   Each headline has authored line breaks (.ln) that never re-wrap.
   Size follows the width of its own column: --fit is the longest line's length in characters. */
.hl { font-size: clamp(var(--hl-min, 1.75rem), calc(100cqi / (var(--fit, 14) * 0.6)), var(--hl-max, 4rem)); line-height: .98; }
.hl .ln { display: block; white-space: nowrap; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hl .ln > span { display: inline-block; }
.hl--hero { --hl-max: 6.2rem; font-weight: 820; letter-spacing: -0.03em; line-height: .95; }
.hl--section { --hl-max: 4.2rem; }
.hl--init { --hl-max: 3.8rem; margin: 12px 0 24px; }
.hl--contact { --hl-max: 5.6rem; }

/* Line-by-line rise. Only transform moves, so nothing around the headline shifts. */
.js .hl .ln > span { transform: translateY(105%); transition: transform 1s var(--ease); }
.js .hl .ln:nth-child(2) > span { transition-delay: .08s; }
.js .hl .ln:nth-child(3) > span { transition-delay: .16s; }
.js .hl .ln:nth-child(4) > span { transition-delay: .24s; }
.js .hl.is-in .ln > span { transform: none; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  transition: box-shadow .3s;
}
/* The frosted bar lives on a pseudo-element: a backdrop-filter on .nav itself would trap
   the fixed full-screen mobile menu inside the bar */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--chalk) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.nav.is-scrolled { box-shadow: 0 1px 0 rgba(22, 24, 43, .12); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; position: relative; z-index: 2; }
.mark { width: 34px; height: 34px; transition: transform .7s var(--ease); }
.brand:hover .mark { transform: rotate(90deg); }
.brand-text { font: 700 0.78rem/1.15 var(--text); }
.menu { display: flex; align-items: center; gap: 4px; }
.menu a {
  position: relative; text-decoration: none; font: 600 0.95rem/1 var(--display);
  padding: 12px 12px; border-radius: 999px;
}
.menu a:not(.menu-cta)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px;
  background: var(--pomegranate); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.menu a:hover::after, .menu a.is-active::after { transform: scaleX(1); }
.menu-cta { background: var(--ink); color: var(--chalk); margin-left: 8px; transition: background .25s; }
.menu-cta:hover, .menu-cta.is-active { background: var(--pomegranate); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: var(--ink); cursor: pointer;
    position: relative; z-index: 2;
  }
  .nav:has(.menu.is-open)::before { opacity: 0; }
  .nav:has(.menu.is-open) { box-shadow: none; }
  .menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--chalk); border-radius: 2px;
    transition: transform .35s var(--ease), background .2s;
  }
  .menu-toggle-bars { position: relative; }
  .menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-bars::before { top: -6px; }
  .menu-toggle-bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] { background: var(--gold); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); background: var(--ink); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); background: var(--ink); }
  .nav:has(.menu.is-open) .brand-text { color: var(--chalk); }
  .nav:has(.menu.is-open) .mark rect:first-child { fill: var(--chalk); }

  .menu {
    position: fixed; inset: 0; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 0; padding: 88px var(--gutter) 40px; background: var(--lapis);
    clip-path: circle(0 at calc(100% - var(--gutter) - 22px) 34px);
    transition: clip-path .6s var(--ease-in-out), visibility 0s .6s;
    visibility: hidden;
  }
  .menu.is-open { clip-path: circle(150% at calc(100% - var(--gutter) - 22px) 34px); visibility: visible; transition: clip-path .6s var(--ease-in-out); }
  .menu a {
    color: var(--chalk); font: 750 clamp(2rem, 9vw, 3rem)/1.15 var(--display);
    letter-spacing: -0.02em; padding: 6px 0;
    opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .5s var(--ease);
  }
  .menu.is-open a { opacity: 1; transform: none; }
  .menu.is-open a:nth-child(2) { transition-delay: .04s; }
  .menu.is-open a:nth-child(3) { transition-delay: .08s; }
  .menu.is-open a:nth-child(4) { transition-delay: .12s; }
  .menu.is-open a:nth-child(5) { transition-delay: .16s; }
  .menu.is-open a:nth-child(6) { transition-delay: .2s; }
  .menu a:not(.menu-cta)::after { left: 0; right: auto; width: 40px; bottom: 8px; background: var(--gold); }
  .menu-cta { background: none; margin: 0; color: var(--gold) !important; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px;
  border-radius: 999px; font: 650 1rem/1 var(--display); text-decoration: none;
  transition: transform .3s var(--ease), background .25s, color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--solid { background: var(--pomegranate); color: #fff; }
.btn--solid:hover { background: var(--ink); }
.btn--line { box-shadow: inset 0 0 0 2px var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--chalk); }
.btn--big { min-height: 60px; padding: 0 30px; font-size: var(--step-1); }

/* ---------- Hero ---------- */
.hero { padding-top: 68px; }
.hero-panels {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  height: clamp(340px, 60vh, 620px);
}
.panel { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.panel--lapis { background: var(--lapis); }
.panel--pomegranate { background: var(--pomegranate); }
.panel--gold { background: var(--gold); }
.panel img {
  width: min(118%, 520px); max-width: none; height: 90%; object-fit: contain; object-position: bottom center;
}
.panel figcaption {
  position: absolute; left: clamp(12px, 2vw, 24px); top: clamp(12px, 2vw, 22px);
  display: flex; flex-direction: column; gap: 2px; color: var(--chalk); font-size: var(--step--1); line-height: 1.2;
}
.panel figcaption strong { font: 780 var(--step-1)/1 var(--display); letter-spacing: -0.01em; }
.panel--gold figcaption { color: var(--ink); }
.hero-copy {
  width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: end;
  padding: clamp(32px, 4.5vw, 64px) 0 clamp(64px, 8vw, 112px);
}
.hero-side p { font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 34ch; }

/* One load sequence: portraits rise in turn, then the headline lines, then the intro */
.js .hero .panel img { transform: translateY(100%); }
.js .hero .panel figcaption { opacity: 0; transform: translateY(-8px); }
.js .hero .hero-side { opacity: 0; transform: translateY(16px); }
.is-loaded .hero .panel img { transform: none; transition: transform 1.2s var(--ease); }
.is-loaded .hero .panel:nth-child(2) img { transition-delay: .12s; }
.is-loaded .hero .panel:nth-child(3) img { transition-delay: .24s; }
.is-loaded .hero .panel figcaption { opacity: 1; transform: none; transition: opacity .6s .7s, transform .6s .7s var(--ease); }
.is-loaded .hero .hl .ln > span { transform: none; transition-duration: 1.1s; }
.is-loaded .hero .hl .ln:nth-child(1) > span { transition-delay: .35s; }
.is-loaded .hero .hl .ln:nth-child(2) > span { transition-delay: .45s; }
.is-loaded .hero .hl .ln:nth-child(3) > span { transition-delay: .55s; }
.is-loaded .hero .hero-side { opacity: 1; transform: none; transition: opacity .7s .9s, transform .8s .9s var(--ease); }

@media (max-width: 760px) {
  .hero-panels { height: clamp(260px, 84vw, 420px); }
  .panel img { width: 185%; height: 82%; }
  .hero-copy { grid-template-columns: 1fr; }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Photos: frame wipes open while the image settles from a slight zoom */
.photo-frame { position: relative; isolation: isolate; overflow: hidden; border-radius: 6px; background: rgba(22, 24, 43, .08); --tint: var(--lapis); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.03); }
/* A soft wash of the section's color over each photo, plus a faint inner edge; it lifts on hover */
/* Soft focus: blurs the photo inside its own frame, so the edges stay clean */
.photo-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  -webkit-backdrop-filter: blur(.8px); backdrop-filter: blur(.8px);
  transition: -webkit-backdrop-filter .6s var(--ease), backdrop-filter .6s var(--ease);
}
/* Strong wash of the section's color, deepening toward the bottom */
.photo-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 38%, transparent), color-mix(in srgb, var(--tint) 62%, transparent));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: opacity .6s var(--ease);
}
.photo-frame:hover::before { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
.photo-frame:hover::after { opacity: .55; }
.about .photo-frame { --tint: var(--lapis); }
.init--elderly .photo-frame { --tint: var(--gold); }
.init--way .photo-frame { --tint: var(--pomegranate); }
.js .reveal-photo .photo-frame { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease-in-out); }
.js .reveal-photo .photo-frame img { transform: scale(1.12); transition: transform 1.6s var(--ease); }
.js .reveal-photo.is-in .photo-frame { clip-path: inset(0 0 0 0); }
.js .reveal-photo.is-in .photo-frame img { transform: none; }
.photo figcaption, .elderly-photo figcaption { margin-top: 10px; font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- About ---------- */
.about { padding: clamp(80px, 10vw, 140px) 0; background: var(--ink); color: var(--chalk); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.about-body { display: grid; gap: 18px; max-width: 58ch; padding-top: .4em; }
.about-body .lead { font-size: var(--step-1); line-height: 1.45; color: var(--gold); }
.about-body p:not(.lead) { color: var(--mist); }
.about-photos {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(16px, 2.5vw, 32px);
  align-items: end; margin-top: clamp(56px, 7vw, 96px);
}
.about-photos .photo--wide .photo-frame { aspect-ratio: 4 / 3; }
.about-photos .photo--tall .photo-frame { aspect-ratio: 3 / 4; }
.about-photos .photo--tall { margin-bottom: clamp(32px, 6vw, 88px); }
.about .photo figcaption { color: var(--mist); }
.principles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(56px, 7vw, 96px); padding-top: 28px; border-top: 2px solid rgba(242, 243, 239, .18);
}
.principles li { display: grid; gap: 12px; align-content: start; cursor: default; }
.principle-word {
  justify-self: start; position: relative;
  font: 800 clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem)/1 var(--display); letter-spacing: -0.02em;
  transition: transform .5s var(--ease);
}
.principle-word::after {
  content: ""; position: absolute; left: 0; bottom: -8px; height: 3px; width: 100%;
  background: currentColor; transform: scaleX(.18); transform-origin: left; transition: transform .6s var(--ease);
}
.principles li:nth-child(1) .principle-word { color: #8FA0FF; }
.principles li:nth-child(2) .principle-word { color: var(--gold); }
.principles li:nth-child(3) .principle-word { color: #FF7A8E; }
.principles li:hover .principle-word { transform: translateY(-4px); }
.principles li:hover .principle-word::after { transform: scaleX(1); }
.principles p { color: var(--mist); max-width: 32ch; margin-top: 6px; }
@media (max-width: 760px) {
  .about-grid, .principles { grid-template-columns: 1fr; }
  .about-photos { grid-template-columns: 1fr; }
  .about-photos .photo--tall { margin-bottom: 0; width: 72%; justify-self: end; }
}

/* ---------- Initiatives shared ---------- */
.initiatives { padding-top: clamp(80px, 10vw, 140px); }
.init-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 56px; align-items: end; padding-bottom: clamp(48px, 6vw, 80px); }
.init-intro > p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; max-width: 40ch; }
.init-index { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.init-index a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: #fff; text-decoration: none; font: 600 var(--step--1)/1 var(--display);
  box-shadow: inset 0 0 0 1.5px rgba(22, 24, 43, .14); transition: background .25s, color .25s, transform .3s var(--ease);
}
.init-index i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.init-index a:hover { background: var(--ink); color: var(--chalk); transform: translateY(-2px); }
@media (max-width: 760px) { .init-intro { grid-template-columns: 1fr; } }

.init { padding: clamp(72px, 9vw, 128px) 0; }
.init-text > p:not(.init-kicker):not(.note):not(.badge):not(.questions-label) { max-width: 54ch; }
.init-kicker { font-weight: 700; font-size: var(--step--1); display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.init-kicker span { font-weight: 400; opacity: .8; }
.init-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
@media (max-width: 860px) { .init-split { grid-template-columns: 1fr; } }

.aims { display: grid; gap: 8px; margin: 22px 0 0; }
.aims li { position: relative; padding-left: 26px; }
.aims li::before { content: ""; position: absolute; left: 0; top: .72em; width: 14px; height: 2px; background: currentColor; opacity: .7; }
.stats { display: flex; flex-wrap: wrap; gap: 16px clamp(32px, 4vw, 56px); margin: 32px 0 0; }
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
.stats dt { font-size: var(--step--1); opacity: .85; }
.stats dd { margin: 0; font: 800 var(--stat)/.9 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.note { margin-top: 14px; font-size: 0.8rem; font-style: italic; opacity: .78; }

/* Typhoid: map */
.init--typhoid { background: var(--lapis); color: var(--chalk); }
.init--typhoid .stats dd { color: var(--gold); }
.iraq-map { display: grid; gap: 18px; justify-items: center; }
.map-svg { width: min(100%, 500px); height: auto; overflow: visible; }
.gov {
  fill: var(--gold); fill-opacity: .14; stroke: var(--lapis); stroke-width: 1.6; stroke-linejoin: round;
  cursor: pointer; outline: none;
  transition: fill-opacity .7s var(--ease) calc(var(--i) * 45ms), fill .3s;
}
.iraq-map.is-in .gov { fill-opacity: 1; }
.gov:hover, .gov:focus-visible, .gov.is-picked { fill: var(--chalk); transition-delay: 0s; }
.gov:focus-visible { stroke: var(--ink); stroke-width: 3; }
.iraq-map figcaption { text-align: center; display: grid; gap: 6px; }
.map-name { font: 780 var(--step-2)/1.1 var(--display); letter-spacing: -0.01em; min-height: 1.1em; }
.iraq-map small { opacity: .78; font-size: 0.8rem; }
html:not(.js) .gov { fill-opacity: 1; }
html:not(.js) .arches path { fill: var(--gold); }

/* Elderly: editorial photo with an overlapping card */
.init--elderly { background: var(--chalk); }
.init--elderly .stats dd { color: var(--pomegranate); }
.elderly-stage {
  width: min(100% - 2 * var(--gutter), 1360px); margin-inline: auto;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start;
}
.elderly-photo { grid-column: 1 / 9; grid-row: 1; }
.elderly-photo .photo-frame { aspect-ratio: 16 / 10; border-radius: 8px; }
.elderly-photo img { object-position: 30% 50%; }
.elderly-card {
  grid-column: 8 / 13; grid-row: 1; position: relative; z-index: 1;
  background: var(--gold); border-radius: 8px; padding: clamp(28px, 3.5vw, 48px);
  box-shadow: 0 30px 60px -30px rgba(22, 24, 43, .45);
  margin-top: clamp(80px, 12vw, 180px);
}
.elderly-card .stats dd { color: var(--ink); }
.elderly-card .aims li::before { opacity: 1; }
.arches-row { margin-top: clamp(48px, 6vw, 80px); }
.arches { width: 100%; height: auto; }
.arches path {
  fill: transparent; stroke: var(--ink); stroke-width: 2.5;
  transition: fill .5s var(--ease) calc(var(--i) * 60ms);
}
.arches.is-in path { fill: var(--gold); }
.arches-label { margin-top: 10px; font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 860px) {
  .elderly-stage { grid-template-columns: 1fr; width: 100%; }
  .elderly-photo { grid-column: 1; }
  .elderly-photo .photo-frame { border-radius: 0; aspect-ratio: 4 / 3; }
  .elderly-photo figcaption { padding: 0 var(--gutter); }
  .elderly-card { grid-column: 1; grid-row: auto; margin: 20px var(--gutter) 0; }
}

/* Environment */
.init--env { background: var(--reed); color: var(--chalk); }
.init--env .stats dd { color: var(--gold); }
.env-head { max-width: 760px; }
.flow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(48px, .45fr) minmax(0, 1.3fr);
  align-items: center; margin: 24px 0 clamp(40px, 5vw, 64px);
}
.flow-inputs { display: grid; gap: clamp(16px, 3vw, 40px); }
.flow-node {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 14px 22px 14px 14px; border: 2px solid rgba(242, 243, 239, .85); border-radius: 999px;
  font: 700 var(--step-1)/1.15 var(--display); letter-spacing: -0.01em;
}
.flow-node svg { flex: none; width: 48px; height: 48px; overflow: visible; }
.flow-node span { min-width: 0; overflow-wrap: anywhere; }
.node-dot { fill: var(--gold); }
.node-pulse { fill: none; stroke: var(--gold); stroke-width: 2.5; transform-origin: 24px 24px; }
.flow.is-in .node-pulse { animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.node-fill { fill: var(--chalk); }
.node-line { fill: none; stroke: var(--chalk); stroke-width: 4; stroke-linecap: round; }
.flow-links { width: 100%; height: 100%; min-height: 160px; overflow: visible; }
.flow-links path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 8 10; vector-effect: non-scaling-stroke; }
.flow.is-in .flow-links path { animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -36; } }
.flow-out { background: var(--chalk); color: var(--ink); border-radius: 8px; padding: 18px 20px 20px; display: grid; gap: 10px; }
.flow-out svg { width: 100%; height: auto; }
.flow-out span { font: 700 var(--step-0)/1.2 var(--display); }
.city { fill: var(--reed); }
.city-halo { fill: none; stroke: var(--reed); stroke-width: 2; opacity: .35; transform-box: fill-box; transform-origin: center; }
.flow.is-in .city-halo { animation: breathe 3.2s ease-in-out infinite; }
.flow.is-in .city-halo:nth-of-type(odd) { animation-delay: -1.6s; }
@keyframes breathe { 50% { transform: scale(1.15); opacity: .15; } }
.env-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); }
.env-cols > p { font-size: var(--step-1); line-height: 1.5; max-width: 46ch; }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow-links { display: none; }
  .flow-inputs { gap: 12px; }
  .flow-node { font-size: 1.05rem; padding: 10px 18px 10px 10px; }
  .flow-inputs::after {
    content: ""; justify-self: center; width: 0; height: 40px;
    border-left: 3px dashed var(--gold); margin: 4px 0;
  }
  .env-cols { grid-template-columns: 1fr; }
}

/* Wa'y */
.init--way { background: var(--pomegranate); color: #fff; }
.way-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "mark copy" "mark topics" "stats stats" "note note";
  gap: 28px clamp(32px, 6vw, 96px); align-items: center;
}
.way-mark { grid-area: mark; justify-self: center; width: min(100%, 380px); }
.way-mark img { width: 100%; height: auto; transform: translateY(var(--py, 0px)); }
.way-copy { grid-area: copy; }
.way-copy p:not(.init-kicker) { max-width: 52ch; }
.way-topics { grid-area: topics; display: grid; gap: 6px; }
.topic {
  appearance: none; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left;
  font: 800 clamp(2.2rem, 1.4rem + 3vw, 3.8rem)/1.05 var(--display); letter-spacing: 0.01em;
  /* Outline drawn with shadows on a background-colored fill, so overlapping glyph contours never show */
  color: var(--pomegranate);
  text-shadow:
    1.5px 0 #fff, -1.5px 0 #fff, 0 1.5px #fff, 0 -1.5px #fff,
    1.1px 1.1px #fff, -1.1px 1.1px #fff, 1.1px -1.1px #fff, -1.1px -1.1px #fff;
  transition: color .35s var(--ease), transform .45s var(--ease);
}
.topic:hover, .topic:focus-visible, .topic.is-on { color: #fff; transform: translateX(8px); }
.stats--way { grid-area: stats; }
.way-note { grid-area: note; margin-top: -12px; }
.way-photos {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(16px, 2.5vw, 32px);
  align-items: start; margin-top: clamp(48px, 6vw, 80px);
}
.way-photos .photo-frame { aspect-ratio: 2 / 1; background: rgba(255, 255, 255, .12); }
.way-photos .photo:nth-child(2) { margin-top: clamp(40px, 7vw, 96px); }
.way-photos-caption { grid-column: 1 / -1; font-size: var(--step--1); opacity: .85; }
@media (max-width: 860px) {
  .way-grid { grid-template-columns: 1fr; grid-template-areas: "mark" "copy" "topics" "stats" "note"; }
  .way-mark { width: min(56%, 220px); justify-self: start; margin-bottom: 8px; }
  .way-mark img { transform: none; }
  .topic { font-size: clamp(2.3rem, 11vw, 3rem); letter-spacing: 0.03em; }
  .way-photos { grid-template-columns: 1fr; }
  .way-photos .photo:nth-child(2) { margin-top: 0; width: 80%; justify-self: end; }
}

/* AMR */
.init--amr { background: var(--ink); color: var(--chalk); }
.badge {
  display: inline-block; margin: 18px 0 0; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--gold); color: var(--gold); font-weight: 700; font-size: var(--step--1);
}
.questions-label { margin-top: 22px; font-weight: 700; }
.questions-label + .aims { margin-top: 10px; }
.stats--planned { padding: 18px 22px; border: 2px solid rgba(242, 243, 239, .25); border-radius: 8px; width: fit-content; }
.stats--planned dd { color: var(--gold); }
.dish { display: grid; gap: 14px; justify-items: center; }
.dish svg { width: min(100%, 440px); }
.dish figcaption { font-size: var(--step--1); opacity: .78; max-width: 40ch; text-align: center; }
.zone { fill: rgba(242, 243, 239, .1); stroke: rgba(242, 243, 239, .5); stroke-width: 1.5; stroke-dasharray: 4 5; }
.js .zone { transform-box: fill-box; transform-origin: center; transform: scale(.25); transition: transform 1.6s var(--ease) var(--d, 0s); }
.js .dish.is-in .zone { transform: scale(1); }
.zone--none { stroke: var(--pomegranate); fill: none; }

/* ---------- Impact ---------- */
.impact { padding: clamp(80px, 11vw, 150px) 0; background: var(--gold); }
.impact-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.impact-head > p { font-size: var(--step-1); line-height: 1.45; max-width: 40ch; }
.impact-table { margin-top: clamp(40px, 5vw, 64px); border-top: 2px solid var(--ink); }
.impact-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 32px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid rgba(22, 24, 43, .3);
}
.impact-project { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 700 var(--step-1)/1.2 var(--display); }
.impact-project i { width: 14px; height: 14px; border-radius: 3px; background: var(--c); }
.impact-project span { flex-basis: 100%; padding-left: 24px; font: italic 400 var(--step--1)/1.3 var(--text); }
.impact-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; margin: 0; }
/* Number and label share one baseline; numbers get a fixed column so every label starts at the same x */
.impact-stats div {
  display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); align-items: baseline; column-gap: 14px; min-width: 0;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3.4rem);
}
.impact-stats dd {
  margin: 0; width: 2.7em; font: 800 1em/1 var(--display);
  letter-spacing: -0.03em; color: var(--lapis); font-variant-numeric: tabular-nums;
}
.impact-stats dt { font-size: var(--step-0); line-height: 1.3; }
.impact-row--planned dd { color: color-mix(in srgb, var(--lapis) 50%, var(--gold)); }
.note--block { margin-top: 28px; max-width: 64ch; }
@media (max-width: 760px) {
  .impact-head, .impact-row { grid-template-columns: 1fr; }
  .impact-stats { grid-template-columns: 1fr 1fr; }
  .impact-stats div { grid-template-columns: 1fr; row-gap: 4px; align-items: start; align-content: start; }
  .impact-stats dd { width: auto; }
}

/* ---------- Team ---------- */
.team { padding: clamp(80px, 10vw, 140px) 0; }
.team-title { font-size: clamp(2.4rem, 1.6rem + 3vw, 4.2rem); }
.team-intro { margin-top: 16px; color: var(--ink-soft); font-size: var(--step-1); max-width: 40ch; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); margin-top: clamp(40px, 5vw, 64px); }
.member-photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center; margin-bottom: 20px;
}
.member--lapis .member-photo { background: var(--lapis); }
.member--pomegranate .member-photo { background: var(--pomegranate); }
.member--gold .member-photo { background: var(--gold); }
.member-photo img { width: 100%; height: 92%; object-fit: contain; object-position: bottom; transition: transform .7s var(--ease); transform-origin: bottom center; }
.member:hover .member-photo img { transform: scale(1.04) translateY(-4px); }
.member h3 { font-size: var(--step-2); letter-spacing: -0.02em; }
.member .role { font-weight: 700; margin-top: 8px; }
.member .place { color: var(--ink-soft); font-size: var(--step--1); margin: 2px 0 10px; }
.member p:last-child { color: var(--ink-soft); max-width: 40ch; }
.team-grid .member:nth-child(2) { margin-top: 48px; }
.team-grid .member:nth-child(3) { margin-top: 96px; }
@media (max-width: 860px) {
  .team-grid { grid-template-columns: 1fr; max-width: 460px; }
  .team-grid .member:nth-child(n) { margin-top: 0; }
  .team-grid .member + .member { margin-top: 24px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--lapis); color: var(--chalk); padding: clamp(88px, 12vw, 170px) 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; }
.contact p { max-width: 44ch; font-size: var(--step-1); line-height: 1.5; }
.contact .btn { margin-top: 28px; }
.contact .btn--solid:hover { background: var(--gold); color: var(--ink); }
.email { margin-top: 14px; font-size: var(--step-0) !important; opacity: .85; overflow-wrap: anywhere; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--mist); padding: 28px 0; font-size: var(--step--1); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.footer a { color: var(--chalk); font-weight: 700; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hl .ln > span, .js .hero .panel img, .js .hero .panel figcaption, .js .hero .hero-side,
  .js .reveal-photo .photo-frame, .js .reveal-photo .photo-frame img, .js .zone {
    opacity: 1 !important; transform: none !important; clip-path: none !important;
  }
  .gov { fill-opacity: 1; }
  .arches path { fill: var(--gold); }
  .way-mark img { transform: none; }
}
