/* ==========================================================================
   MCPA - Mine Clearance Planning Agency
   Theme: brand-locked light. Warm earth (terracotta / sand / olive) with
   MCPA institutional blue. Shape system: containers 16px, interactive 10px,
   chips full-pill. Type: Instrument Sans + Spline Sans Mono (figures).
   ========================================================================== */

:root {
  /* palette */
  --paper: #F4F1E8;
  --paper-deep: #ECE7D8;
  --surface: #FFFFFF;
  --ink: #1E2B33;
  --muted: #56646C;
  --line: #DFDACA;
  --blue: #1E5C8C;
  --blue-strong: #174A72;
  --blue-tint: #E7EFF5;
  --navy: #0F2E47;
  --navy-2: #143A57;
  --terracotta: #B65231;
  --terracotta-tint: #F4E3DA;
  --olive: #5F6D34;
  --olive-tint: #EAECDB;
  --sand: #C6A15B;
  --sand-tint: #F2E9D4;
  /* on-dark data colors (validated for the navy dashboard surface) */
  --d-blue: #7FB2D9;
  --d-sand: #DCAF63;
  --d-terracotta: #D07850;
  --d-olive: #A9BA68;
  /* structure */
  --r-card: 16px;
  --r-ui: 10px;
  --shadow: 0 1px 2px rgba(30, 43, 51, .06), 0 12px 32px -16px rgba(30, 43, 51, .18);
  --shell: 1200px;
  --nav-h: 78px;
  color-scheme: light;
}

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

/* NOTE: no CSS scroll-behavior:smooth here; it breaks ScrollTrigger's refresh
   measurements. Smooth anchor scrolling is handled in js/main.js instead. */

body {
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
ul, ol { list-style: none; }
strong { font-weight: 600; }

.mono { font-family: 'Spline Sans Mono', ui-monospace, monospace; }

::selection { background: var(--blue); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--blue-strong); color: #fff; font-weight: 600;
  padding: 12px 20px; border-radius: var(--r-ui);
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- headings ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.12; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.4vw, 40px); max-width: 24ch; }
.sec-head { margin-bottom: 40px; }
.sec-head > p { color: var(--muted); max-width: 62ch; margin-top: 14px; font-size: 17px; }
.eyebrow {
  font-family: 'Spline Sans Mono', monospace;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--terracotta); display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }

section { padding: 88px 0; scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-weight: 600; font-size: 15.5px; padding: 14px 26px;
  border-radius: var(--r-ui); border: 1.5px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: #A0472A; }
.btn-secondary { background: var(--blue-strong); color: #fff; }
.btn-secondary:hover { background: var(--blue); }
.btn-outline { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.btn svg { flex: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 241, 232, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 28px; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 13px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand img { height: 54px; width: auto; flex: none; }
.brand .brand-sub {
  display: block; font-family: 'Spline Sans Mono', monospace; font-weight: 400;
  font-size: 9.5px; color: var(--muted); letter-spacing: .1em; line-height: 1.4;
}
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="true"] { color: var(--blue-strong); border-bottom-color: var(--terracotta); }
.nav .btn { padding: 11px 20px; font-size: 14.5px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: var(--r-ui); place-items: center; }
.nav-toggle:hover { background: var(--paper-deep); }

/* ==========================================================================
   Hero: animated story scene (barren land, hidden danger, clearance, life)
   ========================================================================== */
.hero {
  position: relative; min-height: calc(100dvh - var(--nav-h));
  display: flex; align-items: flex-start; overflow: hidden;
  padding: 0; background: #EFE7D0;
}
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner {
  position: relative; z-index: 2; width: 100%;
  padding: clamp(44px, 7vh, 88px) 24px 120px;
}
.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px); font-weight: 700;
  letter-spacing: -.028em; line-height: 1.05; color: var(--ink); max-width: 14ch;
}
.hero h1 .w { display: inline-block; }
.hero h1 .accent { color: var(--terracotta); }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 44ch; margin: 20px 0 30px; }
.btn-lg { padding: 17px 34px; font-size: 17px; }
.hero-phase {
  margin-top: 26px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--terracotta); display: flex; align-items: center; gap: 16px; min-height: 20px;
}
.hero-phase::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.hero-replay {
  font: inherit; color: var(--muted); letter-spacing: .12em;
  border-bottom: 1px solid var(--muted); padding-bottom: 1px; transition: color .15s;
}
.hero-replay:hover { color: var(--ink); border-color: var(--ink); }
.hero-scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink); font-family: 'Spline Sans Mono', monospace; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; opacity: .75;
}
.hero-scroll:hover { opacity: 1; }
.motion .hero-scroll svg { animation: scrollNudge 2.2s ease-in-out infinite; }
@keyframes scrollNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* impact strip: the numbers, with room to breathe */
.impact-strip { background: var(--surface); border-bottom: 1px solid var(--line); padding: 72px 0; }
.strip-lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 62ch; color: var(--ink); margin-bottom: 48px; text-wrap: pretty; }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { padding-left: 22px; border-left: 2px solid var(--sand); }
.stat .num {
  font-family: 'Spline Sans Mono', monospace; font-weight: 500;
  font-size: clamp(32px, 3.2vw, 46px); letter-spacing: -.03em; line-height: 1.1;
  color: var(--blue-strong); font-variant-numeric: tabular-nums; display: block;
}
.stat .num small { font-size: .5em; color: var(--terracotta); font-weight: 500; }
.stat .label { font-size: 14px; color: var(--muted); margin-top: 8px; display: block; }

/* ==========================================================================
   Dashboard (single deliberate dark color block)
   ========================================================================== */
.dashboard { background: var(--navy); color: #fff; margin-top: 96px; }
.dashboard .sec-head > p { color: #A7BDCD; }
.dashboard .eyebrow { color: var(--d-sand); }
.dash-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.dash-grid-3 { grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
.dash-panel {
  background: #0A2235; border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-card); padding: 26px;
}
.dash-panel h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.dash-panel .panel-note { font-size: 12.5px; color: #8FA9BC; margin-top: 4px; }
.dash-map-wrap { position: relative; margin-top: 18px; }
.dash-map-wrap svg { width: 100%; height: auto; display: block; }

.afg-outline { fill: #1B4666; stroke: #3E6A8C; stroke-width: 1.5; }
.prov-dot { fill: var(--d-sand); stroke: var(--navy-2); stroke-width: 2; cursor: pointer; transition: fill .15s, opacity .15s; }
.prov-dot.prov-zero { fill: #6E89A0; }
.prov-dot:hover, .prov-dot:focus-visible, .prov-dot.active { fill: var(--d-terracotta); }
.prov-dot.lit { fill: var(--d-sand); }
.prov-dot.prov-zero.lit { fill: #8AA3B8; }
.prov-dot:not(.lit):not(.active) { opacity: .38; }
.prov-dot.active { fill: var(--d-terracotta); opacity: 1; }
.prov-dot.prov-hq { stroke: #fff; stroke-width: 2.5; }

/* geographical coverage explorer */
.geo-panel { padding: 26px 26px 22px; }
.geo-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 8px; }
.geo-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.geo-chip {
  border: 1.5px solid rgba(255, 255, 255, .18); border-radius: 999px;
  padding: 8px 15px; font-size: 13px; font-weight: 500; color: #C7D8E4;
  transition: .15s;
}
.geo-chip:hover { border-color: rgba(255, 255, 255, .45); color: #fff; }
.geo-chip[aria-pressed="true"] { background: var(--d-terracotta); border-color: var(--d-terracotta); color: #fff; }
.geo-body { display: grid; grid-template-columns: 7fr 5fr; gap: 28px; align-items: start; }
.geo-legend { font-size: 11px; color: #8FA9BC; letter-spacing: .06em; margin-top: 10px; }
.geo-detail h4 { font-size: 20px; font-weight: 600; color: #fff; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.geo-detail h4 .mono { font-size: 11px; color: var(--d-sand); letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.geo-detail > p { font-size: 14px; color: #A7BDCD; margin-top: 8px; }
.geo-detail .prov-stats { margin-top: 14px; }
.geo-provline { font-size: 12.5px !important; color: #8FA9BC !important; }
.geo-hint { font-size: 12.5px !important; color: #8FA9BC !important; margin-top: 14px !important; }
.proj-list {
  margin-top: 14px; display: grid; gap: 1px; max-height: 340px; overflow-y: auto;
  border-radius: var(--r-ui); background: rgba(255, 255, 255, .07);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.proj-list li { padding: 10px 14px; background: #0E2C44; display: flex; flex-direction: column; gap: 2px; }
.pj-name { font-size: 13.5px; color: #E8F0F5; line-height: 1.35; }
.pj-meta { font-family: 'Spline Sans Mono', monospace; font-size: 11.5px; color: var(--d-sand); }
.prov-halo { fill: none; stroke: var(--d-sand); stroke-width: 1.5; opacity: .5; pointer-events: none; }
.prov-label { font-family: 'Spline Sans Mono', monospace; font-size: 11px; fill: #9DB6C9; pointer-events: none; }

.prov-info { margin-top: 18px; min-height: 128px; }
.prov-info h4 { font-size: 19px; font-weight: 600; color: #fff; display: flex; align-items: baseline; gap: 10px; }
.prov-info h4 .mono { font-size: 11px; color: var(--d-sand); letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.prov-info p { font-size: 14px; color: #A7BDCD; margin-top: 8px; }
.prov-stats { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.prov-stat {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-ui); padding: 9px 14px;
  font-family: 'Spline Sans Mono', monospace; font-size: 12.5px; color: #C7D8E4;
}
.prov-stat b { color: #fff; font-weight: 500; }

.chart-box { position: relative; margin-top: 18px; height: 300px; }
.chart-box:has(#barChart) { height: 320px; }
.chart-box:has(#donutChart), .chart-box:has(#releaseChart) { height: 250px; }
.chart-box canvas { max-width: 100%; }
.chart-caption { font-size: 12px; color: #8FA9BC; margin-top: 14px; }
.dash-grid + .dash-grid { margin-top: 20px; }

/* ==========================================================================
   Land Release scrolltelling
   ========================================================================== */
.landrelease { background: var(--paper); }
.lr-layout { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.lr-stage-wrap { position: sticky; top: calc(var(--nav-h) + 24px); }
.lr-stage {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 22px; overflow: hidden;
}
.lr-stage svg { width: 100%; height: auto; display: block; }
.lr-stage-cap {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.lr-stage-cap .mono { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); }
.lr-stage-cap .lr-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.lr-steps { position: relative; padding-left: 44px; }
.lr-rail { position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.lr-rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--terracotta); }
.lr-step { position: relative; padding: 8px 0 88px; }
.lr-step:last-child { padding-bottom: 24px; }
.lr-step .lr-node {
  position: absolute; left: -44px; top: 6px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
  display: grid; place-items: center;
  font-family: 'Spline Sans Mono', monospace; font-size: 12.5px; color: var(--muted);
  transition: border-color .3s, background .3s, color .3s;
}
.lr-step.active .lr-node { border-color: var(--terracotta); background: var(--terracotta); color: #fff; }
.lr-step h3 { font-size: 22px; letter-spacing: -.015em; }
.lr-step h3 span { color: var(--muted); font-weight: 500; }
.lr-step > p { color: var(--muted); font-size: 15.5px; margin-top: 10px; max-width: 52ch; }
.lr-step ul { margin-top: 14px; display: grid; gap: 8px; }
.lr-step li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.lr-step li svg { flex: none; margin-top: 4px; color: var(--olive); }
.lr-note {
  margin-top: 16px; font-size: 14px; color: var(--ink);
  background: var(--olive-tint); border-left: 3px solid var(--olive);
  border-radius: 0 var(--r-ui) var(--r-ui) 0; padding: 12px 16px; max-width: 52ch;
}

/* stage SVG helpers */
.scene { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.scene.on { opacity: 1; }

/* ==========================================================================
   EORE horizontal explainer
   ========================================================================== */
.eore { background: var(--sand-tint); padding: 0; overflow: clip; }
.eore-head { padding: 88px 0 12px; }
.eore-track-wrap { position: relative; }
.eore-track {
  display: flex; gap: 24px; padding: 28px 24px 88px; align-items: stretch;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.eore-track.pinned { overflow: visible; }
.eore-track:not(.pinned) .eore-panel { scroll-snap-align: center; }

/* EORE figure animations (gated behind .motion set by JS when motion is allowed) */
.motion .eore-fig .heat,
.motion .eore-fig .pop { opacity: 0; }
.motion .eore-fig .trend { stroke-dasharray: 620; stroke-dashoffset: 620; }
.motion .eore-fig.fig-on .heat { animation: figHeat .8s ease forwards; }
.motion .eore-fig.fig-on .heat:nth-of-type(2) { animation-delay: .18s; }
.motion .eore-fig.fig-on .heat:nth-of-type(3) { animation-delay: .32s; }
.motion .eore-fig.fig-on .heat:nth-of-type(4) { animation-delay: .46s; }
.motion .eore-fig.fig-on .heat:nth-of-type(5) { animation-delay: .6s; }
.motion .eore-fig.fig-on .pop { animation: figPop .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.motion .eore-fig.fig-on .pop:nth-of-type(2) { animation-delay: .16s; }
.motion .eore-fig.fig-on .pop:nth-of-type(3) { animation-delay: .32s; }
.motion .eore-fig.fig-on .pop:nth-of-type(4) { animation-delay: .48s; }
.motion .eore-fig.fig-on .pop:nth-of-type(5) { animation-delay: .64s; }
.motion .eore-fig.fig-on .trend { animation: figDraw 1.4s ease-out .2s forwards; }
@keyframes figHeat { from { opacity: 0; transform: scale(.5); transform-origin: center; } to { opacity: 1; transform: scale(1); } }
@keyframes figPop { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes figDraw { to { stroke-dashoffset: 0; } }
.eore-panel {
  flex: 0 0 min(560px, 82vw);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 30px; display: flex; flex-direction: column; gap: 16px;
}
.eore-panel .phase {
  font-family: 'Spline Sans Mono', monospace; font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta);
}
.eore-panel h3 { font-size: 22px; letter-spacing: -.015em; }
.eore-panel p { color: var(--muted); font-size: 15px; }
.eore-panel ul { display: grid; gap: 7px; }
.eore-panel li { display: flex; gap: 10px; font-size: 14px; color: var(--muted); align-items: flex-start; }
.eore-panel li svg { flex: none; margin-top: 4px; color: var(--olive); }
.eore-fig { margin-top: auto; background: var(--paper); border-radius: var(--r-ui); padding: 14px; }
.eore-fig svg { width: 100%; height: auto; display: block; }
.eore-progress { position: absolute; left: 24px; right: 24px; bottom: 52px; height: 3px; background: rgba(30, 43, 51, .12); border-radius: 2px; }
.eore-progress i { display: block; height: 100%; width: 0; background: var(--terracotta); border-radius: 2px; }

/* ==========================================================================
   Impact bento
   ========================================================================== */
.impact-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.impact-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease;
}
.impact-card:hover { transform: translateY(-3px); }
.impact-card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue-strong);
}
.impact-card h3 { font-size: 18px; letter-spacing: -.01em; }
.impact-card .figure {
  font-family: 'Spline Sans Mono', monospace; font-weight: 500;
  font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.03em; color: var(--blue-strong);
  font-variant-numeric: tabular-nums;
}
.impact-card p { font-size: 14.5px; color: var(--muted); }
.impact-feature {
  grid-column: span 4; grid-row: span 1;
  background: var(--terracotta); border-color: var(--terracotta); color: #fff;
  min-height: 260px; justify-content: flex-end; position: relative; overflow: hidden;
}
.impact-feature .icon { background: rgba(255, 255, 255, .16); color: #fff; }
.impact-feature .figure { color: #fff; font-size: clamp(34px, 3.4vw, 48px); }
.impact-feature p { color: rgba(255, 255, 255, .88); font-size: 15.5px; max-width: 46ch; }
.impact-feature::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none;
}
.impact-card:nth-child(2) { grid-column: span 2; background: var(--olive-tint); }
.impact-card:nth-child(2) .icon { background: rgba(95, 109, 52, .14); color: var(--olive); }
.impact-card:nth-child(2) .figure { color: var(--olive); }
.impact-card:nth-child(3), .impact-card:nth-child(4), .impact-card:nth-child(5) { grid-column: span 2; }
.impact-card:nth-child(5) { background: var(--sand-tint); }
.impact-card:nth-child(5) .icon { background: rgba(198, 161, 91, .2); color: #8A6C33; }

/* ==========================================================================
   About + timeline + gallery
   ========================================================================== */
.about-layout { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-body p { color: var(--muted); font-size: 16px; margin-top: 16px; max-width: 60ch; }
.about-body p:first-of-type { color: var(--ink); font-size: 18px; }
.cred-list { display: grid; gap: 12px; margin-top: 28px; }
.cred-list li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-ui); padding: 14px 18px;
}
.cred-list svg { flex: none; margin-top: 3px; color: var(--olive); }
.cred-list strong { display: block; font-size: 15px; }
.cred-list span { font-size: 13.5px; color: var(--muted); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 26px; }
.timeline li::before {
  content: ""; position: absolute; left: -26px; top: 7px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--terracotta);
}
.timeline .year { font-family: 'Spline Sans Mono', monospace; font-size: 13px; color: var(--terracotta); display: block; }
.timeline strong { font-size: 15.5px; }
.timeline p { font-size: 14px; color: var(--muted); margin-top: 2px; }

.gallery { margin-top: 64px; }
.gallery h3 { font-size: 22px; margin-bottom: 20px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item {
  position: relative; border-radius: var(--r-ui); overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--paper-deep);
  padding: 0; display: block; width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption,
.gallery-cap {
  position: absolute; inset: auto 0 0; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(15, 28, 22, .78));
  color: #fff; font-size: 12.5px; text-align: left;
}
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* lightbox */
.lightbox {
  border: none; padding: 0; background: rgba(12, 20, 26, .92);
  max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
}
.lightbox::backdrop { background: rgba(12, 20, 26, .8); }
.lightbox-inner { display: grid; place-items: center; height: 100dvh; padding: 48px 16px; position: relative; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 78dvh; border-radius: var(--r-ui); object-fit: contain; }
.lightbox-cap { color: #C9D6DE; font-size: 14px; margin-top: 14px; text-align: center; max-width: 70ch; }
.lightbox-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center;
  transition: background .15s;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, .24); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Services
   ========================================================================== */
.services { background: var(--paper-deep); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, border-color .18s ease;
  position: relative; overflow: hidden;
}
.svc-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--terracotta); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.svc-card:hover { transform: translateY(-4px); border-color: #CFC9B6; }
.svc-card:hover::after { transform: scaleX(1); }
.svc-card.svc-wide { grid-column: span 2; background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.svc-card.svc-wide p { color: #BCD2E2; }
.svc-card.svc-wide .icon { background: rgba(255, 255, 255, .14); color: #fff; }
.svc-card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue-strong);
}
.svc-card h3 { font-size: 17.5px; letter-spacing: -.01em; }
.svc-card p { font-size: 14.5px; color: var(--muted); }
.svc-card .svc-tag {
  margin-top: auto; font-family: 'Spline Sans Mono', monospace;
  font-size: 11px; letter-spacing: .1em; color: var(--sand); text-transform: uppercase;
}
.svc-card.svc-wide .svc-tag { color: var(--d-sand); }

/* ==========================================================================
   Stories from the field
   ========================================================================== */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.story-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease;
}
.story-card:hover { transform: translateY(-3px); }
.story-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 24px;
  font-family: 'Spline Sans Mono', monospace; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
}
.story-head-clearance { background: var(--terracotta-tint); color: var(--terracotta); }
.story-head-eore { background: var(--olive-tint); color: var(--olive); }
.story-head-survey { background: var(--blue-tint); color: var(--blue-strong); }
.story-head-qrt { background: var(--sand-tint); color: #8A6C33; }
.story-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.story-meta { font-family: 'Spline Sans Mono', monospace; font-size: 12px; color: var(--muted); }
.story-card h3 { font-size: 20px; letter-spacing: -.015em; }
.story-body > p:not(.story-meta) { font-size: 14.5px; color: var(--muted); }
.story-open { margin-top: auto; align-self: flex-start; padding: 11px 20px; font-size: 14px; }

.story-dialog {
  border: none; padding: 0; margin: auto; border-radius: var(--r-card);
  width: min(680px, calc(100vw - 32px)); max-height: 85dvh;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 80px -24px rgba(30, 43, 51, .45);
}
.story-dialog::backdrop { background: rgba(15, 46, 71, .6); backdrop-filter: blur(3px); }
.story-dialog article { padding: 36px 40px 32px; position: relative; }
.story-dialog h3 { font-size: 26px; letter-spacing: -.02em; margin: 10px 0 4px; }
.story-dialog article > p:not(.story-meta) { font-size: 15px; color: var(--ink); margin-top: 14px; line-height: 1.7; }
.story-dialog .story-meta { padding-right: 48px; }
.story-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.story-stats .prov-stat {
  background: var(--paper); border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r-ui); padding: 9px 14px;
  font-family: 'Spline Sans Mono', monospace; font-size: 12.5px;
}
.story-stats .prov-stat b { color: var(--ink); font-weight: 500; }
.story-close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px;
  border-radius: 50%; background: var(--paper); color: var(--ink);
  display: grid; place-items: center; transition: background .15s;
}
.story-close:hover { background: var(--paper-deep); }

/* ==========================================================================
   News
   ========================================================================== */
.news-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 9px 18px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); transition: .15s;
}
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--blue-strong); border-color: var(--blue-strong); color: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.news-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .18s ease, opacity .3s ease;
}
.news-card:hover { transform: translateY(-4px); }
.news-card.hidden { display: none; }
.news-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--paper-deep); }
.news-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.news-meta .cat {
  font-family: 'Spline Sans Mono', monospace; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--terracotta);
  background: var(--terracotta-tint); border-radius: 6px; padding: 3px 8px;
}
.news-card h3 { font-size: 16.5px; line-height: 1.3; letter-spacing: -.01em; }
.news-card p { font-size: 13.5px; color: var(--muted); }

/* ==========================================================================
   Partners
   ========================================================================== */
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.partner-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 24px 20px; text-align: center;
  position: relative; overflow: hidden; min-height: 172px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.partner-mark {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue-strong);
  font-family: 'Spline Sans Mono', monospace; font-weight: 500; font-size: 15px; letter-spacing: .01em;
  padding: 4px; text-align: center;
}
.partner-card strong { font-size: 14.5px; line-height: 1.3; }
.partner-detail {
  position: absolute; inset: 0; padding: 20px 18px;
  background: var(--blue-strong); color: #fff;
  display: grid; place-items: center; text-align: center;
  font-size: 13px; line-height: 1.5;
  opacity: 0; transition: opacity .22s ease;
}
.partner-card:hover .partner-detail, .partner-card:focus-within .partner-detail { opacity: 1; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-card {
  display: grid; grid-template-columns: 5fr 7fr;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden;
}
.contact-info { padding: 40px; background: var(--navy); color: #fff; display: flex; flex-direction: column; }
.contact-info h2 { color: #fff; font-size: 26px; }
.contact-info > p { color: #A7BDCD; font-size: 15px; margin: 12px 0 28px; }
.c-row { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.c-row .icon {
  width: 40px; height: 40px; flex: none; border-radius: var(--r-ui);
  background: rgba(255, 255, 255, .1); color: var(--d-sand);
  display: grid; place-items: center;
}
.c-row strong { display: block; font-size: 14px; }
.c-row span, .c-row a { font-size: 13.5px; color: #A7BDCD; }
.c-row a:hover { color: #fff; text-decoration: underline; }
.contact-map { margin: 8px 0 24px; background: rgba(255, 255, 255, .06); border-radius: var(--r-ui); padding: 14px; }
.contact-map svg { width: 100%; height: auto; display: block; }
.contact-socials { display: flex; gap: 10px; margin-top: auto; }
.contact-socials a {
  width: 42px; height: 42px; border-radius: var(--r-ui); display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff; transition: background .15s;
}
.contact-socials a:hover { background: rgba(255, 255, 255, .22); }

.contact-form { padding: 40px; display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-ui);
  padding: 13px 15px; font: inherit; font-size: 14.5px;
  background: var(--paper); color: var(--ink); transition: border-color .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.field textarea { resize: vertical; min-height: 130px; }
.field .error { display: none; font-size: 12.5px; color: #9E2A12; margin-top: 5px; }
.field.invalid input, .field.invalid textarea { border-color: #9E2A12; }
.field.invalid .error { display: block; }
.form-status { font-size: 14px; color: var(--olive); font-weight: 600; display: none; }
.form-status.show { display: block; }

/* ==========================================================================
   Grievance Management System
   ========================================================================== */
.grievance { background: var(--paper-deep); }
.grv-card {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 4vw, 56px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow); padding: 40px;
}
.grv-steps { display: grid; gap: 20px; }
.grv-steps li { display: flex; gap: 14px; align-items: flex-start; }
.grv-num {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--olive-tint); color: var(--olive);
  display: grid; place-items: center;
  font-family: 'Spline Sans Mono', monospace; font-size: 14px;
}
.grv-steps strong { display: block; font-size: 15px; }
.grv-steps span { font-size: 13.5px; color: var(--muted); }
.grv-steps a { color: var(--blue-strong); text-decoration: underline; }
.grv-note {
  margin-top: 24px; font-size: 13.5px; color: var(--ink);
  background: var(--olive-tint); border-left: 3px solid var(--olive);
  border-radius: 0 var(--r-ui) var(--r-ui) 0; padding: 12px 16px;
}
.grv-form { display: flex; flex-direction: column; gap: 18px; }
.field .optional { font-weight: 400; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy); color: #A7BDCD; padding: 56px 0 32px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: .02em; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 9px; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; margin-bottom: 14px; }
.footer-brand img { height: 40px; }
.site-footer .tagline { font-size: 14.5px; max-width: 40ch; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: 'Spline Sans Mono', monospace; font-size: 11.5px; letter-spacing: .06em;
}

/* ==========================================================================
   Cookie banner / back-to-top
   ========================================================================== */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 150; max-width: 380px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.cookie-banner .row { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 10px 18px; font-size: 14px; }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 140;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue-strong); color: #fff; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  box-shadow: var(--shadow);
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-bg { inset: 0; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
  .geo-body { grid-template-columns: 1fr; }
  .proj-list { max-height: 280px; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-feature { grid-column: span 2; }
  .impact-card:nth-child(n) { grid-column: span 1; }
  .impact-feature { grid-column: span 2 !important; }
  .about-layout { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-card.svc-wide { grid-column: span 2; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-card { grid-template-columns: 1fr; }
  .grv-card { grid-template-columns: 1fr; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .lr-layout { grid-template-columns: 1fr; }
  .lr-stage-wrap { position: sticky; top: var(--nav-h); z-index: 5; }
  .lr-stage { padding: 12px; }
  .lr-stage svg { max-height: 38dvh; }
}

@media (max-width: 720px) {
  section { padding: 64px 0; }
  .nav-links, .nav .btn-primary { display: none; }
  .nav-toggle { display: grid; margin-left: auto; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-h); left: 0; right: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 16px;
    margin-left: 0;
  }
  .strip-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero-inner { padding: 36px 16px 96px; }
  .impact-grid { grid-template-columns: 1fr; }
  .impact-feature, .impact-card:nth-child(n) { grid-column: span 1 !important; }
  .svc-grid, .news-grid { grid-template-columns: 1fr; }
  .svc-card.svc-wide { grid-column: span 1; }
  .story-dialog article { padding: 28px 22px 26px; }
  .partner-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; aspect-ratio: 16 / 10; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .eore-panel { flex-basis: 86vw; }
  .cookie-banner { left: 12px; right: 12px; max-width: none; }
}

/* ---------- Google Translate widget (language switcher) ---------- */
.gt { display: flex; align-items: center; }
.gt .goog-te-gadget { font-size: 0; color: transparent; }
.gt .goog-te-gadget > span, .gt .goog-logo-link { display: none; }
.gt select.goog-te-combo {
  margin: 0;
  font: 500 13px/1.3 "Instrument Sans", system-ui, sans-serif;
  color: var(--ink, #22303a);
  background: #fff;
  border: 1px solid rgba(30, 92, 140, 0.35);
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
}
/* suppress the Google banner bar and body offset it injects */
body { top: 0 !important; }
iframe.goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
body > .skiptranslate { display: none !important; }
font[style] { background: none !important; box-shadow: none !important; }
@media (max-width: 860px) {
  .gt { margin-left: auto; }
}
