/* Highmark Capital Partners — site styles.
   The page is laid out like a set of drawings: a tall engraved plate under the headline, then numbered
   sheets that alternate linen and charcoal. Serif headlines (Source Serif 4, optical sizes) over a sans text
   face (Hanken Grotesk). Gold marks only what matters: the location, the mat's bearing edge, the cycle's
   direction and the current section. Only the drawings and the map move.
   Colour tokens follow hcp-design-system/tokens.css; .dark re-maps them to the charcoal ground. */

@font-face { font-family: 'Source Serif 4'; src: url('../fonts/SourceSerif4.929728ee.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/HankenGrotesk.30615026.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Local fallbacks scaled to the web fonts' measurements, so text does not reflow when they arrive. */
@font-face { font-family: 'Serif Fallback'; src: local('Times New Roman'), local('Liberation Serif'), local('Times'); size-adjust: 112.28%; ascent-override: 92.27%; descent-override: 29.84%; line-gap-override: 0%; }
@font-face { font-family: 'Sans Fallback'; src: local('Arial'), local('Liberation Sans'), local('Helvetica'); size-adjust: 100.82%; ascent-override: 99.19%; descent-override: 30.05%; line-gap-override: 0%; }

:root {
  color-scheme: light;
  --surface: #fbf9f4;
  --surface-sunken: #f2efe8;
  --ink: #1a1a1a;
  --ink-muted: #55534f;
  --rule: #e0dbd0;
  --rule-strong: #8a867f;
  --accent: #dab234;
  --accent-text: #6f5200;
  --focus-ring: #1f1f1f;
  --charcoal: #1f1f1f;
  --gold: #dab234;
  --linen: #fbf9f4;

  --serif: "Source Serif 4", "Serif Fallback", Georgia, serif;
  --sans: "Hanken Grotesk", "Sans Fallback", "Helvetica Neue", Arial, sans-serif;
  --page: 1280px;
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --col-gap: 24px;
  --header-h: 76px;
  --section-y: clamp(64px, 8vw, 104px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --draw: cubic-bezier(.4, 0, .2, 1);
}
/* Charcoal sections: the same in both themes. */
.dark {
  color-scheme: dark;
  --surface: #1f1f1f; --surface-sunken: #2a2926;
  --ink: #f4f1ea; --ink-muted: #b3afa7; --rule: #383733; --rule-strong: #6f6c66;
  --accent-text: #dab234; --focus-ring: #dab234;
  background: var(--surface); color: var(--ink);
}
/* Dark preference: the linen sheets become a warm grey one step above the charcoal, which itself steps down,
   so the page keeps its alternation instead of collapsing into one dark field. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #282724; --surface-sunken: #31302c;
    --ink: #f2efe8; --ink-muted: #bdb9b0; --rule: #3d3c38; --rule-strong: #7d7a73;
    --accent-text: #e2c35e; --focus-ring: #dab234;
  }
  :root:not([data-theme="light"]) .dark { --surface: #181817; --surface-sunken: #222220; --rule: #33322f; }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #282724; --surface-sunken: #31302c;
  --ink: #f2efe8; --ink-muted: #bdb9b0; --rule: #3d3c38; --rule-strong: #7d7a73;
  --accent-text: #e2c35e; --focus-ring: #dab234;
}
:root[data-theme="dark"] .dark { --surface: #181817; --surface-sunken: #222220; --rule: #33322f; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px; line-height: 1.6; font-weight: 400;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* The footer sits at the bottom of the window on short pages. */
body { min-height: 100svh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--charcoal); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; transition: color 150ms, text-decoration-color 150ms, background-color 150ms, border-color 150ms; }
@media (hover: hover) { a:hover { text-decoration-color: currentColor; } }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--charcoal); }
h1, h2, h3 { text-wrap: balance; font-family: var(--serif); font-optical-sizing: auto; margin: 0; }
p { margin: 0 0 16px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: calc(var(--page) + 48px); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: calc(env(safe-area-inset-top, 0px) + 16px); z-index: 40; background: var(--linen); color: var(--charcoal); padding: 10px 16px; }

/* ---------- Type ---------- */
.label { font-family: var(--sans); font-size: 12px; line-height: 1.35; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.display { font-size: clamp(44px, 6.1vw, 88px); line-height: .99; font-weight: 500; letter-spacing: -.025em; }
.h2 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.08; font-weight: 500; letter-spacing: -.015em; }
.h3 { font-family: var(--serif); font-size: clamp(20px, 1.6vw, 23px); line-height: 1.2; font-weight: 600; letter-spacing: -.005em; }
.lead { font-size: clamp(19px, 1.55vw, 22px); line-height: 1.5; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.logo { display: block; flex: none; }
.logo img { width: 204px; height: auto; }
.nav-list { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav-link { position: relative; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-muted); text-decoration: none; }
@media (hover: hover) { .nav-link:hover { color: var(--ink); } }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--gold); opacity: 0; }
.nav-link[aria-current]::after { opacity: 1; }
.nav-link[aria-current] { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 0;
  color: var(--ink); background: transparent; text-decoration: none;
}
@media (hover: hover) { .btn:hover { background: var(--ink); color: var(--surface); } }   /* no sticky fill after a tap */
.btn[aria-current] { border-color: var(--gold); }   /* Contact, while it is the section being read */

/* ---------- Hero ---------- */
/* The drawing fills the hero from the bottom. While it scales with the hero's height its horizon sits at 64% of
   it, so the hero is never shorter than the copy (padding + two display lines + lead, --copy) needs to stay clear
   of the horizon: --copy / .644. On very wide, short screens it scales with the width instead and the land and
   sky stand 12.5vw and 16.6vw tall from the bottom, so the hero also keeps --copy above the horizon and the
   copy just clear of the faint sky. */
.hero {
  --copy: calc(clamp(40px, 8.5svh, 96px) + 1.98 * min(6.1vw, 88px) + 210px);
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(600px, calc(100svh - var(--header-h) - 40px), 900px);
  min-height: max(calc(var(--copy) * 1.553), calc(var(--copy) + 12.5vw), calc(var(--copy) - 76px + 16.6vw));
}
.plate { position: absolute; inset: 0; z-index: -1; }
.plate { contain: paint; }
.plate .route { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { padding-top: clamp(40px, 8.5svh, 96px); }
.hero .display { max-width: 12.4em; }
.hero .lead { max-width: 38ch; margin-top: 28px; color: var(--ink-muted); }

/* Drawing line work. Weights fall with distance: silhouettes, then structure, then detail. */
.ln { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.guide { stroke-width: 1; opacity: .06; }
.route .ln-horizon { opacity: .5; }
.route .ln-road { stroke-width: 1.5; }
.route .ln-seams { opacity: .8; }
.route .ln-seams.far { opacity: .32; stroke-width: .7; }
.route .ln-planks { opacity: .36; stroke-width: .7; }
.route .ln-bolts { opacity: .55; stroke-width: .8; }
.route .ln-side { opacity: .5; }
.route .ln-towers { opacity: .85; stroke-width: 1.15; }
.route .ln-towers.mid { opacity: .55; stroke-width: .9; }
.route .ln-towers.far { opacity: .32; stroke-width: .7; }
.route .ln-wires { opacity: .55; stroke-width: .8; }
.route .ln-wires.mid { opacity: .38; }
.route .ln-wires.far { opacity: .22; }
.route .ln-marsh { stroke: var(--ink-muted); opacity: .55; }
.route .ln-marsh.mid { opacity: .38; stroke-width: .8; }
.route .ln-marsh.far { opacity: .22; stroke-width: .6; }
.route .ln-water { stroke: var(--ink-muted); opacity: .32; }
.route .ln-water.mid { opacity: .22; stroke-width: .8; }
.route .ln-water.far { opacity: .13; stroke-width: .6; }
.route .ln-reeds { stroke: var(--ink-muted); opacity: .6; stroke-width: .9; }
.route .ln-plant { opacity: .38; stroke-width: .7; }
.route .ln-sky { stroke: var(--ink-muted); opacity: .2; stroke-width: .7; }
.route .ln-sky.far { opacity: .1; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.sheet { display: flex; align-items: baseline; gap: 14px; margin: 0 0 clamp(36px, 4.5vw, 56px); padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-muted); }
.sheet-no { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--accent-text); font-variant-numeric: lining-nums tabular-nums; }
.sheet-sep { color: var(--rule-strong); }
.sheet-sub { color: var(--ink); }
/* Construction mats continue the Equipment chapter: same ground, closer spacing, the sheet title runs on. */
.chapter-open { padding-bottom: calc(var(--section-y) * .5); }
.chapter-next { padding-top: calc(var(--section-y) * .5); }
.intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.intro > .h2 { grid-column: 1 / span 6; max-width: 22ch; }
/* A heading set in two given lines; on phones it wraps on its own. */
.intro > .h2:has(.line) { max-width: none; }
.h2 .line { display: block; white-space: nowrap; }
.intro > .lead, .intro > .intro-text { grid-column: 7 / span 6; padding-top: .35em; max-width: 46ch; }
.intro-text > p:not(.lead) { color: var(--ink-muted); max-width: 52ch; }

/* What we do: a dial for the cycle, the four stations beside it */
.cycle-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; margin-top: 56px; }
.cycle-art { grid-column: 1 / span 5; max-width: 440px; }
.dial { width: 100%; height: auto; overflow: visible; }
.dial .ln-ring { stroke-width: 1.3; }
.dial .ln-inner { opacity: .35; stroke-width: .7; }
.dial .ln-ticks { opacity: .45; stroke-width: .7; }
.dial .ln-ticks.major { opacity: .8; stroke-width: .9; }
.dial .ln-arrows { stroke: var(--accent-text); stroke-width: 1.3; }
.dial .station rect { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.dial .station text { fill: var(--ink); font-family: var(--serif); font-size: 19px; font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.dial .station .station-name { fill: var(--ink-muted); font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.dial .ln-centre { stroke-width: 1; opacity: .5; }
.cycle { grid-column: 7 / span 6; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--col-gap); }
.cycle li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); padding-top: 21px; }
.cycle li::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--rule); transform-origin: left; }
.step-no { font-family: var(--serif); font-size: 15px; line-height: 1.6; font-weight: 600; color: var(--accent-text); font-variant-numeric: lining-nums tabular-nums; padding-top: 2px; }
.cycle .h3 { margin-bottom: 8px; }
.cycle p { color: var(--ink-muted); font-size: 16px; line-height: 1.6; }

/* Equipment: four drawings on one ground line, like one elevation */
.fleet { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 48px; }
.unit { min-width: 0; display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; }
.unit-text { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 0; }
.unit-art { position: relative; padding-bottom: 12px; }
.cat-art { width: 100%; height: auto; aspect-ratio: 240 / 125; overflow: visible; }
.cat-art .ln { stroke-width: 1.2; }
.cat-art .ln-road { stroke-width: 1.5; }
.cat-art .ln-planks, .cat-art .ln-side { stroke-width: .8; opacity: .6; }
.cat-art .ln-seams { stroke-width: .9; opacity: .85; }
.cat-art .ln-towers { stroke-width: .9; opacity: .75; }
.cat-art .ln-wires { stroke-width: .8; opacity: .7; }
/* Ground datum and hatching, continued through the gaps so the row reads as one line. */
.unit-art::before, .unit-art::after { content: ""; position: absolute; left: 0; right: calc(var(--col-gap) * -1); transform-origin: left; }
.unit-art::before { bottom: 11px; height: 1px; background: var(--ink); opacity: .9; }
.unit-art::after { bottom: 0; height: 10px; opacity: .45; background: repeating-linear-gradient(-55deg, var(--rule-strong) 0 1px, transparent 1px 9px); }
.unit:last-child .unit-art::before, .unit:last-child .unit-art::after { right: 0; }
.unit-text { padding-top: 24px; }
.unit-text .h3 { margin-bottom: 8px; }
.unit-text p { color: var(--ink-muted); font-size: 16px; line-height: 1.6; }

/* Construction mats */
.fig-mat { position: relative; margin: 56px 0 0; display: grid; }
.fig-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); }
.panel { padding: 28px 0 24px; min-width: 0; }
.panel-a { padding-right: 40px; }
.panel-b { padding-left: 40px; border-left: 1px dashed var(--rule-strong); }
.panel-label { color: var(--ink-muted); margin-bottom: 6px; }
.panel-note { font-family: var(--serif); font-size: clamp(22px, 2vw, 26px); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.panel svg { width: 100%; height: auto; overflow: visible; margin-top: 8px; }
.fig-mat .hatch { stroke: var(--ink-muted); stroke-width: 1; opacity: .3; }
.fig-mat .soil { stroke: none; }
.fig-mat .surface { fill: none; stroke: var(--ink); stroke-width: 1.4; }
/* The pressure contours fade out with depth through a gradient stroke rather than a mask, so they stay cheap to redraw. */
.fig-mat .bulb { fill: none; stroke-width: 1.3; }
.fig-mat .bulb-stop { stop-color: var(--accent-text); }
.fig-mat .bulb.b3 { opacity: .55; }
.fig-mat .track rect, .fig-mat .track circle { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.fig-mat .track circle { stroke-width: 1.2; }
.fig-mat .mat rect { fill: var(--surface-sunken); stroke: var(--ink); stroke-width: 1.4; }
.fig-mat .mat-ply { fill: none; stroke: var(--ink-muted); stroke-width: 1; }
.fig-mat .mat-bolts { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .45; }
.fig-mat .mat-edge { stroke: var(--accent); stroke-width: 2.2; }
.fig-mat .load { stroke: var(--ink); stroke-width: 2; }
.fig-mat .spread line { stroke: var(--accent-text); stroke-width: 1.4; }
.fig-mat .arrowhead { fill: context-stroke; }
.fig-mat .fig-tag { fill: var(--ink-muted); font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.fig-mat .tag-lead { fill: none; stroke: var(--ink-muted); stroke-width: 1; }
.uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--col-gap); margin: 48px 0 0; }
.uses > div { border-top: 1px solid var(--rule); padding-top: 20px; }
.uses dt { margin-bottom: 8px; }
.uses dd { margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 1.6; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; }
.contact-body { grid-column: 1 / span 6; min-width: 0; }
.fig-map { grid-column: 7 / span 6; margin: 0; min-width: 0; }
.contact-line { margin-top: 24px; color: var(--ink-muted); max-width: 46ch; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-block: 36px 48px; }
.email { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; font-weight: 500; letter-spacing: -.01em; overflow-wrap: anywhere; text-decoration-color: var(--gold); text-underline-offset: 6px; }
@media (hover: hover) { .email:hover { text-decoration-color: currentColor; } }
.copy {
  min-width: 88px; min-height: 44px; padding: 0 14px;
  color: var(--ink); background: transparent; border: 1px solid var(--rule-strong); border-radius: 0; cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
@media (hover: hover) { .copy:hover { border-color: var(--gold); color: var(--accent-text); } }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 0; border-top: 1px solid var(--rule); padding-top: 24px; }
.details dt { color: var(--accent-text); margin-bottom: 8px; }
.details dd { margin: 0; font-size: 16px; line-height: 1.6; }

.fig-map svg { width: 100%; height: auto; overflow: visible; }
.fig-map .grat { fill: none; stroke: var(--rule); stroke-width: 1; }
.fig-map .parish { fill: none; stroke: var(--rule-strong); stroke-width: .5; opacity: .6; }
.fig-map .state { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.fig-map .terrebonne { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.fig-map .tick { fill: var(--ink-muted); font-size: 15px; font-family: var(--sans); font-variant-numeric: lining-nums tabular-nums; }
.fig-map .state-name { fill: var(--ink-muted); font-size: 18px; font-weight: 600; letter-spacing: .5em; font-family: var(--sans); }
.fig-map .north-arrow, .fig-map .scale-line { fill: none; stroke: var(--ink-muted); stroke-width: 1; }
.fig-map .scale-fill { fill: var(--ink-muted); }
.fig-map .north text, .fig-map .scale text { fill: var(--ink-muted); font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .08em; }
.fig-map .pin { fill: var(--gold); stroke: var(--surface); stroke-width: 2; }
.fig-map .pin-ring { fill: none; stroke: var(--gold); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.fig-map .pin-label { fill: var(--ink); font-size: 30px; font-weight: 600; font-family: var(--serif); }
.fig-map .pin-label, .fig-map .pin-sub { stroke: var(--surface); stroke-width: 8px; stroke-linejoin: round; paint-order: stroke; }
.fig-map .pin-sub { fill: var(--ink-muted); font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-family: var(--sans); }

/* ---------- Footer ---------- */
.site-footer { color: var(--ink-muted); font-size: 14px; line-height: 1.55; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; border-top: 1px solid var(--rule); padding-block: 32px 40px; }
.foot-grid p { margin: 0; }
.foot-grid .label { display: inline-block; margin-bottom: 6px; color: var(--ink-muted); opacity: .8; }
.foot-name { display: flex; align-items: flex-start; gap: 16px; }
.foot-name strong { color: var(--ink); font-weight: 600; }
.foot-mark { width: 36px; height: 36px; flex: none; }
.site-footer a { color: var(--ink-muted); }
@media (hover: hover) { .site-footer a:hover { color: var(--ink); } }
.foot-end { display: flex; gap: 28px; }

/* ---------- Legal and error pages ---------- */
.page-main { padding-block: clamp(48px, 7vw, 88px) var(--section-y); }
.page-main .wrap > * { max-width: 62ch; }
.page-main h1 { font-size: clamp(36px, 4.2vw, 56px); line-height: 1.05; font-weight: 500; letter-spacing: -.02em; margin-bottom: 16px; }
.page-main h2 { font-size: 22px; line-height: 1.35; font-weight: 600; margin: 48px 0 12px; }
.page-main .updated { color: var(--ink-muted); margin-bottom: 40px; }
.page-main .actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* ---------- Private preview gate ----------
   While the site is private each page is encrypted and served inside the gate: the opening hero, with the
   password where the headline stands. On wide screens the hero is exactly the site's, so once the page opens
   its drawing stays where it is and only the copy changes. */
.gate-html { overflow-y: scroll; }   /* the page behind it scrolls, so keep the drawing the same width */
.gate-page { min-height: 100svh; display: flex; flex-direction: column; }
.gate-page > main { flex: 1 0 auto; display: flex; flex-direction: column; }
.gate.hero { height: max(600px, calc(100svh - var(--header-h) - 40px)); }   /* uncapped: on tall screens it still reaches the foot */
.gate-kicker { margin: 0 0 18px; color: var(--accent-text); }
.gate .h2 { max-width: 15ch; margin: 0; text-wrap: balance; }
.gate-form { margin-top: 40px; max-width: 480px; }
.gate-label { display: block; margin-bottom: 6px; color: var(--ink-muted); }
.gate-row { display: flex; align-items: flex-end; gap: 16px; }
.gate-field { position: relative; flex: 1; min-width: 0; }
.gate-field input {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 0 64px 0 0;
  background: transparent; color: var(--ink); caret-color: var(--gold);
  border: 0; border-bottom: 1px solid var(--rule-strong); border-radius: 0;
  font: inherit; font-size: 20px; letter-spacing: .04em;
  transition: border-color 150ms;
}
.gate-field input:focus { outline: none; border-bottom-color: var(--gold); }
.gate-field input:focus-visible { box-shadow: 0 1px 0 0 var(--gold); }
.gate-field input[aria-invalid="true"] { border-bottom-color: var(--gold); }
.gate-show {
  position: absolute; right: 0; bottom: 0; min-width: 44px; min-height: 44px; padding: 0 0 0 12px;
  background: none; border: 0; color: var(--ink-muted); cursor: pointer; text-align: right;
}
@media (hover: hover) { .gate-show:hover { color: var(--ink); } }
.gate-show:focus-visible { outline: 1px solid var(--focus-ring); outline-offset: 2px; }
.gate-enter { flex: none; min-width: 112px; cursor: pointer; font-family: var(--sans); }
.gate-enter:focus-visible { outline: 1px solid var(--focus-ring); outline-offset: 3px; }
.is-busy .gate-enter { cursor: progress; }
.gate-msg { min-height: 1.6em; margin: 16px 0 0; color: var(--accent-text); font-size: 16px; line-height: 1.6; }
.gate-foot { color: var(--ink-muted); font-size: 13px; line-height: 1.4; border-top: 1px solid var(--rule); }
.gate-foot .wrap { padding-block: 10px; }
.gate-foot p { margin: 0; }
.gate-mail { color: var(--ink); }
.gate-auto .gate-page > * { visibility: hidden; }   /* opening with a kept key: no gate in between */

/* ---------- Motion: drawings and the map only ---------- */
/* One rule for every drawing. The pen strokes (.pen: outlines, the horizon and road edges, the conductors, the
   dial ring, the coastline) draw themselves once at an even pace; every finer line fades in behind them. Only
   stroke offsets, opacity and transforms change, each drawing settles in about two seconds, nothing loops,
   and no text moves. */
@media (prefers-reduced-motion: no-preference) {
  [data-draw] { --pen: cubic-bezier(.35, .12, .3, 1); --dur: 1.2s; --lead: 0s; --k: 1; }
  /* Dash lengths are written in px (one user unit) so Chrome interpolates them; a unitless calc() jumps. */
  .motion [data-draw] .pen { stroke-dasharray: var(--dash, 1px) calc(var(--dash, 1px) * 2 + 1px); }
  .motion [data-draw]:not(.is-drawn) .pen { stroke-dashoffset: calc(var(--dash, 1px) * 1.02); }
  /* Engraved lines keep a hairline at any size (non-scaling stroke), so their dashes are measured on screen:
     the site script sets --s to each drawing's screen scale and the dash is stretched to match. */
  .motion [data-draw] .ln.pen { --dash: calc(var(--s, 1) * 1.02px); }
  .motion .is-drawn .pen { stroke-dashoffset: 0px; animation: draw var(--dur) var(--pen) calc(var(--lead) + var(--d, 0s) * var(--k)) both; }

  /* Hero: the long strokes draw; the far country, then the near marsh and the mat road, fade in as whole
     drawings, which the browser composites instead of repainting. */
  .plate { --dur: 1.6s; --lead: .15s; }
  .motion .plate .route:is(.route-far, .route-near) { will-change: opacity; }
  .motion .plate:not(.is-drawn) .route:is(.route-far, .route-near) { opacity: 0; }
  .motion .plate.is-drawn .route-far { animation: appear 1.4s var(--ease) .5s both; }
  .motion .plate.is-drawn .route-near { animation: appear 1.4s var(--ease) 1.3s both; }

  /* Gate: the copy fades in over the drawing; a wrong password brings up its line; once the page opens the
     copy (and on narrow screens the drawing) fades out before the page takes its place. */
  .motion .gate-copy > * { animation: appear .9s var(--ease) both; }
  .motion .gate-copy > .gate-kicker { animation-delay: .25s; }
  .motion .gate-copy > .h2 { animation-delay: .4s; }
  .motion .gate-copy > .gate-form { animation-delay: .6s; }
  .motion .gate-foot { animation: appear .9s var(--ease) .8s both; }
  .motion .gate-msg.is-shown { animation: appear .4s var(--ease) both; }
  .gate-opening .gate-copy, .gate-opening .gate-foot { opacity: 0; transition: opacity .45s var(--ease); }

  /* Equipment: the machines draw one at a time, mats, excavator, crane, office, each with its stretch of
     ground line: the outline draws, its detail fades in, and the next begins as it settles, with no pause between
     (every .6s, measured frame by frame; each ground segment ends as the next starts; about 2.8s in all). */
  .fleet { --dur: .7s; --k: .25; }
  .fleet .unit { --lead: calc(var(--n) * .6s); }
  .motion .fleet:not(.is-drawn) .ln:not(.pen) { opacity: 0; }
  .motion .fleet.is-drawn .ln:not(.pen) { animation: appear .5s var(--ease) calc(var(--lead) + .3s + var(--d, 0s) * .2) both; }
  .motion .fleet:not(.is-drawn) .unit-art::before, .motion .fleet:not(.is-drawn) .unit-art::after { transform: scaleX(0); }
  .motion .fleet.is-drawn .unit-art::before { animation: ground .6s var(--pen) var(--lead) both; }
  .motion .fleet.is-drawn .unit-art::after { animation: ground .6s var(--pen) calc(var(--lead) + .1s) both; }

  /* Dial: the ring draws round clockwise one quarter after another, each station arriving as the pen reaches
     it; the graduations, centre and arrows fade in behind it. --q is one quarter of the round, shared with the
     steps beside it; the drawing's own delays (--d, --f) are scaled to match by --k. */
  .cycle-layout { --q: .5625s; }
  .cycle-art { --dur: 2.5s; --pen: cubic-bezier(.3, .1, .45, 1); --k: 1.25; }
  .cycle-art .ln-ring { --dur: var(--q); --pen: linear; }
  .cycle-art .ln-inner { --dur: 1.75s; }
  .motion .cycle-art:not(.is-drawn) :is(.ln:not(.pen), .station) { opacity: 0; }
  .motion .cycle-art.is-drawn .ln:not(.pen) { animation: appear 1.1s var(--ease) calc(var(--f, .8s) * var(--k)) both; }
  .motion .cycle-art.is-drawn .station { animation: appear .5s var(--ease) calc(var(--i) * var(--q)) both; }
  /* The four steps beside it arrive with their stations, I to IV: the rule above each runs across, then the
     step fades in where it stands. The list starts with the dial (data-draw-after="0"), or on its own if the
     dial has been passed by. */
  .motion .cycle:not(.is-drawn) li::before { transform: scaleX(0); }
  .motion .cycle:not(.is-drawn) li > * { opacity: 0; }
  .motion .cycle.is-drawn li::before { animation: ground var(--q) var(--pen) calc(var(--i) * var(--q)) both; }
  .motion .cycle.is-drawn li > * { animation: appear .85s var(--ease) calc(.25s + var(--i) * var(--q)) both; }

  /* Load diagram, one continuous drawing: without a mat, then with one. In each, the label fades in, the
     ground and the machine draw, the load arrow and the detail follow, the pressure contours draw out faintly,
     and the load presses once: a rut without the mat, almost nothing with it. The second panel's pen picks up
     as the first panel's strokes finish, at about .8s (data-draw-after="800", measured frame by frame), so it
     draws while the first load presses and its own press follows; on phones, stacked, it starts when it comes
     into view. The figure holds. */
  .fig-mat .panel { --dur: .9s; --lead: 0s; }
  .fig-mat .track .pen, .fig-mat .mat .pen { --d: .1s; }
  .fig-mat .bulb { --dur: 1s; }
  .fig-mat .b1 { --d: .8s; } .fig-mat .b2 { --d: .9s; } .fig-mat .b3 { --d: 1s; }
  .motion .fig-mat .panel:not(.is-drawn) :is(.panel-label, .panel-note, .soil, .track circle, .mat-ply, .mat-bolts, .mat-edge, .load, .spread line, .fig-tag, .tag-lead) { opacity: 0; }
  .motion .fig-mat .panel.is-drawn :is(.panel-label, .panel-note, .soil) { animation: appear .6s var(--ease) var(--lead) both; }
  .motion .fig-mat .panel:not(.is-drawn) .mat rect { fill-opacity: 0; }
  .motion .fig-mat .panel.is-drawn .mat rect { animation: draw var(--dur) var(--pen) calc(var(--lead) + var(--d)) both, fill-in .5s linear calc(var(--lead) + .7s) both; }
  .motion .fig-mat .panel.is-drawn :is(.track circle, .mat-ply, .mat-bolts) { animation: appear .5s var(--ease) calc(var(--lead) + .5s) both; }
  .motion .fig-mat .panel.is-drawn :is(.mat-edge, .load) { animation: appear .5s var(--ease) calc(var(--lead) + .6s) both; }
  .motion .fig-mat .panel.is-drawn :is(.fig-tag, .tag-lead) { animation: appear .5s var(--ease) calc(var(--lead) + .9s) both; }
  .motion .fig-mat .panel.is-drawn .spread line { animation: appear .5s var(--ease) calc(var(--lead) + 1s) both; }
  .motion .fig-mat .panel.is-drawn .bulb { animation: draw var(--dur) var(--pen) calc(var(--lead) + var(--d)) both, var(--press) 1.5s cubic-bezier(.45, 0, .3, 1) calc(var(--lead) + 1.4s) both; }
  .fig-mat .b1 { --press: pressure; } .fig-mat .b2 { --press: pressure-2; } .fig-mat .b3 { --press: pressure-3; }
  .motion .fig-mat .panel.is-drawn :is(.rig, .spread) { animation: var(--press) 1.5s cubic-bezier(.45, 0, .3, 1) calc(var(--lead) + 1.4s) both; }
  .panel-a .rig { --press: sink; }
  .panel-b .rig { --press: hold; }
  .panel-b .spread { --press: spread; }
  .rig, .spread { transform-box: view-box; }

  /* Map: the graticule is laid in and the coastline draws; once it closes, the parishes, islands and lettering
     fade in, Terrebonne draws, the pin and its label follow, and one ring goes out from Houma. */
  .fig-map { --dur: 1.8s; }
  .fig-map .state { --d: .1s; }
  .fig-map .terrebonne { --d: 2s; --dur: .9s; }
  .motion .fig-map:not(.is-drawn) :is(.grat, .parish, .isles, .tick, .state-name, .north, .scale, .pin, .pin-label, .pin-sub) { opacity: 0; }
  .motion .fig-map.is-drawn .grat { animation: appear 1s var(--ease) both; }
  .motion .fig-map.is-drawn .isles { animation: appear .6s var(--ease) 1.7s both; }
  .motion .fig-map.is-drawn .parish { animation: appear 1s var(--ease) 1.8s both; }
  .motion .fig-map.is-drawn .state-name { animation: appear .8s var(--ease) 1.9s both; }
  .motion .fig-map.is-drawn .tick { animation: appear .8s var(--ease) 2s both; }
  .motion .fig-map.is-drawn :is(.north, .scale) { animation: appear .8s var(--ease) 2.1s both; }
  .motion .fig-map.is-drawn .pin { animation: appear .4s var(--ease) 2.6s both; }
  .motion .fig-map.is-drawn :is(.pin-label, .pin-sub) { animation: appear .8s var(--ease) 2.7s both; }
  /* No fill: the ring stays hidden until it goes out, and is gone after. */
  .motion .fig-map.is-drawn .pin-ring { animation: ring 1.6s var(--ease) 3s 1; }
}
@keyframes draw { from { stroke-dashoffset: calc(var(--dash, 1px) * 1.02); } }
@keyframes appear { from { opacity: 0; } }
@keyframes fill-in { from { fill-opacity: 0; } }
@keyframes ground { from { transform: scaleX(0); } }
@keyframes ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes sink { 0%, 10% { transform: translateY(0); } 100% { transform: translateY(6px); } }
@keyframes hold { 0%, 10% { transform: translateY(0); } 100% { transform: translateY(1px); } }
@keyframes spread { 0%, 20% { transform: translateY(0); opacity: .35; } 100% { transform: translateY(5px); opacity: 1; } }
@keyframes pressure   { 0%, 10% { stroke-opacity: .3; } 60%, 100% { stroke-opacity: 1; } }
@keyframes pressure-2 { 0%, 20% { stroke-opacity: .3; } 75%, 100% { stroke-opacity: 1; } }
@keyframes pressure-3 { 0%, 30% { stroke-opacity: .3; } 90%, 100% { stroke-opacity: 1; } }

/* ---------- Narrow screens ---------- */
@media (max-width: 480px) {
  .h2 .line { display: inline; white-space: normal; }
  .nav-home { display: none; }   /* privacy and 404 pages: the logo links home; Contact alone fits a phone header */
}
@media (max-width: 1080px) {
  .nav-list { gap: 26px; }
}
@media (max-width: 960px) {
  .intro { grid-template-columns: minmax(0, 1fr); }
  .intro > .h2, .intro > .lead, .intro > .intro-text { grid-column: 1 / -1; }
  .intro > .lead, .intro > .intro-text { padding-top: 0; margin-top: 24px; }
  .cycle-layout { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  .cycle-art, .cycle { grid-column: 1 / -1; }
  .cycle-art { max-width: 340px; width: 100%; justify-self: center; }
  .fleet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit:nth-child(2n) .unit-art::before, .unit:nth-child(2n) .unit-art::after { right: 0; }
  .uses { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .contact-body, .fig-map { grid-column: 1 / -1; }
  .fig-map { max-width: 600px; }
}
@media (max-width: 900px) {
  .nav-list li:not(.nav-cta) { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .logo img { width: 172px; }
  /* Hero: the copy, then the drawing framed on the nearest tower. */
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .hero-copy { padding-top: 40px; }
  .hero .lead { margin-top: 24px; }
  .plate { position: relative; inset: auto; order: 2; height: clamp(280px, 78vw, 440px); margin-top: 32px; overflow: hidden; }
  .plate .route { position: absolute; inset: auto auto 0 50%; height: 165%; width: auto; aspect-ratio: 2560 / 900; max-width: none; transform: translateX(-55.63%); }
  /* The gate fills the screen: the drawing keeps the site's size, and the extra height opens up its sky. */
  .gate.hero { height: auto; flex: 1 0 auto; }
  .gate .plate { flex: 1 0 clamp(280px, 78vw, 440px); }
  .gate .plate .route { height: calc(clamp(280px, 78vw, 440px) * 1.65); }
  .gate-opening .gate .plate { opacity: 0; transition: opacity .45s var(--ease); }
  .fig-panels { grid-template-columns: minmax(0, 1fr); }
  .panel-a { padding-right: 0; }
  .panel-b { padding-left: 0; border-left: 0; border-top: 1px dashed var(--rule-strong); }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .display { font-weight: 550; letter-spacing: -.015em; line-height: 1.03; }
  .cycle { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  /* Equipment as compact rows: drawing beside its description. */
  .fleet { grid-template-columns: minmax(0, 1fr); row-gap: 28px; margin-top: 48px; }
  .unit { grid-row: auto; grid-template-rows: none; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); column-gap: 16px; align-items: end; }
  .unit-text { display: block; grid-row: auto; }
  .unit .unit-art::before, .unit .unit-art::after { right: 0; }
  .unit-text { padding-top: 0; padding-bottom: 14px; }
  .unit-text .h3 { font-size: 19px; margin-bottom: 4px; }
  .unit-text p { font-size: 15px; line-height: 1.5; }
  .uses { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .details { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .fig-map .tick { display: none; }
  .fig-map .pin-label { font-size: 38px; }
  .fig-mat .fig-tag { font-size: 18px; }
  .fig-map .pin-sub { font-size: 20px; }
}
@media (max-width: 360px) {
  :root { --gutter: max(20px, env(safe-area-inset-left, 0px)); --gutter-r: max(20px, env(safe-area-inset-right, 0px)); }
  .display { font-size: min(44px, 13.6vw); }   /* "infrastructure." fits the line down to 272px */
  .logo img { width: 150px; }
  .btn { padding: 0 12px; }
}
@media (max-width: 304px) {
  .header-bar { gap: 12px; }
  .logo img { width: clamp(124px, calc(100vw - 150px), 136px); }
}
