/* ==========================================================================
   Ahenfor Engineering and Construction — public site
   Design tokens, layout, components. Mobile-first; breakpoints at 640/900/1200.
   ========================================================================== */

:root {
  --navy-950: #08132a;
  --navy-900: #0b1a33;
  --navy-800: #0e1f3a;
  --navy-700: #1a3159;
  --navy-600: #2b4673;
  --navy-100: #e4e9f1;
  --stone-50: #f7f5f1;
  --stone-100: #efebe4;
  --stone-200: #e3ddd2;
  --stone-300: #d4cdc0;
  --stone-500: #8a8377;
  --ink: #14171d;
  --ink-2: #3d4452;
  --ink-3: #5d6472;
  --white: #ffffff;
  --brass: #c29a4b;          /* accents on dark, rules, buttons */
  --brass-light: #d9b978;
  --brass-ink: #7d5f22;      /* brass-toned text on light backgrounds (AA) */
  --success: #2f6b46;
  --warning: #8a5a12;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1240px;
  --gutter: 16px;
  --section: clamp(4rem, 8vw, 7.5rem);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; --header-h: 84px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  font-family: var(--font-display); font-stretch: 87.5%; font-weight: 700;
  line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--navy-900);
}
h1 { font-size: clamp(2.5rem, 2rem + 3.6vw, 4.75rem); }
h2 { font-size: clamp(2rem, 1.6rem + 2vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); letter-spacing: -.005em; }
h4 { font-size: 1.1rem; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--brass-light); color: var(--navy-900); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--brass); color: var(--navy-900);
  padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Utility type ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: .75rem; margin: 0 0 1.25rem;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass-ink);
}
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--brass); }
.kicker .num { color: var(--ink-3); }
.on-dark .kicker, .kicker.on-dark { color: var(--brass-light); }
.on-dark .kicker .num { color: rgba(255,255,255,.55); }
.lede { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }
.meta { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.prose { max-width: 68ch; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--navy-800); --fg: var(--white); --bd: var(--navy-800);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .75rem 1.4rem; border: 1.5px solid var(--bd); border-radius: var(--radius);
  background: var(--bg); color: var(--fg); font: 600 .95rem/1.2 var(--font-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn .icon { width: 1.1em; height: 1.1em; transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:hover { --bg: var(--navy-700); --bd: var(--navy-700); }
.btn-accent { --bg: var(--brass); --fg: var(--navy-900); --bd: var(--brass); }
.btn-accent:hover { --bg: var(--brass-light); --bd: var(--brass-light); }
.btn-outline { --bg: transparent; --fg: var(--navy-800); --bd: var(--navy-800); }
.btn-outline:hover { --bg: var(--navy-800); --fg: var(--white); }
.btn-outline-light { --bg: transparent; --fg: var(--white); --bd: rgba(255,255,255,.6); }
.btn-outline-light:hover { --bg: var(--white); --fg: var(--navy-900); --bd: var(--white); }
.btn-sm { min-height: 40px; padding: .5rem 1rem; font-size: .88rem; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--navy-800);
  text-decoration: none; border-bottom: 1.5px solid var(--brass); padding-bottom: 2px;
}
.link-arrow .icon { width: 1em; height: 1em; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.on-dark .link-arrow { color: var(--white); }

/* ---------- Notice bars ---------- */
.notice-bar {
  position: fixed; z-index: 150; left: 12px; right: 12px; bottom: 12px; max-width: 720px; margin: 0 auto;
  background: var(--brass); color: var(--navy-900); font-size: .85rem; text-align: center; padding: .6rem 1rem;
  box-shadow: 0 8px 24px rgba(8,19,42,.25);
}
.notice-bar strong { font-weight: 600; }
.preview-bar {
  position: sticky; top: 0; z-index: 120; background: #8a1c1c; color: #fff; font-size: .9rem;
  padding: .6rem var(--gutter); display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center;
}
.preview-bar a { color: #fff; font-weight: 600; }

/* ---------- Header (white, to match the logo background) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--white); color: var(--navy-900); border-bottom: 1px solid var(--stone-200);
  transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(8,19,42,.08); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--navy-900); }
.brand img { height: 48px; width: auto; }
/* Logo icon next to the AHENFOR wordmark: same height as the two lines of text beside it */
.brand-logo { height: 56px !important; width: auto; display: block; object-fit: contain; }
.brand { flex-shrink: 0; }
.brand-logo + .brand-text { justify-content: center; height: 56px; white-space: nowrap; }
.brand-logo + .brand-text .brand-name { font-size: 1.6rem; }
.brand-logo + .brand-text .brand-sub { font-size: .66rem; margin-top: 6px; }
@media (max-width: 640px) {
  .brand-logo { height: 44px !important; }
  .brand-logo + .brand-text { height: 44px; }
  .brand-logo + .brand-text .brand-name { font-size: 1.3rem; }
  .brand-logo + .brand-text .brand-sub { font-size: .56rem; margin-top: 4px; }
}
.brand-mark {
  width: 38px; height: 38px; border: 2px solid var(--brass); display: grid; place-items: center;
  font: 700 1.15rem/1 var(--font-display); color: var(--brass-ink); font-stretch: 87.5%;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 700 1.2rem/1 var(--font-display); font-stretch: 87.5%; letter-spacing: .08em; }
.brand-sub { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  background: transparent; border: 1px solid var(--stone-300); color: var(--navy-900); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

.primary-nav {
  position: fixed; inset: var(--header-h) 0 0 0; background: var(--white); padding: 1.5rem var(--gutter) 2rem;
  display: flex; flex-direction: column; gap: 2rem; overflow-y: auto; border-top: 1px solid var(--stone-200);
  transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.nav-open .primary-nav { transform: none; opacity: 1; visibility: visible; }
.nav-open { overflow: hidden; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .85rem 0; border-bottom: 1px solid var(--stone-200); color: var(--navy-900);
  text-decoration: none; font: 600 1.4rem/1.2 var(--font-display); font-stretch: 87.5%;
}
.nav-list a[aria-current="page"] { color: var(--brass-ink); }
.nav-cta { align-self: flex-start; }

@media (min-width: 1240px) {
  .nav-toggle { display: none; }
  .nav-cta { white-space: nowrap; }
  .primary-nav {
    position: static; inset: auto; padding: 0; background: none; border: 0; flex-direction: row; align-items: center;
    gap: 2rem; transform: none; opacity: 1; visibility: visible; overflow: visible;
  }
  .nav-list { display: flex; gap: 1.6rem; }
  .nav-list a {
    padding: .5rem 0; border: 0; font: 500 .93rem/1 var(--font-body); color: var(--ink-2); position: relative; white-space: nowrap;
  }
  .nav-list a::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--brass);
    transition: right .25s var(--ease);
  }
  .nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--navy-900); }
  .nav-list a:hover::after, .nav-list a[aria-current="page"]::after { right: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px); display: flex; align-items: flex-end;
  color: var(--white); background: var(--navy-900); overflow: hidden; isolation: isolate;
}
.hero-media, .hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media { z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,19,42,.55) 0%, rgba(8,19,42,0) 30%),
    linear-gradient(90deg, rgba(8,19,42,.9) 0%, rgba(8,19,42,.62) 50%, rgba(8,19,42,.25) 100%);
}
.hero-content { padding-top: 5rem; padding-bottom: 5.5rem; width: 100%; }
.hero h1 { color: var(--white); max-width: 15ch; margin-bottom: 1.5rem; }
.hero .lede { color: rgba(255,255,255,.86); max-width: 52ch; margin-bottom: 2.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-footer {
  position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid rgba(255,255,255,.14);
}
.hero-footer .container { display: flex; justify-content: space-between; align-items: center; height: 56px; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.75); text-decoration: none;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
}
.scroll-cue .icon { animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue .icon { animation: none; } }
.video-toggle {
  display: inline-flex; align-items: center; gap: .5rem; background: none; border: 1px solid rgba(255,255,255,.35);
  color: var(--white); padding: .4rem .8rem; font: 500 .8rem var(--font-body); cursor: pointer; border-radius: var(--radius);
}
.video-toggle .icon { width: 1rem; height: 1rem; }
.video-toggle .icon-play { display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.video-toggle.is-paused .icon-pause { display: none; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  position: relative; background: var(--navy-900); color: var(--white); overflow: hidden; isolation: isolate;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.page-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
}
.page-header h1 { color: var(--white); max-width: 18ch; }
.page-header .lede { color: rgba(255,255,255,.8); }
.page-header.with-image { padding-top: clamp(8rem, 18vw, 14rem); }
.page-header .bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-header.with-image::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(8,19,42,.95) 0%, rgba(8,19,42,.55) 55%, rgba(8,19,42,.35) 100%);
}
.breadcrumb { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1.5rem; color: rgba(255,255,255,.65); }
.breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }
.breadcrumb span[aria-hidden] { margin: 0 .5rem; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-tight { padding: calc(var(--section) * .6) 0; }
.section-stone { background: var(--stone-50); }
.section-navy { background: var(--navy-900); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy .lede { color: rgba(255,255,255,.78); }
.section-head { display: grid; gap: 1rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { margin: 0; max-width: 20ch; }
.section-head .lede { margin: 0; }
.section-head .head-action { align-self: end; }
@media (min-width: 900px) {
  .section-head.split { grid-template-columns: 1.2fr 1fr; align-items: end; }
  .section-head.split .head-action { justify-self: end; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.stat { padding: 2rem 1.25rem 2rem 0; border-top: 2px solid var(--brass); }
.stat-value { font: 700 clamp(2.6rem, 2rem + 2.5vw, 4rem)/1 var(--font-display); font-stretch: 87.5%; color: var(--white); }
.stat-label { margin-top: .6rem; color: rgba(255,255,255,.72); font-size: .95rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 2rem; } }

/* ---------- Split layout ---------- */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 5rem; } .split.reverse > :first-child { order: 2; } }
.figure { position: relative; margin: 0; }
.figure img, .figure video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--stone-100); }
.figure.landscape img { aspect-ratio: 4 / 3; }
.figure::after {
  content: ""; position: absolute; left: -14px; bottom: -14px; width: 40%; height: 40%;
  border-left: 2px solid var(--brass); border-bottom: 2px solid var(--brass); pointer-events: none;
}
.figure-placeholder {
  aspect-ratio: 4 / 5; background: var(--navy-800); display: grid; place-items: center; color: rgba(255,255,255,.4);
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.values { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0; }
.values li { padding: 1rem 0; border-top: 1px solid var(--stone-200); display: grid; grid-template-columns: 2.5rem 1fr; gap: .25rem 1rem; }
.values .num { font-family: var(--font-mono); font-size: .78rem; color: var(--brass-ink); padding-top: .3rem; }
.values strong { font-weight: 600; color: var(--navy-900); }
.values p { grid-column: 2; margin: 0; color: var(--ink-3); font-size: .97rem; }

/* ---------- Service cards ---------- */
.service-grid { display: grid; gap: 1px; background: var(--stone-200); border: 1px solid var(--stone-200); }
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service-card { background: var(--white); padding: 2rem 1.75rem 2.25rem; display: flex; flex-direction: column; gap: 1rem; transition: background .25s var(--ease); }
.section-stone .service-card { background: var(--stone-50); }
.service-card:hover { background: var(--navy-900); }
.service-card:hover h3, .service-card:hover .service-icon { color: var(--white); }
.service-card:hover p { color: rgba(255,255,255,.75); }
.service-card:hover .service-num { color: var(--brass-light); }
.service-top { display: flex; justify-content: space-between; align-items: flex-start; }
.service-icon { color: var(--navy-800); }
.service-icon .icon { width: 40px; height: 40px; stroke-width: 1.3; }
.service-num { font-family: var(--font-mono); font-size: .78rem; color: var(--brass-ink); }
.service-card h3 { margin: .5rem 0 0; transition: color .25s; }
.service-card p { margin: 0; color: var(--ink-3); transition: color .25s; }
.service-card a { text-decoration: none; }
.service-card .card-link::after { content: ""; position: absolute; inset: 0; }
.service-card { position: relative; }

.service-detail { display: grid; gap: 2rem; padding: 3rem 0; border-top: 1px solid var(--stone-200); }
.service-detail:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .service-detail { grid-template-columns: 5rem 1fr 1fr; gap: 3rem; } }
.service-detail .service-num { font-size: 1rem; }
.service-detail img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* ---------- Project cards ---------- */
.card-grid { display: grid; gap: 2.5rem 2rem; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.project-card { position: relative; display: flex; flex-direction: column; }
.project-card .media { position: relative; overflow: hidden; background: var(--navy-800); aspect-ratio: 4 / 3; }
.project-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.project-card:hover .media img { transform: scale(1.04); }
.project-card .body { padding-top: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.project-card h3 { margin: 0; }
.project-card h3 a { text-decoration: none; }
.project-card h3 a::after { content: ""; position: absolute; inset: 0; }
.project-card p { color: var(--ink-3); margin: 0; font-size: .98rem; }
.project-card .more { margin-top: auto; padding-top: .75rem; font-weight: 600; color: var(--navy-800); display: inline-flex; gap: .4rem; align-items: center; }
.project-card .more .icon { width: 1em; height: 1em; transition: transform .2s; }
.project-card:hover .more .icon { transform: translateX(4px); }
.project-card:focus-within { outline: 3px solid var(--brass); outline-offset: 6px; }
.project-card:focus-within a:focus-visible { outline: none; }
.media-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.35);
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.media-placeholder .icon { width: 48px; height: 48px; stroke-width: 1; }

.status-chip {
  display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .35rem .6rem; background: var(--navy-900); color: var(--white);
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }
.status-chip.ongoing::before { background: #6fcf97; box-shadow: 0 0 0 3px rgba(111,207,151,.25); }
.status-chip.upcoming::before { background: var(--brass-light); }
.status-chip.on_hold::before { background: #e3a857; }
.status-chip.completed::before { background: #a9b6cc; }
.media .status-chip { position: absolute; top: 14px; left: 14px; }
.chip-light { background: var(--stone-100); color: var(--navy-900); }

/* filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; align-items: center; }
.filter-bar a {
  padding: .55rem 1rem; border: 1px solid var(--stone-300); text-decoration: none; font-size: .92rem;
  color: var(--ink-2); border-radius: var(--radius);
}
.filter-bar a:hover { border-color: var(--navy-800); color: var(--navy-900); }
.filter-bar a[aria-current="true"] { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }
.filter-bar select { min-height: 42px; padding: .4rem 2rem .4rem .75rem; border: 1px solid var(--stone-300); background: var(--white); font: inherit; font-size: .92rem; border-radius: var(--radius); }
.filter-bar .spacer { flex: 1; }

/* upcoming list */
.row-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--stone-300); }
.row-list li { border-bottom: 1px solid var(--stone-300); }
.row-link { display: grid; gap: .25rem 2rem; padding: 1.5rem 0; text-decoration: none; position: relative; }
@media (min-width: 900px) { .row-link { grid-template-columns: 12rem 1fr auto; align-items: baseline; } }
.row-link h3 { margin: 0; transition: color .2s; }
.row-link:hover h3 { color: var(--brass-ink); }
.row-link .icon { width: 1.4em; height: 1.4em; color: var(--navy-800); transition: transform .2s; }
.row-link:hover .icon { transform: translate(3px, -3px); }

/* ---------- Awards ---------- */
.award-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.award { display: grid; grid-template-columns: 5rem 1fr; gap: 1.25rem; padding: 1.75rem 0; border-top: 1px solid var(--stone-300); align-items: start; }
.award:last-child { border-bottom: 1px solid var(--stone-300); }
.award-year { font: 700 1.6rem/1 var(--font-display); font-stretch: 87.5%; color: var(--brass-ink); }
.award h3 { margin: 0 0 .25rem; }
.award .issuer { color: var(--ink-3); margin: 0; }
.award .desc { margin: .75rem 0 0; color: var(--ink-2); }
.award-media { grid-column: 2; display: flex; gap: 1rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.award-media img { width: 96px; height: 96px; object-fit: contain; background: var(--stone-50); border: 1px solid var(--stone-200); padding: 6px; }
@media (min-width: 900px) {
  .award { grid-template-columns: 7rem 1fr 14rem; }
  .award-media { grid-column: 3; justify-content: flex-end; margin: 0; }
}

/* ---------- Testimonials ---------- */
.quote-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .quote-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.quote { margin: 0; padding: 2rem 0 0; border-top: 2px solid var(--brass); display: flex; flex-direction: column; gap: 1.5rem; }
.quote blockquote { margin: 0; font-size: 1.15rem; line-height: 1.6; color: var(--navy-900); }
.section-navy .quote blockquote { color: var(--white); }
.quote figcaption { display: flex; align-items: center; gap: .9rem; margin-top: auto; }
.quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.quote .who { font-weight: 600; }
.quote .org { font-size: .9rem; color: var(--ink-3); }
.section-navy .quote .org { color: rgba(255,255,255,.65); }

/* ---------- News and events ---------- */
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone-300); }
.event-item { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--stone-300); position: relative; }
.date-block { text-align: center; border: 1px solid var(--navy-800); padding: .55rem 0 .5rem; align-self: start; }
.date-block .day { display: block; font: 700 1.8rem/1 var(--font-display); font-stretch: 87.5%; color: var(--navy-900); }
.date-block .mon { display: block; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: .25rem; }
.event-item h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.event-item h3 a { text-decoration: none; }
.event-item h3 a::after { content: ""; position: absolute; inset: 0; }
.event-item:hover h3 { color: var(--brass-ink); }
.event-item p { margin: .35rem 0 0; color: var(--ink-3); font-size: .97rem; }
.event-item.is-past .date-block { border-color: var(--stone-300); }
.event-item.is-past .date-block .day { color: var(--ink-3); }

.news-card { position: relative; display: flex; flex-direction: column; gap: .6rem; }
.news-card .media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-800); margin-bottom: .6rem; }
.news-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.news-card:hover .media img { transform: scale(1.04); }
.news-card h3 { margin: 0; font-size: 1.25rem; }
.news-card h3 a { text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card p { margin: 0; color: var(--ink-3); font-size: .97rem; }
.news-layout { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .news-layout { grid-template-columns: 1fr 1.35fr; gap: 4rem; } }
.news-col-title { font: 600 .78rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1.25rem; }
.news-stack { display: grid; gap: 2rem; }
@media (min-width: 640px) { .news-stack { grid-template-columns: repeat(2, 1fr); } }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--stone-300); margin-bottom: 2.5rem; overflow-x: auto; }
.tabs a { padding: 1rem 1.25rem; text-decoration: none; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--navy-900); }
.tabs a[aria-current="page"] { color: var(--navy-900); border-color: var(--brass); }

/* ---------- Article ---------- */
.article { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .article { grid-template-columns: minmax(0, 1fr) 20rem; gap: 5rem; } }
.article-cover { margin: 0 0 2.5rem; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article video { width: 100%; background: #000; margin: 2rem 0; }
.fact-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy-900); }
.fact-list li { padding: 1rem 0; border-bottom: 1px solid var(--stone-300); display: grid; gap: .2rem; }
.fact-list .meta { font-size: .7rem; }
.fact-list strong { font-weight: 600; color: var(--navy-900); }

/* ---------- Project detail ---------- */
.project-facts { background: var(--navy-800); color: var(--white); }
.project-facts dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .project-facts dl { grid-template-columns: repeat(var(--cols, 5), 1fr); } }
.project-facts .fact { padding: 1.4rem 1rem 1.4rem 0; border-top: 1px solid rgba(255,255,255,.12); }
@media (min-width: 900px) { .project-facts .fact { border-top: 0; border-left: 1px solid rgba(255,255,255,.12); padding-left: 1.25rem; } .project-facts .fact:first-child { border-left: 0; padding-left: 0; } }
.project-facts dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: .4rem; }
.project-facts dd { margin: 0; font-weight: 500; }
.progress { margin-top: .35rem; }
.progress-track { height: 6px; background: rgba(255,255,255,.15); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--brass); }
.progress-label { font: 700 1.6rem/1 var(--font-display); font-stretch: 87.5%; }
.progress-note { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: .4rem; }

.overview { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .overview { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 5rem; } }
.latest-card { border: 1px solid var(--stone-300); background: var(--stone-50); align-self: start; }
.latest-card .head { background: var(--navy-900); color: var(--white); padding: .8rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.latest-card .head .meta { color: var(--brass-light); }
.latest-card .inner { padding: 1.25rem; }
.latest-card h3 { margin: .25rem 0 .5rem; }
.latest-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 1rem; }

.timeline-wrap { display: grid; gap: 2.5rem; }
/* Grid children may contain horizontally scrolling rows; never let them widen the page. */
.timeline-wrap > *, .overview > *, .article > *, .form-layout > *, .split > *, .news-layout > *, .card-grid > * { min-width: 0; }
@media (min-width: 1000px) { .timeline-wrap { grid-template-columns: 17rem minmax(0, 1fr); gap: 4rem; } }
.phase-nav { align-self: start; }
@media (min-width: 1000px) { .phase-nav { position: sticky; top: calc(var(--header-h) + 24px); } }
.phase-nav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--stone-300); }
.phase-nav a { display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; padding: .7rem 0 .7rem 1rem; text-decoration: none; color: var(--ink-3); font-size: .95rem; border-left: 2px solid transparent; margin-left: -1px; }
.phase-nav a:hover { color: var(--navy-900); }
.phase-nav a.is-active { color: var(--navy-900); border-color: var(--brass); font-weight: 600; }
.phase-nav .n { font-family: var(--font-mono); font-size: .75rem; padding-top: .15rem; }
.phase-nav .state { grid-column: 2; font-size: .75rem; font-weight: 400; color: var(--ink-3); }
@media (max-width: 999px) {
  .phase-nav ol { display: flex; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--stone-300); gap: 0; scrollbar-width: thin; }
  .phase-nav li { flex: 0 0 auto; }
  .phase-nav a { border-left: 0; border-bottom: 2px solid transparent; padding: .7rem 1rem; margin: 0 0 -1px; grid-template-columns: auto auto; }
  .phase-nav a.is-active { border-color: var(--brass); }
  .phase-nav .state { display: none; }
}

.phase { padding-bottom: 3.5rem; margin-bottom: 3.5rem; border-bottom: 1px solid var(--stone-200); }
.phase:last-child { border-bottom: 0; margin-bottom: 0; }
.phase-head { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: baseline; margin-bottom: 1rem; }
.phase-head .meta { color: var(--brass-ink); }
.phase-head h3 { flex: 1 1 100%; margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.phase-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink-3); }
.phase-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.phase-status.in_progress { color: var(--success); }
.phase-status.in_progress::before { background: var(--success); border-color: var(--success); }
.phase-status.completed { color: var(--navy-800); }
.phase-status.completed::before { background: var(--navy-800); border-color: var(--navy-800); }
.phase-desc { color: var(--ink-2); max-width: 68ch; }
.phase-empty { color: var(--ink-3); font-style: italic; margin: 1rem 0 0; }

.updates { list-style: none; margin: 2rem 0 0; padding: 0 0 0 1.75rem; position: relative; }
.updates::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--stone-300); }
.update { position: relative; padding-bottom: 2.5rem; }
.update:last-child { padding-bottom: 0; }
.update::before { content: ""; position: absolute; left: calc(-1.75rem + 1px); top: 7px; width: 9px; height: 9px; background: var(--white); border: 2px solid var(--navy-800); border-radius: 50%; }
.update.is-latest::before { background: var(--brass); border-color: var(--brass); box-shadow: 0 0 0 4px rgba(194,154,75,.25); }
.update time { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.update h4 { margin: .3rem 0 .5rem; font-size: 1.2rem; color: var(--navy-900); }
.update .prose { font-size: 1rem; }
.update .badge-latest { display: inline-block; margin-left: .5rem; font-family: var(--font-mono); font-size: .65rem; letter-spacing: .1em; padding: .15rem .45rem; background: var(--brass); color: var(--navy-900); vertical-align: middle; }
.update .badge-draft { display: inline-block; margin-left: .5rem; font-family: var(--font-mono); font-size: .65rem; letter-spacing: .1em; padding: .15rem .45rem; background: #8a1c1c; color: #fff; vertical-align: middle; }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 1rem; }
@media (min-width: 640px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-grid.large { gap: 8px; }
@media (min-width: 1000px) { .photo-grid.large { grid-template-columns: repeat(4, 1fr); } }
.photo-grid a { display: block; position: relative; overflow: hidden; background: var(--stone-100); aspect-ratio: 4 / 3; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.photo-grid a:hover img { transform: scale(1.05); }
.photo-grid .more-count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,19,42,.7); color: #fff; font: 700 1.5rem var(--font-display); }
.update video { width: 100%; max-width: 720px; margin-top: 1rem; background: #000; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(5,11,24,.96); color: #fff; }
.lightbox::backdrop { background: rgba(5,11,24,.96); }
.lightbox-inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; padding: .75rem var(--gutter); font-family: var(--font-mono); font-size: .8rem; color: rgba(255,255,255,.7); }
.lightbox-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-caption { padding: 1rem var(--gutter) 1.5rem; text-align: center; color: rgba(255,255,255,.85); min-height: 3.5rem; }
.lightbox button { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; border-radius: var(--radius); }
.lightbox button:hover { background: rgba(255,255,255,.18); }
.lightbox .prev, .lightbox .next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .prev { left: var(--gutter); }
.lightbox .next { right: var(--gutter); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy-900); color: var(--white); position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .6;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(270deg, #000 0%, transparent 70%);
}
.cta-inner { display: grid; gap: 2rem; padding: clamp(3.5rem, 7vw, 6rem) 0; align-items: end; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.4fr 1fr; } .cta-inner .actions { justify-self: end; } }
.cta-inner h2 { color: var(--white); margin: 0; max-width: 18ch; }
.cta-inner p { color: rgba(255,255,255,.78); margin: 1rem 0 0; max-width: 50ch; }
.cta-inner .actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---------- Forms ---------- */
.form-layout { display: grid; gap: 3rem; }
@media (min-width: 1000px) { .form-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 5rem; } }
.form-grid { display: grid; gap: 1.4rem 1.5rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .45rem; color: var(--navy-900); }
.field .req { color: #9b2c2c; margin-left: 2px; }
.field .opt { color: var(--ink-3); font-weight: 400; font-size: .85rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .75rem .9rem; border: 1.5px solid var(--stone-300); background: var(--white);
  font: inherit; font-size: 1rem; color: var(--ink); border-radius: var(--radius); transition: border-color .2s;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(194,154,75,.35); }
.field input[type=file] { width: 100%; padding: .8rem; border: 1.5px dashed var(--stone-300); background: var(--stone-50); font: inherit; font-size: .92rem; border-radius: var(--radius); }
.field .hint { font-size: .87rem; color: var(--ink-3); margin: .4rem 0 0; }
.field .error { font-size: .88rem; color: #9b2c2c; margin: .4rem 0 0; font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #9b2c2c; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.form-note { font-size: .87rem; color: var(--ink-3); }

.contact-panel { background: var(--navy-900); color: var(--white); padding: 2rem; align-self: start; }
.contact-panel h3 { color: var(--white); }
.contact-panel ul { list-style: none; padding: 0; margin: 0; }
.contact-panel li { display: flex; gap: .9rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.12); }
.contact-panel li .icon { color: var(--brass); margin-top: .2rem; }
.contact-panel .meta { color: rgba(255,255,255,.6); display: block; margin-bottom: .2rem; font-size: .68rem; }
.contact-panel a { color: var(--white); }

/* ---------- Flash ---------- */
.flashes { margin: 0 0 2rem; display: grid; gap: .75rem; }
.flash { padding: 1rem 1.25rem; border-left: 4px solid var(--navy-800); background: var(--stone-50); }
.flash.success { border-color: var(--success); background: #eef6f1; }
.flash.error { border-color: #9b2c2c; background: #fbefef; }
.flash.warning { border-color: var(--warning); background: #fbf4e8; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 3.5rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 .75rem; border: 1px solid var(--stone-300); text-decoration: none; color: var(--ink-2); }
.pagination a:hover { border-color: var(--navy-800); color: var(--navy-900); }
.pagination [aria-current="page"] { background: var(--navy-900); color: var(--white); border-color: var(--navy-900); }
.pagination .disabled { opacity: .4; }

.empty-state { padding: 3rem 2rem; border: 1px dashed var(--stone-300); text-align: center; color: var(--ink-3); }
.empty-state h3 { color: var(--navy-900); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,.75); font-size: .95rem; }
.footer-grid { display: grid; gap: 2.5rem; padding: 4.5rem 0 3rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr 1.3fr; gap: 3rem; } }
.footer-grid h2 { font: 600 .72rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--brass-light); margin: 0 0 1.25rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.footer-grid a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer-grid a:hover { color: var(--white); text-decoration: underline; }
.footer-about p { max-width: 36ch; margin-top: 1.25rem; }
/* Logo sits on a white tile in the dark footer so its white background looks intentional */
.site-footer .brand img { background: var(--white); padding: 8px 12px; box-sizing: content-box; }
.footer-contact li { display: flex; gap: .7rem; }
.footer-contact .icon { color: var(--brass); margin-top: .2rem; width: 1.05em; height: 1.05em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; font-size: .85rem; color: rgba(255,255,255,.55); }
.footer-bottom a { color: rgba(255,255,255,.7); }
.socials { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

/* ---------- Error pages ---------- */
.error-page { min-height: 60vh; display: grid; align-items: center; }
.error-code { font: 700 clamp(5rem, 15vw, 10rem)/1 var(--font-display); font-stretch: 87.5%; color: var(--stone-200); margin: 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

@media print {
  .site-header, .site-footer, .cta-band, .hero-footer, .notice-bar { display: none !important; }
}
