/* Use the same locally hosted fonts as the staff tools so pages work on slower links. */
@font-face {
  font-family: Figtree;
  src: url("/shared/fonts/figtree-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "Young Serif";
  src: url("/shared/fonts/young-serif-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* =====================================================================
   SR&C — site styles
   Palette A "Sand & Forest" + Young Serif / Figtree (chosen 2026-11-30).

   How this file is organised
   1. Tokens        – colours, type, spacing. Change the brand here only.
   2. Base          – element defaults, focus, skip link.
   3. Layout        – container, sections, shared buttons and headings.
   4. Header + menu – shared by every page (markup built by main.js).
   5. Home sections – hero, pillars, results, story, help, partners.
   6. Footer        – shared by every page.
   7. Public pages  – information pages, inquiry form and impact map.
   8. Motion        – only switched on when JS adds .motion-ok (i.e. the
                      visitor has NOT asked for reduced motion).

   Contrast (WCAG 2.2 AA), measured:
     ink on paper 13.7:1 · forest on paper 9.0:1 · forest on sand 7.4:1
     ink on ochre 6.7:1 (Get Involved) · ochre on forest 4.4:1 (large numbers only)
     paper @72% on forest 5.5:1 (small text on dark sections)
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #F7F1E5;   /* page background: warm, not stark white */
  --sand: #E9DCC4;    /* alternate sections, image placeholders */
  --forest: #1E4A34;  /* headings, dark sections, footer */
  --moss: #5E7F4C;    /* icons and lines only (4.0:1 is too low for small text) */
  --ochre: #D6A24A;   /* Get Involved + result numbers: the one warm "act now" colour */
  --ink: #1F2622;     /* body text */
  --ink-soft: rgb(31 38 34 / 0.72);       /* secondary text on paper, 5.4:1 */
  --paper-soft: rgb(247 241 229 / 0.78);  /* secondary text on forest, 6.0:1 */

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;

  /* Fluid type: scales smoothly from phone (390px) to desktop (1440px). */
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);      /* body */
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3rem);    /* intros */
  --step-2: clamp(1.5rem, 1.25rem + 0.9vw, 2rem);         /* card titles */
  --step-3: clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem);        /* section titles */
  --step-hero: clamp(2.75rem, 1.2rem + 5.2vw, 7rem);      /* hero headline */
  /* Feature blocks (home "What We Do" story, featured project): sized like the Squarespace
     reference, 40px heading and ~15px text at 1440px wide, a step smaller than section titles. */
  --step-feature: clamp(1.75rem, 1rem + 1.7vw, 2.5rem);
  --text-feature: 0.9375rem;   /* 15px */

  --gutter: clamp(20px, 5vw, 64px);
  --section-space: clamp(72px, 10vw, 144px);
  --radius-lg: 28px;  /* photos */
  --radius-md: 22px;  /* cards */

  --header-h: 76px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* One shared timing for small interactions (hovers, link underlines, step changes): the same
     speed everywhere is a big part of what makes the Squarespace reference feel polished. */
  --dur-quick: 0.3s;
  --focus: var(--forest);
}

@media (max-width: 1199px) {
  :root { --header-h: 66px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Keeps anchored sections (e.g. #help) from hiding under the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
}
/* Smooth scrolling for "Get involved", but only for people who are fine with motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; } /* stops the page scrolling behind the open phone menu */

img { display: block; max-width: 100%; height: auto; }
/* Long strings (a future partner name or email) wrap instead of pushing the page sideways. */
p, h1, h2, h3, a, li { overflow-wrap: break-word; }
/* Balanced lines stop one-word widows in headings. */
h1, h2, h3 { text-wrap: balance; }
/* Removes the 300ms double-tap-zoom delay on links and buttons, and replaces the grey tap flash
   with a faint forest tint that matches the brand. */
a, button { touch-action: manipulation; -webkit-tap-highlight-color: rgb(30 74 52 / 0.12); }
h1, h2, h3, p, figure, blockquote { margin: 0; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
a { color: inherit; }

/* One clear, high-contrast focus ring everywhere; dark sections swap the colour via --focus. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}
main:focus { outline: none; } /* main gets focus from the skip link; no ring needed on the whole page */

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--forest);
  color: var(--paper);
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* Staff preview of unpublished text (admin Content page). Pinned to the bottom so it never
   covers the header, and in ochre so a preview can't be mistaken for the live site. */
.preview-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  margin: 0;
  padding: 10px 16px;
  background: var(--ochre);
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.defs { position: absolute; }

/* ---------- 3. Layout + shared pieces ---------- */
.container {
  width: 100%;
  max-width: calc(1280px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-space); }

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--forest);
  text-wrap: balance;
}
.section-intro {
  margin-top: 14px;
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 44ch;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;              /* comfortably above the 24px target-size minimum */
  padding: 0 28px;
  border-radius: 999px;
  font: 700 1rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  /* Only transform is transitioned: it runs on the GPU and never causes layout work. */
  transition: transform 0.25s var(--ease-out);
}
.btn--primary {
  background: var(--ochre);
  color: var(--ink);
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.06);
}
/* The hover shadow lives on a pseudo-element that fades in (opacity), instead of animating box-shadow itself. */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 10px 24px -12px rgb(122 82 18 / 0.7);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  pointer-events: none;
}
.btn--primary:hover::after { opacity: 1; }
.btn--outline {
  color: var(--forest);
  box-shadow: inset 0 0 0 2px var(--forest);
}
.btn--outline:hover { background: rgb(30 74 52 / 0.06); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 0.95rem; }

/* ---------- 4. Header + mobile menu ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);   /* reserves space before main.js fills it, so nothing jumps */
}
/* The paper background sits on its own layer so it can fade out (opacity) while the header
   floats over the home page's photo hero, and fade back in once content scrolls under it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  transition: opacity 0.3s;
}
/* Shadow appears once the page scrolls; faded with opacity on a pseudo-element for smoothness. */
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: 0 1px 0 rgb(30 74 52 / 0.12), 0 8px 24px -18px rgb(30 74 52 / 0.5);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.site-header.is-scrolled::after { opacity: 1; }

/* Home page, top of the page: the header floats over the hero photos in white.
   main.js adds .is-scrolled once the page content reaches the header; an open phone menu
   always gets the solid paper header so its links sit on a calm background. */
.page-home:not(.menu-open) .site-header:not(.is-scrolled) { --focus: #fff; }
.page-home:not(.menu-open) .site-header:not(.is-scrolled)::before { opacity: 0; }
.page-home:not(.menu-open) .site-header:not(.is-scrolled) :is(.brand, .site-nav a, .menu-toggle) {
  color: #fff;
  text-shadow: 0 1px 14px rgb(0 0 0 / 0.35); /* extra insurance on bright skies */
}
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .brand__full { border-left-color: rgb(255 255 255 / 0.55); }
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .site-nav a::after { background: #fff; }
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .menu-toggle:hover { background: rgb(255 255 255 / 0.14); }
/* Staff Login is an outline button: white like the nav while over the photos. */
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .staff-login { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .staff-login:hover { background: rgb(255 255 255 / 0.12); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--forest);
  text-decoration: none;
  margin-right: auto;
}
/* Turtle mark: height sets the size, width follows the image (both files share one canvas,
   so swapping them never nudges the name beside them). Colour turtle by default; the
   white-flipper one where the background is dark: over the hero photos and in the footer. */
.brand__mark { height: 44px; width: auto; flex: none; }
.brand__mark--reversed { display: none; }
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .brand__mark--colour,
.site-footer .brand__mark--colour { display: none; }
.page-home:not(.menu-open) .site-header:not(.is-scrolled) .brand__mark--reversed,
.site-footer .brand__mark--reversed { display: block; }
.brand__short {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.01em;
}
.brand__full {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 9.5rem;       /* wraps "Solomon Rise & / Care Association" onto two tidy lines */
  padding-left: 10px;
  border-left: 1.5px solid rgb(30 74 52 / 0.35);
}

.site-nav ul { display: flex; gap: clamp(14px, 1.5vw, 28px); }
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
}
/* Underline grows from the left on hover (scaleX), and stays for the current page. */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--forest);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--forest); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font: 700 0.95rem/1 var(--font-body);
  cursor: pointer;
}
.menu-toggle:hover { background: rgb(30 74 52 / 0.08); }
.menu-toggle__icon { position: relative; width: 20px; height: 2px; background: currentColor; }
.menu-toggle__icon::before, .menu-toggle__icon::after {
  content: "";
  position: absolute; left: 0;
  width: 20px; height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}
.menu-toggle__icon::before { transform: translateY(-6px); }
.menu-toggle__icon::after { transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  overflow-y: auto;
  overscroll-behavior: contain;  /* scrolling the menu never scrolls the page underneath */
  background: var(--paper);
  padding: 24px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.3s var(--ease-out);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu ul { display: grid; }
.mobile-menu li + li { border-top: 1px solid rgb(30 74 52 / 0.15); }
.mobile-menu a:not(.btn) {
  display: block;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--forest);
  text-decoration: none;
}
.mobile-menu .btn { align-self: stretch; }

/* Home page bar: the height of the Squarespace bar it is modelled on (80px on wide screens,
   72px on smaller laptops; phones keep their size). See-through over the hero photo, then a
   forest green (the footer and results band colour) once the page scrolls past the hero
   (main.js adds .is-dark there instead of .is-scrolled, so the white logo, links and Staff Login
   outline stay), and beige again while it's over one of those green sections. An open phone
   menu still gets the paper header. */
.page-home { --header-h: 80px; }
@media (max-width: 1279px) { .page-home { --header-h: 72px; } }
@media (max-width: 1199px) { .page-home { --header-h: 66px; } }
.page-home .site-header::before { background: var(--forest); transition: opacity 0.3s, background-color 0.3s; }
/* Over a green section (main.js adds .is-scrolled there): the beige bar with dark text, so the bar
   stands apart from the green below it. The colours ease across instead of snapping. */
.page-home .site-header.is-scrolled::before { background: var(--paper); }
.page-home .site-header :is(.brand, .site-nav a, .menu-toggle) { transition: color 0.3s; }
.page-home .site-header .staff-login { transition: transform 0.25s var(--ease-out), color 0.3s, box-shadow 0.3s, background-color 0.3s; }
.page-home:not(.menu-open) .site-header.is-dark::before { opacity: 1; }
.page-home:not(.menu-open) .site-header.is-dark :is(.brand, .site-nav a, .menu-toggle) { text-shadow: none; }
.page-home.menu-open .site-header::before { background: var(--paper); }

/* Narrower than 1200px: the seven links no longer fit, so they move into the menu. */
@media (max-width: 1199px) {
  .site-nav,
  .site-header__inner .staff-login { display: none; }   /* Staff Login moves into the menu too */
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1200px) {
  .mobile-menu { display: none !important; }
}
/* Between 1200 and 1359px space is tight: drop the long name, the mark + SR&C still identify us. */
@media (min-width: 1200px) and (max-width: 1359px) {
  .brand__full { display: none; }
}
/* Below 600px the long name would run into the Get Involved button, so only SR&C shows. */
@media (max-width: 599px) {
  .site-header .brand__full { display: none; }
}
@media (max-width: 479px) {
  .brand { gap: 6px; }
  .brand__full { display: none; }
  .brand__mark { height: 32px; }
  .brand__short { font-size: 1.4rem; }
  .site-header__inner { gap: 8px; }
  .site-header__inner .btn--small { padding: 0 14px; font-size: 0.875rem; } /* "Get Involved" is a long label */
  .menu-toggle { padding: 0 10px; }
}
/* Narrow phones: no room for the name beside Get Involved and Menu, so the turtle stands alone
   (the link's aria-label still gives screen readers the full name). */
@media (max-width: 389px) {
  .brand__short { display: none; }
}

/* ---------- 5a. Home hero: "Slow tide" ----------
   Full-screen photos crossfade with a slow zoom; headline and buttons sit bottom-left
   on a dark gradient so white text passes contrast whatever the photo. */
.hero {
  position: relative;
  isolation: isolate;               /* keeps the hero's layers (photos, scrim, shade) in their own stack */
  display: flex;
  align-items: flex-end;
  min-height: 90svh;                /* 90% of the screen (measured without a phone's address bar), so the
                                       next section peeks in at the bottom: there is more below */
  margin-top: calc(var(--header-h) * -1);  /* slides under the floating header */
  padding-top: var(--header-h);
  padding-bottom: clamp(44px, 7vw, 96px);
  background: #101713;              /* near-black green: shows while the first photo loads, and as the photo recedes on scroll */
  color: #fff;
  overflow: hidden;
  --focus: #fff;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;    /* the crossfade */
}
.hero__slide.is-active { opacity: 1; }
/* Three gradients: top (header legibility), bottom (headline + buttons), left (long headline lines). */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgb(10 18 14 / 0.72) 0%, rgb(10 18 14 / 0.3) 14%, rgb(10 18 14 / 0) 30%),
    linear-gradient(to top, rgb(10 18 14 / 0.92) 0%, rgb(10 18 14 / 0.72) 40%, rgb(10 18 14 / 0) 76%),
    linear-gradient(to right, rgb(10 18 14 / 0.5) 0%, rgb(10 18 14 / 0) 62%);
}
.hero__inner { position: relative; z-index: 2; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-hero);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: #fff;
  max-width: 13ch;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.25);
  margin-bottom: clamp(24px, 2.8vw, 40px);
}
.hero__word { display: inline-block; } /* each word is its own box so it can rise in on its own */

/* White outline button for use on photos. */
.btn--light { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.btn--light:hover { background: rgb(255 255 255 / 0.12); }

/* Slideshow controls: progress dashes + pause button, lined up with the buttons on the right. */
.hero__controls {
  position: absolute;
  z-index: 2;
  right: max(var(--gutter), calc((100% - 1280px) / 2));  /* the container's right edge */
  bottom: calc(clamp(44px, 7vw, 96px) + 4px);
  display: flex;
  align-items: center;
  gap: 18px;
}
.hero__controls[hidden] { display: none; }
.hero__dots { display: flex; gap: 8px; }
/* Each dash fills from left to right while its photo is showing: a quiet timer. */
.hero__dot {
  position: relative;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  background: rgb(255 255 255 / 0.35);
}
.hero__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}
.hero__dot.is-active::after { animation: dash-fill var(--slide-interval, 6000ms) linear forwards; }
.hero__pause {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(255 255 255 / 0.75);
  border-radius: 50%;
  background: rgb(10 18 14 / 0.3);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}
.hero__pause:hover { transform: scale(1.06); }
/* Pause icon = two bars (side borders); playing state switches to a play triangle. */
.hero__pause-icon { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.hero.is-paused .hero__pause-icon {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent currentColor;
}

@media (max-width: 699px) {
  /* Phones: controls move to the top-right so they don't crowd the full-width buttons. */
  .hero__controls { top: calc(var(--header-h) + 10px); bottom: auto; gap: 12px; }
  .hero__dot { width: 20px; }
  .hero .btn-row .btn { flex: 1 1 auto; }
}

/* ---------- 5a-2. Island window (used by the coming-soon page) ----------
   A photo clipped to a soft, made-up island shape inside a dotted "reef" ring. */
.hero__visual {
  position: relative;
  aspect-ratio: 1.18 / 1;
}
.hero__island {
  position: absolute;
  inset: 4%;
  clip-path: url(#island-shape);
  background: var(--sand);       /* placeholder colour while the photo loads */
  overflow: hidden;
}
.hero__island img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hero__ring path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.5;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
  opacity: 0.75;
}

/* ---------- 5b. Pillars ---------- */
/* The first section inside the sliding sheet needs a little less top space than a normal section. */
.page-over > .section:first-child { padding-top: clamp(56px, 7vw, 112px); }
.pillars__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
/* The middle card sits lower: a gentle stagger so three equal cards don't read as a template row. */
@media (min-width: 900px) {
  .pillars__list > :nth-child(2) { margin-top: clamp(40px, 6vw, 88px); }
}
.pillar__link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease-out);
}
.pillar__photo {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sand);
}
.pillar__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.pillar__title {
  margin: 22px 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--forest);
}
.pillar__line { max-width: 30ch; color: var(--ink-soft); }
.pillar__more {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  color: var(--forest);
}
/* Text links with a sliding underline (the Squarespace touch): the line is drawn as a background,
   so on hover it can slide out to the right and back in from the left, at the shared speed. */
.pillar__more,
.help-card__more {
  padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}
.motion-ok :is(.pillar__link, .help-card__link):hover :is(.pillar__more, .help-card__more) {
  animation: underline-swap calc(var(--dur-quick) * 2) var(--ease-out);
}
/* --line is each link's own line thickness, so the animation ends exactly where it started. */
@keyframes underline-swap {
  0%   { background-position: 100% 100%; background-size: 100% var(--line, 2px); }
  50%  { background-position: 100% 100%; background-size: 0 var(--line, 2px); }
  50.1% { background-position: 0 100%; background-size: 0 var(--line, 2px); }
  100% { background-position: 0 100%; background-size: 100% var(--line, 2px); }
}
.pillar__link:hover { transform: translateY(-4px); }
.pillar__link:hover .pillar__photo img { transform: scale(1.05); }

/* Phones: a swipeable row instead of three very tall stacked cards. The next card peeks in to show there is more. */
@media (max-width: 699px) {
  .pillars__list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .pillars__list::-webkit-scrollbar { display: none; }
  .pillar { flex: 0 0 80%; scroll-snap-align: start; }
}

/* Pinned photo story (main.js setUpPillarStory; wide screens with motion allowed only).
   Copies the Squarespace section it is modelled on, measured at 1440px wide: 40px page margins
   (24px below 1280px), four steps of exactly one screen each below the header, text column
   ~40% wide on the left, and on the right a 4:3 photo (~49% wide, 660px at 1440) with 8px
   corners, pinned and centred in the space under the header. Spacing as the reference (24px
   heading-to-text, 40px text-to-link); text sizes 20% larger than it (48px heading, 18px text,
   ~17px uppercase link with an arrow), and the "What We Do" title 35% larger than the site's
   section titles. Each step's text is one fixed-width block centred between the left edge and
   the photo. */
.pillars.has-story { padding-block: 0; }   /* the steps provide their own space */
.pillars__list[hidden], .wwd[hidden] { display: none; }
.wwd {
  display: grid;
  grid-template-columns: minmax(0, 543fr) minmax(0, 142fr) minmax(0, 660fr);
  padding-inline: 40px;
}
@media (max-width: 1279px) { .wwd { padding-inline: 24px; } }
.wwd__steps { grid-column: 1 / 3; list-style: none; padding: 0; }   /* text area runs up to the photo */
.wwd__step {
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;                 /* the text block sits midway between the left edge and the photo */
  opacity: 0.3;                        /* steps not beside their photo step back */
  transition: opacity var(--dur-quick) var(--ease-out);
}
.wwd__step.is-active { opacity: 1; }
.wwd .section-head,
.wwd__content { width: min(100%, 32rem); margin: 0; }
.wwd .section-title { font-size: calc(var(--step-3) * 1.35); }
.wwd .section-intro,
.wwd__line {
  margin-top: 24px;
  max-width: none;
  font-size: 18px;
  line-height: 25px;
  font-weight: 500;
  color: var(--ink-soft);
}
.wwd__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--forest);
}
.wwd__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding-bottom: 6px;
  --line: 1.5px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% var(--line) no-repeat;
  font-size: 17px;
  line-height: 17px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--forest);
}
.wwd__arrow { transition: transform var(--dur-quick) var(--ease-out); }
.wwd__link:hover .wwd__arrow { transform: translateX(4px); }
.motion-ok .wwd__link:hover { animation: underline-swap calc(var(--dur-quick) * 2) var(--ease-out); }
/* The photo column runs the full height of the steps; inside it, a screen-tall box stays pinned
   under the header and centres the photo in it. */
.wwd__media { grid-column: 3; }
.wwd__sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}
.wwd__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sand);             /* shows while a photo loads */
}
/* All four photos are stacked in the frame; the current one fades in and settles from a slight zoom. */
.wwd__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s var(--ease-out), transform 1.4s var(--ease-out);
}
.wwd__img.is-active { opacity: 1; transform: none; }

/* ---------- 5c. Results ---------- */
.results {
  background: var(--forest);
  color: var(--paper);
  --focus: var(--ochre);
}
.results .section-title { color: var(--paper); }
.results .section-intro { color: var(--paper-soft); }

.results__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
}
.result {
  padding-top: 22px;
  border-top: 2px solid rgb(214 162 74 / 0.55); /* ochre rule ties each number to its label */
}
.result__number {
  display: grid;               /* the final and counting numbers sit on top of each other */
  font-family: var(--font-display);
  font-size: clamp(3rem, 1.6rem + 3.6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ochre);
  font-variant-numeric: tabular-nums lining-nums;
}
.result__final, .result__count { grid-area: 1 / 1; }
/* While counting, the real number stays in the DOM (for screen readers and to hold the width) but is invisible. */
.result.is-counting .result__final { color: transparent; }
.result:not(.is-counting) .result__count { display: none; }
.result__label {
  margin-top: 14px;
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
}
.result__asof {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--paper-soft);
}

@media (max-width: 899px) {
  .results__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}

/* ---------- 5d. Featured story ----------
   A full-width photo the same size as the hero (edge to edge, 90% of the screen tall), with the
   heading, text and button over its top-right corner. A dark shade fades in from that corner so
   the white text passes contrast on any photo; the rest of the photo stays clear. */
.story {
  position: relative;
  min-height: 90svh;
  display: flex;
  color: #fff;
  --focus: #fff;
}
.story__photo { position: absolute; inset: 0; background: var(--forest); }
.story__photo img { width: 100%; height: 100%; object-fit: cover; }
.story__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom left, rgb(10 18 14 / 0.82) 0%, rgb(10 18 14 / 0.55) 30%, rgb(10 18 14 / 0) 62%),
    linear-gradient(to bottom, rgb(10 18 14 / 0.35), rgb(10 18 14 / 0) 40%);
}
.story__inner {
  position: relative;               /* above the photo and its shade */
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-block: clamp(40px, 7vw, 96px);
}
.story__quote { max-width: 30rem; }
.story .section-title {
  font-size: var(--step-feature);
  line-height: 1.08;
  color: #fff;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.25);
}
.story .section-intro {
  margin-top: 16px;
  font-size: var(--text-feature);
  line-height: 1.55;
  max-width: 40ch;
  color: rgb(255 255 255 / 0.92);
}
.story__quote .btn { margin-top: 24px; }

/* Phones: the text spans the top of the photo, so the shade covers the whole top instead of one corner. */
@media (max-width: 699px) {
  .story__photo::after {
    background: linear-gradient(to bottom, rgb(10 18 14 / 0.85) 0%, rgb(10 18 14 / 0.6) 45%, rgb(10 18 14 / 0) 75%);
  }
}

/* ---------- 5e. How you can help ---------- */
.help { background: var(--sand); }
.help__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}
.help-card { display: flex; min-width: 0; } /* lets every card stretch to the tallest one */
.help-card__link {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s var(--ease-out);
}
.help-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 22px 40px -26px rgb(30 74 52 / 0.55);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}
.help-card__link:hover { transform: translateY(-4px); }
.help-card__link:hover::after { opacity: 1; }
.help-card__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--forest);
}
.help-card__icon svg { width: 26px; height: 26px; }
.help-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.1;
  color: var(--forest);
}
.help-card__line { margin-top: 10px; color: var(--ink-soft); flex: 1; }
.help-card__more {
  margin-top: 24px;
  font-weight: 700;
  color: var(--forest);
}
/* Donors are the main audience: their card carries the strongest colour on the section. */
.help-card--featured .help-card__link { background: var(--forest); color: var(--paper); --focus: var(--forest); }
.help-card--featured .help-card__title, .help-card--featured .help-card__more { color: var(--paper); }
.help-card--featured .help-card__line { color: var(--paper-soft); }
.help-card--featured .help-card__icon { background: var(--ochre); color: var(--forest); }

@media (max-width: 899px) {
  .help__list { grid-template-columns: 1fr; }
  .help-card__icon { margin-bottom: 20px; }
}

/* ---------- 5f. Partners ---------- */
.partners { padding-block: clamp(56px, 7vw, 96px); }
.partners__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: baseline;
}
.partners__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.partners__list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 3.4vw, 56px);
}
.partner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.45rem);
  color: var(--ink-soft);
}
/* Small moss wave before each name: stands in for each partner's logo until real ones arrive. */
.partner::before {
  content: "";
  width: 18px; height: 8px;
  flex: none;
  background: var(--moss);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 8'%3E%3Cpath d='M0 4c3-3 6-3 9 0s6 3 9 0v4H0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 8'%3E%3Cpath d='M0 4c3-3 6-3 9 0s6 3 9 0v4H0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 699px) {
  .partners__inner { grid-template-columns: 1fr; }
}

/* ---------- 6. Footer ---------- */
.site-footer {
  background: var(--forest);
  color: var(--paper);
  --focus: var(--ochre);
  padding-block: clamp(56px, 7vw, 96px) 32px;
}
.site-footer a { color: var(--paper); text-underline-offset: 4px; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(36px, 5vw, 80px);
}
.footer__brand .brand { color: var(--paper); margin: 0; }
.footer__brand .brand__full { border-left-color: rgb(247 241 229 / 0.4); display: block; }
.footer__mission { margin-top: 20px; max-width: 30ch; color: var(--paper-soft); }
.footer__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.footer__contact p { line-height: 1.5; }
.footer__contact-name { font-weight: 700; }
.footer__contact-title { color: var(--paper-soft); }
.footer__contact a { display: inline-block; margin-top: 10px; font-weight: 600; }
.footer__nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 10px 40px;
}
.footer__nav a { text-decoration: none; font-weight: 500; }
.footer__nav a:hover { text-decoration: underline; }
.footer__bottom {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid rgb(247 241 229 / 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-size: 0.9rem;
  color: var(--paper-soft);
}
.footer__bottom p:first-child { color: var(--paper); font-weight: 600; margin-right: auto; }

@media (max-width: 899px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 559px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
}

/* ---------- 7. Public pages ---------- */
/* Plain page heading on the paper background: title + intro, no banner or photo. */
.page-intro {
  padding-top: clamp(40px, 7vw, 88px);
}

.page-intro h1 {
  color: var(--forest);
  font: 400 clamp(2.6rem, 6vw, 4.75rem)/1.06 var(--font-display);
}

.page-intro p {
  margin-top: 16px;
  max-width: 60ch;
  font-size: var(--step-1);
  color: var(--ink-soft);
}

.info-page__body {
  display: grid;
  justify-items: start;
  gap: 32px;
  padding-block: clamp(36px, 6vw, 80px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
  width: 100%;
}

.info-card {
  width: 100%;
  padding: clamp(22px, 4vw, 42px);
  background: var(--sand);
  border-radius: var(--radius-md);
}

.info-card h2 {
  color: var(--forest);
  font: 400 var(--step-2)/1.2 var(--font-display);
}

.info-card p, .info-card address { margin-top: 14px; }
.info-card address { font-style: normal; }
.info-card address p + p { margin-top: 8px; }
.info-card p { max-width: 68ch; }
.info-card > a { display: inline-block; margin-top: 18px; font-weight: 700; }
.info-card .info-card__status { margin: 0 0 8px; font-weight: 700; color: var(--forest); }

.info-page .btn, .story__quote .btn {
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  padding-block: 10px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 28px;
  width: 100%;
}

.map-panel iframe:not([hidden]) {
  display: block;
  width: 100%;
  height: clamp(320px, 50vw, 540px);
  border: 1px solid var(--sand);
  border-radius: var(--radius-md);
  background: var(--sand);
}

.map-panel .btn { margin-bottom: 12px; }
.map-panel > a { display: inline-block; margin-top: 10px; }
.map-layout .map-locations { margin-top: 18px; }
.map-locations li { border-top: 1px solid var(--sand); padding-block: 14px; }
.map-locations a[aria-current] { color: var(--forest); font-weight: 800; }

/* Impact map (Leaflet, drawn by public-page.js). Same box the old map iframe used. */
.impact-map {
  position: relative;
  z-index: 0; /* keeps Leaflet's layers under the site header and its menus */
  height: clamp(320px, 50vw, 540px);
  border: 1px solid var(--sand);
  border-radius: var(--radius-md);
  background: var(--sand);
  overflow: hidden;
}
.impact-map__loading { display: grid; place-items: center; height: 100%; margin: 0; padding: 20px; text-align: center; color: var(--ink-soft); }
.impact-map__overview { margin-top: 12px; }
.impact-map__overview[hidden] { display: none; } /* .btn sets display, which would override hidden */
.map-projects { display: grid; gap: 10px; margin-top: 8px; }
.map-projects li { display: grid; gap: 2px; }
.map-projects__name { font-weight: 700; }
.map-projects__meta { font-size: 0.9375rem; }
.map-projects__when { font-size: 0.875rem; color: var(--ink-soft); }
.map-popup { display: grid; gap: 2px; font: inherit; }
.map-popup strong:not(:first-child) { margin-top: 8px; }
.map-popup__muted { color: var(--ink-soft); }

.inquiry { max-width: 760px; }
.inquiry form:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.inquiry label { display: grid; gap: 6px; font-weight: 700; }
.inquiry :is(input, select, textarea) {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--moss);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.inquiry .inquiry__consent {
  display: flex;
  align-items: start;
}
.inquiry input[type="checkbox"] {
  width: 1.25rem;
  min-height: 0;
  height: 1.25rem;
  flex: 0 0 auto;
  accent-color: var(--forest);
}
.project-list { padding-inline-start: 22px; }

.inquiry textarea { resize: vertical; }
.inquiry__wide { grid-column: 1 / -1; }
.inquiry button { justify-self: start; }

@media (max-width: 700px) {
  .map-layout, .inquiry form:not([hidden]) { grid-template-columns: 1fr; }
}

/* ---------- 7b. Our Work (hub + pillar pages) ----------
   Mobile-first: everything is one column on a phone and only spreads out on wider screens.
   The page body is a grid that hugs its content (justify-items: start), so each Our Work
   block asks for the full width. */
/* min-width: 0 lets a block shrink below its content's width; without it the sideways-scrolling
   pillar switcher stretches the whole grid column and the page scrolls sideways on a phone. */
.ow-switcher, .ow-results, .ow-section, .ow-band { width: 100%; min-width: 0; }
.ow-section .section-title { margin-bottom: 24px; }
.ow-section + .ow-section { margin-top: clamp(16px, 3vw, 40px); }

/* Pillar switcher: a row of pills that scrolls sideways on a narrow phone instead of wrapping. */
.ow-switcher ul {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.ow-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                 /* comfortable tap target */
  padding: 0 18px;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 700;
  color: var(--forest);
  box-shadow: inset 0 0 0 2px rgb(30 74 52 / 0.25);
}
.ow-switcher a:hover { background: rgb(30 74 52 / 0.06); }
.ow-switcher a[aria-current="page"] { background: var(--forest); color: var(--paper); box-shadow: none; }

/* Results band: same look as the home page's results (ochre figures on forest), without the count-up. */
.ow-results {
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-md);
  background: var(--forest);
  color: var(--paper);
  --focus: var(--ochre);
}
.ow-results__title { font: 400 var(--step-2)/1.2 var(--font-display); }
.ow-results__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px clamp(24px, 3vw, 48px);
  margin-top: 20px;
}
.ow-results__list li { padding-top: 18px; border-top: 2px solid rgb(214 162 74 / 0.55); }
.ow-results__number {
  display: block;
  font: 400 clamp(2.6rem, 1.6rem + 3vw, 4.5rem)/1 var(--font-display);
  color: var(--ochre);                /* large text: 4.4:1 on forest passes AA for large type */
  font-variant-numeric: tabular-nums lining-nums;
}
.ow-results__label { display: block; margin-top: 10px; font-weight: 600; line-height: 1.3; }
.ow-results .ow-asof { margin-top: 20px; color: var(--paper-soft); }
.ow-results__note { margin-top: 14px; max-width: 60ch; font-size: var(--step-1); color: var(--paper-soft); }
.ow-asof { font-size: 0.9rem; color: var(--ink-soft); }

/* Hub rows: photo (or headline figure) beside the text; alternating sides on wide screens. */
.ow-rows { display: grid; gap: clamp(36px, 6vw, 72px); }
.ow-row { display: grid; gap: 20px; align-items: center; }
.ow-row__visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.ow-row__stat {
  display: grid;
  gap: 6px;
  align-content: center;
  aspect-ratio: 4 / 3;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: var(--paper);
  font-size: var(--step-1);
  font-weight: 600;
}
.ow-row__stat .ow-row__number { font: 400 clamp(3rem, 2rem + 4vw, 5.5rem)/1 var(--font-display); color: var(--ochre); }
.ow-row__stat .ow-asof { color: var(--paper-soft); font-weight: 400; }
.ow-row__text h3 { font: 400 var(--step-2)/1.2 var(--font-display); color: var(--forest); }
.ow-row__text > p { margin-top: 12px; max-width: 52ch; }
.ow-row__text .btn { margin-top: 20px; }
.ow-figure { color: var(--forest); }
.ow-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ow-tags li { padding: 6px 12px; border-radius: 999px; background: var(--sand); font-size: 0.9rem; font-weight: 600; }
@media (min-width: 900px) {
  .ow-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
  .ow-row:nth-child(even) .ow-row__visual { order: 2; }
}

/* How we work: numbered steps, so the order of the process is clear without relying on layout. */
.ow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 20px;
  padding: 0;
  list-style: none;       /* the numbered circle below replaces the browser's "1." marker */
  counter-reset: step;
}
.ow-steps li {
  counter-increment: step;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--sand);
}
.ow-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  font-weight: 700;
}
.ow-steps h3 { font: 400 1.3rem/1.25 var(--font-display); color: var(--forest); }
.ow-steps p { margin-top: 8px; }
.ow-more { margin-top: 20px; font-weight: 700; }

/* Goals: grouped lists (Basic Needs has three areas; the others have one). */
.ow-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.ow-goals__group { padding: clamp(22px, 4vw, 32px); border-radius: var(--radius-md); background: var(--sand); }
.ow-goals__group h3 { margin-bottom: 12px; font: 400 1.3rem/1.25 var(--font-display); color: var(--forest); }
.ow-goals ul { display: grid; gap: 10px; padding-inline-start: 22px; }
.ow-goals li::marker { color: var(--moss); }

/* Project cards: the status is printed as a word; Active gets a filled badge, planned an outline. */
.ow-projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.ow-project {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgb(30 74 52 / 0.2);
}
.ow-project h3 { font: 400 1.4rem/1.2 var(--font-display); color: var(--forest); }
.ow-project a { margin-top: 6px; font-weight: 700; }
.ow-project__place { font-size: 0.95rem; color: var(--ink-soft); }
.ow-status {
  justify-self: start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest);
  box-shadow: inset 0 0 0 2px var(--forest);
}
.ow-status--active { background: var(--forest); color: var(--paper); }

/* From the field: before/after pair, then a photo grid. */
.ow-pair { display: grid; gap: 16px; margin-bottom: 32px; }
.ow-pair h3 { font: 400 var(--step-2)/1.2 var(--font-display); color: var(--forest); }
.ow-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.ow-section figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--sand);              /* placeholder colour while a lazy photo loads */
}
.ow-section figcaption { margin-top: 8px; font-size: 0.95rem; color: var(--ink-soft); }
@media (min-width: 700px) {
  .ow-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ow-pair h3 { grid-column: 1 / -1; }
}

.ow-stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 20px; }

/* Closing band: who funds this pillar, then the next step. */
.ow-band { padding: clamp(24px, 5vw, 48px); border-radius: var(--radius-md); background: var(--sand); }
.ow-band > p { max-width: 65ch; }
.ow-funded { margin-bottom: 20px; max-width: 70ch; }
.ow-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.ow-cta .ow-actions { margin-top: 0; }

/* ---------- 8. Motion ----------
   Everything below only runs when main.js has added .motion-ok to <html>,
   which it does only if the visitor has NOT turned on "reduce motion".
   Without JS, or with reduced motion, every element simply shows in place.
   Only transform and opacity are animated: they don't trigger layout, so they stay smooth. */

/* Hero: the one dramatic entrance. Words rise in one by one as white outlines, then fill with
   white like rising water: a wave-edged fill (an inline SVG, white below a wavy line, clear
   above) is clipped to the letters, slides up through them and rolls sideways as it rises
   (the Conservation International effect, with a wave). The image is twice the word's height
   and its wave sits at the middle, so at the end only its solid white half shows and the words
   look exactly like the still version. These are the aria-hidden visual words; screen readers
   read the plain sentence beside them. */
.motion-ok .hero__word {
  opacity: 0;
  transform: translateY(0.45em);
  /* The fill only paints inside the word's box, and with the headline's tight line height the
     tails of g/j/p/q/y, accents and the curl of f reach outside it. So the box is enlarged on every
     side (padding) and pulled back by the same amount (negative margin): the fill covers every
     letter, whatever the headline says, and the words sit exactly where they did. */
  padding: 0.35em 0.15em;
  margin: -0.35em -0.15em;
  color: transparent;
  -webkit-text-stroke: 1px #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 200' preserveAspectRatio='none'%3E%3Cpath d='M0 100 C 12 92 38 92 50 100 S 88 108 100 100 V200 H0 Z' fill='%23fff'/%3E%3C/svg%3E");
  background-size: 1.6em 200%;
  background-repeat: repeat-x;
  background-position: 0 0;
  -webkit-background-clip: text;
          background-clip: text;
  text-shadow: none; /* a shadow would be painted over the clipped fill; the title's drop-shadow replaces it */
  /* The fill is deliberately unhurried (2.52 s per word, one word starting every 0.168 s). */
  animation:
    rise-in 0.9s var(--ease-out) forwards,
    wave-fill 2.52s cubic-bezier(0.45, 0, 0.3, 1) forwards;
  animation-delay:
    calc(0.15s + var(--i, 0) * 0.09s),
    calc(1s + var(--i, 0) * 0.168s);
}
/* Soft shadow behind the words (instead of text-shadow, which doesn't mix with clipped fills). */
.motion-ok .hero__title > [aria-hidden] { filter: drop-shadow(0 2px 22px rgb(0 0 0 / 0.25)); }
.motion-ok .hero .btn-row {
  opacity: 0;
  animation: fade-up 0.9s var(--ease-out) 0.85s forwards;
}
/* Slow zoom on the photo that's showing. The outgoing photo keeps zooming (.is-leaving)
   while it fades, so it never snaps back mid-crossfade. */
.motion-ok .hero__slide.is-active,
.motion-ok .hero__slide.is-leaving { animation: slow-zoom 9s ease-out forwards; }
/* Pause button, or hero fully covered by the page: freeze the zoom and the progress dash. */
.motion-ok .hero.is-paused .hero__slide,
.motion-ok .hero.is-paused .hero__dot::after,
.motion-ok .hero.is-covered .hero__slide,
.motion-ok .hero.is-covered .hero__dot::after { animation-play-state: paused; }

/* Coming-soon page: the island window opens and its photo settles. */
.motion-ok .hero__island {
  opacity: 0;
  transform: scale(0.94);
  animation: open-window 1.4s var(--ease-out) 0.1s forwards;
}
.motion-ok .hero__island img { animation: settle 4.6s var(--ease-out) 0.1s both; }
.motion-ok .hero__ring {
  opacity: 0;
  transform: scale(1.04);
  animation: open-window 1.6s var(--ease-out) 0.5s forwards;
}

@keyframes rise-in { to { opacity: 1; transform: none; } }
/* Up through the letters while the wave rolls 3 wavelengths sideways. */
@keyframes wave-fill { to { background-position: -4.8em 100%; } }
@keyframes fade-up { from { transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes open-window { to { opacity: 1; transform: none; } }
/* The photo eases from a slight zoom to rest, then stays still. Under 5 seconds on purpose:
   motion that keeps going beside other content would need a pause button (WCAG 2.2.2). */
@keyframes settle { from { transform: scale(1.12); } to { transform: none; } }
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
@keyframes dash-fill { to { transform: scaleX(1); } }

/* Everywhere else: a quiet fade-and-rise as sections scroll into view. --i staggers items in a list. */
.motion-ok .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.09s);
}
.motion-ok .reveal.is-visible { opacity: 1; transform: none; }
/* Cards keep their hover lift after revealing: the reveal transform lives on the <li>, the lift on the link inside. */

/* ---------- 8b. Hero pinned behind a sliding sheet ----------
   The hero stays put while the rest of the page (.page-over) scrolls up over it like a sheet
   of paper. As the sheet rises, the hero sinks back: it shrinks a touch, fades, and a shade
   layer turns it dark and almost black-and-white, so attention moves to the new content.

   main.js writes the scroll progress into --p (0 = hero fully visible, 1 = fully covered).
   Only opacity and transform change per frame. The grey-and-dark look comes from a fixed
   backdrop-filter on the shade, faded in with opacity, so no filter is ever animated.
   Reduced motion / no JS: none of this applies and the hero scrolls away normally. */
.hero__shade { display: none; }

.motion-ok .hero {
  position: sticky;
  /* Pinned at the very top (the header floats over it). If the hero is ever taller than the
     screen, main.js sets a negative top so it pins by its bottom edge and its buttons are seen first. */
  top: var(--hero-top, 0px);
  z-index: 0;
}
/* As the sheet rises, the photos sink back a little into the dark... */
.motion-ok .hero__media {
  transform: scale(calc(1 - var(--p, 0) * 0.06));
  will-change: transform;
}
/* ...and the headline drifts up and fades. */
.motion-ok .hero__inner,
.motion-ok .hero__controls {
  transform: translateY(calc(var(--p, 0) * -24px));
  opacity: calc(1 - var(--p, 0) * 0.5);
  will-change: transform, opacity;
}
.motion-ok .hero__shade {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;                       /* above photos, text and controls */
  pointer-events: none;
  background: rgb(14 20 17 / 0.72);                 /* deep, slightly green-black: dark but still on-brand */
  -webkit-backdrop-filter: grayscale(1) contrast(1.08);
          backdrop-filter: grayscale(1) contrast(1.08); /* drains the colour from everything behind it */
  opacity: clamp(0, calc(var(--p, 0) * 1.6), 1);    /* full strength by ~60% covered, so it reads as black-and-white early */
  will-change: opacity;
}

.motion-ok .page-over {
  z-index: 1;                       /* above the pinned hero, below the sticky header */
  background: var(--paper);
  overflow-x: clip;                 /* nothing inside can cause sideways scrolling; not a scroll box, so sticky still works */
}

/* The page after the hero meets it with a straight edge. */
.page-over { position: relative; }

/* Belt and braces: if reduced motion is on, also stop hover transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.university-projects summary { cursor: pointer; font-weight: 700; margin-top: 1rem; }
.university-projects form label { font-weight: 600; }
.university-projects form .input {
  display: block;
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.625rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink-soft);
  border-radius: 0.375rem;
  font: inherit;
}
.university-projects form button { margin-top: 1rem; }
