/* ISSLA RISK - shared base styles. Bump ?v=N in src/partials/head.html (site.json css_version) when this file changes. */

/* ---------- Tokens ---------- */
:root {
  /* Colour: deep petrol green, warm paper, restrained brass. All text pairs >= 4.5:1. */
  --paper: #f6f4ee;
  --paper-alt: #ebe8df;
  --white: #ffffff;
  --ink: #13232b;
  --ink-soft: #46545c;
  --petrol-900: #03283c;
  --petrol-800: #07374d;
  --petrol-700: #0d4a66;
  --petrol-600: #176282;
  --brass: #c4a468;
  --brass-ink: #76591f;
  --on-dark: #f6f4ee;
  --on-dark-soft: #b9c5cb;
  --line: #d6d2c6;
  --line-dark: rgba(246, 244, 238, 0.18);
  --error: #9b2c2c;
  --focus: #1b516c;

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-300: 0.875rem;
  --fs-400: 1rem;
  --fs-500: 1.125rem;
  --fs-600: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --fs-700: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --fs-800: clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-900: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
  --lh-tight: 1.12;
  --lh-snug: 1.3;
  --lh-body: 1.65;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: clamp(4rem, 3rem + 5vw, 8rem);

  /* Layout */
  --wrap: 72rem;
  --wrap-narrow: 46rem;
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  --header-h: 4.5rem;
  --radius: 2px;

  /* ---------- Motion system (see README_BUILD.md, "Motion system") ----------
     One language: slow, precise, no bounce. One primary easing (--ease-out) for entrances and
     movement, one symmetric easing (--ease-inout) for state swaps/exits.
     Durations: --dur-fast hover/colour, --dur-base standard, --dur-slow reveals.
     Reveals: opacity + --rise + (few elements only) --blur-in, staggered by --stagger.
     Everything that hides content is gated by html.motion (set before paint, only when the visitor
     has not asked for reduced motion), so content is always visible without JS / with reduced motion. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 240ms;
  --dur-base: 600ms;
  --dur-slow: 1000ms;
  --dur-out: 700ms; /* reversed reveal (scrolling back up): ~0.7x, no stagger */
  --stagger: 90ms;
  --rise: 20px;
  --blur-in: 6px;
  --ease: var(--dur-fast) var(--ease-out); /* legacy shorthand: duration + easing for simple colour transitions */

  /* Accent: ONE place to change the highlight colour (hover lines, cursor, submenu line, focus accents).
     Currently brass. The logo's orange is a candidate (see README_BUILD.md). */
  --accent: var(--brass);
  --accent-ink: var(--brass-ink); /* the same accent, darkened for use on light backgrounds */
  --link-rest: rgba(19, 64, 87, 0.4); /* resting underline of text links on light backgrounds */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--fs-400) / var(--lh-body) var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; line-height: var(--lh-snug); margin: 0 0 var(--sp-4); letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--fs-900); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-800); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }
p { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
a { color: var(--petrol-700); text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: color var(--ease); }
a:hover { color: var(--petrol-900); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
button { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }

.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;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(var(--wrap-narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--sp-9); }
.section--alt { background: var(--paper-alt); }
.section--dark { background: var(--petrol-900); color: var(--on-dark); --focus: #e3c27a; --link-rest: rgba(246, 244, 238, 0.4); }
.section--dark a { color: var(--on-dark); }
.section--dark a:hover { color: var(--brass); }
.prose > * + * { margin-top: var(--sp-4); }
.prose { max-width: 40rem; }
.eyebrow {
  display: block; margin: 0 0 var(--sp-4);
  font: 600 var(--fs-300) / 1.4 var(--font-sans); letter-spacing: 0.01em; color: var(--brass-ink);
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--brass); }
.lede { font-size: var(--fs-500); color: var(--ink-soft); max-width: 40rem; }
.section--dark .lede, .hero .lede { color: var(--on-dark-soft); }
.grid { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 3rem; padding: 0.75rem 1.5rem; border: 1px solid transparent; border-radius: var(--radius);
  font: 600 var(--fs-400) / 1.2 var(--font-sans); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover { transform: translate3d(0, -1px, 0); }
.btn:active { transform: none; transition-duration: 90ms; }
.btn--primary { background: var(--petrol-800); color: var(--white); border-color: var(--petrol-800); }
.btn--primary:hover { background: var(--petrol-900); color: var(--white); }
.btn--secondary { background: transparent; color: var(--petrol-800); border-color: var(--petrol-800); }
.btn--secondary:hover { background: var(--petrol-800); color: var(--white); }
.btn--sm { min-height: 2.5rem; padding: 0.5rem 1.1rem; font-size: var(--fs-300); }
.section--dark .btn--primary, .hero .btn--primary { background: var(--brass); color: var(--petrol-900); border-color: var(--brass); }
.section--dark .btn--primary:hover, .hero .btn--primary:hover { background: #d6b87c; color: var(--petrol-900); }
.section--dark .btn--secondary, .hero .btn--secondary { color: var(--on-dark); border-color: rgba(246, 244, 238, 0.55); }
.section--dark .btn--secondary:hover, .hero .btn--secondary:hover { background: var(--on-dark); color: var(--petrol-900); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--sp-4); top: -4rem; z-index: 200; padding: 0.75rem 1.25rem;
  background: var(--petrol-900); color: var(--white); font-weight: 600; text-decoration: none; border-radius: var(--radius);
}
.skip-link:focus { top: var(--sp-3); outline: 3px solid #e3c27a; outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); min-height: var(--header-h); flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; padding-block: var(--sp-2); text-decoration: none; }
.wordmark img { display: block; width: min(11.25rem, 46vw); height: auto; } /* 180 px; width/height attributes reserve the box */
.nav-toggle {
  display: none; align-items: center; gap: var(--sp-2); min-height: 2.75rem; padding: 0.5rem 0.9rem;
  background: transparent; border: 1px solid var(--petrol-800); border-radius: var(--radius); color: var(--petrol-800); cursor: pointer;
  font-weight: 600; font-size: var(--fs-300); letter-spacing: 0.01em;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 1.1rem; height: 2px; background: currentColor; transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav { flex: 1 1 100%; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nav-list > li { border-top: 1px solid var(--line); position: relative; }
.nav-link, .nav-cta-item a { display: flex; align-items: center; min-height: 3rem; padding: 0.5rem 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-link:hover { color: var(--petrol-600); }
.nav-link[aria-current] { color: var(--petrol-600); box-shadow: inset 0 -2px 0 var(--accent); }
.sub-toggle { display: none; }
.sub { list-style: none; margin: 0; padding: 0 0 var(--sp-3) var(--sp-4); }
.sub a { display: block; padding: 0.45rem 0; color: var(--ink-soft); text-decoration: none; font-size: var(--fs-300); }
.sub a:hover { color: var(--petrol-700); }
.sub a[aria-current="page"] { color: var(--petrol-700); font-weight: 600; }
.nav-cta-item { padding: var(--sp-4) 0 var(--sp-3); }
.nav-cta-item .btn { width: 100%; color: var(--white); }

/* No-JS: nav is simply visible. With JS on small screens it collapses behind the toggle. */
.js .nav-toggle { display: inline-flex; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; padding-bottom: var(--sp-4); }

@media (min-width: 1200px) {
  :root { --header-h: 5rem; }
  .header-inner { flex-wrap: nowrap; }
  .js .nav-toggle { display: none; }
  .js .site-nav, .js .site-nav.is-open, .site-nav { display: block; flex: 0 1 auto; max-height: none; overflow: visible; padding: 0; }
  .nav-list { flex-direction: row; align-items: center; gap: clamp(0.9rem, 0.4rem + 1.2vw, 1.75rem); }
  .nav-list > li { border: 0; }
  .nav-link, .nav-cta-item a { min-height: 2.75rem; font-size: 0.9375rem; white-space: nowrap; }
  .nav-link[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
  .nav-cta-item { padding: 0; margin-left: var(--sp-2); }
  .site-nav { align-self: stretch; }
  .nav-list { height: 100%; }
  .nav-cta-item .btn { width: auto; min-height: 2.75rem; padding: 0.55rem 1.2rem; font-size: 0.9375rem; white-space: nowrap; }
  .has-sub { display: flex; align-items: center; align-self: stretch; } /* li spans the header height: the panel starts at the header's lower edge, no hover gap */
  .sub-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 2.75rem; padding: 0;
    background: transparent; border: 0; cursor: pointer; color: var(--ink-soft); transition: color var(--ease);
  }
  .sub-toggle:hover { color: var(--ink); }
  .sub-toggle svg { width: 0.7rem; height: 0.7rem; transition: transform var(--dur-base) var(--ease-out); }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

  /* Submenu panel: petrol, hairline border, restrained depth. Enter 380 ms ease-out; leave 240 ms ease-in-out.
     visibility (not display) keeps closed links out of the tab order while allowing the transition. */
  .sub {
    --sub-in: 380ms; --sub-out: 240ms;
    position: absolute; top: 100%; left: -1.25rem; min-width: 19.5rem; padding: var(--sp-3) 0; z-index: 110;
    background: var(--petrol-900); border: 1px solid var(--line-dark); border-top: 0; --focus: #e3c27a;
    box-shadow: 0 28px 40px -28px rgba(1, 8, 11, 0.55);
    visibility: hidden; opacity: 0; pointer-events: none; transform: translate3d(0, -6px, 0); filter: blur(6px);
    transition: opacity var(--sub-out) var(--ease-inout), transform var(--sub-out) var(--ease-inout), filter var(--sub-out) var(--ease-inout), visibility 0s linear var(--sub-out);
  }
  .sub::before { /* accent line drawing across the top edge */
    content: ""; position: absolute; left: -1px; right: -1px; top: 0; height: 2px; background: var(--accent);
    transform: scaleX(0); transform-origin: left center; transition: transform var(--sub-out) var(--ease-inout);
  }
  .sub li { opacity: 0; transform: translate3d(0, 4px, 0); transition: opacity var(--sub-out) var(--ease-inout), transform var(--sub-out) var(--ease-inout); }
  .sub li:nth-child(2) { --si: 1; } .sub li:nth-child(3) { --si: 2; } .sub li:nth-child(4) { --si: 3; }
  .sub li:nth-child(5) { --si: 4; } .sub li:nth-child(6) { --si: 5; } .sub li:nth-child(7) { --si: 6; }
  .sub a { padding: 0.7rem 1.5rem; font-size: 0.9375rem; color: var(--on-dark-soft); transition: color var(--ease), background-size var(--dur-base) var(--ease-out), transform var(--ease); }
  .sub a:hover, .sub a:focus-visible { color: var(--on-dark); transform: translate3d(2px, 0, 0); }
  .sub a[aria-current="page"] { color: var(--on-dark); }
  .has-sub.is-open > .sub, html:not(.js) .has-sub:hover > .sub, html:not(.js) .has-sub:focus-within > .sub {
    visibility: visible; opacity: 1; pointer-events: auto; transform: none; filter: none;
    transition: opacity var(--sub-in) var(--ease-out), transform var(--sub-in) var(--ease-out), filter var(--sub-in) var(--ease-out), visibility 0s;
  }
  .has-sub.is-open > .sub::before, html:not(.js) .has-sub:hover > .sub::before, html:not(.js) .has-sub:focus-within > .sub::before {
    transform: scaleX(1); transition: transform 720ms var(--ease-out) 40ms;
  }
  .has-sub.is-open > .sub li, html:not(.js) .has-sub:hover > .sub li, html:not(.js) .has-sub:focus-within > .sub li {
    opacity: 1; transform: none;
    transition: opacity 420ms var(--ease-out) calc(110ms + var(--si, 0) * 35ms), transform 420ms var(--ease-out) calc(110ms + var(--si, 0) * 35ms);
  }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--paper); border-bottom: 1px solid var(--line); font-size: var(--fs-300); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0; padding: var(--sp-3) 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb [aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--petrol-900); color: var(--on-dark); --focus: #e3c27a; overflow: hidden;
  padding-block: clamp(4rem, 2rem + 9vw, 9rem);
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(27, 81, 108, 0.45), transparent 70%),
    linear-gradient(180deg, var(--petrol-900), #061c27);
}
.hero::after { /* fine rule, no imagery */
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--line-dark);
}
.hero::before { /* edge vignette: sits over the map, under the text */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 75% 85% at 50% 48%, transparent 55%, rgba(1, 8, 11, 0.55) 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 54rem; }
.hero .display { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-900); line-height: var(--lh-tight); letter-spacing: -0.005em; text-wrap: balance; color: var(--on-dark); margin: 0 0 var(--sp-4); }
.hero h1 { color: var(--on-dark-soft); font-size: var(--fs-600, 1.25rem); font-family: var(--font-sans, inherit); font-weight: 400; line-height: var(--lh-snug); max-width: none; white-space: nowrap; margin-bottom: var(--sp-3); }
.hero .lede { max-width: none; }
@media (max-width: 820px) { .hero h1 { white-space: normal; } }
.hero .lede { font-size: var(--fs-600); line-height: 1.5; margin-bottom: var(--sp-6); max-width: 44rem; }
.hero__support { margin: var(--sp-7) 0 0; padding-top: var(--sp-5); border-top: 1px solid var(--line-dark); color: var(--on-dark-soft); font-size: var(--fs-400); letter-spacing: 0.02em; max-width: 44rem; }
.hero a { color: var(--on-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--petrol-900); color: var(--on-dark-soft); padding-block: var(--sp-8) var(--sp-5); font-size: var(--fs-300); --focus: #e3c27a; }
.footer-top { display: grid; gap: var(--sp-7); grid-template-columns: 1fr; padding-bottom: var(--sp-7); }
.footer-logo { display: block; width: 9.5rem; height: auto; margin: 0 0 var(--sp-6); }
.footer-headline { font: 500 var(--fs-600) / 1.35 var(--font-serif); color: var(--on-dark); margin: 0; max-width: 24rem; text-wrap: balance; }
.footer-institutional { font-family: var(--font-serif); font-style: italic; color: var(--brass); font-size: var(--fs-400); margin: var(--sp-4) 0 0; }
.footer-nav { display: grid; gap: var(--sp-6) var(--sp-7); grid-template-columns: repeat(2, max-content); align-content: start; justify-content: start; padding-top: 0.2rem; }
.footer-nav ul, .footer-legal { list-style: none; margin: 0; padding: 0; }
.footer-nav a, .linklike { display: inline-block; padding: 0.35rem 0; color: var(--on-dark-soft); text-decoration: none; font-size: var(--fs-400); }
.footer-nav a:hover, .linklike:hover { color: var(--on-dark); }
.linklike { background: none; border: 0; cursor: pointer; text-align: left; font: inherit; font-size: var(--fs-300); }
.footer-bottom { padding-top: var(--sp-5); border-top: 1px solid var(--line-dark); display: grid; gap: var(--sp-4); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); }
.footer-legal a, .footer-legal .linklike { padding: 0.3rem 0; font-size: var(--fs-300); color: var(--on-dark-soft); opacity: 0.85; }
.footer-legal a:hover, .footer-legal .linklike:hover { opacity: 1; }
.footer-entity, .footer-ai { margin: 0; max-width: 64rem; font-size: 0.8125rem; line-height: 1.5; opacity: 0.7; }
.footer-entity + .footer-ai { margin-top: calc(var(--sp-2) * -1); }
.footer-legal .linklike[aria-pressed="true"] { opacity: 1; color: var(--on-dark); }
@media (min-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: start; }
  .footer-nav { justify-content: end; column-gap: clamp(3rem, 8vw, 7rem); }
}

/* ---------- Cookie banner ---------- */
.cc {
  position: fixed; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); z-index: 300; max-width: 44rem; margin-inline: auto;
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-top: 3px solid var(--petrol-800);
  box-shadow: 0 16px 48px rgba(9, 36, 50, 0.22); padding: var(--sp-5);
}
.cc[hidden] { display: none; }
.cc h2 { font: 600 var(--fs-500) / 1.3 var(--font-serif); margin: 0 0 var(--sp-2); }
.cc p { margin: 0 0 var(--sp-4); font-size: var(--fs-300); color: var(--ink-soft); }
.cc__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.cc__actions .btn { flex: 1 1 9rem; }
.cc__short { display: none; }
@media (min-width: 760px) { .cc { left: auto; right: var(--sp-5); bottom: var(--sp-5); margin: 0; } }
/* Small screens: compact bottom bar. Text scrolls inside if the viewport is tiny; the two buttons always stay visible.
   Page gets bottom padding only while it is open (html.cc-open, --cc-h set by site.js). */
@media (max-width: 759px) {
  .cc {
    left: 0; right: 0; bottom: 0; max-width: none; margin: 0; display: flex; flex-direction: column; gap: var(--sp-2);
    max-height: max(32vh, 9.5rem); max-height: max(32svh, 9.5rem);
    padding: var(--sp-3) max(var(--sp-4), env(safe-area-inset-right)) max(var(--sp-3), env(safe-area-inset-bottom)) max(var(--sp-4), env(safe-area-inset-left));
    box-shadow: 0 -8px 28px rgba(9, 36, 50, 0.2);
  }
  .cc[hidden] { display: none; }
  .cc__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .cc h2 { font-size: var(--fs-400); margin-bottom: var(--sp-1); }
  .cc p { margin: 0; font-size: 0.8125rem; line-height: 1.45; }
  .cc__long { display: none; }
  .cc__short { display: inline; }
  .cc__actions { flex-wrap: nowrap; flex: 0 0 auto; }
  .cc__actions .btn { flex: 1 1 0; min-width: 0; padding-block: 0.5rem; }
  html.cc-open .site-footer { padding-bottom: calc(var(--sp-5) + var(--cc-h, 0px)); }
}
@media (min-width: 560px) and (max-width: 759px) and (orientation: landscape) and (max-height: 520px) {
  .cc { flex-direction: row; align-items: center; gap: var(--sp-4); max-height: none; }
  .cc__body { flex: 1 1 auto; max-height: 40svh; }
  .cc__actions { flex: 0 0 15rem; }
}

/* ---------- Forms (contact component) ---------- */
.form { display: grid; gap: var(--sp-5); }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--sp-5); min-width: 0; }
.form legend { padding: 0; font: 600 var(--fs-300) / 1.4 var(--font-sans); letter-spacing: 0.01em; color: var(--brass-ink); margin-bottom: var(--sp-3); }
.field { display: grid; gap: var(--sp-2); min-width: 0; }
.field label { font-weight: 600; font-size: var(--fs-300); }
.field .req { color: var(--error); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid #8a959a; border-radius: var(--radius);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--petrol-700); }
.field .hint { font-size: var(--fs-300); color: var(--ink-soft); margin: 0; }
.form-row { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--fs-300); }
.check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin-top: 0.15rem; flex: none; accent-color: var(--petrol-800); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5rem; margin: 0; font-weight: 600; }
.form-status[data-state="error"] { color: var(--error); }
.form-status[data-state="ok"] { color: var(--petrol-700); }

/* ---------- 404 / utility ---------- */
.notfound { padding-block: var(--sp-9); }
.notfound .code { font: 600 var(--fs-300) / 1 var(--font-sans); letter-spacing: 0.01em; color: var(--brass-ink); margin-bottom: var(--sp-4); display: block; }

/* ---------- Link identity (shared by every text link) ----------
   Hover/focus-visible: a 1px accent line expands from the left (background-size, no layout change).
   Colour shifts with --dur-fast. Link text never scales. */
.more, .nav-link:not([aria-current]), .sub a, .footer-nav a, .linklike, .breadcrumb a, .cv__body h3 a, .u-link {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; background-origin: content-box;
  transition: color var(--ease), background-size var(--dur-base) var(--ease-out);
}
.more:hover, .more:focus-visible, .nav-link:not([aria-current]):hover, .nav-link:not([aria-current]):focus-visible,
.sub a:hover, .sub a:focus-visible, .footer-nav a:hover, .footer-nav a:focus-visible, .linklike:hover, .linklike:focus-visible,
.breadcrumb a:hover, .breadcrumb a:focus-visible,
.cv__body h3 a:hover, .cv__body h3 a:focus-visible, .u-link:hover, .u-link:focus-visible { background-size: 100% 1px; }
.sub a { transition: color var(--ease), background-size var(--dur-base) var(--ease-out), transform var(--ease); }

/* ---------- Section primitives shared by home and inner pages (moved from home.css, rules unchanged) ---------- */
.hs { padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.hs__title { font-size: var(--fs-700); max-width: 34rem; margin-bottom: var(--sp-6); }
.hs__intro { color: var(--ink-soft); font-size: var(--fs-500); max-width: 40rem; }
.hs__centre { text-align: center; }
.hs__centre .hs__title, .hs__centre .hs__intro { margin-inline: auto; }
.btn-row--centre { justify-content: center; }

.more {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding-block: 0.7rem; line-height: 1.35;
  font-weight: 600; color: var(--petrol-700); text-decoration: none;
  /* resting hairline under the text; the accent line (base.css) draws over it on hover/focus */
  background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--link-rest), var(--link-rest));
  background-size: 0 1px, 100% 1px;
}
.more:hover, .more:focus-visible { color: var(--petrol-900); background-size: 100% 1px, 100% 1px; }
.section--dark .more { color: var(--on-dark); }

/* ---------- Hero title: character entrance (CSS only) ----------
   tools/build_site.py splits [data-split] text at BUILD time: nowrap word spans, character spans with an inline --i, the real
   text once in a visually-hidden span, the split copy aria-hidden. The reveal is a pure CSS animation under html.motion
   (set by the inline head script before paint), so it starts at first paint without waiting for any JS. Nothing is hidden by
   default: the hidden state exists only as the animation's backwards fill, so no-JS / no-animation / reduced motion show the text.
   ~22 ms per character, ~1.15 s for the 37-character slogan; hero H1 / lede / buttons follow right after. */
.sw { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; }
.ch::before { content: attr(data-c); }
html.motion .ch { animation: ch-in 360ms var(--ease-out) calc(var(--i, 0) * 22ms) both; }
@keyframes ch-in {
  from { opacity: 0; filter: blur(8px); transform: translate3d(0, 0.35em, 0); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
html.motion .hero__inner > :not([data-split]) { animation: hero-in var(--dur-base) var(--ease-out) calc(560ms + var(--hi, 0) * 90ms) both; }
.hero__inner > :nth-child(2) { --hi: 0; }
.hero__inner > :nth-child(3) { --hi: 1; }
.hero__inner > :nth-child(4) { --hi: 2; }
.hero__inner > :nth-child(5) { --hi: 3; }
@keyframes hero-in {
  from { opacity: 0; transform: translate3d(0, calc(var(--rise) * 0.6), 0); }
  to { opacity: 1; transform: none; }
}

/* ---------- Scroll reveals (motion.js toggles .is-in) ----------
   [data-reveal]        opacity + rise + blur (use on a few headings only)
   [data-reveal="fade"] opacity only
   [data-reveal-group]  children rise ~12 px (no blur), staggered by --i * --stagger
   Reversible: leaving through the BOTTOM edge (scrolling back up) removes .is-in; the hidden state carries the quicker
   exit transition (--dur-out, no delay), the .is-in state carries the entrance (--dur-slow + stagger). Hero is once-only. */
html.motion [data-reveal] {
  opacity: 0; transform: translate3d(0, var(--rise), 0); filter: blur(var(--blur-in));
  transition: opacity var(--dur-out) var(--ease-out), transform var(--dur-out) var(--ease-out), filter var(--dur-out) var(--ease-out);
}
html.motion [data-reveal="fade"] { transform: none; filter: none; }
html.motion [data-reveal].is-in {
  opacity: 1; transform: none; filter: none;
  transition: opacity var(--dur-slow) var(--ease-out) var(--rd, 0ms), transform var(--dur-slow) var(--ease-out) var(--rd, 0ms), filter var(--dur-slow) var(--ease-out) var(--rd, 0ms);
}
[data-reveal-group] > * { --rd: calc(var(--i, 0) * var(--stagger)); }
html.motion [data-reveal-group] > * {
  opacity: 0; transform: translate3d(0, calc(var(--rise) * 0.6), 0);
  transition: opacity var(--dur-out) var(--ease-out), transform var(--dur-out) var(--ease-out);
}
html.motion [data-reveal-group].is-in > * {
  opacity: 1; transform: none;
  transition: opacity var(--dur-slow) var(--ease-out) var(--rd), transform var(--dur-slow) var(--ease-out) var(--rd);
}

/* ---------- Counter ([data-count], motion.js) ----------
   Final value is always in the markup; tabular figures keep the width steady while it counts. */
[data-count] { font-variant-numeric: tabular-nums; }
[data-count].is-counting { display: inline-block; }

/* ---------- Custom cursor (cursor.js; fine pointers only) ---------- */
.cur { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); --cur: var(--accent-ink); }
.cur.is-on { opacity: 1; }
.cur--dark { --cur: var(--accent); }
.cur__d, .cur__r { position: absolute; left: 0; top: 0; will-change: transform; }
.cur__d i { display: block; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--cur); transition: background-color var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.cur__r i {
  display: block; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 1px solid var(--cur); border-radius: 50%; opacity: 0.6;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.cur--hover .cur__r i { transform: scale(1.6); opacity: 0.32; }
.cur--hover .cur__d i { opacity: 0.55; }
.cur--down .cur__r i { transform: scale(0.8); opacity: 0.85; transition-duration: 160ms; }
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .cur { display: none !important; } }

/* ---------- Pause animations (html.motion-paused, toggled from the footer; WCAG 2.2.2) ----------
   Decorative loops and parallax/drift stop and settle to their still state. Content is never hidden: every hidden state in the
   motion system is an entrance (backwards fill / html.motion), not a loop. Default state = prefers-reduced-motion. */
html.motion-paused .hero-map *, html.motion-paused .hs--partners::before, html.motion-paused .hs--record::before { animation: none !important; }
html.motion-paused [data-parallax] { transform: none !important; }

/* ---------- Reduced motion: everything visible and still ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  [data-reveal], [data-reveal-group] > *, [data-reveal-each] > *, [data-split], .cv-n, .cv-k { opacity: 1 !important; transform: none !important; filter: none !important; }
}

@media print {
  [data-reveal], [data-reveal-group] > *, [data-reveal-each] > *, [data-split], .cv-n, .cv-k { opacity: 1 !important; transform: none !important; filter: none !important; }
  .site-header, .cc, .skip-link, .nav-toggle { display: none !important; }
  body { background: #fff; }
}

/* Page heroes without an eyebrow: the H1 leads in the home serif; the lede runs wide enough for 3-4 lines */
.hero.hero--lead h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.25rem, 1.4rem + 2vw, 3.25rem); line-height: 1.12; letter-spacing: -0.012em; text-wrap: balance; text-rendering: optimizeLegibility; font-kerning: normal; font-feature-settings: "kern", "liga", "onum"; -webkit-font-smoothing: antialiased; color: var(--on-dark); white-space: normal; max-width: 34ch; margin-bottom: var(--sp-5); }
.hero.hero--lead:not(.hero--globe) .hero__inner { max-width: 66rem; }
.hero.hero--lead .lede { max-width: 62rem; font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem); line-height: 1.6; color: var(--on-dark-soft); text-wrap: pretty; margin-bottom: var(--sp-6); }
.hero.hero--lead.hero--globe .lede { max-width: 36rem; }
.hero.hero--lead.hero--globe .hero__inner { max-width: 48rem; }
.hero.hero--lead.hero--globe .lede { max-width: 44rem; }

/* ---------- Mobile polish: lighter cookie bar, 44px touch targets, faster hero reveal ---------- */
@media (max-width: 759px) {
  .cc { gap: var(--sp-2); padding-block: var(--sp-2) max(var(--sp-2), env(safe-area-inset-bottom)); }
  .cc h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .cc p { font-size: 0.75rem; line-height: 1.4; }
  .cc__actions .btn { min-height: 44px; padding-block: 0.4rem; }
  [aria-label="Breadcrumb"] a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer li > a, .site-footer .linklike { display: inline-flex; align-items: center; min-height: 44px; }
  dd > a, .ct__partner a { display: inline-flex; align-items: center; min-height: 44px; }
  .svp__txt h3 a { display: inline-block; padding-block: 0.6rem; }
  .check { display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; }
  .check input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 22px; }
  html.motion .hero__inner > :not([data-split]) { animation-delay: calc(60ms + var(--hi, 0) * 50ms); animation-duration: 360ms; }
}
