/* ==========================================================================
   PERPETUA – style.css
   --------------------------------------------------------------------------
   1. Fonts
   2. Design tokens
   3. Reset & base
   4. Layout primitives (container, grid)
   5. Typography helpers (kicker, prose, links, button)
   6. Header & navigation
   7. Hero
   8. Sections (generic, panel, dusk band)
   9. Home sections · 10. Tiles · 11. Team · 12. Partners page
   14. Footer
   15. Motion & accessibility
   ========================================================================== */


/* 1. Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}


/* 2. Design tokens -------------------------------------------------------- */

:root {
  /* Brand palette: a twilight landscape – midnight sky brightening to blue
     at the horizon, an orange sun, slate mountains with sunlit ridges and
     charcoal ground. */
  --midnight:   #1D3149;   /* sky, top */
  --twilight:   #2B568D;   /* sky, middle */
  --horizon:    #5E8EBF;   /* sky, at the horizon */
  --sun:        #F48E2C;
  --sun-core:   #FEE0BA;
  --peach:      #F9C887;
  --ember:      #C25A12;   /* the sun's orange, deep enough for light surfaces */
  --ridge:      #CE864B;   /* sunlit edge on the mountains */
  --slate:      #728BAA;   /* far mountains */
  --slate-deep: #516482;   /* near mountains */
  --charcoal:   #333039;   /* ground */
  --sky:        #8DB9D9;

  /* Colour roles ---------------------------------------------------------
     Every surface is either light (morning mist) or dark (sky / ground)
     and each surface gets exactly one accent:

       light (mist)   → ink: midnight   accent: ember
       dark (sky)     → ink: white      accent: sun orange

     The bright sun orange never carries text on a light surface. */
  --accent:       var(--ember);
  --accent-dark:  var(--sun);

  /* Derived surfaces & text */
  --ink:        var(--midnight);
  --ink-soft:   rgba(29, 49, 73, 0.7);
  --ink-faint:  rgba(29, 49, 73, 0.46);
  --cream:      #F6F7FA;
  --cream-soft: rgba(246, 247, 250, 0.74);
  --cream-faint:rgba(246, 247, 250, 0.5);
  --paper:      #EEF2F6;   /* mist, lightened for reading */
  --paper-rgb:  238, 242, 246;
  --paper-2:    #DFE6EE;
  --mist:       #A9B9CD;   /* the plain right under the mountains */
  --ground:     #C6D1DE;   /* where the home hero's ground ends */
  --line:       rgba(29, 49, 73, 0.16);
  --line-dark:  rgba(246, 247, 250, 0.18);

  /* Mountain silhouettes. --mountains sits on the foot of the hero sky (far
     and near range); --mountains-ground closes the page above the footer
     and adds the charcoal ground in front. Stretched to the full width.
     --mountains-peaks is the home hero's ranges, stretched across the
     viewport. The plants sit on top of it, in .hero__flora, and grow from
     a twig on the left to a grove on the right. */
  --mountains: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath fill='%23728BAA' d='M0 92L260 58L470 16L720 70L980 38L1200 62L1440 28V160H0Z'/%3E%3Cpath fill='%23516482' d='M0 128L240 106L420 120L640 80L860 112L1080 96L1290 66L1440 90V160H0Z'/%3E%3Cpath fill='none' stroke='%23CE864B' stroke-width='3' vector-effect='non-scaling-stroke' d='M640 80L860 112L1080 96L1290 66'/%3E%3C/svg%3E");
  --mountains-peaks: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%202400%20260'%20preserveAspectRatio%3D'none'%3E%3Cpath%20fill%3D'%23728BAA'%20d%3D'M0%20158L860%2032L1280%20142L1660%2038L2400%20158V260H0Z'%2F%3E%3Cpath%20fill%3D'%23516482'%20d%3D'M0%20196L640%20158L1120%20102L1580%20168L2060%20136L2400%20196V260H0Z'%2F%3E%3Cpath%20fill%3D'%23333039'%20d%3D'M0%20238L720%20198L1240%20220L1760%20186L2400%20238V260H0Z'%2F%3E%3C%2Fsvg%3E");
  --mountains-ground: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 240' preserveAspectRatio='none'%3E%3Cpath fill='%23728BAA' d='M0 104L300 58L450 22L700 82L940 52L1180 74L1440 40V240H0Z'/%3E%3Cpath fill='%23516482' d='M0 150L280 112L470 132L700 92L900 128L1120 110L1300 86L1440 102V240H0Z'/%3E%3Cpath fill='none' stroke='%23CE864B' stroke-width='3' vector-effect='non-scaling-stroke' d='M700 92L900 128L1120 110L1300 86'/%3E%3Cpath fill='%23333039' d='M0 210L250 182L540 200L830 168L1110 190L1440 160V240H0Z'/%3E%3Cpath fill='none' stroke='%23CE864B' stroke-width='3' vector-effect='non-scaling-stroke' d='M0 210L250 182L540 200L830 168L1110 190L1440 160'/%3E%3C/svg%3E");

  /* fine grain shared by the hero sky and the dark sections */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans:    "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --step--2: 0.75rem;
  --step--1: clamp(0.875rem, 0.85rem + 0.15vw, 0.9375rem);
  --step-0:  clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-1:  clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --step-2:  clamp(1.625rem, 1.3rem + 1.2vw, 2.375rem);
  --step-3:  clamp(2.125rem, 1.4rem + 2.6vw, 3.75rem);
  --step-4:  clamp(3.25rem, 1.75rem + 8.5vw, 9rem);

  /* Space & layout */
  --gutter:    clamp(1.25rem, 5vw, 4rem);
  --gap:       clamp(1rem, 2.5vw, 2rem);
  --container: 84rem;
  --header-h:  4.5rem;
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --block-y:   clamp(3.5rem, 7vw, 6rem);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (max-width: 59.99em) {
  :root { --header-h: 4rem; }
}


/* 3. Reset & base --------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--paper);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

main {
  overflow: clip;
}

h1, h2, h3, h4, p, dl, dd, figure, address, ul, ol {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

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

a { color: inherit; }

address { font-style: normal; }

/* No italics anywhere: <em> is emphasis by colour and weight, not slant. */
em { font-style: normal; }

::selection {
  background: var(--accent);
  color: var(--cream);
}

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

/* Dark surfaces switch to the dark-surface accent for everything inside. */
.section--dark,
.site-footer,
.site-header:not(.is-scrolled),
.site-header.nav-open {
  --accent: var(--accent-dark);
}

.skip-link {
  position: absolute;
  top: 0; left: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--cream);
  font: 500 var(--step--1) var(--font-sans);
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }


/* 4. Layout primitives ---------------------------------------------------- */

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(2rem, 4vw, 3rem);
}

.col-span-2  { grid-column-end: span 2; }
.col-span-3  { grid-column-end: span 3; }
.col-span-4  { grid-column-end: span 4; }
.col-span-5  { grid-column-end: span 5; }
.col-span-6  { grid-column-end: span 6; }
.col-span-7  { grid-column-end: span 7; }
.col-span-12 { grid-column: 1 / -1; }
.col-start-4 { grid-column-start: 4; }
.col-start-5 { grid-column-start: 5; }
.col-start-6 { grid-column-start: 6; }
.col-start-7 { grid-column-start: 7; }
.col-start-8 { grid-column-start: 8; }
.col-start-9 { grid-column-start: 9; }
.col-start-10{ grid-column-start: 10; }
.col-start-11{ grid-column-start: 11; }

@media (max-width: 59.99em) {
  .grid > [class*="col-"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 36em) {
  .hide-sm { display: none; }
}


/* 5. Typography helpers --------------------------------------------------- */

.kicker {
  display: block;
  font: 500 var(--step--2) / 1.4 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.kicker--light { color: var(--cream-soft); }

.wordmark-text {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.86em;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .wordmark-text {
    width: 6.2em;
    height: 0.78em;
    overflow: hidden;
    background-color: currentColor;
    -webkit-mask: url("../images/wordmark-blue.png") center / contain no-repeat;
    mask: url("../images/wordmark-blue.png") center / contain no-repeat;
    text-indent: -999em;
    vertical-align: -0.06em;
  }
}

.prose {
  max-width: 34em;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.prose p + p { margin-top: 1.25em; }

/* Body text next to a statement: accent corner brackets frame the column. */
.prose--rule {
  position: relative;
  display: block;
  padding: calc(20px - (var(--step-0) * 0.3)) 20px;
  border: none;
}
.prose--rule::before,
.prose--rule::after {
  content: "";
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-color: var(--accent);
  border-style: solid;
}
.prose--rule::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}
.prose--rule::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}
@media (max-width: 59.99em) {
  .prose--rule { padding-top: 1rem; }
}
.prose__cta { margin-top: 2.25em !important; }

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--accent);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.link:hover { color: var(--accent); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem 0.85rem 1.375rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font: 500 var(--step--1) / 1 var(--font-sans);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  transition:
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}
.button svg {
  transition: transform 0.3s var(--ease-out);
}
/* Hover: midnight → the sun's orange. */
.button:hover {
  border-color: var(--ember);
  background: var(--ember);
  color: var(--cream);
  transform: translateY(-2px);
}
.button:hover svg { transform: translateX(3px); }

.button--solid {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
}


/* 6. Header & navigation -------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--cream);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), box-shadow 0.35s;
}

.site-header::after {
  /* hairline that appears once the page is scrolled */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.35s;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(var(--paper-rgb), 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
.site-header.is-scrolled::after { opacity: 1; }

.site-header__inner {
  height: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}
.brand__logo,
.brand__word {
  position: relative;
  display: block;
}
.brand__logo {
  height: 1.75rem;
  aspect-ratio: 171 / 120;
}
.brand__word {
  height: 0.875rem;
  aspect-ratio: 971 / 122;
}
.brand__mark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.35s var(--ease-out);
}
.brand__mark--dark  { opacity: 0; }
.brand__mark--light { opacity: 1; }
.is-scrolled .brand__mark--dark  { opacity: 1; }
.is-scrolled .brand__mark--light { opacity: 0; }


.site-nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}
.site-nav__list a {
  position: relative;
  display: inline-block;
  padding: 0.25rem 0;
  font: 500 var(--step--1) / 1 var(--font-sans);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: inherit;
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out), background-color 0.3s;
}
.site-nav__list a:hover::after,
.site-nav__list a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-nav__list a.is-active::after { background: var(--accent); }

.site-nav__meta { display: none; }

/* Social icons: after the links, behind a hairline */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}
.site-nav__social {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: clamp(1.25rem, 2.5vw, 2.5rem);
  line-height: 0;
}
.site-nav__social::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 1.25rem;
  width: 1px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: 0.3;
}
.site-nav__social a {
  display: block;
  padding: 0.25rem;
  color: inherit;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.site-nav__social a:hover {
  opacity: 1;
  color: var(--accent);
}
.site-nav__social svg { display: block; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: 500 var(--step--1) / 1 var(--font-sans);
  cursor: pointer;
}
.nav-toggle__icon {
  position: relative;
  width: 1.375rem;
  height: 0.75rem;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.nav-toggle__icon::before { top: 0; }
.nav-toggle__icon::after  { top: calc(100% - 1.5px); }

.nav-open .nav-toggle__icon::before { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-open .nav-toggle__icon::after  { top: 50%; transform: translateY(-50%) rotate(-45deg); }

@media (max-width: 59.99em) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: calc(var(--header-h) + 2rem) var(--gutter) 2.5rem;
    background: var(--ink);
    color: var(--cream);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0s 0.35s;
  }
  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s var(--ease-out);
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
  }
  .site-nav__list li {
    border-top: 1px solid var(--line-dark);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
  }
  .site-nav__list li:last-child { border-bottom: 1px solid var(--line-dark); }
  .nav-open .site-nav__list li { transform: none; opacity: 1; }
  .nav-open .site-nav__list li:nth-child(2) { transition-delay: 0.04s; }
  .nav-open .site-nav__list li:nth-child(3) { transition-delay: 0.08s; }
  .nav-open .site-nav__list li:nth-child(4) { transition-delay: 0.12s; }
  .nav-open .site-nav__list li:nth-child(5) { transition-delay: 0.16s; }

  .site-nav__list a {
    display: block;
    padding: 1rem 0;
    font: 400 var(--step-2) / 1.1 var(--font-display);
    letter-spacing: -0.01em;
  }
  .site-nav__list a::after { display: none; }

  .site-nav__social {
    margin-top: auto;
    padding: 0 0 1.5rem;
    gap: 1.5rem;
  }
  .site-nav__social::before { display: none; }
  .site-nav__social svg { width: 22px; height: 22px; }

  .site-nav__meta {
    display: block;
    font: 500 var(--step--2) / 1.6 var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cream-soft);
  }

  /* While the menu is open the header sits on the dark panel. */
  .nav-open.site-header {
    color: var(--cream);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-open.site-header::after { opacity: 0; }
  .nav-open .brand__mark--dark  { opacity: 0; }
  .nav-open .brand__mark--light { opacity: 1; }
}

body.nav-open { overflow: hidden; }


/* 7. Hero ----------------------------------------------------------------- */

/* The hero opens the page the way the last section closes it: a twilight
   sky – midnight brightening to blue at the horizon – with an orange sun,
   a range of slate mountains at its foot and a small legged robot walking
   along the horizon. Everything the hero has to say sits in one column in
   the sky: eyebrow, headline, one sentence, the two actions. */

.hero {
  --walker-h: clamp(3rem, 6vw, 5.5rem);
  /* how far up from the horizon the sky turns blue */
  --dawn-h: clamp(14rem, 34vh, 24rem);
  --mtn-h: clamp(4rem, 11vh, 7rem);
  --gait: 1.4s;
  /* the sun: a disk with a bright core, in a soft glow */
  --sun-x: 80%;
  --sun-y: 42%;
  --sun-r: clamp(2rem, 5vw, 4.25rem);
  --sun-layers:
    radial-gradient(circle calc(var(--sun-r) * 0.78) at calc(var(--sun-x) + var(--sun-r) * 0.2) calc(var(--sun-y) - var(--sun-r) * 0.08),
      var(--sun-core) 0, #FDD9AE 45%, #F9BE7C calc(100% - 1px), transparent 100%),
    radial-gradient(circle var(--sun-r) at var(--sun-x) var(--sun-y),
      var(--sun) 0, var(--sun) calc(100% - 1px), transparent 100%),
    radial-gradient(circle calc(var(--sun-r) * 3.4) at var(--sun-x) var(--sun-y),
      rgba(249, 200, 135, 0.36) 0, rgba(240, 170, 100, 0.12) 40%, transparent 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  isolation: isolate;
  background: var(--paper-2);
}

.hero__sky {
  min-height: calc(var(--header-h) + var(--dawn-h) + clamp(2rem, 5vh, 4rem));
  background:
    var(--mountains) center bottom / 100% var(--mtn-h) no-repeat,
    var(--sun-layers),
    linear-gradient(
      180deg,
      var(--midnight) 0,
      var(--midnight) calc(100% - var(--dawn-h)),
      #213E5E calc(100% - var(--dawn-h) * 0.85),
      #285083 calc(100% - var(--dawn-h) * 0.65),
      #325F96 calc(100% - var(--dawn-h) * 0.50),
      #3B6AA0 calc(100% - var(--dawn-h) * 0.36),
      #4F7EB2 calc(100% - var(--dawn-h) * 0.20),
      var(--horizon) 100%
    );
}
.hero__ground {
  /* the sunlit ridge at the mountains' foot, then mist settles into the
     reading surface */
  background:
    linear-gradient(var(--ridge), var(--ridge)) top / 100% 2px no-repeat,
    linear-gradient(180deg, var(--mist) 0, #BAC7D7 30%, var(--paper-2) 100%);
}
/* …and the first section after the hero lightens it further to paper */
.hero + .section {
  --fade-h: clamp(12rem, 28vh, 20rem);
  background: linear-gradient(180deg, var(--paper-2) 0, var(--paper) var(--fade-h));
}

.hero__sky::after {
  /* fine grain: kills gradient banding and gives the sky a printed feel */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: var(--grain);
  background-size: 240px 240px;
}

.hero__sky,
.hero__ground {
  position: relative;
  z-index: 1;
  display: flex;
}
.hero__sky { flex: 0 0 auto; }
.hero__ground { flex: 0 0 auto; }

.hero__top,
.hero__bottom {
  position: relative;
  z-index: 1;
}

/* -- Sky: headline → sentence → actions ---------------------------------- */

.hero__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + clamp(2rem, 6vh, 4rem));
  /* keep the text in the dark part of the band, above the sand and the
     robot walking on the horizon */
  padding-bottom: calc(var(--dawn-h) * 0.5 + var(--walker-h) * 0.5);
}

/* -- Home: the logo blown up to viewport size ---------------------------- */

/* The home hero is the logo at viewport size: the wordmark low in a twilight
   sky, the sun high to the right, mountains and the robot along the horizon. */
.hero--home {
  --walker-h: clamp(2.5rem, 5vw, 4.75rem);
  --mtn-h: clamp(4.75rem, 23svh, 14.5rem);
  --sun-x: 80%;
  --sun-y: 26%;
  --sun-r: clamp(3rem, 8vw, 7rem);
  --home-fade-h: clamp(16rem, 36vh, 26rem);
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ground);
}
/* Ground → paper runs for --home-fade-h from the hero foot, independent of
   how tall the collaborators strip is (wide viewports often clip it otherwise). */
.hero--home::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: var(--home-fade-h);
  background: linear-gradient(180deg, var(--ground) 0%, var(--paper) 100%);
  pointer-events: none;
  z-index: 0;
}

/* The sky gradient (midnight → blue horizon) and the mist below are split
   across the two halves of the hero, so the horizon stays on the join
   whatever the viewport height. */
.hero--home .hero__sky {
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 52svh;
  background:
    var(--mountains-peaks) center bottom / 100% var(--mtn-h) no-repeat,
    var(--sun-layers),
    linear-gradient(
      180deg,
      var(--midnight) 0%,
      var(--midnight) 14%,
      #213E5E 30%,
      #285083 46%,
      #325F96 60%,
      #3B6AA0 72%,
      #4F7EB2 86%,
      var(--horizon) 100%
    );
}
.hero--home .hero__ground {
  min-height: 0;
  background: linear-gradient(
    180deg,
    var(--mist) 0%,
    #B9C7D7 40%,
    var(--ground) 100%
  );
}
.hero--home .hero__ground::after {
  /* the same grain as the sky, so the two halves read as one picture */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: var(--grain);
  background-size: 240px 240px;
}
/* grain height matches the shared fade band anchored on the hero */
.hero--home + .section {
  --fade-h: var(--home-fade-h);
  background: transparent;
}

.hero--home .hero__top {
  z-index: 2;
  flex: 1 1 auto;
  display: grid;
  /* All spare sky sits above the title, so on a tall screen PERPETUA rests
     below the sun. The row shrinks away on a short screen and the title
     stops under the header. */
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: stretch;
  gap: 0;
  padding-top: calc(var(--header-h) + clamp(1.25rem, 3svh, 2.5rem));
  padding-bottom: calc(var(--mtn-h) * 0.9 + clamp(0.65rem, 1.6svh, 1.35rem));
}

/* Plants on the home horizon. The hills stretch with the viewport; these
   keep their own aspect and are placed along the charcoal ridge, small on
   the left and fully grown on the right. --x/--y are percentages of the
   hill band (same box as --mountains-peaks). */
.hero__flora {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--mtn-h);
  pointer-events: none;
}
.flora {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  display: block;
  width: var(--w, 1rem);
  height: auto;
  transform: translateX(-50%);
  overflow: visible;
}
.flora--twig   { --w: clamp(0.65rem, 1.2vw, 0.95rem); }
.flora--mid    { --w: clamp(0.8rem, 1.5vw, 1.2rem); }
.flora--far    { --w: clamp(0.5rem, 0.95vw, 0.75rem); }
.flora--sprout { --w: clamp(1.05rem, 2vw, 1.65rem); }
.flora--lg     { --w: clamp(1.35rem, 2.6vw, 2.15rem); }
.flora--sapling { --w: clamp(1.55rem, 3.1vw, 2.5rem); }
.flora--young  { --w: clamp(1.95rem, 3.8vw, 3.15rem); }
.flora--pine   { --w: clamp(2.35rem, 4.7vw, 3.9rem); }
.flora--tall   { --w: clamp(2.75rem, 5.6vw, 4.7rem); }
.flora--grove  { --w: clamp(3.5rem, 8.2vw, 6.9rem); }

.hero--home .hero__lede {
  grid-row: 3;
  max-width: 22em;
  margin: 0;
  font: 400 min(var(--step-3), 7.5svh) / 1.12 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--cream);
  text-shadow: 0 0.05em 1.25rem rgba(20, 30, 45, 0.35);
}

.hero__wordmark {
  grid-row: 2;
  width: 100%;
  margin: 0 0 clamp(1.5rem, 8vh, 6rem);
  color: var(--cream);
  line-height: 0;
}
.hero__wordmark-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 926 / 100;
  overflow: visible;
  filter: drop-shadow(0 0.35rem 1.5rem rgba(20, 30, 45, 0.18));
}

/* Below a tall desktop, the title sits higher, so lift the sun off the letters. */
@media (max-height: 75rem) {
  .hero--home { --sun-y: 18%; }
}

/* Very short: keep the sun just under the header, and stop the word before it. */
@media (max-height: 48rem) {
  .hero--home {
    --sun-x: 88%;
    --sun-y: calc(var(--header-h) + var(--sun-r) + 0.4rem);
    --sun-r: clamp(1.35rem, 4vw, 2.4rem);
  }
  .hero__wordmark {
    max-width: min(100%, 38rem);
  }
}

/* -- Ground: scroll cue -------------------------------------------------- */

.hero--home .hero__bottom {
  display: flex;
  justify-content: flex-end;
  padding-top: clamp(1.25rem, 3vh, 2rem);
  padding-bottom: clamp(1.25rem, 3vh, 2rem);
}
.hero__next {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font: 500 var(--step--2) / 1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 0.2s;
}
.hero__next svg { transition: transform 0.3s var(--ease-out); }
.hero__next:hover { color: var(--ink); }
.hero__next:hover svg { transform: translateY(3px); }

@media (max-width: 59.99em) {
  .hero--home .hero__sky { min-height: 44svh; }
  .hero--home .hero__bottom { justify-content: flex-start; }
}

/* buttons on the dark band */
.button--light {
  border-color: var(--cream);
  color: var(--cream);
}
.button--light.button--solid {
  background: var(--cream);
  color: var(--ink);
}
.button--light:hover {
  border-color: var(--sun);
  background: var(--sun);
  color: var(--midnight);
}

/* the ground is only the horizon the robot walks on */
.hero__ground {
  min-height: clamp(2.5rem, 5vh, 4rem);
}

/* -- Sub-page variant: title instead of wordmark, no robot ---------------- */

.hero--page {
  --dawn-h: clamp(11rem, 26vh, 17rem);
}
.hero--page .hero__top {
  padding-bottom: calc(var(--dawn-h) * 0.42 + 1.5rem);
}
/* Compact: shorter band, one line on the sand, content right after */
.hero--compact {
  --dawn-h: clamp(9rem, 20vh, 13rem);
}
.hero--compact .hero__top {
  padding-bottom: calc(var(--dawn-h) * 0.38 + 1rem);
}
.hero--compact .hero__bottom--page {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
.hero--compact .hero__bottom--page .hero__lede {
  font-size: var(--step-0);
  font-weight: 400;
  color: var(--ink-soft);
}
.hero--compact + .section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.hero__title {
  margin-top: 0.875rem;
  max-width: 14em;
  font: 400 var(--step-3) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--cream);
  text-wrap: balance;
}
.hero__title em {
  font-weight: 300;
  color: var(--peach);
}
.hero__title .wordmark-text { font-size: 0.8em; }

/* No robot on sub-pages, so no survey line either: just the sun in the sky
   to the right of the title, over the mountains. */
.hero--page {
  --sun-x: 80%;
  --sun-y: 46%;
}
@media (max-width: 36em) {
  .hero--page {
    --sun-x: 86%;
    --sun-y: 34%;
    --sun-r: 1.75rem;
  }
}

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

/* -- Horizon: a measured line ------------------------------------------- */

.hero__horizon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: 0.5rem;
  pointer-events: none;
  background:
    /* the line itself: the sunlit ridge at the mountains' foot */
    linear-gradient(var(--ridge), var(--ridge)) 0 0 / 100% 2px no-repeat,
    /* survey ticks: a major every 8 minors */
    repeating-linear-gradient(90deg, rgba(29, 49, 73, 0.5) 0 1px, transparent 1px 12rem) 0 0 / 100% 0.5rem no-repeat,
    repeating-linear-gradient(90deg, rgba(29, 49, 73, 0.32) 0 1px, transparent 1px 1.5rem) 0 0 / 100% 0.25rem no-repeat;
}
/* The home horizon sits on the charcoal ground, so the line is light
   rather than the sunlit ridge. */
.hero--home .hero__horizon {
  background:
    linear-gradient(rgba(246, 247, 250, 0.45), rgba(246, 247, 250, 0.45)) 0 0 / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(246, 247, 250, 0.32) 0 1px, transparent 1px 12rem) 0 0 / 100% 0.5rem no-repeat,
    repeating-linear-gradient(90deg, rgba(246, 247, 250, 0.18) 0 1px, transparent 1px 1.5rem) 0 0 / 100% 0.25rem no-repeat;
}

/* -- The walker ---------------------------------------------------------- */

.hero__track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: var(--walker-h);
  /* svg y=91 (the feet) sits exactly on the horizon line */
  transform: translateY(-94.8%);
  pointer-events: none;
}
.hero__walker {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  will-change: transform;
  transform: translateX(58vw);
}
.walker {
  display: block;
  height: 100%;
  width: auto;
  overflow: visible;
  fill: var(--midnight);
  stroke: var(--midnight);
  stroke-width: 6.5;
  stroke-linecap: round;
}
.walker rect,
.walker circle,
.walker ellipse { stroke: none; }
.walker__shank line { stroke-width: 5; }   /* shank tapers a little */
.walker__shadow {
  fill: rgba(29, 49, 73, 0.2);
  transform-origin: 64px 91.4px;
}
.walker__panel { fill: var(--sky); }
.walker__highlight { fill: rgba(246, 247, 250, 0.16); }
.walker__eye { fill: var(--sun); }
.walker__glint { fill: var(--cream); opacity: 0.85; }
.walker__bolt { fill: var(--cream); opacity: 0.3; }
.walker__leg--far { opacity: 0.5; }

/* on the home hero it walks in front of the charcoal hills */
.hero--home .walker {
  fill: var(--cream);
  stroke: var(--cream);
}
.hero--home .walker__bolt { fill: var(--midnight); }

.walker__body { transform-origin: 62px 40px; }
.walker__leg--hind  { transform-origin: 40px 47px; }
.walker__leg--front { transform-origin: 88px 47px; }
.walker__shank--hind  { transform-origin: 49px 67px; }
.walker__shank--front { transform-origin: 79px 67px; }

/* Resting pose = each leg frozen at its own phase of the walk, so the robot
   still reads as walking when the animation is off (reduced motion, print,
   old browsers). Angles are the 0 / 25 / 50 / 75 % samples of the gait. */
.walker__leg--hind.walker__leg--near                        { transform: rotate(-10deg); }
.walker__leg--hind.walker__leg--near  .walker__shank--hind  { transform: rotate(-15.3deg); }
.walker__leg--front.walker__leg--near                       { transform: rotate(-3.2deg); }
.walker__leg--front.walker__leg--near .walker__shank--front { transform: rotate(0.4deg); }
.walker__leg--hind.walker__leg--far                         { transform: rotate(15.2deg); }
.walker__leg--hind.walker__leg--far   .walker__shank--hind  { transform: rotate(-6.2deg); }
.walker__leg--front.walker__leg--far                        { transform: rotate(23.7deg); }
.walker__leg--front.walker__leg--far  .walker__shank--front { transform: rotate(-30.3deg); }

@media (prefers-reduced-motion: no-preference) {
  .hero__walker {
    animation: walk-across var(--walk-duration, 75s) linear infinite;
    animation-delay: calc(var(--walk-duration, 75s) * -0.42);
  }
  .walker__body   { animation: walker-bob    var(--gait) ease-in-out infinite; }
  .walker__shadow { animation: walker-shadow var(--gait) ease-in-out infinite; }

  /* Joint angles are sampled every 4 % of the cycle from a two-link IK
     solution (see the comment in index.html), hence linear timing. */
  .walker__leg--hind    { animation: walker-thigh-hind  var(--gait) linear infinite; }
  .walker__leg--front   { animation: walker-thigh-front var(--gait) linear infinite; }
  .walker__shank--hind  { animation: walker-shank-hind  var(--gait) linear infinite; }
  .walker__shank--front { animation: walker-shank-front var(--gait) linear infinite; }

  /* four-beat walk: each leg starts its cycle a quarter period after the last */
  .walker__leg,
  .walker__leg .walker__shank {
    animation-delay: calc(var(--gait) * var(--phase, 0) * -1);
  }
  .walker__eye {
    animation: walker-blink 5.2s steps(1) infinite;
  }
}

@keyframes walk-across {
  from { transform: translateX(-8rem); }
  to   { transform: translateX(100vw); }
}

/* Gait: stance 0–60 % (foot planted, moving back 26 units under the hip),
   swing 60–100 % (foot arcs forward, lifting 7 units). One cycle covers
   26 / 0.6 ≈ 43.3 SVG units – the crossing speed in script.js relies on this. */
@keyframes walker-thigh-hind {
  0%   { transform: rotate(-10deg); }
  4%   { transform: rotate(-9.9deg); }
  8%   { transform: rotate(-9.4deg); }
  12%  { transform: rotate(-8.4deg); }
  16%  { transform: rotate(-7deg); }
  20%  { transform: rotate(-5.3deg); }
  24%  { transform: rotate(-3.4deg); }
  28%  { transform: rotate(-1.2deg); }
  32%  { transform: rotate(1.3deg); }
  36%  { transform: rotate(3.9deg); }
  40%  { transform: rotate(6.8deg); }
  44%  { transform: rotate(10deg); }
  48%  { transform: rotate(13.4deg); }
  52%  { transform: rotate(17.1deg); }
  56%  { transform: rotate(21.1deg); }
  60%  { transform: rotate(25.5deg); }
  64%  { transform: rotate(17.1deg); }
  68%  { transform: rotate(8.6deg); }
  72%  { transform: rotate(-0.3deg); }
  76%  { transform: rotate(-9.3deg); }
  80%  { transform: rotate(-17.2deg); }
  84%  { transform: rotate(-22.8deg); }
  88%  { transform: rotate(-25deg); }
  92%  { transform: rotate(-23.5deg); }
  96%  { transform: rotate(-18.5deg); }
  100% { transform: rotate(-10deg); }
}
@keyframes walker-shank-hind {
  0%   { transform: rotate(-15.3deg); }
  4%   { transform: rotate(-11deg); }
  8%   { transform: rotate(-7.6deg); }
  12%  { transform: rotate(-5deg); }
  16%  { transform: rotate(-3deg); }
  20%  { transform: rotate(-1.5deg); }
  24%  { transform: rotate(-0.5deg); }
  28%  { transform: rotate(-0.1deg); }
  32%  { transform: rotate(-0.1deg); }
  36%  { transform: rotate(-0.5deg); }
  40%  { transform: rotate(-1.5deg); }
  44%  { transform: rotate(-3deg); }
  48%  { transform: rotate(-5deg); }
  52%  { transform: rotate(-7.6deg); }
  56%  { transform: rotate(-11deg); }
  60%  { transform: rotate(-15.3deg); }
  64%  { transform: rotate(1.4deg); }
  68%  { transform: rotate(14.7deg); }
  72%  { transform: rotate(24.9deg); }
  76%  { transform: rotate(31.5deg); }
  80%  { transform: rotate(33.9deg); }
  84%  { transform: rotate(31.5deg); }
  88%  { transform: rotate(24.9deg); }
  92%  { transform: rotate(14.7deg); }
  96%  { transform: rotate(1.4deg); }
  100% { transform: rotate(-15.3deg); }
}
@keyframes walker-thigh-front {
  0%   { transform: rotate(-25.5deg); }
  4%   { transform: rotate(-21.1deg); }
  8%   { transform: rotate(-17.1deg); }
  12%  { transform: rotate(-13.4deg); }
  16%  { transform: rotate(-10deg); }
  20%  { transform: rotate(-6.8deg); }
  24%  { transform: rotate(-3.9deg); }
  28%  { transform: rotate(-1.3deg); }
  32%  { transform: rotate(1.2deg); }
  36%  { transform: rotate(3.4deg); }
  40%  { transform: rotate(5.3deg); }
  44%  { transform: rotate(7deg); }
  48%  { transform: rotate(8.4deg); }
  52%  { transform: rotate(9.4deg); }
  56%  { transform: rotate(9.9deg); }
  60%  { transform: rotate(10deg); }
  64%  { transform: rotate(18.5deg); }
  68%  { transform: rotate(23.5deg); }
  72%  { transform: rotate(25deg); }
  76%  { transform: rotate(22.8deg); }
  80%  { transform: rotate(17.2deg); }
  84%  { transform: rotate(9.3deg); }
  88%  { transform: rotate(0.3deg); }
  92%  { transform: rotate(-8.6deg); }
  96%  { transform: rotate(-17.1deg); }
  100% { transform: rotate(-25.5deg); }
}
@keyframes walker-shank-front {
  0%   { transform: rotate(15.3deg); }
  4%   { transform: rotate(11deg); }
  8%   { transform: rotate(7.6deg); }
  12%  { transform: rotate(5deg); }
  16%  { transform: rotate(3deg); }
  20%  { transform: rotate(1.5deg); }
  24%  { transform: rotate(0.5deg); }
  28%  { transform: rotate(0.1deg); }
  32%  { transform: rotate(0.1deg); }
  36%  { transform: rotate(0.5deg); }
  40%  { transform: rotate(1.5deg); }
  44%  { transform: rotate(3deg); }
  48%  { transform: rotate(5deg); }
  52%  { transform: rotate(7.6deg); }
  56%  { transform: rotate(11deg); }
  60%  { transform: rotate(15.3deg); }
  64%  { transform: rotate(-1.4deg); }
  68%  { transform: rotate(-14.7deg); }
  72%  { transform: rotate(-24.9deg); }
  76%  { transform: rotate(-31.5deg); }
  80%  { transform: rotate(-33.9deg); }
  84%  { transform: rotate(-31.5deg); }
  88%  { transform: rotate(-24.9deg); }
  92%  { transform: rotate(-14.7deg); }
  96%  { transform: rotate(-1.4deg); }
  100% { transform: rotate(15.3deg); }
}

/* the body rises slightly twice per cycle and pitches a touch nose-up as the
   hind legs push, nose-down as the front legs catch */
@keyframes walker-bob {
  0%   { transform: translateY(0)      rotate(0.5deg); }
  25%  { transform: translateY(-0.9px) rotate(0deg); }
  50%  { transform: translateY(0)      rotate(-0.5deg); }
  75%  { transform: translateY(-0.9px) rotate(0deg); }
  100% { transform: translateY(0)      rotate(0.5deg); }
}
@keyframes walker-shadow {
  0%, 50%, 100% { transform: scaleX(1);    opacity: 1; }
  25%, 75%      { transform: scaleX(0.96); opacity: 0.85; }
}
@keyframes walker-blink {
  0%, 94%, 100% { opacity: 1; }
  95%, 98%      { opacity: 0.15; }
}

/* -- Ground on sub-pages: the lede on the sand ------------------------- */

.hero__ground { color: var(--ink); }

.hero__bottom {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(1.75rem, 4vh, 3rem);
  padding-top: clamp(2rem, 5vh, 3rem);
  padding-bottom: clamp(1.25rem, 3vh, 2rem);
}
.hero__bottom--page .hero__lede {
  grid-column: 1 / 9;
  max-width: 36em;
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.45;
  text-wrap: pretty;
}

@media (max-width: 59.99em) {
  .hero { --dawn-h: clamp(12rem, 30vh, 18rem); }
  .hero--page { --dawn-h: clamp(9rem, 22vh, 13rem); }
  .hero__top {
    padding-top: calc(var(--header-h) + 1.5rem);
  }
  .hero__bottom { row-gap: 1.75rem; }
  .hero__bottom--page .hero__lede { grid-column: 1 / -1; }
  .hero__horizon {
    background:
      linear-gradient(var(--ridge), var(--ridge)) 0 0 / 100% 2px no-repeat,
      repeating-linear-gradient(90deg, rgba(29, 49, 73, 0.5) 0 1px, transparent 1px 6rem) 0 0 / 100% 0.5rem no-repeat,
      repeating-linear-gradient(90deg, rgba(29, 49, 73, 0.32) 0 1px, transparent 1px 1rem) 0 0 / 100% 0.25rem no-repeat;
  }
  .hero--home .hero__horizon {
    background:
      linear-gradient(rgba(246, 247, 250, 0.45), rgba(246, 247, 250, 0.45)) 0 0 / 100% 1px no-repeat,
      repeating-linear-gradient(90deg, rgba(246, 247, 250, 0.32) 0 1px, transparent 1px 6rem) 0 0 / 100% 0.5rem no-repeat,
      repeating-linear-gradient(90deg, rgba(246, 247, 250, 0.18) 0 1px, transparent 1px 1rem) 0 0 / 100% 0.25rem no-repeat;
  }
}


/* 8. Sections (generic) --------------------------------------------------- */

.section {
  position: relative;
  padding-block: var(--section-y);
}
/* one gap between sections, not two: only the first section after the hero
   keeps its top padding */
.section + .section { padding-top: 0; }

/* Every section opens the same way: a rule, a small kicker, then the
   section's name set large ("The challenge", "Our project", …). */
.section__head {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__head .kicker {
  margin-bottom: 0.875rem;
}
.section__name {
  font: 400 var(--step-3) / 1.05 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section__name em {
  font-weight: 300;
  color: var(--accent);
}
.section__name .wordmark-text { font-size: 0.8em; }

/* The statement under the name – large, but a step below it. */
.section__title {
  font: 400 var(--step-2) / 1.12 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 16em;
}
.section__title em { color: var(--accent); }
.section__title .wordmark-text { font-size: 0.8em; }

/* A single quiet line under the head, for sections that need no statement */
.section__lead {
  max-width: 34em;
  font: 300 var(--step-1) / 1.35 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.section__lead .wordmark-text { font-size: 0.8em; }

/* A recessed panel on the sand – partner box and similar callouts. */
.panel {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: none;
  background: var(--paper);
  border-radius: 5px;
  box-shadow:
    inset 2px 2px 5px rgba(104, 124, 152, 0.5),
    inset -2px -2px 5px rgba(104, 124, 152, 0.5);
}
.section--dusk .panel {
  background: rgba(var(--paper-rgb), 0.92);
}

/* An action row after a block */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* The page is one continuous horizon: the hero opens with dawn over the
   sand, the sections travel across the ground, and the last section runs it
   back into the midnight of the footer. Wherever a gradient is doing that
   work it gets the same grain as the hero so the surfaces read as one
   material. */
.hero + .section::before,
.section--dusk::before,
.section--dark::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.11;
  mix-blend-mode: overlay;
  background-image: var(--grain);
  background-size: 240px 240px;
}
.hero + .section:not(.section--dusk)::before {
  /* grain only where the ground is still sand, fading out with it */
  bottom: auto;
  height: var(--fade-h);
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}
.section > .container,
.site-footer > .container { position: relative; }

/* Dark surface: the night sky from the hero, cream ink. */
.section--dark {
  background: var(--ink);
  color: var(--cream);
}
.section--dark .section__head { border-color: var(--line-dark); }
.section--dark .kicker { color: var(--cream-soft); }
.section--dark ::selection { background: var(--sun); color: var(--ink); }

/* Dusk: the closing image of every page – the lower half of the hero's
   landscape. Content sits on the mist; below it the sky brightens towards
   the horizon behind the mountain ranges, and the charcoal ground in front
   runs on into the footer. */
.section--dusk {
  --dusk-h: clamp(14rem, 34vh, 24rem);
  --dusk-sky:
    #CFDAE7 calc(100% - var(--dusk-h) - 4rem),
    #A9C3DF 100%;
  padding-bottom: calc(var(--section-y) + var(--dusk-h));
  color: var(--ink);
  background:
    var(--mountains-ground) center bottom / 100% var(--dusk-h) no-repeat,
    linear-gradient(
      180deg,
      var(--paper-2) 0,
      var(--dusk-sky)
    );
}
.section--dusk .section__head { border-color: rgba(29, 49, 73, 0.24); }
.section--dusk .prose { color: rgba(29, 49, 73, 0.88); }

/* A page whose only section is the dusk one (gallery, contact): mist → paper
   for reading → back into the dusk. */
.hero + .section--dusk {
  background:
    var(--mountains-ground) center bottom / 100% var(--dusk-h) no-repeat,
    linear-gradient(
      180deg,
      var(--paper-2) 0,
      var(--paper) var(--fade-h),
      var(--paper) 55%,
      var(--dusk-sky)
    );
}

@media (max-width: 59.99em) {
  .section--dusk { --dusk-h: clamp(11rem, 26vh, 16rem); }
}

/* Home partners: the section above is plain paper, so the mist has to
   arrive gradually. A hard step to paper-2 reads as a cut under the photo. */
.section--partners.section--dusk {
  background:
    var(--mountains-ground) center bottom / 100% var(--dusk-h) no-repeat,
    linear-gradient(
      180deg,
      var(--paper) 0,
      var(--paper-2) clamp(8rem, 16vh, 14rem),
      var(--paper-2) calc(100% - var(--dusk-h) - 8rem),
      #CFDAE7 calc(100% - var(--dusk-h) - 4rem),
      #A9C3DF 100%
    );
}


/* 9. Home: challenge · project · goal & team · partners · highlights ------- */


/* the group photo sits in the column, at its own 3:2 frame */
.section--goal .team-photo {
  margin-block: var(--block-y) clamp(2rem, 4vw, 3rem);
}
.section--goal .button-row { margin-top: 0; }

.team-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
}

/* partners teaser: logos, then the "become a partner" box; the section
   darkens towards the dusk of the highlights */
.partner-box {
  margin-top: var(--block-y);
}
.partner-box .kicker { margin-bottom: 0.75rem; }
.partner-box__title {
  font: 400 var(--step-2) / 1.12 var(--font-display);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.partner-box > p:not(.kicker) {
  max-width: 36em;
  text-wrap: pretty;
}
.partner-box .button-row { margin-top: 1.75rem; }

/* highlights / gallery: a grid of photos, placeholders until then */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.grid + .gallery-grid { margin-top: clamp(2.5rem, 5vw, 4rem); }
.gallery-grid img,
.media-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  background: rgba(246, 247, 250, 0.55);
  font: 500 var(--step--2) / 1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.gallery-item figcaption {
  margin-top: 0.625rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
@media (max-width: 59.99em) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36em) {
  .gallery-grid { grid-template-columns: 1fr; }
}


/* 10. Become a partner --------------------------------------------------- */

.become__intro .section__title { margin-bottom: clamp(1.5rem, 3vw, 2rem); }
.become__intro .button-row { margin-top: clamp(2rem, 4vw, 2.5rem); }

/* Ways to support: a ruled list – title in the display face, one line of
   detail under it. */
.ways {
  align-self: start;
  border-bottom: 1px solid rgba(29, 49, 73, 0.24);
}
.ways li {
  padding-block: clamp(1.5rem, 2.5vw, 2rem);
  border-top: 1px solid rgba(29, 49, 73, 0.24);
}
.ways li:first-child { border-top-color: var(--ink); }
.ways h3 {
  font: 400 var(--step-1) / 1.15 var(--font-display);
  letter-spacing: -0.015em;
}
.ways p {
  margin-top: 0.4rem;
  max-width: 30em;
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.ways .wordmark-text { font-size: 0.8em; }

@media (max-width: 59.99em) {
  .ways { margin-top: 0.5rem; }
}


/* 11. Team ---------------------------------------------------------------- */

/* the paragraph that opens the team page, above the portraits */
.section--members .prose {
  margin-bottom: var(--block-y);
}

.portraits {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(0.75rem, 1.5vw, 1.25rem);
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-2);
  /* pull the green foliage slightly towards the warm palette */
  filter: saturate(0.88);
  transition: filter 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.portrait {
  overflow: hidden;
  border-radius: 2px;
}
.portrait:hover img {
  filter: saturate(1);
  transform: scale(1.018);
}
.portrait figcaption {
  margin-top: 0.75rem;
  line-height: 1.35;
}
.portrait figcaption b {
  display: block;
  font-weight: 500;
  font-size: var(--step--1);
}
.portrait figcaption span {
  display: block;
  font-size: var(--step--2);
  color: var(--ink-soft);
}
.portrait__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  border: 1px dashed var(--line);
  background: var(--paper-2);
}

@media (max-width: 59.99em) {
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.section--supervision {
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
}
.section--supervision .section__lead {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Institution logos in a row, on a hairline */
/* The strip under the hero: shallower than a full section, so it reads as a
   footnote to the hero rather than as the first chapter of the page. */
.section--collaborators {
  /* short above (it belongs to the hero), a normal section gap below, because
     the next section drops its own top padding after any .section */
  padding-top: clamp(2rem, 4vw, 3.25rem);
  padding-bottom: var(--section-y);
}
.section--collaborators .kicker {
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.logo-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: var(--block-y);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.logo-strip--plain {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.logo-strip li {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.logo-strip a {
  display: block;
  line-height: 0;
  transition: opacity 0.2s ease;
}
.logo-strip a:hover { opacity: 0.78; }
.logo-strip img {
  width: auto;
  height: clamp(3.5rem, 7vw, 5.25rem);
  max-width: min(100%, 20rem);
  object-fit: contain;
  object-position: center center;
}
.logo-strip .logo-strip__eth {
  height: clamp(2.15rem, 4.2vw, 3.1rem);
  max-width: min(100%, 16rem);
}

@media (max-width: 36em) {
  .logo-strip {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 1.75rem;
  }
  .logo-strip li {
    flex: 0 1 auto;
  }
  .logo-strip img {
    height: 2.65rem;
  }
  .logo-strip .logo-strip__eth {
    height: 1.5rem;
  }
}


/* 12. Partners page ------------------------------------------------------- */

/* Partner logos by tier: centred rows, no frames – the bigger the tier,
   the bigger the logo. Each grid size is a box the logo has to fit in. */
.section--tiers {
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
}
.tier {
  --tier-color: var(--ink-faint);
  text-align: center;
}
.tier--diamond  { --tier-color: var(--sky); }
.tier--platinum { --tier-color: #B8C9D9; }
.tier--gold     { --tier-color: #C29A3B; }
.tier--silver { --tier-color: #9AA3AB; }
.tier--bronze { --tier-color: #A86A3D; }
.tier + .tier {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.tier__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  font: 500 var(--step-1) / 1.4 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
/* Short rules in the tier colour, fading out so the label reads as the break between groups. */
.tier__name::before,
.tier__name::after {
  content: "";
  width: clamp(2.25rem, 12vw, 7rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tier-color) 62%, var(--ink)));
}
.tier__name::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--tier-color) 62%, var(--ink)), transparent);
}
.tier__name span {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.tier__name span::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  flex: none;
  border-radius: 50%;
  background: var(--tier-color);
}
.logo-grid {
  --logo-h: 3.5rem;
  --logo-w: 16rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem) clamp(2rem, 6vw, 5rem);
}
.logo-grid--2xl { --logo-h: clamp(7rem, 12vw, 10rem);  --logo-w: 34rem; }
.logo-grid--xl  { --logo-h: clamp(4.75rem, 8vw, 6.25rem); --logo-w: 24rem; }
.logo-grid--lg  { --logo-h: clamp(3rem, 5vw, 4.25rem); --logo-w: 16rem; }
.logo-grid--md  { --logo-h: clamp(2.25rem, 4vw, 3rem);  --logo-w: 11rem; }
.logo-grid--sm  { --logo-h: clamp(1.5rem, 3vw, 2rem);   --logo-w: 9rem; }
.logo-grid li {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}
.logo-grid a {
  display: block;
  width: fit-content;
  /* Cap width on the link with a fixed length, not a %: % max-widths are ignored when
     the flex row sizes its items, so wide logos left an empty box and pushed the row
     off-centre. The li's max-width: 100% still keeps it inside narrow screens. */
  max-width: var(--logo-w);
  line-height: 0;
  transition: opacity 0.2s ease;
}
.logo-grid a:hover { opacity: 0.78; }
.logo-grid img {
  width: auto;
  height: auto;
  max-height: var(--logo-h);
  max-width: 100%;
  object-fit: contain;
}
/* Diamond lockups can be narrower than the link’s height-based width; keep the mark centred in that box. */
.logo-grid--2xl img {
  margin-inline: auto;
}
/* Very wide wordmarks (≈8:1) hit the width cap long before the height cap; give them room to match their tier. */
.logo-grid__link--wide { --logo-w: 24rem; }
/* Tall lockups hit the bronze width cap and read too large vs silver; keep them in scale. */
.logo-grid--sm .logo-grid__logo--compact {
  max-height: clamp(0.85rem, 2vw, 1.1rem);
  max-width: 5.75rem;
}
/* until the real logos are here */
.logo-placeholder {
  font: 500 var(--step--2) / 1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}


/* 14. Footer -------------------------------------------------------------- */

.site-footer {
  position: relative;
  background: var(--charcoal);
  color: var(--cream);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
}
.site-footer__logo {
  width: auto;
  height: clamp(2rem, 2.8vw, 2.5rem);
}
.site-footer__mark {
  width: clamp(9rem, 14vw, 12rem);
  height: auto;
}
.site-footer__claim {
  margin-top: 1.25rem;
  font: 300 var(--step-1) / 1.3 var(--font-display);
  color: var(--peach);
}

.site-footer .kicker { margin-bottom: 0.875rem; white-space: nowrap; }
.site-footer address p:not(.kicker) {
  line-height: 1.6;
}
.site-footer__mail {
  margin-bottom: 0.875rem;
  font-weight: 500;
}
.site-footer__mail .link { text-decoration-color: var(--sun); }
.site-footer__nav li + li { margin-top: 0.25rem; }
.site-footer__nav .link {
  text-decoration-color: var(--line-dark);
}
.site-footer__nav .link:hover {
  color: var(--sun);
  text-decoration-color: var(--sun);
}
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  font: 500 var(--step--2) / 1.5 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-faint);
}
.site-footer__up {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer__up:hover { color: var(--cream); }

@media (max-width: 59.99em) {
  .site-footer__top { row-gap: 2.5rem; }
  .site-footer__bottom { gap: 0.75rem 1.5rem; }
}
.site-footer__bottom p { margin: 0; }


/* 15. Motion & accessibility ---------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .nav-toggle, .skip-link, .site-footer__up { display: none; }
  .hero, .hero__sky, .hero__ground { min-height: auto; color: #000; background: none; }
  .hero--home, .hero--home .hero__sky, .hero--home .hero__ground { min-height: auto; background: none; }
  .hero__sky::after, .hero--home .hero__ground::after, .hero--home::after,
  .hero__track, .hero__horizon, .hero__next, .hero__flora { display: none; }
  .hero__top { padding: 1rem 0; }
  .hero__wordmark { margin-bottom: 0; max-width: 100%; }
  .hero__wordmark, .hero__lede, .hero__title { color: #000; text-shadow: none; }
  .hero__wordmark-svg { filter: none; }
  .section--dark, .section--dusk, .site-footer { background: none; color: #000; }
  .site-nav__social { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
