/* ==========================================================================
   site.css — layout and components. References tokens only; no raw hex.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img, svg { max-width: 100%; display: block; }
img { height: auto; }

/* --- type ---------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0 0 var(--sp-4);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 {
  font-size: var(--step-1);
  line-height: var(--lh-snug);
  font-weight: 700;
  letter-spacing: -0.02em;
}

p, ul, ol, dl { margin: 0 0 var(--sp-4); }
p { max-width: var(--measure); text-wrap: pretty; }
strong { font-weight: 700; }

a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  font-weight: 700;
  color: var(--accent-strong);
  margin: 0 0 var(--sp-4);
}
.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 46ch;
  color: var(--ink);
}
.lede--muted { color: var(--ink-muted); }

/* --- skip link ----------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--bg-raised); color: var(--ink);
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--focus); border-radius: var(--radius);
}
.skip:focus { left: var(--sp-4); top: var(--sp-4); }

/* --- layout -------------------------------------------------------------- */
.wrap {
  width: 100%; max-width: var(--page);
  margin-inline: auto; padding-inline: var(--sp-5);
}
.wrap--narrow { max-width: var(--page-narrow); }

.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }

/* full-bleed colour fields */
.band { position: relative; }
.band--sunken { background: var(--bg-sunken); }
.band--navy {
  background: var(--brand-navy);
  color: var(--ink-invert);
}
.band--navy h1, .band--navy h2, .band--navy h3 { color: var(--ink-invert); }
.band--navy .eyebrow { color: var(--accent-on-invert); }
.band--navy a { color: var(--accent-on-invert); }
.band--navy .lede, .band--navy .lede--muted { color: var(--ink-invert-muted); }

/* --- wave divider -------------------------------------------------------
   The logo is horns over water, so a wave is the brand's own device rather
   than a decoration borrowed from nowhere. */
.wave {
  display: block; width: 100%; height: clamp(44px, 7.5vw, 118px);
  pointer-events: none;
}
.wave svg { width: 100%; height: 100%; display: block; }
.wave--flip svg { transform: scaleY(-1); }

/* --- header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5); padding-block: var(--sp-4); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 58px; flex: none; }
.brand__mark--light { display: none; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800; font-size: var(--step-0);
  letter-spacing: -0.02em; line-height: 1.02;
  text-transform: uppercase;
}
.brand__name span {
  display: block; font-weight: 600; font-size: var(--step--2);
  letter-spacing: var(--track-wide); color: var(--ink-muted);
}

.nav ul { list-style: none; display: flex; gap: var(--sp-5); margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
  font-family: var(--font-display);
  color: var(--ink); text-decoration: none; font-weight: 600;
  font-size: var(--step--1); text-transform: uppercase;
  letter-spacing: 0.08em; padding-block: var(--sp-2);
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* swap in the light logo where the surface is dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark--dark { display: none; }
  :root:not([data-theme="light"]) .brand__mark--light { display: block; }
}
:root[data-theme="dark"] .brand__mark--dark { display: none; }
:root[data-theme="dark"] .brand__mark--light { display: block; }

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(var(--sp-8), 9vw, var(--sp-9)) 0;
}
.hero__inner { position: relative; z-index: 2; }
.hero__mark { width: clamp(150px, 24vw, 280px); margin-bottom: var(--sp-6); }
.hero h1 { max-width: 21ch; font-size: var(--step-6); font-weight: 900; }
.hero__accent { color: var(--accent-on-invert); }
.hero .lede {
  margin-bottom: var(--sp-6);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.35;
  max-width: 34ch;
}
/* only invert where the hero actually sits on a dark field — otherwise a
   light-background hero renders its own lede invisible */
.band--navy .lede { color: var(--ink-invert-muted); }
.band--navy .hero__inner .lede { color: var(--ink-invert); }
.hero__foot { padding-bottom: var(--sp-8); }

/* faint wave field behind the hero */
.hero__field {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  opacity: 0.16; pointer-events: none;
}
.hero__field svg { width: 100%; height: auto; display: block; }

.hero--page { padding-block: var(--sp-8) var(--sp-6); }
/* when a wave closes the hero it must sit flush to the band edge */
.hero:has(> .wave) { padding-bottom: 0; }
.hero:has(> .wave) .hero__inner { padding-bottom: var(--sp-7); }
.hero--page h1 { font-size: var(--step-4); max-width: 26ch; }

.rule {
  width: 92px; height: 6px; border-radius: 3px;
  background: var(--accent); border: 0;
  /* the UA centres <hr> with auto inline margins — pin it to the text edge */
  margin: 0 0 var(--sp-5) 0;
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display);
  padding: var(--sp-3) var(--sp-6);
  border-radius: 999px;
  font-weight: 700; font-size: var(--step-0);
  text-decoration: none; border: 2px solid transparent;
  cursor: pointer; line-height: 1.4;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.btn--accent { background: var(--accent); color: var(--brand-navy-deep); }
.btn--accent:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); }
.band--navy .btn--ghost { border-color: var(--ink-invert-muted); color: var(--ink-invert); }
.band--navy .btn--ghost:hover { border-color: var(--accent-on-invert); }
/* `.band--navy a` (0,1,1) outranks `.btn--accent` (0,1,0), which was leaving the
   hero buttons with orange text on an orange fill — 1.45:1. Restate them here. */
.band--navy .btn--accent { color: var(--brand-navy-deep); }
.band--navy .btn--accent:hover { color: var(--btn-fg); }
.band--navy .btn--primary { color: var(--btn-fg); }
.btn-row { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; }

/* --- big numbers --------------------------------------------------------- */
.figures {
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.figure-stat { border-top: 5px solid var(--accent); padding-top: var(--sp-4); }
.figure-stat__num {
  display: block; font-family: var(--font-display);
  font-size: var(--step-4); font-weight: 900;
  line-height: 0.95; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.figure-stat__label {
  display: block; margin-top: var(--sp-3);
  font-size: var(--step--1); color: var(--ink-muted);
  max-width: 30ch;
}
.band--navy .figure-stat__label { color: var(--ink-invert-muted); }

/* --- steps --------------------------------------------------------------- */
.steps {
  display: grid; gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none; padding: 0; margin: 0;
  counter-reset: step;
}
.step { position: relative; padding-top: var(--sp-6); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  font-family: var(--font-display); font-weight: 900;
  font-size: var(--step-1); line-height: 1;
  color: var(--accent);
}
.step::after {
  content: ""; position: absolute; top: calc(var(--sp-2) * 1.4); left: 2.2rem; right: 0;
  height: 2px; background: var(--line);
}
.step:last-child::after { display: none; }
.step h3 { margin-bottom: var(--sp-2); }
.step p { margin-bottom: 0; color: var(--ink-muted); }
.band--navy .step p { color: var(--ink-invert-muted); }
.band--navy .step::after { background: color-mix(in srgb, var(--ink-invert) 22%, transparent); }
@media (max-width: 46rem) { .step::after { display: none; } }

/* --- icons --------------------------------------------------------------- */
.ico {
  width: 30px; height: 30px; flex: none;
  color: var(--accent-strong);
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.band--navy .ico { color: var(--accent-on-invert); }
.ico--lg { width: 42px; height: 42px; }

/* --- cards --------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.card > .ico { margin-bottom: var(--sp-2); }
.card h3 { margin-bottom: 0; }
.card p { margin-bottom: 0; color: var(--ink-muted); }
.card__amount {
  font-family: var(--font-display);
  font-size: var(--step-2); font-weight: 900;
  letter-spacing: -0.03em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.card--accent { border-color: var(--accent); border-width: 2px; }
.card--flat { background: transparent; box-shadow: none; }

/* --- photography --------------------------------------------------------
   Photos get an art-directed treatment so they read as designed rather than
   pasted: a slight desaturation plus a navy gradient anchored at the base. */
.shot { position: relative; overflow: hidden; border-radius: var(--radius-lg); margin: 0; }
.shot img { width: 100%; filter: saturate(0.88) contrast(1.04); }
.shot::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--brand-navy) 55%, transparent) 0%,
    color-mix(in srgb, var(--brand-navy) 8%, transparent) 42%,
    transparent 72%);
  pointer-events: none;
}
.shot figcaption {
  position: absolute; inset: auto var(--sp-4) var(--sp-4) var(--sp-4); z-index: 2;
  color: var(--ink-invert); font-size: var(--step--1); line-height: 1.4;
  text-shadow: 0 1px 12px rgb(6 32 60 / 70%);
  max-width: 48ch;
}
.shot--plain::after { display: none; }
.shot--plain figcaption {
  position: static; inset: auto; color: var(--ink-muted);
  margin-top: var(--sp-3); text-shadow: none;
}

.bleed { width: 100vw; margin-inline: calc(50% - 50vw); }
.shot--bleed { border-radius: 0; }
.shot--bleed img { max-height: 62vh; object-fit: cover; }

/* --- gallery ------------------------------------------------------------
   Mixed portrait and landscape, so every tile is forced to a common aspect
   ratio and the image crops to fill. Keeps the grid even without hand-picking. */
.gallery {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(4, 1fr);
  list-style: none; margin: 0; padding: 0;
}
.gallery li { margin: 0; }
.gallery .shot { height: 100%; border-radius: var(--radius); }
.gallery .shot img { aspect-ratio: 1 / 1; height: 100%; width: 100%; object-fit: cover; }
/* a square crop centres by default, which loses subjects sitting low in frame */
.gallery .shot--low img { object-position: center 72%; }
.gallery .shot--high img { object-position: center 28%; }
.gallery .shot::after { display: none; }
.gallery li:first-child { grid-column: span 2; grid-row: span 2; }
.gallery li:first-child .shot img { aspect-ratio: 1 / 1; }
@media (max-width: 46rem) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
  .gallery li:first-child { grid-column: span 2; grid-row: auto; }
}

/* asymmetric mosaic — deliberately not a uniform grid */
.mosaic { display: grid; gap: var(--sp-4); grid-template-columns: repeat(4, 1fr); }
.mosaic > *:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaic > *:nth-child(2) { grid-column: span 2; }
.mosaic > *:nth-child(3),
.mosaic > *:nth-child(4) { grid-column: span 1; }
.mosaic .shot { height: 100%; }
.mosaic .shot img { height: 100%; object-fit: cover; }
@media (max-width: 46rem) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic > *:nth-child(1) { grid-column: span 2; grid-row: auto; }
  .mosaic > *:nth-child(2) { grid-column: span 2; }
}

/* --- split layout -------------------------------------------------------- */
.split { display: grid; gap: var(--sp-7); align-items: start; grid-template-columns: 1fr 1fr; }
.split--centre { align-items: center; }
.split--wide { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 52rem) { .split, .split--wide { grid-template-columns: 1fr; gap: var(--sp-6); } }

/* --- people -------------------------------------------------------------- */
.people { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.person { display: flex; flex-direction: column; gap: var(--sp-3); }
.person__photo {
  aspect-ratio: 1; width: 104px; border-radius: 50%;
  background: var(--bg-sunken); border: 2px dashed var(--line-strong);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--step-1); color: var(--ink-muted);
}
.person h3 { margin-bottom: 0; }
.person__role {
  font-family: var(--font-display);
  font-size: var(--step--2); text-transform: uppercase;
  letter-spacing: var(--track-wide); font-weight: 700;
  color: var(--accent-strong); margin: 0;
}
.person p { color: var(--ink-muted); margin-bottom: 0; }

/* --- partners ------------------------------------------------------------ */
/* Two rows of four. The white plate sits on the tile rather than the image, so
   logos of wildly different aspect ratios read as one consistent set. */
.partners {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5); list-style: none; margin: 0; padding: 0;
}
.partners li {
  display: grid; place-items: center;
  background: var(--plate);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  min-height: 188px;
  box-shadow: var(--shadow-sm);
}
.partners img {
  max-height: 116px; max-width: 100%; width: auto;
  background: none; padding: 0; box-shadow: none;
}
@media (max-width: 62rem) {
  .partners { grid-template-columns: repeat(2, 1fr); }
  .partners li { min-height: 148px; }
  .partners img { max-height: 92px; }
}

/* --- pills & callouts ---------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--step--1); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: var(--sp-2) var(--sp-4); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
}
.band--navy .pill {
  background: color-mix(in srgb, var(--ink-invert) 12%, transparent);
  color: var(--accent-on-invert);
  border-color: color-mix(in srgb, var(--accent-on-invert) 42%, transparent);
}

.note {
  border-left: 5px solid var(--accent);
  background: var(--accent-soft);
  padding: var(--sp-5);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: var(--sp-6) 0;
}
.note > :last-child { margin-bottom: 0; }
.note h3 { font-size: var(--step-0); }

/* --- facts list ---------------------------------------------------------- */
.facts { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: var(--sp-3) var(--sp-5); margin: var(--sp-5) 0; }
.facts dt {
  font-family: var(--font-display); font-weight: 700;
  color: var(--ink-muted); font-size: var(--step--2);
  text-transform: uppercase; letter-spacing: 0.09em; padding-top: 3px;
}
.facts dd { margin: 0; }
@media (max-width: 34rem) {
  .facts { grid-template-columns: 1fr; gap: var(--sp-1) 0; }
  .facts dd { margin-bottom: var(--sp-4); }
}

/* --- checklist ----------------------------------------------------------- */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2.1rem; margin-bottom: var(--sp-4); max-width: var(--measure); }
.checklist li::before {
  content: ""; position: absolute; left: 0.35rem; top: 0.6em;
  width: 0.62rem; height: 0.62rem; border-radius: 2px;
  background: var(--accent);
}

/* --- forms --------------------------------------------------------------- */
.form { max-width: 42rem; }
.field { margin-bottom: var(--sp-5); }
.field label { display: block; font-weight: 700; margin-bottom: var(--sp-2); }
.field .hint {
  display: block; font-weight: 400; font-size: var(--step--1);
  color: var(--ink-muted); margin: -2px 0 var(--sp-2);
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg-raised);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--focus); }
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: var(--err); background: var(--err-soft); }
.field__error { display: none; color: var(--err); font-size: var(--step--1); font-weight: 700; margin-top: var(--sp-2); }
.field[data-invalid="true"] .field__error { display: block; }

/* honeypot: off-screen rather than display:none, so bots still fill it */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.formmsg { border-radius: var(--radius-lg); padding: var(--sp-5); margin-bottom: var(--sp-5); }
.formmsg--ok { background: var(--accent-soft); border-left: 5px solid var(--ok); }
.formmsg--err { background: var(--err-soft); border-left: 5px solid var(--err); }
.formmsg > :last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* --- footer -------------------------------------------------------------- */
.site-footer {
  background: var(--brand-navy-deep); color: var(--ink-invert);
  padding-block: var(--sp-7) var(--sp-6);
  font-size: var(--step--1);
}
.site-footer a { color: var(--ink-invert); }
.site-footer__grid { display: grid; gap: var(--sp-6); grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 46rem) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 30rem) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  font-size: var(--step--2); text-transform: uppercase;
  letter-spacing: var(--track-wide); color: var(--accent-on-invert);
  margin-bottom: var(--sp-4); font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--sp-3); }
.site-footer p { color: var(--ink-invert-muted); max-width: 44ch; }
.site-footer__legal {
  margin-top: var(--sp-6); padding-top: var(--sp-5);
  border-top: 1px solid color-mix(in srgb, var(--ink-invert) 18%, transparent);
}
.site-footer__legal p { font-size: var(--step--2); max-width: 88ch; color: var(--ink-invert-muted); }
.site-footer__mark { width: 76px; margin-bottom: var(--sp-4); }

/* --- utility ------------------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.stack > * + * { margin-top: var(--sp-4); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.cite { font-size: var(--step--2); color: var(--ink-muted); }
.band--navy .cite { color: var(--ink-invert-muted); }
.refs { font-size: var(--step--2); color: var(--ink-muted); padding-left: 1.3em; }
.refs li { margin-bottom: var(--sp-2); }
.refs a { color: var(--ink-muted); }
sup a { text-decoration: none; font-weight: 700; padding-inline: 1px; }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: var(--sp-3); border-bottom: 1px solid var(--line); }
th { font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-muted); }

/* --- narrow screens ------------------------------------------------------ */
@media (max-width: 30rem) {
  .site-header__inner { gap: var(--sp-3); padding-block: var(--sp-3); }
  .nav ul { gap: var(--sp-4); }
  .nav a { font-size: var(--step--2); letter-spacing: 0.06em; }
  .brand__mark { width: 52px; }
  .hero { padding-top: var(--sp-7); }
  .hero__mark { width: 116px; margin-bottom: var(--sp-4); }
  .section { padding-block: var(--sp-7); }
}
