/* ==========================================================================
   Fernbank Construction Limited
   main.css. Single stylesheet, no framework, no build step.

   The site is drawn rather than photographed. Its visual language is taken
   from contract drawings: setting out grids, title blocks, dimension lines,
   section cuts and hatches. Photography sits inside that system instead of
   carrying it.
   --------------------------------------------------------------------------
   01  Tokens
   02  Reset and base
   03  Typography
   04  Layout
   05  Drawing system
   06  Motion
   07  Chrome: skip, progress, header, menu
   08  Hero
   09  Buttons and links
   10  Media and cards
   11  Index rows, stats, programme
   12  Marquee, accordion, table, quote, people
   13  Projects: filter, grid, drawer
   14  Forms
   15  Footer
   16  Utilities
   17  Reduced motion and print
   ========================================================================== */

/* ---------------------------------------------------------------- 01 Tokens */

:root {
  /* Surfaces. A truer black, with more separation between levels than before. */
  --ink:        #050607;
  --ink-2:      #0a0c0d;
  --ink-3:      #101314;
  --ink-4:      #191d1e;
  --ink-rgb:    5, 6, 7;
  --bone-rgb:   244, 243, 239;

  /* Type */
  --bone:       #f4f3ef;
  --bone-dim:   #b4b6b2;
  --muted:      #8c9192;

  /* Accent sampled from the logo. --accent is the brand green as drawn;
     --accent-bright is the electric tint for small text and live states. */
  --accent:         #5cac00;
  --accent-bright:  #8fe000;
  --accent-deep:    #24430a;
  --accent-rgb:     92, 172, 0;

  /* Hairlines */
  --line:    rgba(244, 243, 239, 0.07);
  --line-2:  rgba(244, 243, 239, 0.13);
  --line-3:  rgba(244, 243, 239, 0.24);

  /* Drawing ink */
  --dwg:       rgba(244, 243, 239, 0.38);
  --dwg-mid:   rgba(244, 243, 239, 0.22);
  --dwg-faint: rgba(244, 243, 239, 0.11);

  /* Two families only */
  --f-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Scale. Bigger and tighter at the top, so the jumps actually read. */
  --t-display: clamp(3rem, 9vw, 8rem);
  --t-h1:      clamp(2.5rem, 7vw, 5.6rem);
  --t-h2:      clamp(1.9rem, 4.6vw, 3.6rem);
  --t-h3:      clamp(1.2rem, 1.9vw, 1.55rem);
  --t-h4:      clamp(1rem, 1.3vw, 1.125rem);
  --t-body:    clamp(1rem, 0.95vw, 1.0625rem);
  --t-lede:    clamp(1.0625rem, 1.45vw, 1.3125rem);
  --t-micro:   0.8125rem;
  --t-nano:    0.75rem;

  /* Space */
  --gutter:  clamp(1.15rem, 4vw, 3.75rem);
  --shell:   1560px;
  --sec-y:   clamp(5rem, 11vw, 11rem);
  --s-1: 0.25rem;  --s-2: 0.5rem;   --s-3: 0.75rem;  --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;     --s-7: 2.75rem;  --s-8: 4rem;
  --s-9: 6rem;     --s-10: 9rem;

  /* Motion. Shorter and more precise than before. */
  --e-out:  cubic-bezier(0.19, 1, 0.22, 1);
  --e-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --e-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --d-1: 160ms;  --d-2: 280ms;  --d-3: 480ms;  --d-4: 760ms;

  --nav-h: 72px;
  color-scheme: dark;
}

@media (max-width: 720px) { :root { --nav-h: 60px; } }


/* Light theme: the same tokens on paper. Chosen with the switch in the top
   bar (html[data-theme]); without a choice the visitor's system setting
   decides. Everything else in this file reads the tokens, so nothing below
   needs a second copy. */
html[data-theme="light"] {
  color-scheme: light;
  --ink:        #f3f2ee;
  --ink-2:      #f8f7f4;
  --ink-3:      #ffffff;
  --ink-4:      #e7e6e1;
  --ink-rgb:    243, 242, 238;
  --bone:       #101314;
  --bone-dim:   #4d5254;
  --muted:      #646a6c;
  --bone-rgb:   16, 19, 20;
  --accent:         #4d9400;
  --accent-bright:  #3f7f00;
  --accent-deep:    #dcefc9;
  --accent-rgb:     77, 148, 0;
  --line:    rgba(16, 19, 20, 0.09);
  --line-2:  rgba(16, 19, 20, 0.16);
  --line-3:  rgba(16, 19, 20, 0.30);
  --dwg:       rgba(16, 19, 20, 0.50);
  --dwg-mid:   rgba(16, 19, 20, 0.30);
  --dwg-faint: rgba(16, 19, 20, 0.14);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
  color-scheme: light;
  --ink:        #f3f2ee;
  --ink-2:      #f8f7f4;
  --ink-3:      #ffffff;
  --ink-4:      #e7e6e1;
  --ink-rgb:    243, 242, 238;
  --bone:       #101314;
  --bone-dim:   #4d5254;
  --muted:      #646a6c;
  --bone-rgb:   16, 19, 20;
  --accent:         #4d9400;
  --accent-bright:  #3f7f00;
  --accent-deep:    #dcefc9;
  --accent-rgb:     77, 148, 0;
  --line:    rgba(16, 19, 20, 0.09);
  --line-2:  rgba(16, 19, 20, 0.16);
  --line-3:  rgba(16, 19, 20, 0.30);
  --dwg:       rgba(16, 19, 20, 0.50);
  --dwg-mid:   rgba(16, 19, 20, 0.30);
  --dwg-faint: rgba(16, 19, 20, 0.14);
}
}
html[data-theme="light"] .only-dark, html:not([data-theme="light"]) .only-light { display: none; }
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .only-dark { display: none; }
  html:not([data-theme="dark"]) .only-light { display: block; }
}
html[data-theme="light"] .only-light { display: block; }
/* the hero photograph was shot for a dark page: on paper it sits in a frame */
html[data-theme="light"] .hero__media img { filter: saturate(0.9) contrast(0.96); }

/* the theme switch: a sun or a moon, drawn with the same hairlines */
.theme-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-3); color: var(--bone-dim); background: transparent; cursor: pointer;
  transition: color var(--d-2) var(--e-soft), border-color var(--d-2) var(--e-soft);
}
.theme-btn:hover { color: var(--bone); border-color: var(--bone); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .moon { display: none; }
html[data-theme="light"] .theme-btn .sun { display: none; }
html[data-theme="light"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) .theme-btn .sun { display: none; }
  html:not([data-theme="dark"]) .theme-btn .moon { display: block; }
}
.menu__foot .theme-btn { width: 34px; height: 34px; }

/* ------------------------------------------------------- 02 Reset and base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.58;
  letter-spacing: -0.003em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video, figure { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--accent-deep); color: var(--bone); }

@supports (scrollbar-width: thin) {
  html { scrollbar-width: thin; scrollbar-color: var(--ink-4) var(--ink); }
}

/* --------------------------------------------------------- 03 Typography */

.display, .h1, .h2, .h3 {
  font-family: var(--f-sans);
  margin: 0;
  text-wrap: balance;
  font-weight: 700;
}

.display {
  font-size: var(--t-display);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variation-settings: "wdth" 112;
  font-weight: 700;
}

.h1 {
  font-size: var(--t-h1);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 110;
}

.h2 {
  font-size: var(--t-h2);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 108;
}

.h3 {
  font-size: var(--t-h3);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.h4 {
  font-family: var(--f-sans);
  font-size: var(--t-h4);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.display em, .h1 em, .h2 em { font-style: normal; color: var(--accent-bright); }

.lede {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--bone-dim);
  font-weight: 400;
  margin: 0;
  max-width: 52ch;
  text-wrap: pretty;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.prose { color: var(--bone-dim); max-width: 62ch; }
.prose strong { color: var(--bone); font-weight: 600; }
.prose a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }

/* The annotation voice. Everything metadata is mono, uppercase, wide tracked. */
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.eyebrow__num { color: var(--accent-bright); }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line-2); max-width: 120px; }
.eyebrow--plain::after { display: none; }

.mono {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono--nano { font-size: var(--t-nano); letter-spacing: 0.18em; }

/* ------------------------------------------------------------- 04 Layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: 1080px; }

.section { position: relative; padding-block: var(--sec-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--flush-top { padding-top: 0; }
.section--alt { background: var(--ink-2); }
.section--ruled { border-top: 1px solid var(--line); }

/* Hook on the long lower sections. Left empty on purpose.
   Do not add content-visibility: auto here. It collapses offscreen sections
   to a guessed height, which makes the scroll position jump. */
.section--defer { }

.sec-head { display: grid; gap: var(--s-5); margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.sec-head > .h2 { max-width: 18ch; }
.sec-head--split { grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 900px) {
  .sec-head--split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-8); }
  .sec-head--split .eyebrow { grid-column: 1 / -1; }
}

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-6); }
.grid--gap-lg { gap: clamp(2rem, 4.5vw, 4.5rem); }

.col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: span 12; }
/* Below 760px every column is full width anyway, but a 12 track grid still reserves
   11 column gaps - about 352px - which is wider than a 360px phone and scrolled the
   page sideways. Collapse to a single track so only the row gap survives. */
@media (max-width: 759px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .col-6 { grid-column: span 6; }
  .col-4 { grid-column: span 6; }
  .col-3 { grid-column: span 6; }
}
@media (min-width: 1000px) {
  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
}

/* The page sits on a setting out grid, like a drawing sheet. */
.sheet-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: none;
}
.sheet-grid span {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(var(--bone-rgb), 0.035);
}
.sheet-grid span:nth-child(1) { left: var(--gutter); }
.sheet-grid span:nth-child(2) { left: 25%; }
.sheet-grid span:nth-child(3) { left: 50%; }
.sheet-grid span:nth-child(4) { left: 75%; }
.sheet-grid span:nth-child(5) { right: var(--gutter); left: auto; }
@media (min-width: 1100px) { .sheet-grid { display: block; } }

main, .site-header, .site-footer { position: relative; z-index: 1; }

.rule {
  height: 1px;
  background: var(--line-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-4) var(--e-out);
}
.is-in .rule, .rule.is-in { transform: scaleX(1); }

.dim {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dim::before, .dim::after {
  content: "";
  width: 6px; height: 6px;
  border: 1px solid var(--line-3);
  transform: rotate(45deg);
  flex: none;
}

/* ----------------------------------------------------- 05 Drawing system */

/* A drawing sits in a frame with a thin border and corner ticks, the way a
   detail is boxed on a sheet. */
.dwg {
  position: relative;
  margin: 0;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, rgba(var(--bone-rgb),0.016), rgba(var(--bone-rgb),0)) ,
    var(--ink-2);
  overflow: hidden;
}
.section--alt .dwg { background: linear-gradient(180deg, rgba(244,243,239,0.016), rgba(244,243,239,0)), var(--ink); }

.dwg::before, .dwg::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--line-3);
  pointer-events: none;
  z-index: 3;
}
.dwg::before { left: 8px; top: 8px; border-right: 0; border-bottom: 0; }
.dwg::after  { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }

.dwg__svg { display: block; width: 100%; height: auto; }

/* Drawing strokes. Authored with pathLength="1" so one rule animates them all. */
.dwg svg { color: var(--dwg); }
.dwg svg [stroke] { vector-effect: non-scaling-stroke; }

.dwg-line   { stroke: var(--dwg); fill: none; stroke-width: 1.25; }
.dwg-heavy  { stroke: var(--bone); fill: none; stroke-width: 1.75; }
.dwg-mid    { stroke: var(--dwg-mid); fill: none; stroke-width: 1; }
.dwg-faint  { stroke: var(--dwg-faint); fill: none; stroke-width: 1; }
.dwg-accent { stroke: var(--accent-bright); fill: none; stroke-width: 1.5; }
.dwg-dash   { stroke: var(--dwg-mid); fill: none; stroke-width: 1; stroke-dasharray: 6 5; }

.dwg-fill-ink    { fill: var(--ink-3); stroke: none; }
.dwg-fill-accent { fill: rgba(var(--accent-rgb), 0.16); stroke: none; }

.dwg-txt {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--muted);
  stroke: none;
}
.dwg-txt--lit { fill: var(--bone-dim); }
.dwg-txt--accent { fill: var(--accent-bright); }
.dwg-txt--big { font-size: 15px; letter-spacing: 0.08em; fill: var(--bone); }

/* Grid bubble: the circled letter or number at the end of a setting out line */
.dwg-bubble circle { stroke: var(--dwg-mid); fill: var(--ink); stroke-width: 1; }
.dwg-bubble text {
  font-family: var(--f-mono);
  font-size: 11px;
  fill: var(--bone-dim);
  text-anchor: middle;
  dominant-baseline: central;
  letter-spacing: 0;
}

/* Plot the drawing on as the section arrives. */
.js .dwg [class*="dwg-"][stroke],
.js .dwg path.dwg-line, .js .dwg path.dwg-heavy, .js .dwg path.dwg-mid,
.js .dwg path.dwg-faint, .js .dwg path.dwg-accent, .js .dwg path.dwg-dash,
.js .dwg line.dwg-line, .js .dwg line.dwg-mid, .js .dwg line.dwg-faint,
.js .dwg line.dwg-heavy, .js .dwg line.dwg-accent, .js .dwg line.dwg-dash,
.js .dwg rect.dwg-line, .js .dwg rect.dwg-mid, .js .dwg rect.dwg-heavy,
.js .dwg circle.dwg-line, .js .dwg polyline.dwg-line, .js .dwg polyline.dwg-mid {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s var(--e-soft);
  transition-delay: calc(var(--dw, 0) * 90ms);
}
.js .dwg.is-in [class*="dwg-"][stroke],
.js .dwg.is-in path[class*="dwg-"], .js .dwg.is-in line[class*="dwg-"],
.js .dwg.is-in rect[class*="dwg-"], .js .dwg.is-in circle[class*="dwg-"],
.js .dwg.is-in polyline[class*="dwg-"] { stroke-dashoffset: 0; }

.js .dwg .dwg-txt, .js .dwg .dwg-bubble text, .js .dwg [class*="dwg-fill"], .js .dwg .dwg-hatch {
  opacity: 0;
  transition: opacity var(--d-3) linear;
  transition-delay: calc(360ms + var(--dw, 0) * 70ms);
}
.js .dwg.is-in .dwg-txt, .js .dwg.is-in .dwg-bubble text,
.js .dwg.is-in [class*="dwg-fill"], .js .dwg.is-in .dwg-hatch { opacity: 1; }

/* The setting out grid laid over the hero photograph. */
.hero__grid i {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, rgba(var(--bone-rgb),0.16), rgba(var(--bone-rgb),0.02));
}
.hero__grid b {
  position: absolute;
  top: calc(var(--nav-h) + 22px);
  transform: translateX(-50%);
  width: 26px; height: 26px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 10px; font-weight: 400;
  color: var(--bone-dim);
  background: rgba(var(--ink-rgb), 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

/* Title block. The panel on every drawing sheet carrying the project data. */
.titleblock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-2);
  background: rgba(var(--ink-rgb), 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (min-width: 720px) { .titleblock { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.titleblock--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .titleblock--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.tb {
  padding: 0.85rem 1rem 0.95rem;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.3rem;
  align-content: start;
  min-width: 0;
}
.tb:last-child { border-right: 0; }
.tb__k {
  font-family: var(--f-mono);
  font-size: var(--t-nano);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.tb__v {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bone);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.tb__v--accent { color: var(--accent-bright); }

/* ------------------------------------------------------------- 06 Motion */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity var(--d-3) var(--e-out), transform var(--d-3) var(--e-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal--sm { transform: translate3d(0, 10px, 0); }
.js .reveal--scale { transform: scale(1.03); opacity: 0; }
.js .reveal--scale.is-in { transform: none; }

.js .mask { overflow: hidden; display: block; }
.js .mask > .mask__i {
  display: block;
  transform: translate3d(0, 105%, 0);
  transition: transform var(--d-4) var(--e-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .mask.is-in > .mask__i { transform: none; }

.js .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.js .w__i {
  display: inline-block;
  transform: translate3d(0, 108%, 0);
  transition: transform 0.9s var(--e-out);
  transition-delay: calc(var(--wi, 0) * 44ms);
}
.js .is-in .w__i, .js .w.is-in .w__i { transform: none; }

@keyframes pump {
  0%, 100% { transform: scale(1); }
  38%      { transform: scale(1.05); }
  62%      { transform: scale(0.996); }
}
@keyframes pump-ring {
  0%   { transform: scale(0.97); opacity: 0.5; }
  70%  { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(1.2); opacity: 0; }
}
.pumped { animation: pump 760ms var(--e-soft) both; }

.par { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }

/* ------------------------------------------------------------- 07 Chrome */

.skip {
  position: absolute;
  left: var(--gutter); top: 0;
  transform: translateY(-120%);
  z-index: 200;
  background: var(--bone);
  color: var(--ink);
  padding: 0.7rem 1.1rem;
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform var(--d-2) var(--e-out);
}
.skip:focus { transform: translateY(0); }

.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  background: var(--accent-bright);
  z-index: 120;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: transform var(--d-3) var(--e-out), background-color var(--d-2) linear,
              border-color var(--d-2) linear;
  border-bottom: 1px solid transparent;
}
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(var(--ink-rgb),0.8), rgba(var(--ink-rgb),0));
  transition: opacity var(--d-2) linear;
  pointer-events: none;
}
.site-header.is-stuck {
  background: rgba(var(--ink-rgb), 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line-2);
}
.site-header.is-stuck::before { opacity: 0; }
.site-header.is-hidden { transform: translate3d(0, -102%, 0); }
.site-header.is-open { transform: none; background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
.site-header.is-open::before { opacity: 0; }

.nav { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; flex: none; }
.brand__mark {
  width: 40px; height: 40px; flex: none;
  object-fit: contain;
  transition: transform var(--d-3) var(--e-out);
}
.brand:hover .brand__mark { transform: scale(1.07) rotate(-3deg); }
@media (max-width: 720px) { .brand__mark { width: 34px; height: 34px; } }
.brand__text { display: grid; line-height: 1; }
.brand__name {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 108;
}
.brand__sub {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-top: 5px;
}
@media (max-width: 420px) { .brand__sub { font-size: 0.625rem; letter-spacing: 0.12em; } }

.nav__list { display: none; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
@media (min-width: 1040px) { .nav__list { display: flex; } }
/* six tabs: keep each on one line, and drop the enquiry button until there is room for it */
.nav__link { white-space: nowrap; }
@media (min-width: 1040px) and (max-width: 1279px) { .nav .nav__end .nav__cta { display: none; } }

.nav__link {
  position: relative;
  font-family: var(--f-sans);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--bone-dim);
  padding-block: 0.4rem;
  transition: color var(--d-2) var(--e-soft);
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-2) var(--e-out);
}
.nav__link:hover { color: var(--bone); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--bone); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); background: var(--line-3); }

.nav__end { display: flex; align-items: center; gap: var(--s-4); flex: none; }
/* Hub: a sign in to a separate application, shown as an outlined button with a green
   edge. In the header it sits beside the CTA from 1040px (scoped to .nav so it beats the
   later .btn display rule); below that it lives in the slide out menu as .menu__hub. */
.nav .nav__hub { display: none; }
@media (min-width: 1040px) { .nav .nav__hub { display: inline-flex; } }
/* .btn.btn--hub, not .btn--hub: this block sits above the base .btn rules, which would otherwise win */
.btn.btn--hub { --btn-fg: var(--bone); background: transparent; border-color: var(--accent-bright); }
.btn.btn--hub::before { background: var(--accent-bright); }
.btn.btn--hub:hover { color: var(--ink); border-color: var(--accent-bright); }
.btn.btn--hub:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
/* keep screen reader text hidden inside buttons, whose spans are otherwise position: relative */
.btn > span.vh { position: absolute; }

.menu__hub {
  display: grid; gap: 0.35rem;
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-2);
  color: var(--bone-dim);
  transition: color var(--d-2) var(--e-soft);
}
.menu__hub-name {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
}
.menu__hub-name svg { opacity: 0.6; transition: opacity var(--d-2) linear, transform var(--d-2) var(--e-out); }
.menu__hub-note { font-size: 0.9375rem; color: var(--muted); }
.menu__hub:hover .menu__hub-name { color: var(--accent-bright); }
.menu__hub:hover .menu__hub-name svg { opacity: 1; transform: translate(1px, -1px); }

/* Scoped to .nav so it beats the later `.btn { display: inline-flex }`.
   A bare .nav__cta rule loses the cascade and the button shows on mobile,
   pushing the burger off the edge of the screen. */
.nav .nav__cta { display: none; }
@media (min-width: 1040px) { .nav .nav__cta { display: inline-flex; } }

.burger { --bw: 20px; display: grid; gap: 5px; padding: 10px; margin-right: -10px; }
@media (min-width: 1040px) { .burger { display: none; } }
.burger span {
  display: block; width: var(--bw); height: 1.5px; background: var(--bone);
  transition: transform var(--d-2) var(--e-out), opacity var(--d-1) linear, width var(--d-2) var(--e-out);
}
.burger span:nth-child(2) { width: 13px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: var(--bw); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 105;
  background: var(--ink);
  display: grid;
  grid-template-rows: var(--nav-h) 1fr auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 700ms var(--e-out);
  visibility: hidden;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu__inner { align-self: center; width: 100%; max-width: var(--shell); margin-inline: auto; padding: var(--s-5) var(--gutter); overflow-y: auto; }
.menu__list { display: grid; }
.menu__item { overflow: hidden; border-bottom: 1px solid var(--line); }
.menu__link {
  display: flex; align-items: baseline; gap: 1.1rem;
  font-size: clamp(1.9rem, 7.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variation-settings: "wdth" 108;
  padding-block: clamp(0.55rem, 1.6vw, 0.9rem);
  color: var(--bone);
  transform: translate3d(0, 110%, 0);
  transition: transform 640ms var(--e-out), color var(--d-2) linear;
  transition-delay: calc(var(--i, 0) * 45ms);
}
.menu.is-open .menu__link { transform: none; }
.menu__link:hover { color: var(--accent-bright); }
.menu__link span {
  font-family: var(--f-mono);
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--accent);
  flex: none;
}
.menu__foot {
  border-top: 1px solid var(--line-2);
  padding: var(--s-5) var(--gutter);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  justify-content: space-between; align-items: center;
}
.menu__foot a { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.14em; color: var(--bone-dim); }
.menu__foot a:hover { color: var(--accent-bright); }

/* --------------------------------------------------------------- 08 Hero */

.hero {
  position: relative;
  min-height: min(100svh, 1000px);
  display: grid;
  align-items: end;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vh, 5rem));
  padding-bottom: 0;
  overflow: clip;
}

.hero__bg { position: absolute; inset: -12% 0 -12% 0; z-index: 0; }
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(110% 80% at 80% 6%, rgba(var(--accent-rgb), 0.09), transparent 58%),
    linear-gradient(to top, var(--ink) 2%, rgba(var(--ink-rgb),0.84) 42%, rgba(var(--ink-rgb),0.48) 100%);
}

/* The setting out grid laid over the photograph, so the drawn language and
   the real site read as one system. */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: none;
}
@media (min-width: 900px) { .hero__grid { display: block; } }
.hero__grid svg { width: 100%; height: 100%; }

.hero__inner { position: relative; z-index: 2; width: 100%; }
.hero__kicker { margin-bottom: clamp(1.1rem, 2.6vw, 1.75rem); }
.hero .display { max-width: 15ch; margin-bottom: clamp(1.25rem, 3vw, 2rem); }

.hero__row {
  display: grid;
  gap: var(--s-6);
  align-items: end;
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
}
@media (min-width: 980px) { .hero__row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-8); } }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero__tb { margin-top: clamp(2rem, 5vw, 3.5rem); border-bottom: 0; }

.scroll-hint {
  display: none; align-items: center; gap: 0.6rem;
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
@media (min-width: 980px) { .scroll-hint { display: flex; } }
.scroll-hint i { display: block; width: 1px; height: 34px; background: linear-gradient(to bottom, var(--line-3), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after {
  content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 11px;
  background: var(--accent-bright);
  animation: hint 2.4s var(--e-soft) infinite;
}
@keyframes hint {
  0%   { transform: translateY(-13px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(36px); opacity: 0; }
}

/* Inner page hero */
.page-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(3.5rem, 10vh, 7rem));
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  overflow: clip;
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 110% at 88% -15%, rgba(var(--accent-rgb), 0.085), transparent 58%);
  pointer-events: none;
}
.page-hero__inner { position: relative; display: grid; gap: var(--s-5); }
.page-hero .h1 { max-width: 20ch; }
.page-hero .lede { max-width: 56ch; }

.crumbs {
  display: flex; gap: 0.6rem; align-items: center;
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.crumbs a:hover { color: var(--accent-bright); }
.crumbs span { color: var(--line-3); }

/* -------------------------------------------------- 09 Buttons and links */

.btn {
  --btn-fg: var(--ink);
  --btn-bg: var(--bone);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  font-family: var(--f-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--d-2) var(--e-out), color var(--d-2) var(--e-soft),
              border-color var(--d-2) var(--e-soft);
}
.btn > span { position: relative; z-index: 2; }
.btn__arrow { position: relative; z-index: 2; flex: none; transition: transform var(--d-2) var(--e-out); }
.btn::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: var(--ink);
  transform: translate3d(0, 101%, 0);
  transition: transform var(--d-3) var(--e-out);
}
.btn:hover { transform: translateY(-2px); color: var(--bone); }
.btn:hover::before { transform: none; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn:active { transform: translateY(0); }

.btn--ghost { --btn-fg: var(--bone); background: transparent; border-color: var(--line-3); }
.btn--ghost::before { background: var(--bone); }
.btn--ghost:hover { color: var(--ink); border-color: var(--bone); }

.btn--accent { --btn-bg: var(--accent-bright); border-color: var(--accent-bright); }
.btn--sm { padding: 0.7rem 1.05rem; }
.btn--block { width: 100%; justify-content: center; }

.btn--pulse::after {
  content: "";
  position: absolute; inset: -1px;
  border: 1px solid var(--accent-bright);
  animation: pump-ring 3.2s var(--e-soft) infinite;
  pointer-events: none;
  z-index: 0;
}
.btn--pulse:hover::after { animation-play-state: paused; opacity: 0; }

.tlink {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bone);
  padding-bottom: 0.35rem;
  background-image: linear-gradient(var(--accent-bright), var(--accent-bright));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--d-3) var(--e-out), color var(--d-2) linear;
}
.tlink:hover { color: var(--accent-bright); background-size: 100% 1px; }
.tlink svg { transition: transform var(--d-2) var(--e-out); }
.tlink:hover svg { transform: translateX(4px); }

/* ------------------------------------------------------ 10 Media & cards */

/* Photographic slots. Kept for pages that take real photography. */
.media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(140deg, var(--ink-3), var(--ink-2) 55%, var(--ink));
  border: 1px solid var(--line);
  isolation: isolate;
}
.media::after {
  content: "";
  position: absolute; left: 10px; top: 10px;
  width: 12px; height: 12px;
  border-left: 1px solid var(--line-2);
  border-top: 1px solid var(--line-2);
  z-index: 2; pointer-events: none;
}
.media picture { display: block; width: 100%; height: 100%; }
.media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 0; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--3x2  { aspect-ratio: 3 / 2; }
.media--1x1  { aspect-ratio: 1 / 1; }
.media--4x5  { aspect-ratio: 4 / 5; }
.media--fill { position: absolute; inset: 0; aspect-ratio: auto; border: 0; }
.media--fill::after { display: none; }

.card {
  position: relative;
  display: grid;
  gap: var(--s-4);
  align-content: start;
  padding: clamp(1.4rem, 2.4vw, 2rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color var(--d-3) var(--e-soft), background-color var(--d-3) var(--e-soft),
              transform var(--d-3) var(--e-out);
}
.section--alt .card { background: var(--ink); }
.card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--accent-bright), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-4) var(--e-out);
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card:hover::before { transform: scaleX(1); }

.card__num { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.2em; color: var(--accent-bright); }
.card__body { color: var(--bone-dim); }

.ticks { display: grid; gap: 0.5rem; margin-top: 0.25rem; }
/* Block, not grid: a grid li puts any trailing text node in its own cell, so an
   item like "<strong>Lead in.</strong> rest of the sentence" wrapped one word per line. */
.ticks li {
  position: relative; padding-left: 1.45rem;
  font-size: 0.9375rem; color: var(--bone-dim); line-height: 1.5;
}
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; background: var(--accent);
}

.icon-tile {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--accent-bright); flex: none;
  transition: border-color var(--d-2) linear, transform var(--d-3) var(--e-out);
}
.card:hover .icon-tile { border-color: var(--accent-deep); transform: rotate(-4deg); }

/* Screenshots of the Hub. A thin frame on the page's own surface, a soft
   shadow in the dark theme and a hairline in the light one; captions set as
   drawing notes. */
.shot { display: block; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--ink-3); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
html[data-theme="light"] .shot { box-shadow: 0 18px 50px rgba(16, 19, 20, 0.12); }
@media (prefers-color-scheme: light) { html:not([data-theme="dark"]) .shot { box-shadow: 0 18px 50px rgba(16, 19, 20, 0.12); } }
.shot img { display: block; width: 100%; height: auto; }
.shot-fig { margin: 0; }
.shot-fig figcaption { margin-top: var(--s-4); font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.04em; color: var(--bone-dim); line-height: 1.6; max-width: 72ch; }
.shot-fig figcaption a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; }
.sec-head + .shot-fig { margin-top: var(--s-7); }
.shot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); margin-top: var(--s-8); align-items: start; }
.shot-fig--phone { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: var(--s-5); align-items: end; }
.shot-fig--phone .shot { border-radius: 22px; }
.shot-fig--phone figcaption { margin-top: 0; }
@media (max-width: 860px) { .shot-grid { grid-template-columns: minmax(0, 1fr); } .shot-fig--phone { grid-template-columns: minmax(0, 220px) 1fr; } }
@media (max-width: 520px) { .shot-fig--phone { grid-template-columns: minmax(0, 1fr); align-items: start; } .shot-fig--phone figcaption { margin-top: var(--s-4); } }

/* -------------------------------------- 11 Index rows, stats, programme */

/* The capability index. A numbered list that behaves like a drawing register,
   with the matching drawing revealed on hover. */
.index { border-top: 1px solid var(--line-2); }
.index__row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem var(--s-5);
  align-items: baseline;
  padding-block: clamp(1.4rem, 3.2vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
  transition: padding-left var(--d-3) var(--e-out);
}
@media (min-width: 900px) {
  .index__row { grid-template-columns: 72px minmax(0, clamp(10.5rem, 19.5vw, 15.5rem)) minmax(0, 1fr) auto; align-items: center; }
}
.index__row::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-4) var(--e-out);
}
.index__row:hover::after { transform: scaleX(1); }
@media (min-width: 900px) { .index__row:hover { padding-left: 14px; } }

.index__n { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.2em; color: var(--accent-bright); }
.index__t {
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.06;
  font-variation-settings: "wdth" 106;
  transition: color var(--d-2) linear;
}
.index__t { overflow-wrap: anywhere; }
.index__row:hover .index__t { color: var(--accent-bright); }
.index__d { color: var(--bone-dim); font-size: 0.9375rem; grid-column: 1 / -1; }
@media (min-width: 900px) { .index__d { grid-column: auto; max-width: 48ch; } }
.index__go { display: none; }
@media (min-width: 900px) {
  .index__go { display: block; color: var(--muted); transition: transform var(--d-2) var(--e-out), color var(--d-2) linear; }
  .index__row:hover .index__go { color: var(--accent-bright); transform: translateX(5px); }
}

/* Stats. Large tabular figures on a ruled band. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  border-top: 1px solid var(--line-2);
}
.stat {
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.75rem);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid; gap: 0.6rem; align-content: start;
}
.stat:last-child { border-right: 0; }
.stat__fig {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-variation-settings: "wdth" 108;
  color: var(--bone);
  display: inline-flex;
  align-items: baseline;
  transform-origin: left bottom;
  font-variant-numeric: tabular-nums;
}
.stat__fig sup {
  font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0;
  color: var(--accent-bright); top: -0.15em; margin-left: 0.2em;
}
.stat__label {
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); line-height: 1.6;
}

/* Programme. A real bar chart rather than a list of steps. */
.prog { border-top: 1px solid var(--line-2); }
.prog__head {
  display: none;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: var(--s-5);
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 860px) { .prog__head { display: grid; } }
.prog__scale { display: grid; grid-template-columns: repeat(6, 1fr); }
.prog__scale span {
  font-family: var(--f-mono); font-size: var(--t-nano);
  letter-spacing: 0.14em; color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 0.4rem;
}

.prog__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem var(--s-5);
  padding-block: clamp(1rem, 2.2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
@media (min-width: 860px) { .prog__row { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); } }
.prog__label { display: grid; gap: 0.3rem; }
.prog__n { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.2em; color: var(--accent-bright); }
.prog__t { font-weight: 600; letter-spacing: -0.015em; font-size: 1.0625rem; }
.prog__d { color: var(--bone-dim); font-size: 0.875rem; }

.prog__track {
  position: relative;
  height: 34px;
  background: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 6));
}
.prog__bar {
  position: absolute;
  top: 6px; bottom: 6px;
  left: calc(var(--from) / var(--weeks, 10) * 100%);
  width: calc(var(--span) / var(--weeks, 10) * 100%);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), rgba(var(--accent-rgb), 0.22));
  border: 1px solid rgba(var(--accent-rgb), 0.65);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-4) var(--e-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.is-in .prog__bar, .prog__bar.is-in { transform: scaleX(1); }
.prog__bar::after {
  content: attr(data-weeks);
  position: absolute; right: 7px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono); font-size: var(--t-nano);
  letter-spacing: 0.12em; color: var(--bone);
  white-space: nowrap;
}

/* ------------------------- 12 Marquee, accordion, table, quote, people */

.marquee {
  position: relative; overflow: hidden;
  border-block: 1px solid var(--line-2);
  padding-block: clamp(1rem, 1.9vw, 1.5rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; gap: clamp(2rem, 5vw, 4.5rem); animation: slide var(--mq-dur, 42s) linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }
.marquee__item {
  display: flex; align-items: center; gap: 0.7rem; flex: none;
  font-family: var(--f-mono); font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.marquee__item b { color: var(--bone); font-weight: 500; }
.marquee__item i { width: 4px; height: 4px; background: var(--accent); flex: none; }

.acc { border-top: 1px solid var(--line-2); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-4); align-items: center;
  width: 100%; padding: clamp(1.1rem, 2.3vw, 1.65rem) 0;
  text-align: left; transition: color var(--d-2) linear;
}
.acc__btn:hover { color: var(--accent-bright); }
.acc__btn .mono { color: var(--accent-bright); }
.acc__sign { position: relative; width: 14px; height: 14px; flex: none; }
.acc__sign::before, .acc__sign::after {
  content: ""; position: absolute; background: currentColor;
  transition: transform var(--d-3) var(--e-out), opacity var(--d-2) linear;
}
.acc__sign::before { left: 0; top: 6.5px; width: 14px; height: 1px; }
.acc__sign::after  { left: 6.5px; top: 0; width: 1px; height: 14px; }
.acc__btn[aria-expanded="true"] .acc__sign::after { transform: rotate(90deg); opacity: 0; }
.acc__panel { overflow: hidden; height: 0; transition: height var(--d-3) var(--e-out); }
.acc__inner { padding-bottom: clamp(1.2rem, 3vw, 2rem); display: grid; gap: var(--s-4); }
@media (min-width: 860px) { .acc__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); } }

.spec { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.spec th, .spec td { text-align: left; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th {
  font-family: var(--f-mono); font-size: var(--t-micro); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); width: 38%;
}
.spec td { color: var(--bone-dim); }
/* A table never shrinks below its min-content width, so one long unbreakable value
   (an email address) sets the width of everything around it and scrolls narrow
   phones sideways. Let cell values wrap instead. */
.spec th, .spec td { overflow-wrap: anywhere; }
.spec tr:first-child th, .spec tr:first-child td { border-top: 1px solid var(--line); }

.quote { display: grid; gap: var(--s-5); }
.quote blockquote {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-variation-settings: "wdth" 106;
  text-wrap: balance;
}
.quote blockquote::before { content: "\201C"; color: var(--accent-bright); }
.quote blockquote::after { content: "\201D"; color: var(--accent-bright); }
.quote figcaption { display: grid; gap: 0.2rem; }
.quote figcaption b { font-weight: 600; font-size: 0.9375rem; }

.steps { display: grid; counter-reset: step; border-top: 1px solid var(--line-2); }
.step {
  counter-increment: step;
  display: grid; gap: var(--s-3);
  padding-block: clamp(1.4rem, 2.8vw, 2.1rem);
  border-bottom: 1px solid var(--line);
  position: relative;
}
@media (min-width: 860px) { .step { grid-template-columns: 80px minmax(0, min(300px, 34%)) minmax(0, 1fr); gap: var(--s-6); align-items: start; } }
.step__n { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.2em; color: var(--accent-bright); }
.step__n::before { content: "0" counter(step); }
.step__body { color: var(--bone-dim); }
.step::after {
  content: ""; position: absolute; left: 0; bottom: -1px;
  height: 1px; width: 100%; background: var(--accent-deep);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--d-4) var(--e-out);
}
.step:hover::after { transform: scaleX(1); }

.people { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.person { display: grid; gap: var(--s-4); align-content: start; }
/* start, not the default stretch: cards share the tallest card’s height, and stretch
   handed the spare height to the text row, so shorter bios sat their names lower. */
.person__name { font-weight: 600; }
.person__role { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-bright); }

.cta-band { position: relative; overflow: clip; border-top: 1px solid var(--line-2); background: var(--ink-2); }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 130% at 10% 115%, rgba(var(--accent-rgb), 0.13), transparent 60%);
  pointer-events: none;
}
.cta-band__inner { position: relative; display: grid; gap: var(--s-6); align-items: center; padding-block: clamp(3.5rem, 8vw, 7rem); }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-8); } }

/* ----------------------------------------------------------- 13 Projects */

.filters {
  display: grid; gap: var(--s-4);
  padding-block: var(--s-5);
  border-block: 1px solid var(--line-2);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }
.filters__label { flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  padding: 0.52rem 0.95rem;
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line-2);
  transition: color var(--d-2) linear, border-color var(--d-2) linear, background-color var(--d-2) linear;
}
.chip:hover { color: var(--bone); border-color: var(--line-3); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--bone); border-color: var(--bone); }
.filters__count { margin-left: auto; font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.14em; color: var(--muted); }

.proj-grid { display: grid; gap: clamp(1.25rem, 2.6vw, 2rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr)); }

/* Project card as a drawing sheet: the drawing on top, title block beneath. */
.proj {
  position: relative;
  display: grid;
  align-content: start;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
  transition: opacity var(--d-3) var(--e-soft), transform var(--d-3) var(--e-out),
              border-color var(--d-3) var(--e-soft);
}
.section--alt .proj { background: var(--ink); }
.proj[hidden] { display: none; }
.proj.is-out { opacity: 0; transform: scale(0.98) translateY(6px); pointer-events: none; }
.proj:hover { border-color: var(--line-3); transform: translateY(-3px); }

.proj__media { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.proj__media .media, .proj__media .dwg { border: 0; transition: transform 800ms var(--e-out); }
.proj:hover .proj__media .media { transform: scale(1.03); }
.proj__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(var(--ink-rgb),0.8), transparent 55%);
  opacity: 0; transition: opacity var(--d-3) var(--e-soft);
  z-index: 4; pointer-events: none;
}
.proj:hover .proj__media::after { opacity: 1; }
.proj__view {
  position: absolute; left: 0.9rem; bottom: 0.9rem; z-index: 5;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--d-3) var(--e-soft), transform var(--d-3) var(--e-out);
  pointer-events: none;
}
.proj:hover .proj__view, .proj:focus-visible .proj__view { opacity: 1; transform: none; }

.proj__body { padding: clamp(1.1rem, 2vw, 1.4rem); display: grid; gap: 0.6rem; }
.proj__title { transition: color var(--d-2) linear; font-size: clamp(1.15rem, 1.7vw, 1.4rem); font-weight: 600; letter-spacing: -0.025em; }
.proj:hover .proj__title { color: var(--accent-bright); }
.proj__line { font-size: 0.9rem; color: var(--bone-dim); line-height: 1.5; }
.proj__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }

.tag { font-family: var(--f-mono); font-size: var(--t-nano); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-bright); }
.tag--muted { color: var(--muted); }

.proj__tb { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proj__tb .tb { border-top: 0; padding: 0.6rem 0.8rem 0.7rem; }

.empty {
  padding: clamp(3rem, 8vw, 6rem) 0; text-align: center;
  display: grid; gap: var(--s-4); justify-items: center;
  border: 1px dashed var(--line-2);
}

.drawer { position: fixed; inset: 0; z-index: 140; display: grid; justify-items: end; visibility: hidden; pointer-events: none; }
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(3, 4, 4, 0.76);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity var(--d-3) linear;
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: relative;
  width: min(100%, 660px); height: 100%;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--ink-2);
  border-left: 1px solid var(--line-2);
  transform: translate3d(100%, 0, 0);
  transition: transform 560ms var(--e-out);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vw, 4rem);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close {
  position: sticky; top: 0; margin-left: auto;
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-dim);
  padding: 0.5rem 0; z-index: 2;
}
.drawer__close:hover { color: var(--accent-bright); }
.drawer__body { display: grid; gap: var(--s-5); }
.drawer__body .h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }

/* -------------------------------------------------------------- 14 Forms */

.form { display: grid; gap: var(--s-5); }
.form__grid { display: grid; gap: var(--s-5); }
@media (min-width: 720px) { .form__grid--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 0.45rem; position: relative; }
.field > label {
  font-family: var(--f-mono); font-size: var(--t-micro);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.field > label .req { color: var(--accent-bright); }

.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="url"], .field select, .field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--f-sans);
  font-size: 1rem;
  color: var(--bone);
  background: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 0;
  transition: border-color var(--d-2) linear, background-color var(--d-2) linear, box-shadow var(--d-2) linear;
  appearance: none;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--bone-dim) 50%),
                    linear-gradient(135deg, var(--bone-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.75rem;
  cursor: pointer;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  background: var(--ink-4);
  box-shadow: 0 0 0 1px var(--accent-deep);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }

.field[data-invalid="true"] input, .field[data-invalid="true"] select,
.field[data-invalid="true"] textarea { border-color: #c9766a; box-shadow: 0 0 0 1px rgba(201,118,106,0.35); }
.checks[data-invalid="true"] .check input { border-color: #c9766a; }

.field__err {
  font-family: var(--f-mono); font-size: var(--t-nano);
  letter-spacing: 0.12em; text-transform: uppercase; color: #e09487;
  margin: 0; max-height: 0; opacity: 0; overflow: hidden;
  transform: translateY(-4px);
  transition: max-height var(--d-2) var(--e-out), opacity var(--d-1) linear, transform var(--d-2) var(--e-out);
}
.field[data-invalid="true"] .field__err, .checks[data-invalid="true"] .field__err { max-height: 4em; opacity: 1; transform: none; }

.checks { display: grid; gap: 0.7rem; }
.check {
  display: grid; grid-template-columns: 17px 1fr; gap: 0.7rem;
  align-items: start; font-size: 0.9375rem; color: var(--bone-dim); cursor: pointer;
}
.check input {
  appearance: none; width: 17px; height: 17px; margin: 0.18em 0 0;
  border: 1px solid var(--line-3); background: var(--ink-3);
  position: relative; cursor: pointer;
  transition: border-color var(--d-2) linear, background-color var(--d-2) linear;
}
.check input:checked { background: var(--accent-bright); border-color: var(--accent-bright); }
.check input:checked::after {
  content: ""; position: absolute; left: 5px; top: 2px;
  width: 4px; height: 8px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(42deg);
}
.check:hover input { border-color: var(--accent); }

.form__note { font-family: var(--f-mono); font-size: var(--t-nano); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.8; }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status {
  display: none; gap: var(--s-4);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--accent-deep);
  background: rgba(var(--accent-rgb), 0.055);
}
.form__status.is-shown { display: grid; }
.form__status .h3 { color: var(--accent-bright); }
.form.is-sent { display: none; }

/* ------------------------------------------------------------- 15 Footer */

.site-footer { border-top: 1px solid var(--line-2); background: var(--ink); padding-top: clamp(3rem, 6vw, 5rem); }
.footer__top { display: grid; gap: clamp(2rem, 4vw, 3.5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 640px) { .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .footer__top { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s-7); } }
.footer__col { display: grid; gap: var(--s-4); align-content: start; min-width: 0; }

.brand-full { display: inline-block; justify-self: start; }
.brand-full img {
  width: clamp(126px, 12vw, 158px);
  height: auto; opacity: 0.78;
  transition: opacity var(--d-2) linear, transform var(--d-3) var(--e-out);
}
.brand-full:hover img { opacity: 1; transform: translateY(-2px); }

.footer__h { font-family: var(--f-mono); font-size: var(--t-micro); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.footer__col ul { display: grid; gap: 0.65rem; }
.footer__col a { color: var(--bone-dim); font-size: 0.9375rem; transition: color var(--d-2) linear, transform var(--d-2) var(--e-out); display: inline-block; }
.footer__col a:hover { color: var(--accent-bright); transform: translateX(3px); }
/* long addresses must wrap rather than push the page sideways */
.footer__col a, .footer__col p, .footer__col li { overflow-wrap: anywhere; min-width: 0; }
.footer__blurb { color: var(--bone-dim); font-size: 0.9375rem; max-width: 34ch; }

.footer__bar {
  border-top: 1px solid var(--line);
  padding-block: var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  justify-content: space-between; align-items: center;
}
.footer__legal { font-family: var(--f-mono); font-size: var(--t-nano); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); line-height: 1.9; }
.footer__legal a { color: var(--bone-dim); }
.footer__legal a:hover { color: var(--accent-bright); }

/* ---------------------------------------------------------- 16 Utilities */

.flow > * + * { margin-top: var(--s-4); }
.flow-lg > * + * { margin-top: var(--s-6); }
.stack { display: grid; gap: var(--s-5); align-content: start; }
.stack--sm { gap: var(--s-3); }
.stack--lg { gap: var(--s-7); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.sticky-top { position: sticky; top: calc(var(--nav-h) + 2rem); }
@media (max-width: 999px) { .sticky-top { position: static; } }
.txt-accent { color: var(--accent-bright); }
.txt-dim { color: var(--bone-dim); }
.center { text-align: center; justify-items: center; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.no-mobile { display: none; }
@media (min-width: 760px) { .no-mobile { display: initial; } }

.intro {
  position: fixed; inset: 0; z-index: 300;
  background: var(--ink); display: grid; place-items: center;
  transition: clip-path 720ms var(--e-in), opacity 300ms linear 440ms;
  clip-path: inset(0 0 0 0);
}
.intro.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.intro__mark { display: grid; gap: var(--s-5); justify-items: center; }
.intro__mark img { width: 58px; height: 58px; object-fit: contain; }
.intro__bar { width: min(200px, 46vw); height: 1px; background: var(--line-2); overflow: hidden; }
.intro__bar i { display: block; height: 100%; width: 100%; background: var(--accent-bright); transform: scaleX(0); transform-origin: left; animation: load 740ms var(--e-soft) forwards; }
@keyframes load { to { transform: scaleX(1); } }

/* ------------------------------------------- 17 Reduced motion and print */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .js .reveal, .js .reveal--scale { opacity: 1 !important; transform: none !important; }
  .js .mask > .mask__i, .js .w__i { transform: none !important; }
  .js .dwg [class*="dwg-"] { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .prog__bar { transform: scaleX(1) !important; }
  .marquee__track { animation: none; transform: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .par { transform: none !important; }
  .btn--pulse::after { display: none; }
  .scroll-hint i::after { display: none; }
  .intro { display: none; }
}

@media print {
  .site-header, .menu, .progress, .sheet-grid, .intro, .drawer, .cta-band, .scroll-hint { display: none !important; }
  body { background: #fff; color: #000; }
  .dwg, .media { border: 1px solid #ccc; background: #fff; }
  .dwg svg { color: #333; }
}

/* Measure. Paragraphs stop at about 65 characters wherever the layout would
   otherwise let them run on; headings keep their own limits. */
.prose p, .card__body, .step__body, .footer__blurb, .acc__inner p, .sec-head .lede, .page-hero .lede { max-width: 62ch; }
.footer__legal { font-size: 0.8125rem; }

/* The Hub page. A feature row is five columns of words beside seven of
   picture; it flips on alternate rows. The practical strip puts the phone
   beside three short facts. */
.page-hero--tight .page-hero__inner { padding-bottom: var(--s-6); }
.page-hero--tight .shot-fig { margin-top: var(--s-5); }
.feat { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); align-items: center; }
.feat__text { grid-column: span 5; display: grid; gap: var(--s-4); }
.feat__text .h2 { max-width: 16ch; }
.feat__text p { max-width: 46ch; }
.feat__pic { grid-column: span 7; margin: 0; }
.feat--flip .feat__text { order: 2; }
.feat--flip .feat__pic { order: 1; }
.practical { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); align-items: center; }
.practical__phone { grid-column: span 3; margin: 0; }
.shot--phone { border-radius: 22px; }
.practical__facts { grid-column: span 9; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.practical__facts p { margin-top: var(--s-3); color: var(--bone-dim); max-width: 34ch; }
@media (max-width: 960px) {
  .feat__text, .feat__pic, .feat--flip .feat__text, .feat--flip .feat__pic { grid-column: span 12; order: 0; }
  .feat__text .h2, .feat__text p { max-width: none; }
  .practical__phone { grid-column: span 4; }
  .practical__facts { grid-column: span 8; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) { .practical__phone { grid-column: span 12; max-width: 260px; } .practical__facts { grid-column: span 12; } }
