/* ============================================================
   stab-catalogue-web — Stabiliti project catalogue
   ALT VERSION: greenmargin.io look & feel.
   Cream-first page, navy dashboard cards, pastel accent trio,
   Inter body + Poppins headings + Crimson Pro italic accents.
   Tokens mirror stab-greenmargin-web (Impact Dashboard Design).
   ============================================================ */

:root {
  --navy-900: #0f1730;
  --navy-800: #141d3a;
  --navy-700: #1a2547;
  --cream-50: #fffdf9;
  --cream-100: #f6f2ea;

  --amber-400: #f3c86c;
  --amber-500: #e8b04a;
  --amber-700: #b8801c;
  --green-400: #7fc79a;
  --green-700: #3f9665;
  --blue-400: #7aa6e0;
  --blue-700: #3d6fb8;

  --slate-50: #f2f5fb;
  --slate-100: #eef1f8;
  --slate-200: #e9edf6;
  --slate-300: #c3cbe0;
  --slate-400: #aab4cf;
  --slate-500: #8a97b8;
  --slate-600: #6f7d9f;
  --slate-700: #5e6a8a;
  --slate-800: #4d5b80;

  --page-bg: var(--cream-100);
  --surface-card: var(--navy-700);
  --surface-panel: rgba(255, 255, 255, 0.045);
  --surface-panel-hover: rgba(255, 255, 255, 0.075);
  --surface-inset: var(--navy-800);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-panel: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text-heading: var(--slate-50);
  --text-primary: var(--slate-100);
  --text-body: var(--slate-200);
  --text-secondary: var(--slate-300);
  --text-label: var(--slate-500);
  --text-muted: var(--slate-600);

  --accent-amber: var(--amber-500);
  --accent-green: var(--green-400);
  --accent-blue: var(--blue-400);
  --accent-amber-border: rgba(232, 176, 74, 0.35);
  --accent-green-border: rgba(127, 199, 154, 0.35);
  --accent-blue-border: rgba(122, 166, 224, 0.35);

  --shadow-card: 0 30px 60px -20px rgba(26, 37, 71, 0.35), 0 8px 20px -8px rgba(26, 37, 71, 0.25);
  --shadow-widget: 0 18px 40px -16px rgba(26, 37, 71, 0.4);

  --light-surface: var(--cream-50);
  --light-border: rgba(26, 37, 71, 0.1);
  --light-border-strong: rgba(26, 37, 71, 0.16);
  --light-text: var(--navy-700);
  --light-text-body: var(--slate-800);
  --light-text-label: var(--slate-700);
  --light-amber: var(--amber-700);
  --light-green: var(--green-700);
  --light-blue: var(--blue-700);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Crimson Pro", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --amber-brand: #f59c00;

  --tracking-tight: -0.02em;
  --tracking-kicker: 0.08em;

  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-panel: 14px;
  --radius-hero: 16px;
  --radius-card: 22px;
  --radius-pill: 999px;

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

@keyframes ds-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--surface-card); }
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--light-text-body);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--light-text);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
h1, h2 { font-weight: 700; letter-spacing: -0.035em; }
h1 em, h2 em {
  font-family: var(--font-serif);
  font-size: 1.21em;
  line-height: 1;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--amber-brand);
}
::selection { background: var(--amber-400); color: var(--navy-900); }
:focus-visible { outline: 2px solid var(--light-blue); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-kicker);
  text-transform: uppercase; color: var(--amber-brand);
}
.kicker::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 8px currentColor;
}
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 4.6vw, 40px); line-height: 1.08; }
.section-head p { color: var(--light-text-body); font-size: 16px; text-wrap: pretty; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 1000;
  transform: translateY(-160%);
  background: var(--navy-900);
  color: var(--cream-50);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: transform .25s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ============================================================
   Pills
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; cursor: pointer; border: 0; font-family: inherit;
  position: relative; overflow: hidden;
  transition: background .2s, transform .2s, border-color .2s, color .2s;
}
.pill::after {
  content: ""; position: absolute; top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-18deg); transition: left .7s var(--ease-out); pointer-events: none;
}
.pill:hover::after { left: 130%; }
.pill:active { transform: scale(0.98); }
.pill-navy { background: var(--surface-card); color: var(--cream-50); }
.pill-navy:hover { background: var(--navy-800); transform: translateY(-1px); }
.pill-amber { background: linear-gradient(135deg, #f8bb4d, var(--amber-brand) 60%); color: var(--surface-card); }
.pill-amber:hover { background: linear-gradient(135deg, #f8bb4d, #f5a51e 60%); transform: translateY(-1px); }
.pill-ghost { border: 1px solid var(--light-border-strong); color: var(--light-text-label); background: transparent; }
.pill-ghost:hover { border-color: var(--navy-700); color: var(--light-text); transform: translateY(-1px); }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-border);
  transition: background .25s var(--ease-out);
}
/* fully opaque while the catalogue header is pinned beneath it */
.nav.nav-solid {
  background: var(--cream-50);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nav-inner { display: flex; align-items: center; gap: 28px; padding-block: 14px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark img { height: 20px; width: auto; display: block; }
.wordmark .product {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1;
  color: var(--light-text);
  border-left: 1px solid var(--light-border-strong);
  padding-left: 12px;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--light-text-label); transition: color .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--light-text); }
.nav .pill { padding: 9px 16px; font-size: 13px; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
}

/* ============================================================
   Hero — cream, copy left, featured navy card right
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - 58px);
  min-height: calc(100svh - 58px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 48px clamp(150px, 20vw, 240px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 480px at 72% 34%, rgba(245, 156, 0, 0.10), transparent 70%),
    repeating-linear-gradient(0deg, rgba(26, 37, 71, 0.045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(26, 37, 71, 0.045) 0 1px, transparent 1px 32px);
  -webkit-mask-image: radial-gradient(120% 95% at 50% 15%, #000 35%, transparent 100%);
  mask-image: radial-gradient(120% 95% at 50% 15%, #000 35%, transparent 100%);
}
.hero > .wrap { position: relative; width: 100%; }
.hero-copy {
  display: flex; flex-direction: column; gap: 22px;
  max-width: 620px;
  animation: ds-rise .6s var(--ease-out) both;
}
.hero-copy h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; }
.hero-copy > p { font-size: 16px; color: var(--light-text-label); max-width: 54ch; text-wrap: pretty; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* Light ridgelines along the base of the hero — the first version's
   landscape, redrawn quietly on cream */
.hero-ridges {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: min(46%, 300px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 38%);
  mask-image: linear-gradient(180deg, transparent, #000 38%);
}
.hero-ridges svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: opacity 3s ease;
}
/* scene crossfade: hills (green) → ocean (blue) → forest (deep green, pines);
   the green svg is the un-classed default so the opening scene needs no
   class and nothing fades at load; ocean/forest win via scene classes */
#heroRidges, #heroRidgesForest { opacity: 0; }
.hero-ridges.scene-ocean #heroRidgesAlt,
.hero-ridges.scene-forest #heroRidgesAlt { opacity: 0; }
.hero-ridges.scene-ocean #heroRidges { opacity: 1; }
.hero-ridges.scene-forest #heroRidgesForest { opacity: 1; }

/* Bird flock canvas — behind the copy, above the ridges */
.hero-birds { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .hero-birds { display: none; } }

/* Scroll cue — bobbing chevron at the hero's base */
.scroll-cue {
  position: absolute; left: 50%; bottom: 24px; z-index: 2;
  padding: 8px; color: var(--light-text-body); opacity: 0.75; background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s, color .2s;
  animation: cue-bob 3s ease-in-out infinite;
}
.scroll-cue:hover { opacity: 1; color: var(--light-text); }
@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue { transform: translateX(-50%); } }
@media (max-width: 720px) {
  .hero { min-height: 0; padding-block: 40px 140px; }
  .scroll-cue { display: none; }
}

/* ============================================================
   Catalogue — warm white band
   ============================================================ */
.catalogue {
  padding-block: 80px 96px;
  background: var(--cream-50);
  border-top: 1px solid var(--light-border);
  scroll-margin-top: 30px; /* land the section title clear of the sticky nav */
  overflow-x: clip; /* the sticky header's 100vw backdrop must not widen the page */
}

/* Sticky catalogue header: title + filters pin below the nav while
   the grid scrolls, releasing at the last row (sticky within .wrap) */
.catalogue-head { position: relative; }
@media (min-width: 861px) {
  .catalogue-head {
    position: sticky;
    top: 58px;
    z-index: 10;
    padding-top: 26px;
  }
  .catalogue-head::before {
    content: "";
    position: absolute;
    top: -8px; bottom: 0;
    left: 50%; transform: translateX(-50%);
    width: 100vw;
    background: var(--cream-50);
    z-index: -1;
    transition: box-shadow .25s var(--ease-out), border-color .25s;
    border-bottom: 1px solid transparent;
  }
  .catalogue-head.is-stuck::before {
    border-bottom-color: var(--light-border);
    box-shadow: 0 16px 22px -18px rgba(26, 37, 71, 0.22);
  }
  /* keep the gap below the filters inside the painted sticky block */
  .catalogue-head .filters-bar { margin-bottom: 0; padding-bottom: 22px; }
  .catalogue-head + .projects-grid { margin-top: 46px; }
}

/* Filters: slim toolbar of search + pill dropdowns */
.filters-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 36px; }
.fsearch { position: relative; }
.fsearch svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--slate-600);
  pointer-events: none;
}
.fsearch input {
  font: 500 13px/1.2 var(--font-sans);
  color: var(--light-text);
  background: var(--light-surface);
  border: 1px solid var(--light-border-strong);
  border-radius: var(--radius-pill);
  padding: 9px 16px 9px 36px;
  width: 210px;
  transition: border-color .2s, box-shadow .2s, width .25s var(--ease-out);
}
.fsearch input::placeholder { color: var(--slate-600); }
.fsearch input:hover { border-color: var(--navy-700); }
.fsearch input:focus-visible {
  outline: none;
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(61, 111, 184, 0.16);
  width: 250px;
}
.fsearch input.is-active { border-color: rgba(232, 176, 74, 0.65); background: rgba(232, 176, 74, 0.10); }

.fselect select {
  appearance: none; -webkit-appearance: none;
  font: 600 13px/1.2 var(--font-sans);
  color: var(--light-text);
  background-color: var(--light-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' fill='none' stroke='%235e6a8a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4.5 4.5L10 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--light-border-strong);
  border-radius: var(--radius-pill);
  padding: 9px 36px 9px 16px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.fselect select:hover { border-color: var(--navy-700); }
.fselect select:focus-visible { outline: none; border-color: var(--light-blue); box-shadow: 0 0 0 3px rgba(61, 111, 184, 0.16); }
.fselect select.is-active {
  border-color: rgba(232, 176, 74, 0.65);
  background-color: rgba(232, 176, 74, 0.10);
  color: var(--navy-700);
}
.filters-clear {
  font: 600 13px/1.2 var(--font-sans);
  color: var(--light-text-label);
  padding: 9px 6px;
  transition: color .2s;
}
.filters-clear:hover { color: var(--navy-700); }
.filters-spacer { flex: 1; }
.filters-count { font-size: 12px; color: var(--light-text-label); font-variant-numeric: tabular-nums; }

/* Grid */
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 2.6vw, 34px); }
@media (max-width: 1000px) { .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .projects-grid { grid-template-columns: 1fr; } }

/* ---- Project card: light panel, navy terrain as the image ---- */
.pcard {
  display: flex; flex-direction: column;
  background: #26304F; /* the impact page's "three forces" panel blue */
  border-radius: var(--radius-card);
  box-shadow: 0 16px 34px -20px rgba(26, 37, 71, 0.45);
  color: var(--text-body);
  padding: 18px 18px 20px;
  gap: 15px;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .3s var(--ease-out), opacity .4s var(--ease-out);
}
.pcard:hover {
  transform: translateY(-4px);
  background: #2B3659;
  box-shadow: inset 0 -3px 0 var(--accent-amber), var(--shadow-card);
}
.pcard.is-hidden { display: none; }
.pcard { opacity: 0; transform: translateY(14px); }
.pcard.is-revealed { opacity: 1; transform: none; }
.pcard.is-revealed:hover { transform: translateY(-4px); }

.pcard-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-inset);
}
.pcard-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard-place {
  position: absolute; left: 13px; bottom: 9px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(242, 245, 251, 0.75);
}
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding-inline: 6px; flex: 1; }
.pcard-type {
  font-size: 11px; font-weight: 600; letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
}
.pcard-type.acc-green { color: var(--accent-green); }
.pcard-type.acc-blue  { color: var(--accent-blue); }
.pcard-type.acc-amber { color: var(--accent-amber); }
.pcard-name { color: var(--text-heading); font-size: 17px; }
.pcard-loc { font-size: 12px; color: var(--text-label); }
.pcard-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.55; flex: 1; margin-top: 4px; text-wrap: pretty; }
.pcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border-subtle);
  padding: 12px 6px 0;
  margin-top: 12px;
}
.pcard-area { font-size: 13px; font-weight: 600; color: var(--accent-green); font-variant-numeric: tabular-nums; }
/* chalk chevron slides in on hover */
.pcard-go {
  display: grid; place-items: center;
  height: 30px;
  color: var(--cream-50);
  opacity: 0;
  transform: translateX(-5px);
  transition: transform .25s var(--ease-out), opacity .25s var(--ease-out);
}
.pcard:hover .pcard-go { opacity: 1; transform: translateX(0); }
@media (hover: none) {
  .pcard-go { opacity: 0.55; transform: none; } /* touch: always hinted */
}

.projects-empty {
  display: none;
  padding: 56px 0;
  text-align: center;
  font-size: 15px;
  color: var(--light-text-label);
}
.projects-empty.is-visible { display: block; }

/* ============================================================
   Closing band — centred, cream, grid texture fading up
   ============================================================ */
.closing-band { position: relative; overflow: hidden; padding-bottom: 104px; background: var(--page-bg); scroll-margin-top: 40px; }
.closing-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(26, 37, 71, 0.045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(26, 37, 71, 0.045) 0 1px, transparent 1px 32px);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 90%);
  mask-image: linear-gradient(to top, #000 30%, transparent 90%);
}
.closing {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
  padding-block: 104px 0;
}
.closing h2 { font-size: clamp(26px, 4.4vw, 36px); line-height: 1.12; max-width: 18ch; }
.closing p { color: var(--light-text-label); font-size: 15px; max-width: 52ch; text-wrap: pretty; }
.closing .hero-ctas { justify-content: center; }

/* Closing with enquiry form — copy left, form card right */
.closing-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
  padding-top: 104px;
}
@media (max-width: 820px) { .closing-grid { grid-template-columns: 1fr; gap: 40px; } }
.closing-copy { display: flex; flex-direction: column; gap: 18px; }
.closing-copy h2 { font-size: clamp(26px, 4.4vw, 36px); line-height: 1.12; max-width: 16ch; }
.closing-copy p { color: var(--light-text-label); font-size: 15px; max-width: 46ch; text-wrap: pretty; }
.closing-alt { font-size: 14px; }
.closing-alt a { font-weight: 600; color: var(--light-blue); transition: color .2s; }
.closing-alt a:hover { color: var(--navy-700); }

/* Enquiry form — no card: fields sit directly on the band */
.enquiry { display: flex; flex-direction: column; gap: 16px; }
.enquiry [hidden] { display: none !important; }
.f-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 480px) { .f-pair { grid-template-columns: 1fr; } }
.f-field { display: flex; flex-direction: column; gap: 6px; }
.f-field label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--light-text-label);
}
.f-field label .opt { font-weight: 400; color: var(--slate-600); }
.f-field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-field input,
.f-field textarea,
.f-field select {
  font: inherit;
  font-size: 14px;
  color: var(--light-text);
  background: #ffffff;
  border: 1px solid var(--light-border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.f-field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none' stroke='%235e6a8a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.f-field input:focus-visible,
.f-field textarea:focus-visible,
.f-field select:focus-visible {
  outline: none;
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(61, 111, 184, 0.18);
}
.f-field input.f-invalid, .f-field textarea.f-invalid { border-color: #c0442c; }
.f-submit { align-self: stretch; width: 100%; margin-top: 4px; }
.f-note { font-size: 13px; color: var(--light-text-label); min-height: 1.2em; margin: 0; }
.f-note.ok { color: var(--light-green); font-weight: 600; }
.f-note.err { color: #c0442c; }

/* ============================================================
   Footer — navy, mirrored from greenmargin
   ============================================================ */
footer.foot {
  margin-top: auto;
  background: var(--surface-card);
  color: var(--text-body);
  padding-block: 52px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 50vh 0 50vh var(--surface-card);
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { display: flex; flex-direction: column; gap: 10px; }
.foot-brand img { height: 20px; width: auto; }
.foot-brand p { font-size: 13px; color: var(--text-secondary); max-width: 34ch; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col .t {
  font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-kicker);
  text-transform: uppercase; color: var(--text-label);
}
.foot-col a { font-size: 13px; color: var(--text-secondary); transition: color .2s; }
.foot-col a:hover { color: var(--text-heading); }
.foot-legal {
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: 12px; color: var(--text-label);
}

/* ============================================================
   Back to top
   ============================================================ */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  width: 44px; height: 44px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: var(--surface-card); color: var(--cream-50); font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-widget);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--navy-800); transform: translateY(-2px); }

/* ============================================================
   PROJECT DETAIL
   ============================================================ */
.phero { position: relative; padding-block: clamp(48px, 7vw, 80px) 0; }
.phero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 420px at 78% 20%, rgba(245, 156, 0, 0.08), transparent 70%),
    repeating-linear-gradient(0deg, rgba(26, 37, 71, 0.04) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(26, 37, 71, 0.04) 0 1px, transparent 1px 32px);
  -webkit-mask-image: radial-gradient(120% 95% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(120% 95% at 50% 0%, #000 30%, transparent 100%);
}
.phero > .wrap { position: relative; }
.phero-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--light-text-label);
  margin-bottom: 28px; transition: color .2s;
}
.phero-back:hover { color: var(--light-text); }
.phero .kicker { margin-bottom: 14px; }
.phero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; max-width: 18ch; }
.phero-meta { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); margin-top: 26px; }
.phero-meta .m .k {
  font-size: 11px; font-weight: 600; letter-spacing: var(--tracking-kicker);
  text-transform: uppercase; color: var(--light-text-label);
  margin-bottom: 4px;
}
.phero-meta .m .v { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--light-text); }

/* Navy overview card with terrain + quiet facts */
.pcard-hero {
  margin-top: 36px;
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  color: var(--text-body);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  animation: ds-rise .6s var(--ease-out) both;
}
@media (max-width: 820px) { .pcard-hero { grid-template-columns: 1fr; } }
.pcard-hero .visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 240px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
}
.pcard-hero .visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard-hero .visual .place {
  position: absolute; left: 14px; bottom: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(242, 245, 251, 0.8);
}
.pcard-hero .glance { display: flex; flex-direction: column; padding: 4px 6px; }
.pcard-hero .glance .t {
  font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-kicker);
  text-transform: uppercase; color: var(--text-label);
  padding-bottom: 10px;
}
.glance-row {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
}
.glance-row .k { color: var(--text-label); }
.glance-row .v { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; text-align: right; }

/* Body */
.pbody { padding-block: 72px 88px; background: var(--cream-50); border-top: 1px solid var(--light-border); margin-top: 64px; }
.pbody-copy { max-width: 640px; }
.pbody-copy .kicker { margin-bottom: 16px; }
.pbody-copy .lede {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.4;
  color: var(--light-text);
  margin-bottom: 20px;
  text-wrap: pretty;
}
.pbody-copy p.body { font-size: 15px; color: var(--light-text-body); margin-bottom: 14px; text-wrap: pretty; }
.pbody-copy .plinks { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
.pbody-copy .plink {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 14px; font-weight: 600;
  color: var(--light-blue); transition: color .2s;
}
.pbody-copy .plink:hover { color: var(--navy-700); }

/* Interventions as greenmargin "steps" */
.interv { margin-top: 56px; }
.interv h3 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 24px; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--light-surface);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-panel);
  padding: 18px 20px;
  display: flex; gap: 14px; align-items: baseline;
  font-size: 14px; color: var(--light-text-body);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.step:hover { transform: translateY(-2px); border-color: var(--light-border-strong); box-shadow: var(--shadow-widget); }
.step .n {
  font-size: 12px; font-weight: 700; color: var(--light-amber);
  letter-spacing: var(--tracking-kicker); font-variant-numeric: tabular-nums;
  flex: none;
}

/* From the field */
.updates { margin-top: 56px; }
.updates h3 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 18px; }
.updates-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--light-border);
  font-size: 14px;
}
.updates-row:last-child { border-bottom: 1px solid var(--light-border); }
.updates-row .d { font-size: 12px; font-weight: 600; color: var(--light-text-label); font-variant-numeric: tabular-nums; }
.updates-row .e { color: var(--light-text-body); }
@media (max-width: 560px) { .updates-row { grid-template-columns: 1fr; gap: 2px; } }

/* Prev / next */
.pnav { background: var(--cream-50); border-top: 1px solid var(--light-border); }
.pnav-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1080px; margin: 0 auto; }
.pnav a { padding: 32px 20px; transition: background .2s; }
.pnav a:hover { background: var(--cream-100); }
.pnav a + a { border-left: 1px solid var(--light-border); text-align: right; }
.pnav .dir {
  display: block;
  font-size: 11px; font-weight: 600; letter-spacing: var(--tracking-kicker);
  text-transform: uppercase; color: var(--light-text-label);
  margin-bottom: 6px;
}
.pnav .nm { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--light-text); }
@media (max-width: 640px) {
  .pnav-grid { grid-template-columns: 1fr; }
  .pnav a + a { border-left: 0; border-top: 1px solid var(--light-border); text-align: left; }
}

/* Scroll reveal helper */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pcard, .reveal { opacity: 1; transform: none; }
}
