/* =========================================================================
   Centre for Place-Based Giving — holding page
   Built from Figma "CPBG_Holding-site-for-developers" (desktop 1440 / mobile 375).
   Fluid values interpolate between the 375px and 1440px frames.
   ========================================================================= */

/* ---------- Design tokens (Figma variables) ---------- */
:root {
  --deep-teal: #004d5e;          /* colour/deep-teal  */
  --dark-teal: #1a3d49;          /* colour/dark-teal  */
  --teal: #4dacb6;               /* FT Teal           */
  --teal-40: rgba(77, 172, 182, 0.4);
  --orange: #ed572a;             /* colour/orange     */
  --orange-accessible: #d33f12;  /* colour/orange-accessible */
  --button-yellow: #fac722;      /* FT Yellow (buttons on light) */
  --yellow: #ffcf4e;             /* colour/yellow     */
  --off-white: #fbf6ef;          /* colour/off-white  */
  --gunmetal: #bed4dc;           /* colour/gunmetal   */
  --white: #fff;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type scale: mobile -> desktop */
  --fs-h1: clamp(2.375rem, 1.671rem + 3.005vw, 4.375rem);     /* 38 -> 70 */
  --fs-h2: clamp(2.125rem, 1.905rem + 0.939vw, 2.75rem);      /* 34 -> 44 */
  --fs-h3: clamp(1.6875rem, 1.489rem + 0.845vw, 2.25rem);     /* 27 -> 36 */
  --fs-h4: clamp(1.375rem, 1.243rem + 0.563vw, 1.75rem);      /* 22 -> 28 */
  --fs-stat: clamp(2.375rem, 1.759rem + 2.629vw, 4.125rem);   /* 38 -> 66 */
  --fs-lead: clamp(1.1875rem, 1.099rem + 0.376vw, 1.4375rem); /* 19 -> 23 */
  --fs-body: clamp(1.125rem, 1.081rem + 0.188vw, 1.25rem);    /* 18 -> 20 */
  --fs-small: clamp(1rem, 0.956rem + 0.188vw, 1.125rem);      /* 16 -> 18 */
  --fs-caps: clamp(0.875rem, 0.853rem + 0.094vw, 0.9375rem);  /* 14 -> 15 */
  --fs-button: clamp(0.9375rem, 0.871rem + 0.282vw, 1.125rem);/* 15 -> 18 */

  /* Spacing */
  --page-margin: clamp(1.25rem, 0.59rem + 2.817vw, 3.125rem);       /* 20 -> 50 */
  --section-pad: clamp(2.5rem, 0.739rem + 7.512vw, 7.5rem);         /* 40 -> 120 */
  --text-gap: clamp(0.75rem, 0.662rem + 0.376vw, 1rem);             /* 12 -> 16 */
  --para-gap: clamp(0.75rem, 0.574rem + 0.751vw, 1.25rem);          /* 12 -> 20 */
  --radius: 8px;

  --header-h: 96px;
  --max-w: 1440px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 1099.98px) {
  :root { --header-h: 75px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Safety net: nothing can widen the page sideways (clip, unlike hidden, keeps the sticky header working) */
html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--white);
  color: var(--dark-teal);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open { overflow: hidden; }

/* No grey box on tapped links/buttons in iOS Safari (each control has its own states) */
a, button { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles: orange on light backgrounds, yellow on dark */
:focus-visible {
  outline: 3px solid var(--orange-accessible);
  outline-offset: 3px;
  border-radius: 2px;
}
.stats-card :focus-visible,
.banner :focus-visible,
.contact :focus-visible {
  outline-color: var(--yellow);
}
/* After a tap or click, no ring: iOS Safari shows one when script moves focus
   (menu open/close). Keydown switches back, so keyboard users always see it. */
html[data-input="pointer"] :focus-visible { outline: none; }

.skip-link {
  position: absolute;
  top: 0;
  left: var(--page-margin);
  z-index: 200;
  padding: 12px 20px;
  background: var(--deep-teal);
  color: var(--white);
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  transform: translateY(-110%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

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

/* ---------- Typography ---------- */
.eyebrow {
  color: var(--orange-accessible);
  font-size: var(--fs-caps);
  font-weight: 600;
  line-height: 1.23;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow--yellow { color: var(--yellow); }

.h2 {
  color: var(--deep-teal);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.lead {
  color: var(--deep-teal);
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.4;
}

.body {
  font-size: var(--fs-body);
  line-height: 1.4;
}

.body-copy {
  color: var(--dark-teal);
  font-size: var(--fs-body);
  line-height: 1.4;
}
.body-copy p + p { margin-top: var(--para-gap); }
.body-copy__small { font-size: var(--fs-small); line-height: 1.32; }

.section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--text-gap);
  align-items: flex-start;
}
.section-heading .h2,
.section-heading .body { max-width: 900px; }
.section-heading .body { max-width: 848px; }
.section-heading--loose { gap: clamp(0.75rem, 0.574rem + 0.751vw, 1.25rem); } /* 12 -> 20 */

@media (max-width: 767.98px) {
  .h2 { line-height: 1.23; }
  .lead { font-weight: 400; }
  .body-copy__small { font-size: var(--fs-body); line-height: 1.4; }
}

/* ---------- Buttons (Figma "D_Button CPBG") ----------
   Hover/focus (Aine): deep teal fill and border, white text (9.45:1). No shadow, no lift. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--dark-teal);
  font-size: var(--fs-button);
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  /* Single line whenever it fits (buttons size to their content); wraps only
     when the label would otherwise overflow, e.g. with WCAG text spacing. */
  white-space: normal;
  /* Slow, smooth hover (Aine): text colour included so it fades with the background */
  transition: color 0.35s ease, background-color 0.35s ease, border-color 0.35s ease, opacity 0.35s ease;
}

.btn--primary { background: var(--button-yellow); }

.btn--outline {
  border-color: var(--teal);
  opacity: 0.8;
}

.btn--yellow { background: var(--yellow); }

.btn:focus-visible {
  background: var(--deep-teal);
  border-color: var(--deep-teal);
  color: var(--white);
  opacity: 1;
  box-shadow: none;
  transform: none;
}
/* Hover styles only where the device can really hover: iOS keeps :hover
   "stuck" on whatever was last tapped */
@media (hover: hover) {
  .btn:hover {
    background: var(--deep-teal);
    border-color: var(--deep-teal);
    color: var(--white);
    opacity: 1;
    box-shadow: none;
    transform: none;
  }
}

@media (max-width: 767.98px) {
  .btn { padding: 11px 16px; line-height: 1.32; }
}

/* ---------- Nav link (Figma "H_Nav link": Default / Hover) ---------- */
.nav-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-block: 6px;
  color: var(--deep-teal);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: "";
  width: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
  opacity: 0;
  transition: width 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-link:focus-visible { color: var(--orange-accessible); }
.nav-link:focus-visible::after {
  width: 100%;
  opacity: 1;
}
@media (hover: hover) {
  .nav-link:hover { color: var(--orange-accessible); }
  .nav-link:hover::after {
    width: 100%;
    opacity: 1;
  }
}

.nav-link--small {
  font-size: var(--fs-caps);
  font-weight: 500;
  line-height: 1.32;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  transition: box-shadow 0.25s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(0, 77, 94, 0.1), 0 6px 20px rgba(0, 77, 94, 0.06); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

/* Logo: mark + wordmark, 187 x 60 on desktop, 140 x 45 on mobile */
.logo {
  --logo-scale: 1;
  display: flex;
  align-items: flex-start;
  gap: calc(14.62px * var(--logo-scale));
  flex-shrink: 0;
  border-radius: 4px;
}
.logo__mark {
  width: calc(56.5274px * var(--logo-scale));
  height: auto;
  margin-top: calc(0.64px * var(--logo-scale));
}
.logo__wordmark {
  width: calc(115.849px * var(--logo-scale));
  height: auto;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 50px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-right: -9px;
  padding: 0;
  border: 0;
  border-radius: 40px;
  background: transparent;
  transition: background-color 0.2s var(--ease);
}
@media (hover: hover) {
  .menu-toggle:hover { background: var(--off-white); }
}

@media (max-width: 1099.98px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header__inner { padding-top: 5px; }
  .logo { --logo-scale: 0.7487; }
}

/* ---------- Mobile menu (Figma "Burger") ---------- */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0; /* longhands: inset needs Safari 14.1+ */
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 30px;
  overflow-y: auto;
  background: var(--white);
}
.mobile-menu__bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 75px;
  padding: 5px var(--page-margin) 0;
}
.menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-right: -9px;
  padding: 0;
  border: 0;
  border-radius: 40px;
  background: transparent;
  transition: background-color 0.2s var(--ease);
}
@media (hover: hover) {
  .menu-close:hover { background: var(--off-white); }
}
.menu-close img { width: 13.97px; height: 14.0296px; } /* exact Figma size; HTML attrs are rounded */

.mobile-menu__list li { border-bottom: 1px solid var(--orange); }
.mobile-menu__list a {
  display: block;
  padding: 18px var(--page-margin);
  color: var(--deep-teal);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.32;
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.25s var(--ease);
}
.mobile-menu__list a:focus-visible {
  color: var(--orange-accessible);
  padding-left: calc(var(--page-margin) + 6px);
}
@media (hover: hover) {
  .mobile-menu__list a:hover {
    color: var(--orange-accessible);
    padding-left: calc(var(--page-margin) + 6px);
  }
}
.mobile-menu__list a:focus-visible { outline-offset: -3px; }

/* Slides in from the right like Collaboration Circle's menu (transform 0.5s, CSS "ease"); script.js waits
   for the slide-out before hiding it */
.mobile-menu { -webkit-transform: translateX(100%); transform: translateX(100%); }
.mobile-menu.is-open { -webkit-transform: translateX(0); transform: translateX(0); }
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu { -webkit-transition: -webkit-transform 0.5s ease; transition: transform 0.5s ease; }
}

/* Side panel on wider screens (Collaboration Circle: max-width 540px, anchored
   right, 15% black overlay fading in over 0.5s). Full width below 540px. */
.mobile-menu {
  left: auto;
  width: 100%;
  max-width: 540px;
}
.menu-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.15);
  opacity: 0;
}
.menu-overlay.is-open { opacity: 1; }
/* At 540px and below the menu covers the whole screen, so the overlay has nothing to dim
   (and on iOS it could flash for a frame before the menu painted) */
@media (max-width: 540px) {
  .menu-overlay { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .menu-overlay { transition: opacity 0.5s ease; }
}

/* ---------- Carousel (shared) ---------- */
/* min-width: 0 stops the off-screen slides' min-content widening flex parents */
.carousel,
.carousel__viewport { min-width: 0; overflow: hidden; }
/* Browser keeps vertical page scrolling; horizontal swipes reach the carousel */
.carousel__viewport { touch-action: pan-y; }
.carousel__track {
  --gap: 0px;
  display: flex;
  gap: var(--gap);
  transform: translateX(calc(var(--index, 0) * -1 * (100% + var(--gap))));
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.carousel__track > * {
  flex: 0 0 100%;
  min-width: 0;
}

.carousel__controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.arrow-btn {
  position: relative;
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.arrow-btn::before {           /* enlarge hit area to 44px */
  content: "";
  position: absolute;
  inset: 0 -13px;
}
.arrow-btn img { width: 18.3848px; height: 37px; }
.arrow-btn--prev img { transform: rotate(180deg); }
@media (hover: hover) {
  .arrow-btn:hover { opacity: 0.75; transform: translateX(3px); }
  .arrow-btn--prev:hover { transform: translateX(-3px); }
}

.dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  position: relative;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.dot::before {                 /* invisible 24 x 24 tap target, centred on the dot */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
}
.dots--dark .dot { background: rgba(0, 77, 94, 0.4); }
@media (hover: hover) {
  .dot:hover { background: rgba(255, 255, 255, 0.7); }
  .dots--dark .dot:hover { background: rgba(0, 77, 94, 0.7); }
}
.dot[aria-current="true"],
.dots--dark .dot[aria-current="true"] {
  width: 24px;
  background: var(--yellow);
}

/* =========================================================================
   01 Hero / Top banner
   ========================================================================= */
.hero {
  background: var(--off-white);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 573px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-left: var(--page-margin);
  padding-bottom: 29px;
}
.hero__text {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 100px;
  color: var(--deep-teal);
}
.hero__text .eyebrow { margin-bottom: -8px; } /* 16px gap between eyebrow and title */
.hero__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.01em;
}
.hero__lead {
  max-width: 518px;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.4;
}
.hero__note {
  max-width: 518px;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.32;
}
.hero__actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

/* Collage: layers positioned in % of the Figma frame so it scales */
.hero-art {
  position: relative;
  overflow: hidden;
  /* Own background so the photos' darken blend is correct even while the
     reveal transition isolates this element. */
  background: var(--off-white);
}
.hero-art--desktop {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  max-width: 817px;
  aspect-ratio: 817 / 632;
  justify-self: end;
}
.hero-art--mobile,
.hero-art--tablet { display: none; }

.hero-art__layer {
  position: absolute;
  left: var(--l);
  top: var(--t);
  width: var(--w);
  height: var(--h);
}
.hero-art__layer img { position: absolute; max-width: none; }

/* Ribbons: native-proportion SVG centred in its bounding box, rotated (positions from
   Aine's v2 reference, CPBG_hero_with ribbons (1).jpg: both ribbons end inside the art) */
.hero-art__r1 img,
.hero-art__r3 img {
  left: 50%;
  top: 50%;
  width: var(--iw);
  height: var(--ih);
  transform: translate(-50%, -50%) rotate(var(--rot)) skewX(var(--skew));
}
/* Both ribbons blend with the photo as in the reference (tower shows through the
   magenta; red where they cross). The yellow sits under the darkened photo already. */
.hero-art__r3 { mix-blend-mode: darken; }

/* Photo collage (single image, CPBG_hero.jpg): its white background is
   blended away (mix-blend: darken), as the Figma photo layers were.
   Stacking as in Figma: yellow ribbon below the photo, magenta above. */
.hero-art__photo { mix-blend-mode: darken; }
.hero-art__photo img { inset: 0; width: 100%; height: 100%; }

/* Ribbons "draw" in from the top once the hero photo has loaded: script.js adds
   .hero-ribbons-go to <html> on the photo's load event (or after a short fallback).
   Magenta (r3) first, yellow (r1) 0.4s later, 1.6s each. The clip is on the unrotated layer box,
   so it grows straight down the screen; the -20% margins keep the finished ribbon
   unclipped. No animation with reduced motion: the ribbons are simply there. */
@keyframes hero-ribbon-draw {
  from { clip-path: inset(-20% -20% 100% -20%); }
  to   { clip-path: inset(-20% -20% -20% -20%); }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero-art__r1,
  .js .hero-art__r3 { clip-path: inset(-20% -20% 100% -20%); }
  .js.hero-ribbons-go .hero-art__r3 { animation: hero-ribbon-draw 1.6s var(--ease) both; }
  .js.hero-ribbons-go .hero-art__r1 { animation: hero-ribbon-draw 1.6s var(--ease) 0.4s both; }
  /* Fail-safe: if script.js never runs (no .reveal-ready), draw them after 1.5s anyway */
  .js:not(.reveal-ready) .hero-art__r3 { animation: hero-ribbon-draw 1.6s var(--ease) 1.5s both; }
  .js:not(.reveal-ready) .hero-art__r1 { animation: hero-ribbon-draw 1.6s var(--ease) 1.9s both; }
}

/* Desktop collage geometry (817 x 632 frame). The photo is placed so the
   people and runners land where the two Figma photo layers were. */
.hero-art--desktop .hero-art__r1    { --l: 55.596%; --t: 31.097%; --w: 43.567%; --h: 63.111%; --iw: 97.166%; --ih: 97.764%; --rot: 1.5deg; --skew: 0deg; }
.hero-art--desktop .hero-art__photo { --l: 5.141%; --t: 4.905%; --w: 86.593%; --h: 89.31%; }
/* Magenta ribbon positioned to match Aine's reference (CPBG_hero_with ribbons.jpg), not the Figma file */
.hero-art--desktop .hero-art__r3    { --l: 61.5%; --t: -4.357%; --w: 38.083%; --h: 53.38%; --iw: 95.539%; --ih: 96.248%; --rot: -2.5deg; --skew: 0deg; }

/* Mobile collage geometry (355 x 259 frame) */
.hero-art--mobile .hero-art__r1    { --l: 48.606%; --t: 30.082%; --w: 45.376%; --h: 69.694%; --iw: 97.166%; --ih: 97.764%; --rot: 1.5deg; --skew: 0deg; }
.hero-art--mobile .hero-art__photo { --l: -3.944%; --t: 1.158%; --w: 90.188%; --h: 98.625%; }
.hero-art--mobile .hero-art__r3    { --l: 55.374%; --t: -9.07%; --w: 39.664%; --h: 58.947%; --iw: 95.539%; --ih: 96.248%; --rot: -2.5deg; --skew: 0deg; }

/* Tablet landscape to desktop (900–1439px): same side-by-side layout as
   1440, with a text column that narrows fluidly (573px at 1440 -> 400px at 900)
   so the collage keeps a usable size. 1440+ is unchanged. */
@media (min-width: 900px) and (max-width: 1439.98px) {
  .hero__inner { grid-template-columns: min(573px, calc(112.6px + 31.97vw)) minmax(0, 1fr); }
  /* Collage centred on the text column, as at 1440 (where its centre sits 8px
     above the text's centre). The text's 100px top spacing moves onto the grid,
     so the collage's area (rows 1-2) is exactly the text block. Margins of
     -100px / -84px centre it 8px high and let it reach, but not pass, the top
     of the hero. Where it hangs below the buttons (~1150px+), the bottom
     padding grows to contain it (fitted at 1200, 1300 and 1439px). */
  .hero__inner {
    padding-top: 100px;
    padding-bottom: max(29px, calc(20.71vw - 185.5px));
  }
  .hero__text { padding-top: 0; }
  .hero-art--desktop {
    grid-row: 1 / span 2;
    align-self: center;
    margin-top: -100px;
    margin-bottom: -84px;
  }
}

/* Small tablet (768–899px): stack text above the desktop collage */
@media (max-width: 899.98px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    padding-right: var(--page-margin);
    padding-bottom: 40px;
  }
  .hero__text { padding-top: 60px; max-width: 640px; }
  .hero__actions { grid-row: 2; margin-top: 32px; }
  .hero-art--desktop {
    grid-column: 1;
    grid-row: 3;
    margin-top: 24px;
    margin-right: calc(var(--page-margin) * -1);
  }
}

/* Mobile: text -> collage -> buttons (Figma mobile frame) */
@media (max-width: 767.98px) {
  .hero__inner {
    gap: 20px;
    padding-bottom: 40px;
  }
  .hero__text {
    gap: 14px;
    padding-top: 50px;
  }
  .hero__text .eyebrow { margin-bottom: -2px; letter-spacing: 0.12em; line-height: 1.32; }
  .hero__title { line-height: 1.1; }
  .hero__lead { font-weight: 400; }
  .hero-art--desktop { display: none; }
  .hero-art--mobile {
    display: block;
    grid-row: 2;
    width: calc(100% + var(--page-margin));
    aspect-ratio: 355 / 259;
  }
  .hero__actions {
    grid-row: 3;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 0;
  }
}

/* =========================================================================
   Why we exist (stats intro)
   ========================================================================= */
.why__inner {
  display: flex;
  align-items: flex-start;
  gap: 76px;
}

.stats-card {
  flex: 0 0 382px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  border: 1px solid var(--teal-40);
  border-radius: var(--radius);
  background: var(--deep-teal);
  color: var(--white);
}
.stats-card__label {
  min-height: 34px;
  display: flex;
  align-items: center;
  font-size: var(--fs-caps);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.stats .carousel__viewport { margin-bottom: 16px; }
.stats .carousel__track > * { min-height: 180px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat__value {
  color: var(--yellow);
  font-size: var(--fs-stat);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.stat__text {
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.4;
}

.why__text {
  flex: 1 1 932px;
  max-width: 932px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.why__text .body-copy { max-width: 824px; }

/* 900–1439px: narrower stats card, wider text column. Card and gap scale
   fluidly to the desktop 382px / 76px at 1440 (300px / 48px at 900). */
@media (min-width: 900px) and (max-width: 1439.98px) {
  .why__inner { gap: calc(1.33px + 5.185vw); }
  .stats-card { flex-basis: calc(163.3px + 15.185vw); }
}

@media (max-width: 899.98px) {
  .why__inner { flex-direction: column; gap: 40px; }
  .stats-card { flex-basis: auto; width: 100%; max-width: 480px; }
  .why__text { flex: none; }
}

@media (max-width: 767.98px) {
  .why { padding-bottom: 24px; }
  .stats-card {
    max-width: none;
    gap: 12px;
    padding: 20px 17px;
    border: 0;
    border-radius: 4px;
  }
  .stats-card__label { min-height: 0; }
  .stats .carousel__track > * { min-height: 0; }
  .stat__text { font-weight: 400; }
  .why__text { gap: 12px; }
  .why__text .lead { color: var(--deep-teal); }
}

/* =========================================================================
   02 What we do
   ========================================================================= */
.what {
  position: relative;
  overflow: hidden;
  background: var(--off-white);
}
.what .container { position: relative; }
.what__ribbons {
  position: absolute;
  top: 2px;
  right: max(-34px, calc((100% - var(--max-w)) / 2 - 34px));
  width: 540px;
  height: 425px;
  overflow: hidden;
  border-bottom-right-radius: var(--radius);
  pointer-events: none;
}
.what__ribbons img {
  position: absolute;
  left: -47px;
  top: -73px;
  width: 668px;
  height: 711px;
  max-width: none;
}
.what .section-heading { max-width: min(900px, calc(100% - 470px)); }

.features { margin-top: 56px; }
.features__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  transform: none;
}
.features__list > * { flex: initial; }
.features .carousel__controls { display: none; }

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 32px 40px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.feature-card__icon {
  position: relative;
  display: block;
  width: 99.2px;
  height: 56px;
  color: var(--deep-teal);
  transition: color 0.35s ease;
}
.feature-card__title {
  color: var(--deep-teal);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.feature-card__text {
  font-size: var(--fs-small);
  line-height: 1.32;
}

/* Figma "H_Feature card" Hover: orange border + orange icon */
@media (hover: hover) {
  .feature-card:hover { border-color: var(--orange); }
  .feature-card:hover .feature-card__icon { color: var(--orange); }
}

/* Icons are single-colour SVGs used as masks so the hover colour can change */
.icon-mask {
  position: absolute;
  left: 0;
  top: 0;
  background-color: currentColor;
  -webkit-mask: var(--icon) no-repeat 0 0 / 100% 100%;
  mask: var(--icon) no-repeat 0 0 / 100% 100%;
}
.icon-mask--connector  { --icon: url("assets/icon-connector.4aa59836.svg");     width: 99.2px; height: 103.2px; }
.icon-mask--catalyst   { --icon: url("assets/icon-catalyst.c14d3220.svg");      width: 58.4px; height: 30.4px; left: 5.6px; top: 9.6px; }
.icon-mask--knowledge  { --icon: url("assets/icon-knowledge-hub.d26e46f9.svg"); width: 60.8px; height: 56px; }
.icon-mask--influencer { --icon: url("assets/icon-influencer.52159b2c.svg");    width: 100px; height: 103.2px; }

@media (max-width: 1099.98px) {
  .what__ribbons { display: none; }
  .what .section-heading { max-width: none; }
  .features__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile: cards become a swipeable carousel */
@media (max-width: 767.98px) {
  .features { margin-top: 30px; }
  .features__list {
    --gap: 26px;
    display: flex;
    gap: var(--gap);
    transform: translateX(calc(var(--index, 0) * -1 * (100% + var(--gap))));
  }
  .features__list > * { flex: 0 0 100%; }
  .features .carousel__controls {
    display: flex;
    margin-top: 10px;
  }
  .feature-card {
    gap: 16px;
    padding: 20px;
    border-radius: 4px;
  }
}

/* =========================================================================
   03 Our learning + banner carousel + report CTA
   ========================================================================= */
.learning__intro {
  padding-top: var(--section-pad);
  padding-bottom: clamp(2.5rem, 2.236rem + 1.127vw, 3.125rem); /* 40 -> 50 */
}
.learning__body { max-width: 756px; }

.banner {
  position: relative;
  padding-bottom: 30px;
}
.banner__viewport { height: 560px; }
.banner__viewport .carousel__track { height: 100%; }
.banner__slide { position: relative; height: 100%; }
.banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Crops matched to the Figma slides */
.banner__img--1 { object-position: 0 81%; }
.banner__img--2 { object-position: 50% 0; }   /* image is pre-cropped to the Figma frame; top-anchored as in Figma */
.banner__img--3 { object-position: 50% 54%; }

.banner__frame {
  position: absolute;
  inset: 0 0 30px;
  max-width: var(--max-w);
  margin-inline: auto;
  pointer-events: none;
}
.banner__card {
  position: absolute;
  left: clamp(var(--page-margin), 10.7vw, 154px);
  top: 85px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 400px;
  min-height: 366px;
  padding: 50px 30px 30px;
  border-radius: var(--radius);
  background: var(--deep-teal);
  color: var(--white);
  pointer-events: auto;
}
.banner__panels-viewport { overflow: hidden; }
/* Text panels slide side by side on their own track, in sync with the photo track
   (same 0.6s duration and easing as .carousel__track). The track is as tall as the
   tallest panel, so the card height never changes. */
.banner__panels {
  --gap: 40px;                 /* clear space between panels while they slide */
  display: flex;
  gap: var(--gap);
  transform: translateX(calc(var(--index, 0) * -1 * (100% + var(--gap))));
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.banner__panel {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Off-screen panels are hidden from screen readers and keyboard once the slide ends */
  visibility: hidden;
  transition: visibility 0s linear 0.6s;
}
.banner__panel.is-active { visibility: visible; transition: visibility 0s; }
.banner__panel > * { max-width: 317px; }
.banner__title {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
}
.banner__text {
  font-size: var(--fs-small);
  line-height: 1.32;
}
.banner .carousel__controls { margin-top: auto; }

@media (max-width: 767.98px) {
  .banner { padding-bottom: 0; }
  .banner__img--1 { object-position: 62% 50%; }
  .banner__frame { inset: 0; }
  .banner__card {
    left: var(--page-margin);
    right: var(--page-margin);
    top: auto;
    bottom: 29px;
    width: auto;
    min-height: 0;
    gap: 20px;
    padding: 20px;
    border-radius: 4px;
  }
  .banner__panel { gap: 12px; }
  .banner__panels { --gap: 20px; }
  .banner__panel > * { max-width: none; }
  .banner__title { font-weight: 600; letter-spacing: 0; }
  .banner .carousel__controls { margin-top: 0; }
}

/* Report CTA */
.cta-wrap { padding-block: 40px; }
.cta {
  display: flex;
  align-items: stretch;
}
.cta__content {
  flex: 1 1 870px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding: 40px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--off-white);
}
.cta__title {
  color: var(--deep-teal);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
}
.cta__text {
  margin-top: -24px;             /* 16px between title and text */
  color: var(--dark-teal);
  font-size: var(--fs-body);
  line-height: 1.4;
}
.cta__art {
  position: relative;
  flex: 0 1 470px;
  overflow: hidden;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--off-white);
}
.cta__ribbons { position: absolute; max-width: none; }
/* left: -112px in the 470px Figma box; kept relative to the box centre so it crops evenly when narrower */
.cta__ribbons--desktop { left: calc(55.2% - 371.5px); top: -155px; width: 743px; height: 791px; }
.cta__ribbons--mobile { display: none; }
.cta__ribbons--tablet { display: none; }

@media (max-width: 1099.98px) {
  .cta__art { flex-basis: 34%; }
}

/* 768–1439px: the art box is narrower than the desktop 470 x 292, so scale the
   ribbons with the box width (desktop window: left -112, top -155 of a 743 x 791
   SVG) and keep that window centred vertically. Identical to desktop at 470 x 292. */
@media (min-width: 768px) and (max-width: 1439.98px) {
  .cta__ribbons--desktop {
    left: -23.83%;            /* -112 / 470 */
    top: 50%;
    width: 158.085%;          /* 743 / 470 */
    height: auto;
    transform: translateY(-38.05%);   /* (155 + 292/2) / 791 */
  }
}

@media (max-width: 767.98px) {
  .cta {
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--off-white);
  }
  .cta__content {
    flex: none;
    gap: 20px;
    padding: 20px;
    border-radius: 0;
  }
  .cta__title { line-height: 1.32; }
  .cta__text { margin-top: -8px; font-size: var(--fs-body); }
  .cta__art {
    flex: none;
    height: 161px;
    border-radius: 10px;
  }
  .cta__ribbons--desktop { display: none; }
  .cta__ribbons--mobile { display: block; left: -74px; top: -110px; width: 539px; height: 478px; }
}

/* =========================================================================
   04 Who we are
   ========================================================================= */
.who__inner {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}
.who__photo {
  position: relative;
  flex: 0 1 534px;
  aspect-ratio: 534 / 462;
  overflow: hidden;
  mix-blend-mode: darken;
}
.who__photo img {
  position: absolute;
  left: -7.12%;
  top: -6.11%;
  width: 114.23%;
  height: 157.58%;
  max-width: none;
}
.who__text {
  flex: 0 1 705px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.who__text .h2 { margin-bottom: 4px; }   /* 20px to body */
.who__text .btn { margin-top: 24px; }    /* 40px from body */

@media (max-width: 899.98px) {
  .who__inner { flex-direction: column; gap: 30px; }
  .who__photo { flex: none; width: 100%; max-width: 534px; }
  .who__text { flex: none; }
}

@media (max-width: 767.98px) {
  .who { padding-top: 30px; padding-bottom: 40px; }
  /* Whole photo at its natural proportions (963 x 1096), so the people and the teal background aren't cropped */
  .who__photo {
    max-width: none;
    aspect-ratio: 963 / 1096;
    height: auto;
  }
  .who__photo img {
    position: static;
    width: 100%;
    height: auto;
  }
  .who__text { gap: 12px; }
  .who__text .h2 { margin-bottom: 0; }
  .who__text .btn { margin-top: 18px; }
  .who__text .eyebrow { font-size: 0.8125rem; }
}

/* =========================================================================
   Get in touch
   ========================================================================= */
.contact {
  position: relative;
  overflow: hidden;
  background: var(--deep-teal);
  color: var(--white);
}
.contact__inner { position: relative; z-index: 1; }
.contact__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 744px;
  padding-top: 100px;
  padding-bottom: 120px;
}
.contact__title {
  max-width: 668px;
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.01em;
}
.contact__lead {
  max-width: 720px;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.4;
}
.contact__text .btn { margin-top: 16px; }
/* The band is deep teal too: a white edge keeps the hovered button visible */
.contact .btn:focus-visible { border-color: var(--white); }
@media (hover: hover) {
  .contact .btn:hover { border-color: var(--white); }
}

.contact__ribbons--desktop {
  position: absolute;
  top: 0;
  left: max(782px, calc(50% + 62px));
  width: 658px;
  height: 718.2px;
  overflow: hidden;
  border-radius: 0 11.2px 11.2px 0;
  pointer-events: none;
}
.contact__ribbons--desktop img {
  position: absolute;
  left: -213px;
  top: -257px;
  width: 1040.2px;
  height: 1107.4px;
  max-width: none;
}
.contact__ribbons--mobile { display: none; }

@media (max-width: 1199.98px) {
  .contact__text { max-width: 640px; }
}

/* 900–1439px: ribbons sit beside the text as on desktop, in the space to the
   right of a fluid text column (692px at 1440), scaled with that space and
   centred vertically. Matches desktop (left -213, top -257 of 1040 x 1107)
   when the box is 658 wide and the band 661 tall. */
@media (min-width: 900px) and (max-width: 1439.98px) {
  .contact { --contact-col: min(692px, 52vw); }
  .contact__text { max-width: var(--contact-col); }
  .contact__ribbons--desktop {
    left: calc(var(--page-margin) + var(--contact-col) + 40px);
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
  }
  .contact__ribbons--desktop img {
    left: -32.37%;            /* -213 / 658 */
    top: 50%;
    width: 158.085%;          /* 1040.2 / 658 */
    height: auto;
    transform: translateY(-53.05%);   /* (257 + 661/2) / 1107.4 */
  }
}

@media (max-width: 899.98px) {
  .contact__ribbons--desktop { display: none; }
  .contact__inner { padding-bottom: 40px; }
  .contact__text { padding-top: 60px; padding-bottom: 20px; }
  .contact__ribbons--mobile {
    position: relative;
    display: block;
    height: 161px;
    overflow: hidden;
    border-radius: 10px;
  }
  .contact__ribbons--mobile img {
    position: absolute;
    left: -74px;
    top: -110px;
    width: 539px;
    height: 478px;
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .contact__text { gap: 12px; padding-top: 40px; }
  .contact__text .eyebrow { font-size: 0.8125rem; line-height: normal; }
  .contact__title {
    max-width: 299px;
    font-size: var(--fs-h2);
    line-height: 1.23;
  }
  .br-desktop { display: none; }
  .contact__lead { font-size: var(--fs-body); font-weight: 400; }
  .contact__text .btn { margin-top: 8px; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--white); }
/* Two bands, each topped by a gunmetal rule across the content width (Figma "D_Footer") */
.site-footer__top,
.site-footer__bottom {
  display: flex;
  border-top: 1px solid var(--gunmetal);
  padding-top: 40px;
}
.site-footer__top {
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 204px;          /* 40px + 164px row, as in Figma (rule included) */
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.site-footer__mark { width: 48.668px; height: auto; margin: 2px; }
.site-footer__part-of {
  width: 126px;
  padding-top: 8px;
  border-top: 1px solid var(--dark-teal);
  color: var(--dark-teal);
  font-size: 1rem;
  line-height: 1.24;
}
.site-footer__links {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
.site-footer__copy {
  padding-block: 6px;
  color: var(--deep-teal);
  font-size: var(--fs-caps);
  font-weight: 500;
  line-height: 1.32;
}
.site-footer__bottom {
  flex-direction: column;
  gap: 40px;
  padding-bottom: 60px;
}
/* Partner logos: black artwork shown at 60% (grey), spread across the row */
.site-footer__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 40px;
}
.site-footer__logos li { position: relative; } /* contains each link's visually-hidden text, which otherwise escapes the scrolling row and widens the page */
.site-footer__logos a { display: block; border-radius: 2px; }
.site-footer__logos img {
  display: block;
  opacity: 0.6;
  transition: opacity 0.35s ease;
}
/* Keyboard focus brings the logo to full strength; on hover-capable devices, hovering
   fades it about 25% (0.6 -> 0.45) with the img's 0.35s transition, like the buttons */
.site-footer__logos a:focus-visible img { opacity: 1; }
@media (hover: hover) {
  .site-footer__logos a:hover img { opacity: 0.45; }
}
.site-footer__legal {
  color: #5a5757;
  font-size: var(--fs-caps);
  font-weight: 500;
  line-height: 1.3;
}

/* Below 984px the logos stay on one line and swipe sideways, edge to edge, like the
   Collaboration Circle footer (funders-together theme, _sitesList.scss: no auto-scroll,
   3rem gap, page-margin side padding, slightly smaller logos) */
@media (max-width: 983.98px) {
  .site-footer__logos {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 3rem;
    margin-inline: calc(-1 * var(--page-margin));
    padding-inline: var(--page-margin);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    /* Room inside the scroller for the 3px + 3px focus ring, which it would otherwise clip */
    padding-block: 8px;
    margin-block: -8px;
    -webkit-overflow-scrolling: touch;
  }
  .site-footer__logos li { flex: 0 0 auto; }
  .site-footer__logos img { height: auto; }
  .site-footer__logos li:nth-child(1) img { width: 125px; }  /* Funders Together */
  .site-footer__logos li:nth-child(2) img { width: 60px; }   /* London Funders */
  .site-footer__logos li:nth-child(3) img { width: 130px; }  /* Centre for Place-Based Giving */
  .site-footer__logos li:nth-child(4) img { width: 206px; }  /* Collaboration Circle */
  .site-footer__logos li:nth-child(5) img { width: 105px; }  /* 360Giving */
}

@media (max-width: 767.98px) {
  .site-footer__top {
    flex-direction: column;
    gap: 26px;
    min-height: 0;
    padding-top: 30px;
    padding-bottom: 40px;
  }
  .site-footer__mark { width: 37.4831px; }
  .site-footer__links { flex-direction: column; gap: 6px; }
  .site-footer__links .nav-link,
  .site-footer__copy { padding-block: 0; }
  .site-footer__bottom { gap: 30px; padding-top: 30px; padding-bottom: 40px; }
}

/* =========================================================================
   iPad portrait (768–899px), from Aine's Figma "Tablet – Holding site"
   frame (2037:700), used as a guide. Mobile and 900px+ are unaffected.
   ========================================================================= */
/* "Who we are" photo at the tablet design size (461 x 274, cropped at the bottom) from 600px to 899px,
   so narrower iPads (iPad mini portrait is 744px) don't get the full-height mobile photo */
@media (min-width: 600px) and (max-width: 899.98px) {
  .who__photo {
    width: 461px;
    max-width: 100%;
    height: 274px;
    aspect-ratio: auto;
  }
  /* Fill the box, crop only at the bottom (faces always fully visible) */
  .who__photo img {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
  }
}

@media (min-width: 768px) and (max-width: 899.98px) {
  /* 0. Hero: full-width text (56px heading), buttons side by side, then a
     full-bleed 768 x 441 collage with Aine's tablet ribbons */
  .hero__inner { padding-bottom: 0; }
  .hero__text {
    gap: 16px;
    max-width: none;
    padding-top: 40px;
  }
  .hero__text .eyebrow { margin-bottom: 0; line-height: 1.32; }
  .hero__title { font-size: 3.5rem; line-height: 1.1; }    /* 56px */
  .hero__lead { max-width: none; font-size: 1.25rem; font-weight: 400; }
  .hero__note { max-width: none; font-size: 0.9375rem; }
  .hero__actions { gap: 20px; margin-top: 24px; }
  .hero__actions .btn { padding: 12px 20px; font-size: 0.9375rem; line-height: 1.32; }
  .hero-art--desktop { display: none; }
  .hero-art--tablet {
    display: block;
    grid-column: 1;
    grid-row: 3;
    width: calc(100% + 2 * var(--page-margin));
    margin: 30px calc(var(--page-margin) * -1) 0;
    aspect-ratio: 768 / 441;
  }
  /* Tablet collage geometry (768 x 441 frame, all in % so it scales with the
     viewport). Photo enlarged 7.5% and moved left so the runners start at
     x=53 as in Aine's frame; both ribbons are moved/scaled with the photo, so
     the magenta still runs off the right edge. ~10px of empty top margin and
     ~19px at the bottom are cropped by the frame. */
  .hero-art--tablet .hero-art__r1    { --l: 52.117%; --t: 28.953%; --w: 39.463%; --h: 77.011%; --iw: 97.166%; --ih: 97.764%; --rot: 1.5deg; --skew: 0deg; }
  .hero-art--tablet .hero-art__photo { --l: 6.415%; --t: -3.008%; --w: 78.435%; --h: 108.979%; }
  .hero-art--tablet .hero-art__r3    { --l: 58.003%; --t: -14.309%; --w: 34.495%; --h: 65.136%; --iw: 95.539%; --ih: 96.248%; --rot: -2.5deg; --skew: 0deg; }

  /* 1. Stats card: full width, figure and label on single lines */
  .stats-card {
    max-width: none;
    gap: 14px;
    padding: 20px;
    border-radius: 6px;
  }
  .stats-card__label { min-height: 0; }
  .stats .carousel__viewport { margin-bottom: 14px; }
  .stats .carousel__track > * { min-height: 0; }
  .stat__value { font-size: 3.5rem; }                       /* 56px */
  .stat__text { font-size: 1.25rem; font-weight: 400; }     /* 20px */

  /* 2. "Transforming places together": text left, Aine's tablet ribbons right */
  .cta { border-radius: 6px; }
  .cta__content {
    flex: 1 1 auto;
    gap: 24px;
    padding: 30px 0 30px 30px;
    border-radius: 6px 0 0 6px;
  }
  .cta__title { font-size: 1.875rem; line-height: 1.32; }  /* 30px */
  .cta__text { margin-top: -10px; font-size: 1.125rem; }   /* 14px below title; 18px */
  .cta__art { flex: 0 0 243px; border-radius: 0 6px 6px 0; }
  .cta__ribbons--desktop { display: none; }
  .cta__ribbons--tablet {
    display: block;
    left: -68px;              /* Figma frame inset -14.62% of 465 */
    top: -98px;               /* -26.64% of 368 */
    width: 533px;
    height: 466px;
  }

  /* 3. "Who we are" photo: see the 600-899px block below */

  /* 4. Contact: heading on one line, narrower paragraph, ribbons tucked top-right */
  .contact__inner { padding-bottom: 0; }
  .contact__text {
    gap: 14px;
    padding-top: 48px;
    padding-bottom: 74px;
  }
  .br-desktop { display: none; }
  .contact__title { font-size: var(--fs-h2); line-height: 1.23; }
  .contact__lead { max-width: 455px; font-weight: 400; }
  .contact__text .btn { margin-top: 10px; }                /* 24px below the paragraph */
  .contact__ribbons--mobile {
    position: absolute;
    top: -2px;
    right: -52px;             /* Figma: x 485–820 in a 768 frame */
    width: 335px;
    height: 215px;
    z-index: -1;
  }
}

/* =========================================================================
   404 page (404.html) — reuses hero/eyebrow/button styles
   ========================================================================= */
.not-found { background: var(--off-white); }
.not-found__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: calc(720px + 2 * var(--page-margin));
  margin-inline: 0;
  color: var(--deep-teal);
}
.not-found__inner .btn { margin-top: 16px; }
@media (min-width: 1440px) {
  .not-found__inner { margin-left: calc((100% - var(--max-w)) / 2); }
}

/* =========================================================================
   Scroll reveal (only when JS is running and motion is allowed)
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .js .why__text.reveal,
  .js .who__text.reveal { transition-delay: 0.12s; }

  /* Fail-safe: if script.js never initialises the reveal (failed to load,
     threw, unsupported browser), show everything after 2s. script.js adds
     .reveal-ready once its observer is running, which switches this off. */
  .js:not(.reveal-ready) .reveal {
    animation: reveal-failsafe 0s linear 2s forwards;
  }
  @keyframes reveal-failsafe {
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .btn:hover,
  .arrow-btn:hover { transform: none; }
}
