/* ==========================================================================
   CA-BRIP block theme — theme.css
   Ported from the approved v1 mockup (CA-BRIP website/assets/css/site.css).
   Selectors are retargeted to WordPress core block markup. Colours and fonts
   come from theme.json presets so the editor and front end share one source.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette — defined once in theme.json */
  --c-forest:    var(--wp--preset--color--forest);
  --c-earth:     var(--wp--preset--color--earth);
  --c-sage:      var(--wp--preset--color--sage);
  --c-olive:     var(--wp--preset--color--olive);
  --c-bark:      var(--wp--preset--color--bark);
  --c-mist:      var(--wp--preset--color--mist);

  /* Derived surface + ink tones (kept within the brand's hue family) */
  --c-paper:     var(--wp--preset--color--paper);
  --c-white:     var(--wp--preset--color--white);
  --c-ink:       var(--wp--preset--color--ink);
  --c-ink-muted: var(--wp--preset--color--ink-muted);
  --c-rule:      var(--wp--preset--color--rule);   /* keyline — sage-derived */
  --c-forest-dk: #24350f;
  --c-earth-lt:  #8a662a;

  /* Type — Archivo Narrow / Archivo stand in for Franklin Gothic Medium
     Condensed / News Gothic MT. See README-developer.md to swap them. */
  --f-display: var(--wp--preset--font-family--display);
  --f-body:    var(--wp--preset--font-family--body);

  /* Spacing scale */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
  --s-9: 96px;  --s-10: 128px;

  /* Layout */
  --wrap:       1200px;
  --wrap-text:  720px;
  --gutter:     24px;

  --radius: 2px;                       /* near-square: institutional, not consumer */
  --shadow: 0 1px 2px rgba(36,26,17,.06), 0 8px 24px rgba(36,26,17,.06);

  /* Motion: one duration and one curve, so every transition agrees. */
  --dur: .24s;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Browser-drawn surfaces themed from the palette rather than left default. */
  scrollbar-color: var(--c-olive) var(--c-mist);
  scrollbar-width: thin;
  accent-color: var(--c-earth);
}

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  caret-color: var(--c-earth);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--c-sage); color: var(--c-forest); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--c-mist); }
::-webkit-scrollbar-thumb { background: var(--c-olive); border: 3px solid var(--c-mist); }
::-webkit-scrollbar-thumb:hover { background: var(--c-forest); }

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

/* Dates and other figures read as data, not as prose. */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

a { color: var(--c-earth); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--c-forest); text-decoration-thickness: 2px; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 3px solid var(--c-earth); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 var(--s-4);
  color: var(--c-forest);
  text-wrap: balance;
}
p { margin: 0 0 var(--s-5); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.h-xl { font-size: clamp(38px, 6.2vw, 68px); letter-spacing: -0.02em; line-height: 1.04; }
.h-lg { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.015em; }
.h-md { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.008em; }
.h-sm { font-size: 21px; }

.eyebrow {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-earth);
  margin: 0 0 var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--c-rule);
}
/* The keyline also opens each label with a short solid mark, so the rule
   reads as a deliberate device rather than a leftover divider. */
.eyebrow::before {
  content: "";
  width: 18px;
  height: 3px;
  flex: none;
  background: currentColor;
}
.eyebrow--plain::after { display: none; }

.lede { font-size: clamp(19px, 1.9vw, 22px); line-height: 1.55; color: var(--c-ink-muted); }

/* WordPress prints its own skip link; this dresses it like v1's. */
body .skip-link.screen-reader-text:focus {
  left: 0; top: 0; padding: 12px 20px; font-size: 17px;
  background: var(--c-forest); color: #fff; text-decoration: none;
}

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

/* WordPress resets: no gaps between top-level blocks — .section padding sets
   the rhythm, as in v1. */
.wp-site-blocks > *,
.wp-block-post-content > *,
main.main > * { margin-block: 0; }
figure.wp-block-image { margin: 0; }
.wp-block-image img { vertical-align: bottom; }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: var(--wrap-text); }

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--forest { background: var(--c-forest); color: var(--c-mist); }
.section--forest h2, .section--forest h3 { color: var(--c-white); }
.section--forest .eyebrow { color: var(--c-sage); }
.section--forest .eyebrow::after { background: rgba(191,199,160,.35); }
.section--forest a { color: var(--c-sage); }
.section--forest a:hover { color: var(--c-white); }
.section--mist { background: var(--c-mist); }
.section--white { background: var(--c-white); }

.stack > * + * { margin-top: var(--s-5); }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Asymmetric editorial split: narrow label column + wide content column */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   4. Buttons — core Button block. Default style = v1 .btn--primary,
      "Outline" = .btn--outline, "On dark" (functions.php) = .btn--on-dark.
   -------------------------------------------------------------------------- */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.wp-block-button { margin: 0; }
body .wp-block-button .wp-block-button__link,
.field input.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  width: auto;
  min-height: 48px;
  padding: 12px 26px;
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--c-earth);
  color: var(--c-white);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
body .wp-block-button .wp-block-button__link:hover,
.field input.wpcf7-submit:hover { background: var(--c-bark); color: var(--c-white); }
body .wp-block-button .wp-block-button__link:active,
.field input.wpcf7-submit:active { transform: translateY(1px); }
body .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--c-forest); border-color: var(--c-forest); padding: 12px 26px; }
body .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--c-forest); color: var(--c-white); }
body .wp-block-button.is-style-on-dark > .wp-block-button__link { background: transparent; color: var(--c-white); border-color: var(--c-sage); }
body .wp-block-button.is-style-on-dark > .wp-block-button__link:hover { background: var(--c-sage); color: var(--c-forest-dk); }
.field input.wpcf7-submit:disabled { background: var(--c-mist); color: #857c6e; border-color: var(--c-rule); cursor: not-allowed; transform: none; }

/* --------------------------------------------------------------------------
   5. Header + navigation
   -------------------------------------------------------------------------- */
.site-header { background: var(--c-white); border-bottom: 1px solid var(--c-rule); position: relative; z-index: 20; }

.utility-bar {
  background: var(--c-forest-dk);
  color: var(--c-sage);
  font-size: 13px;
  letter-spacing: 0.03em;
}
.utility-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 38px;
}
.utility-bar p { margin: 0; }

/* Language slot — styled for Polylang's switcher (or any list of links). */
.lang-switch { display: flex; align-items: center; gap: var(--s-1); }
.lang-switch ul { display: flex; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  color: var(--c-sage);
  text-decoration: none;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
}
.lang-switch a[aria-current], .lang-switch .current-lang a { background: rgba(191,199,160,.18); color: var(--c-white); }
.lang-switch a:hover { color: var(--c-white); }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding-block: var(--s-4);
}

.brand { position: relative; display: flex; align-items: center; gap: var(--s-4); }
.brand-logo { flex: none; }
.brand-logo img { width: 62px; height: auto; }
.brand .wp-block-site-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.brand .wp-block-site-title a { color: var(--c-forest); text-decoration: none; }
/* One link covers logo + name, as in v1. */
.brand .wp-block-site-title a::after { content: ""; position: absolute; inset: 0; }
.brand .wp-block-site-tagline {
  margin: 5px 0 0;
  max-width: 30ch;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--c-ink-muted);
}

/* Navigation — core Navigation block. */
.site-header .wp-block-navigation .wp-block-navigation__container { gap: var(--s-2); }
/* Each item reserves its bold width so positions never shift page to page.
   data-label comes from cabrip_nav_link_label() in functions.php. */
.site-header .wp-block-navigation .wp-block-navigation-item { flex-direction: column; align-items: stretch; }
.site-header .wp-block-navigation .wp-block-navigation-item::after {
  content: attr(data-label);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-inline: 14px;
}
.site-header .wp-block-navigation .wp-block-navigation-item__content {
  display: block;
  padding: 10px 14px;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-forest);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.site-header .wp-block-navigation .wp-block-navigation-item__content:hover { border-bottom-color: var(--c-sage); }
/* Current page reads as colour + weight, not a rule. aria-current carries it
   for assistive tech, so colour is a reinforcement rather than the only signal. */
.site-header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] { color: var(--c-earth); font-weight: 700; }
.site-header .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"]:hover { border-bottom-color: var(--c-earth); }

/* Mobile menu: core overlay, dressed like v1's toggle and panel. */
body .site-header .wp-block-navigation__responsive-container-open,
body .site-header .wp-block-navigation__responsive-container-close {
  align-items: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 10px 16px;
  background: transparent;
  border: 2px solid var(--c-rule);
  border-radius: var(--radius);
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-forest);
}
.site-header .wp-block-navigation__responsive-container-open::after {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E") center / contain no-repeat;
}
body .site-header .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--c-white);
  color: var(--c-forest);
  padding: var(--s-4) var(--gutter) var(--s-5);
}
/* Core's overlay rules are (0,4,0); these are (0,4,1) so the panel reads like
   v1's: full-width, left-aligned items separated by keylines. */
body .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
body .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column; align-items: stretch; gap: 0; width: 100%;
}
body .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; align-items: stretch; text-align: left; }
body .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item::after { display: none; }
body .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 14px 0; border-bottom: 1px solid var(--c-rule); }
/* v1 switches to the mobile menu at 860px; core switches at 600px. */
@media (min-width: 600px) and (max-width: 860px) {
  .site-header .wp-block-navigation .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .site-header .wp-block-navigation .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
  .site-header .wp-block-navigation .is-menu-open .wp-block-navigation__responsive-container-close { display: flex; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; background: var(--c-forest-dk); color: var(--c-white); overflow: hidden; }
.hero .hero-media { position: absolute; inset: 0; margin: 0; }
.hero .hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(102deg, rgba(30,45,14,.93) 0%, rgba(30,45,14,.80) 38%, rgba(36,53,15,.30) 78%, rgba(57,40,26,.18) 100%),
    linear-gradient(to top, rgba(30,45,14,.55) 0%, rgba(30,45,14,0) 42%);
}
.hero .wrap { position: relative; padding-block: clamp(64px, 10vw, 120px); }
.hero-inner { max-width: 46rem; }
.hero h1 { color: var(--c-white); margin-bottom: var(--s-5); }
.hero .lede { color: #e9ece2; max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-7); }
.hero .eyebrow { color: var(--c-sage); }
.hero .eyebrow::after { background: rgba(191,199,160,.4); }

/* Facts strip beneath the hero */
.facts { background: var(--c-forest); color: var(--c-mist); border-top: 1px solid rgba(191,199,160,.22); }
.facts .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); padding-block: var(--s-6); }
.facts .fact + .fact { border-left: 1px solid rgba(191,199,160,.32); padding-left: var(--s-6); }
.fact-term {
  font-family: var(--f-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-sage);
  margin: 0 0 var(--s-2);
}
.fact-value { margin: 0; font-size: 18px; line-height: 1.4; color: var(--c-white); }

/* --------------------------------------------------------------------------
   7. Interior page header
   -------------------------------------------------------------------------- */
.page-header { background: var(--c-forest); color: var(--c-mist); }
.page-header .wrap { padding-block: clamp(44px, 6vw, 76px); }
.page-header h1 { color: var(--c-white); max-width: 22ch; }
.page-header .lede { color: #dfe3d6; max-width: 52ch; margin-top: var(--s-5); }
.page-header .eyebrow { color: var(--c-sage); }
.page-header .eyebrow::after { background: rgba(191,199,160,.35); }

.breadcrumb { font-size: 14px; padding-block: var(--s-1); border-bottom: 1px solid var(--c-rule); background: var(--c-white); }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); color: var(--c-ink-muted); }
.breadcrumb-list > * { display: inline-flex; align-items: center; min-height: 44px; margin: 0; font: inherit; color: inherit; }
.breadcrumb-list > * + *::before { content: "/"; margin-right: var(--s-2); color: var(--c-rule); }
/* Article titles can be long: let the current title wrap as text, not as a flex column. */
.breadcrumb-list > .wp-block-post-title { display: block; padding-block: 10px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }

/* --------------------------------------------------------------------------
   8. Content components
   -------------------------------------------------------------------------- */
.prose h2 { margin-top: var(--s-7); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s-6); font-size: 21px; }
.prose ul, .prose ol { margin: 0 0 var(--s-5); padding-left: 1.25em; }
.prose li { margin-bottom: var(--s-3); }

/* Numbered objective list */
.objectives { counter-reset: objective; display: grid; gap: 0; }
.objective {
  counter-increment: objective;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s-5);
  padding-block: var(--s-5);
  border-top: 1px solid var(--c-rule);
  align-items: start;
}
.objective:last-child { border-bottom: 1px solid var(--c-rule); }
/* 01–05 are generated, so reordering objectives in the editor renumbers them. */
.objective::before {
  content: counter(objective, decimal-leading-zero);
  font-family: var(--f-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  color: var(--c-sage);
}
.objectives h3 { font-size: 20px; margin-bottom: var(--s-2); color: var(--c-forest); }
.objectives p { margin: 0; color: var(--c-ink-muted); font-size: 16.5px; }
.section--forest .objective { border-color: rgba(191,199,160,.28); }
.section--forest .objective::before { color: var(--c-earth-lt); }
.section--forest .objectives p { color: #d3d8c8; }

/* Cards */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.card h3 { font-size: 20px; margin: 0; }
.card p { margin: 0; font-size: 16px; color: var(--c-ink-muted); }
.card--link { position: relative; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card--link:hover { border-color: var(--c-forest); box-shadow: var(--shadow); }
.card--link h3 { margin: 0; font-size: 20px; }
.card--link h3 a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--c-rule); }
/* The whole card is one link. */
.card--link h3 a::after { content: ""; position: absolute; inset: 0; }
.card--link:hover h3 a { text-decoration-color: var(--c-earth); }
.card--link:focus-within { outline: 3px solid var(--c-earth); outline-offset: 2px; }
.card--link h3 a:focus-visible { outline: none; }

/* Cards keep their own light-surface ink even inside a dark section. */
.section--forest .card { background: var(--c-white); border-color: transparent; }
.section--forest .card h3 { color: var(--c-forest); }
.section--forest .card p { color: var(--c-ink-muted); }
.section--forest .card--link h3,
.section--forest .card--link h3 a { color: var(--c-forest); }
.section--forest .card--link:hover { border-color: var(--c-sage); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  margin: 0;
  font-family: var(--f-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-earth);
  font-variant-numeric: tabular-nums;
}
.meta > * { margin: 0; }
.meta > * + *::before { content: "·"; margin-right: 6px; }
.card .meta a,
.page-header .meta a { color: inherit; text-decoration: none; position: relative; z-index: 1; }

/* Query Loop grids */
.wp-block-post-template.grid { list-style: none; margin: 0; padding: 0; }
.wp-block-post-template.grid > li { display: flex; margin: 0; }
.wp-block-post-template.grid > li > .card { flex: 1; }

/* Pull quote / vision statement */
.pullquote {
  margin: 0;
  border-top: 3px solid var(--c-earth);
  padding-top: clamp(20px, 2.4vw, 32px);
}
.pullquote p {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.28;
  font-weight: 500;
  color: var(--c-forest);
}
.section--forest .pullquote { border-top-color: var(--c-sage); }
.section--forest .pullquote p { color: var(--c-white); }
.pullquote cite { display: block; margin-top: var(--s-4); font-style: normal; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-ink-muted); font-family: var(--f-display); font-weight: 600; }
.section--forest .pullquote cite { color: var(--c-sage); }

/* People */
.person {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-top: var(--s-5);
  border-top: 3px solid var(--c-sage);
}
.person .name { font-family: var(--f-display); font-size: 22px; font-weight: 600; color: var(--c-forest); margin: 0; line-height: 1.15; }
.person .role { margin: 0; font-size: 15.5px; color: var(--c-ink-muted); }
.person .contact-line { margin: 0; font-size: 15px; }

/* Logo wall */
.logo-wall { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 4vw, 56px); }
.logo-wall .wp-block-image { margin: 0; }
.logo-wall .wp-block-image img { max-height: 92px; width: auto; }
.logo-wall--sm .wp-block-image img { max-height: 56px; }
/* Framed wall uses a grid so the last row never stretches to fill. */
.logo-wall--framed {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-5);
}
.logo-wall--framed .wp-block-image {
  background: var(--c-white);
  border: 1px solid var(--c-rule);
  padding: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
}

/* Institution list */
.institutions { display: grid; gap: 0; }
.institution {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--s-5);
  align-items: center;
  padding-block: var(--s-5);
  border-top: 1px solid var(--c-rule);
}
.institution:last-child { border-bottom: 1px solid var(--c-rule); }
.institutions .logo-cell { display: flex; align-items: center; justify-content: center; margin: 0; }
.institutions .logo-cell img { max-height: 72px; width: auto; }
.institutions h3 { font-size: 19px; margin: 0 0 var(--s-1); }
.institutions p { margin: 0; font-size: 15.5px; color: var(--c-ink-muted); }

/* Call-to-action band */
.cta-band { background: var(--c-earth); color: var(--c-white); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-6); padding-block: var(--s-7); }
.cta-band h2 { color: var(--c-white); margin: 0 0 var(--s-3); }
.cta-band p { margin: 0; color: #f0e9dc; max-width: 48ch; }
body .cta-band .wp-block-button.is-style-on-dark > .wp-block-button__link { border-color: var(--c-white); }
body .cta-band .wp-block-button.is-style-on-dark > .wp-block-button__link:hover { background: var(--c-white); color: var(--c-earth); }

/* Figure + caption */
figure { margin: 0; }
figure img { border-radius: var(--radius); }
/* Intrinsic ratios keep layout stable while images load. */
.hero .hero-media img { aspect-ratio: 1800 / 1199; }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.logo-wall .wp-block-image img, .institutions .logo-cell img { aspect-ratio: auto; }
figcaption,
.wp-block-image .wp-element-caption {
  margin-top: var(--s-4);
  margin-bottom: 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-rule);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  color: var(--c-ink-muted);
}
.section--forest figcaption { color: var(--c-sage); }

/* Placeholder marker for content the client still needs to supply */
.placeholder {
  background: #fff6d9;
  border: 1px dashed #b08a1e;
  color: #6b5310;
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: .92em;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. Forms — v1 markup, reproduced by contact-form-7-template.html
   -------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--f-display); font-size: 15px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-forest); }
.field .hint { font-size: 14px; color: var(--c-ink-muted); }
.field input, .field select, .field textarea {
  font-family: var(--f-body);
  font-size: 16px;
  color: var(--c-ink);
  background: var(--c-white);
  border: 1px solid var(--c-olive);
  border-radius: var(--radius);
  padding: 13px 14px;
  min-height: 50px;
  width: 100%;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--c-forest); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-earth); }
.field input::placeholder, .field textarea::placeholder { color: #7b7264; }
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: var(--c-mist); color: #857c6e; border-color: var(--c-rule); cursor: not-allowed;
}
/* Validation styling, ready for server- or client-side messages. */
.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #8c2f14; }
.field-error { font-size: 14px; color: #8c2f14; font-weight: 500; }

.field textarea { min-height: 168px; resize: vertical; }
.field .req { color: var(--c-earth); }
.form-note { font-size: 14.5px; color: var(--c-ink-muted); }

/* Contact Form 7 output, mapped onto the v1 states above. */
.field .wpcf7-form-control-wrap { display: block; }
.field .wpcf7-not-valid { border-color: #8c2f14; }
.wpcf7-not-valid-tip { display: block; margin-top: var(--s-2); font-size: 14px; color: #8c2f14; font-weight: 500; }
.field input.wpcf7-submit { align-self: flex-start; }
.field .wpcf7-spinner { margin: var(--s-3) 0 0; }
body .wpcf7 form .wpcf7-response-output { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-5); border: 1px solid var(--c-rule); border-radius: var(--radius); font-size: 15px; }
body .wpcf7 form.invalid .wpcf7-response-output,
body .wpcf7 form.unaccepted .wpcf7-response-output,
body .wpcf7 form.failed .wpcf7-response-output,
body .wpcf7 form.aborted .wpcf7-response-output { border-color: #8c2f14; color: #8c2f14; }
body .wpcf7 form.sent .wpcf7-response-output { border-color: var(--c-forest); color: var(--c-forest); }

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-bark); color: #cdc4b8; font-size: 15.5px; }
.site-footer a { color: var(--c-sage); }
.site-footer a:hover { color: var(--c-white); }
.footer-main { display: grid; grid-template-columns: minmax(0, 4fr) repeat(2, minmax(0, 2.4fr)); gap: clamp(32px, 5vw, 64px); padding-block: var(--s-8); }
.site-footer h2 { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-sage); margin-bottom: var(--s-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.site-footer li { display: flex; align-items: center; min-height: 44px; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-brand { display: flex; gap: var(--s-4); align-items: flex-start; }
.footer-logo { flex: none; }
.footer-logo img { width: 68px; height: auto; }
.footer-brand .brand-name {
  margin: 0;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-white);
}
.footer-brand p { color: #b8ada0; font-size: 15px; margin: var(--s-3) 0 0; }
.footer-brand p.brand-name { margin: 0; color: var(--c-white); }
.footer-bar { border-top: 1px solid rgba(191,199,160,.2); padding-block: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: space-between; font-size: 14px; }
.footer-bar p { margin: 0; }
.footer-bar ul { flex-direction: row; gap: var(--s-6); }

/* Funder acknowledgement block */
.funders { background: var(--c-white); border-top: 1px solid var(--c-rule); }
.funders .wrap { padding-block: var(--s-7); }
.funders p { font-size: 15.5px; color: var(--c-ink-muted); max-width: 92ch; }

/* --------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .logo-wall--framed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

@media (max-width: 860px) {
  /* Text spans the full width here, so the scrim can no longer be directional. */
  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(30,45,14,.86) 0%, rgba(30,45,14,.78) 55%, rgba(30,45,14,.88) 100%);
  }
  .hero .hero-media img { opacity: .55; }

  .brand .wp-block-site-tagline { display: none; }
  .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .facts .wrap { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .logo-wall--framed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-wall--framed .wp-block-image { min-height: 118px; }
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .footer-main { grid-template-columns: minmax(0, 1fr); }
  .objective { grid-template-columns: 44px minmax(0, 1fr); gap: var(--s-4); }
  .objective::before { font-size: 26px; }
  .institution { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .institutions .logo-cell { justify-content: flex-start; }
  .brand-logo img { width: 50px; }
  .brand .wp-block-site-title { font-size: 20px; }
  .utility-bar .wrap > p { display: none; }
  .utility-bar .wrap { justify-content: flex-end; }
  /* Until a language switcher is added, the bar would be empty on phones. */
  .utility-bar:has(.lang-switch:empty) { display: none; }
}

/* --------------------------------------------------------------------------
   12. Print + motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .cta-band, .hero-media { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}

/* --------------------------------------------------------------------------
   13. Utilities — replace v1's one-off inline styles
   -------------------------------------------------------------------------- */
.u-mt-16 { margin-top: 16px; }
.u-mt-32 { margin-top: 32px; }
.u-mt-40 { margin-top: 40px; }
.u-mt-56 { margin-top: 56px; }
.u-mb-40 { margin-bottom: 40px; }
.u-mb-48 { margin-bottom: 48px; }
.u-mw-24ch { max-width: 24ch; }
.u-mw-26ch { max-width: 26ch; }
.u-mw-30ch { max-width: 30ch; }
.u-mw-34ch { max-width: 34ch; }
.u-mw-62ch { max-width: 62ch; }
/* v1's inline colour on the About mission lede */
.section--forest .lede { color: #dfe3d6; }

/* --------------------------------------------------------------------------
   14. News templates — not in the approved mockup; designed in v1's language
   -------------------------------------------------------------------------- */
.wp-block-query-pagination { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; font-family: var(--f-display); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.wp-block-query-pagination a,
.wp-block-query-pagination .current { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-2); }
.wp-block-query-pagination .current { color: var(--c-earth); }
.card .wp-block-post-excerpt__excerpt { margin: 0; font-size: 16px; color: var(--c-ink-muted); }
.page-header .meta { color: var(--c-sage); margin-bottom: var(--s-3); }
.prose > * + * { margin-top: var(--s-5); }
