/* ==========================================================================
   The Project Drivers — "Machined to fit"
   Concept: one running machine, one new part. Text on a 12-col grid on the
   left, the 3D mechanism on a fixed layer behind, stations along the shaft.
   ========================================================================== */

:root {
  /* Palette */
  --graphite: #0E1116;
  --navy: #0F1B2D;
  --surface: #141A23;
  --surface-2: #1A212C;
  --line: #2A313C;
  --aluminium: #C9CDD2;
  --fg: #E6E8EB;
  --muted: #9AA3AE;
  --accent: #FF6B1A;      /* Signal Orange: CTA + moment of engagement only */
  --accent-ink: #160A02;
  --blueprint: #7FB8D6;
  --error: #FF7A70;
  --ok: #6FD39A;

  /* Type */
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-xs: .75rem; --t-sm: .875rem; --t-md: 1.0625rem; --t-lg: 1.25rem;
  --t-xl: clamp(1.75rem, 3.4vw, 2.75rem);
  --t-2xl: clamp(2.25rem, 5.2vw, 4.5rem);
  --t-hero: clamp(2.6rem, 6vw, 5.5rem);

  /* Space & layout */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --header-h: 72px;
  --radius: 2px;

  /* Motion */
  --ease-engage: cubic-bezier(.2, 0, 0, 1);
  --ease-drive: cubic-bezier(.65, 0, .35, 1);
  --ease-click: cubic-bezier(.3, 1.4, .5, 1);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--fg);
  font: 400 var(--t-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-stretch: 125%; line-height: 1.02; text-wrap: balance; }
h2 { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -.02em; }
h3 { font-size: var(--t-lg); font-weight: 700; font-stretch: 112%; letter-spacing: -.005em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow { font: 500 var(--t-xs)/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.body-l { font-size: var(--t-lg); line-height: 1.55; color: var(--aluminium); max-width: 52ch; }
.sample { color: var(--accent); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 24px; border: 1px solid transparent; border-radius: var(--radius);
  font: 600 var(--t-sm)/1 var(--f-body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  overflow: hidden; isolation: isolate; background: none; color: var(--fg);
}
.btn-sm { --h: 44px; padding: 0 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg);
  transform: translateY(101%); transition: transform .32s var(--ease-engage);
}
.btn-primary:hover::before, .btn-primary:focus-visible::before { transform: translateY(0); }
.btn .arrow { display: inline-block; transition: transform .18s var(--ease-click); }
.btn:hover .arrow { transform: rotate(90deg); }
.btn-link { padding-inline: 4px; height: auto; color: var(--fg); }
.btn-link::after { /* dimension-line underline */
  content: ""; position: absolute; left: 4px; right: 4px; bottom: -6px; height: 7px;
  border-inline: 1px solid var(--muted); background: linear-gradient(var(--muted), var(--muted)) center / 100% 1px no-repeat;
  transition: border-color .2s, background-size .3s var(--ease-engage);
}
.btn-link:hover::after { border-color: var(--accent); background-image: linear-gradient(var(--accent), var(--accent)); }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--graphite); transition: opacity .5s var(--ease-engage), visibility .5s; }
.loader-gear { width: 56px; color: var(--accent); animation: chip 1.1s var(--ease-drive) infinite alternate; }
.is-ready .loader { opacity: 0; visibility: hidden; }
/* Safety net: never keep the page covered if a script fails */
.loader { animation: loader-out .4s 2.5s forwards; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@keyframes chip { from { opacity: .35; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* ---------- 3D stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#scene { width: 100%; height: 100%; opacity: 0; transition: opacity 1s var(--ease-engage); }
.has-webgl #scene { opacity: 1; }
.scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14,17,22,.92) 0%, rgba(14,17,22,.6) 34%, rgba(14,17,22,0) 58%),
    radial-gradient(120% 90% at 70% 50%, transparent 55%, rgba(14,17,22,.75) 100%);
}
.callout {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px;
  font: 500 var(--t-xs)/1.3 var(--f-mono); color: var(--fg); white-space: nowrap;
  opacity: 0; transition: opacity .4s var(--ease-engage); will-change: transform;
}
.callout::before { content: ""; width: 9px; height: 9px; border: 1px solid var(--accent); border-radius: 50%; background: var(--graphite); flex: none; transform: translateX(-4.5px); }
.callout span { color: var(--accent); }
.callout i { font-style: normal; color: var(--aluminium); padding: 4px 8px; background: rgba(14,17,22,.7); border: 1px solid var(--line); }
body[data-station="hero"] .callout[data-show="hero"],
body[data-station="diagnose"] .callout[data-show="diagnose"] { opacity: 1; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex; align-items: center; gap: 32px;
  transition: background .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.is-scrolled .site-header { background: rgba(14,17,22,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; color: var(--fg); transition: color .3s; }
.brand:hover .brand-mark { color: var(--accent); }
.brand-name { font: 600 11px/1.05 var(--f-body); letter-spacing: .02em; color: var(--muted); }
.brand-name b { font: 800 15px/1 var(--f-display); font-stretch: 125%; color: var(--fg); letter-spacing: .01em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: var(--t-sm); color: var(--muted); text-decoration: none; padding: 8px 0; position: relative; transition: color .2s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--fg); }
.nav a[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--accent); }
.burger { display: none; }

/* ---------- Stations ---------- */
main { position: relative; z-index: 1; }
.station { position: relative; padding-block: clamp(96px, 16vh, 180px); }
.panel { background: var(--graphite); }
.panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--line); }
.narrow-left > * { max-width: 620px; }
.reveal { will-change: transform; }

/* Hero */
.hero { min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--header-h) + 48px) 96px; }
.hero-copy { max-width: 800px; position: relative; z-index: 2; }
.hero-title { font-size: var(--t-hero); font-weight: 800; letter-spacing: -.035em; line-height: .94; margin-bottom: 28px; }
.hero-title .line { display: block; overflow-x: visible; overflow-y: clip; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--aluminium); max-width: 34ch; margin-bottom: 36px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); }
.trust b { color: var(--fg); font-weight: 500; margin-right: 4px; }
.hero-fallback { position: absolute; right: var(--gutter); top: 50%; width: min(44vw, 520px); transform: translateY(-50%); color: var(--line); transition: opacity .8s; }
.has-webgl .hero-fallback { opacity: 0; }
.scroll-hint { position: absolute; left: var(--gutter); bottom: 28px; font-size: var(--t-xs); color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

/* Diagnose */
.diagnose h2 { margin-bottom: 24px; }
.pain-list { margin-top: 48px; border-top: 1px solid var(--line); }
.pain-list li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pain-list .mono { color: var(--accent); font-size: var(--t-sm); padding-top: 3px; }
.pain-list h3 { margin-bottom: 6px; }
.pain-list p { color: var(--muted); }

/* Capabilities */
.capabilities { padding-block: 0; }
.cap-pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 48px; padding-block: 120px 80px; overflow: hidden; }
.cap-track { display: flex; gap: 20px; padding-inline: var(--gutter); width: max-content; will-change: transform; }
.part {
  width: min(380px, 80vw); flex: none; display: flex; flex-direction: column; gap: 16px;
  padding: 24px; background: rgba(20,26,35,.86); border: 1px solid var(--line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .3s, transform .4s var(--ease-engage);
}
.part:hover { border-color: var(--aluminium); transform: translateY(-4px); }
.part header { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-xs); padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.part-no { color: var(--accent); letter-spacing: .06em; }
.part-lead { color: var(--muted); }
.part h3 { font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 800; letter-spacing: -.02em; }
.part p { color: var(--aluminium); }
.part ul { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 12px; font-size: var(--t-xs); color: var(--muted); }
.part ul li::before { content: "— "; color: var(--line); }
.part-accent { border-color: rgba(255,107,26,.5); background: linear-gradient(160deg, rgba(255,107,26,.12), rgba(20,26,35,.9) 55%); }

/* Integration */
.integration h2 { margin-bottom: 24px; }
.timeline { position: relative; margin-top: 56px; padding-left: 36px; display: flex; flex-direction: column; gap: 36px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--progress, 0)); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border: 2px solid var(--line); background: var(--graphite); border-radius: 50%; transition: border-color .3s, background .3s; z-index: 1; }
.timeline li.is-on::before { border-color: var(--accent); background: var(--accent); }
.t-weeks { display: block; font-size: var(--t-xs); color: var(--accent); letter-spacing: .08em; margin-bottom: 6px; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--muted); max-width: 46ch; }
.ports { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; font-size: var(--t-xs); }
.ports li { padding: 6px 10px; border: 1px solid var(--line); color: var(--aluminium); background: rgba(14,17,22,.6); }

/* Work / bench */
.work h2, .workshop h2, .pricing h2 { margin-bottom: 48px; }
.bench { border: 1px solid var(--line); background: var(--surface); }
.bench-tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.bench-tabs button {
  flex: 1 0 auto; min-height: 52px; padding: 0 24px; background: none; border: 0; border-right: 1px solid var(--line);
  color: var(--muted); font: 500 var(--t-sm) var(--f-mono); cursor: pointer; text-align: left; position: relative;
}
.bench-tabs button[aria-selected="true"] { color: var(--fg); background: var(--surface-2); }
.bench-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.case { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; padding: clamp(24px, 4vw, 48px); align-items: center; }
.case[hidden] { display: none; }
.case-copy { display: flex; flex-direction: column; gap: 16px; }
.case h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; }
.case p { color: var(--aluminium); max-width: 56ch; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); font-size: var(--t-xs); }
.specs dt { color: var(--muted); margin-bottom: 4px; }
.specs dd { margin: 0; color: var(--fg); }
.gauge { margin: 0; position: relative; max-width: 360px; width: 100%; justify-self: center; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.g-track, .g-fill { fill: none; stroke-width: 10; }
.g-track { stroke: var(--line); stroke-dasharray: 2 4; }
.g-fill { stroke: var(--accent); stroke-dasharray: 252; stroke-dashoffset: var(--dash, 252); transition: stroke-dashoffset 1.1s var(--ease-engage); }
.gauge figcaption { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; display: flex; flex-direction: column; }
.g-val { font: 800 clamp(2.25rem, 4vw, 3.25rem)/1 var(--f-display); font-stretch: 125%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gauge figcaption span { font: 500 var(--t-xs) var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 80px; border-top: 1px solid var(--line); }
.stats li { padding: 28px 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stats b { font: 800 var(--t-2xl)/1 var(--f-display); font-stretch: 125%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: var(--t-sm); max-width: 22ch; }

/* Workshop */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.quote { margin: 48px 0 0; padding-left: 24px; border-left: 2px solid var(--accent); }
.quote p { font: 600 var(--t-lg)/1.45 var(--f-body); color: var(--fg); max-width: 44ch; }
.quote footer { margin-top: 12px; font-size: var(--t-xs); color: var(--muted); }
.photo-slot {
  aspect-ratio: 4 / 3; width: 100%; max-width: 100%; display: grid; place-items: end start; padding: 16px;
  border: 1px solid var(--line); color: var(--muted); font-size: var(--t-xs);
  background: repeating-linear-gradient(135deg, var(--surface) 0 12px, var(--surface-2) 12px 24px);
}

/* Pricing */
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.spec-card { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.spec-card + .spec-card { border-left: 1px solid var(--line); }
.spec-card .part-no { font-size: var(--t-xs); }
.spec-card h3 { font-size: var(--t-xl); font-weight: 800; }
.price { font: 800 clamp(2rem, 3.2vw, 2.75rem)/1 var(--f-display); font-stretch: 125%; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price .mono { font-size: var(--t-xs); font-weight: 400; color: var(--muted); letter-spacing: 0; vertical-align: middle; }
.spec-card ul { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--aluminium); font-size: var(--t-sm); }
.spec-card li::before { content: "+ "; color: var(--accent); font-family: var(--f-mono); }
.spec-featured { background: var(--surface); box-shadow: inset 0 2px 0 var(--accent); }

/* Contact */
.contact { padding-bottom: 140px; }
.contact h2 { margin-bottom: 24px; }
.contact-meta { margin: 40px 0 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.contact-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-meta dt { color: var(--muted); }
.contact-meta dd { margin: 0; }
.contact-meta a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-meta a:hover { border-color: var(--accent); }
.form { display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 3vw, 40px); background: rgba(20,26,35,.92); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font: 500 var(--t-xs) var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--graphite); color: var(--fg); border: 1px solid var(--line);
  font: 400 var(--t-md)/1.4 var(--f-body); transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field ::placeholder { color: #5f6875; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #3c4554; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.err { color: var(--error); font-size: var(--t-xs); min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: var(--t-sm); color: var(--ok); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }

/* Footer */
.site-footer { position: relative; z-index: 1; background: var(--graphite); border-top: 1px solid var(--line); padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); }
.site-footer .container { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.titleblock { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); border: 1px solid var(--line); font-size: var(--t-xs); }
.titleblock div { padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; }
.titleblock div + div { border-left: 1px solid var(--line); }
.titleblock span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--t-sm); }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--fg); }
.copy { grid-column: 1 / -1; font-size: var(--t-xs); color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .case { grid-template-columns: minmax(0, 1fr); }
  .gauge { justify-self: start; max-width: 300px; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .header-cta { display: none; }
  .burger {
    display: inline-flex; align-items: center; gap: 12px; height: 44px; margin-left: auto; padding: 0 14px 0 16px;
    background: rgba(14,17,22,.55); border: 1px solid var(--line); color: var(--fg); cursor: pointer;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: border-color .3s, background .3s;
  }
  .burger:hover, .burger[aria-expanded="true"] { border-color: var(--accent); }
  .burger-label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; min-width: 5ch; text-align: right; }
  .burger-icon { position: relative; width: 20px; height: 14px; }
  .burger-icon i { position: absolute; right: 0; height: 2px; background: var(--fg); transition: transform .35s var(--ease-engage), width .35s var(--ease-engage), opacity .2s, top .35s var(--ease-engage), background .3s; }
  .burger-icon i:nth-child(1) { top: 0; width: 20px; }
  .burger-icon i:nth-child(2) { top: 6px; width: 13px; background: var(--accent); }
  .burger-icon i:nth-child(3) { top: 12px; width: 7px; }
  .burger:hover .burger-icon i { width: 20px; }
  .burger[aria-expanded="true"] .burger-icon i:nth-child(1) { top: 6px; width: 20px; transform: rotate(45deg); }
  .burger[aria-expanded="true"] .burger-icon i:nth-child(2) { opacity: 0; transform: translateX(6px); }
  .burger[aria-expanded="true"] .burger-icon i:nth-child(3) { top: 6px; width: 20px; transform: rotate(-45deg); background: var(--accent); }
  .nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto; flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--graphite); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease-engage), visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { font: 700 1.5rem/1 var(--f-display); font-stretch: 125%; color: var(--fg); padding: 16px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="true"]::after { display: none; }

  .scrim { background: linear-gradient(180deg, rgba(14,17,22,.15) 0%, rgba(14,17,22,.55) 45%, rgba(14,17,22,.92) 75%); }
  body:not([data-station="hero"]) #scene { opacity: .45; }
  .hero { align-items: flex-end; padding-top: 48svh; }
  .hero-fallback { top: 90px; right: 50%; width: 72vw; transform: translateX(50%); }
  .callout i { display: none; }
  .split, .spec-grid { grid-template-columns: minmax(0, 1fr); }
  .spec-card + .spec-card { border-left: 0; border-top: 1px solid var(--line); }
  .cap-pin { min-height: 0; padding-block: 96px; }
  .cap-track { flex-direction: column; width: auto; }
  .part { width: 100%; }
  .site-footer .container { grid-template-columns: minmax(0, 1fr); }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock div:nth-child(3) { border-left: 0; }
  .titleblock div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .specs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats li, .stats li + li { border-left: 0; padding-left: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .contact-meta div { grid-template-columns: 90px minmax(0, 1fr); }
  .contact-meta dd { overflow-wrap: anywhere; }
  .bench-tabs button { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Brand logo, portfolio, about, contact channels (v11)
   ========================================================================== */
.brand-logo { height: 40px; width: auto; display: block; transition: filter .3s; }
.brand:hover .brand-logo { filter: brightness(1.45); }
.loader-logo { width: 180px; height: auto; animation: chip 1.1s var(--ease-drive) infinite alternate; }
.footer-logo { height: 36px; width: auto; }

/* Portfolio */
.work-intro { margin: -24px 0 48px; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.project {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  transition: border-color .3s, transform .45s var(--ease-engage);
}
.project:hover { border-color: #4a5464; transform: translateY(-4px); }
.project-shot { aspect-ratio: 16 / 10; overflow: hidden; background: #e9ecef; border-bottom: 1px solid var(--line); max-width: 100%; }
.project-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease-engage); }
.project:hover .project-shot img { transform: scale(1.04); }
.project-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project h3 { font-size: 1.5rem; font-weight: 800; }
.project-open { all: unset; cursor: pointer; }
.project-open::after { content: ""; position: absolute; inset: 0; }
.project-open:focus-visible { outline: none; }
.project:has(.project-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.project-body > p { color: var(--aluminium); }
.project-body::after { content: "View project →"; margin-top: auto; padding-top: 10px; font: 500 var(--t-xs) var(--f-mono); color: var(--accent); letter-spacing: .04em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.tags li { padding: 3px 8px; border: 1px solid var(--line); color: var(--muted); }

/* Project dialog */
.project-dialog {
  width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: auto;
  background: var(--graphite); color: var(--fg); border: 1px solid var(--line);
}
.project-dialog::backdrop { background: rgba(5,7,10,.78); backdrop-filter: blur(6px); }
.dlg-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; background: var(--graphite); border-bottom: 1px solid var(--line); }
.dlg-head h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; }
.dlg-close { width: 44px; height: 44px; flex: none; background: none; border: 1px solid var(--line); color: var(--fg); font-size: 16px; cursor: pointer; }
.dlg-close:hover { border-color: var(--accent); color: var(--accent); }
.dlg-gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 20px 24px; }
.dlg-gallery img { flex: none; width: min(780px, 82%); height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #e9ecef; scroll-snap-align: start; border: 1px solid var(--line); }
.dlg-gallery img:only-child { width: 100%; object-fit: contain; }
.dlg-body { padding: 4px 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.dlg-body p { font-size: var(--t-lg); line-height: 1.6; color: var(--aluminium); max-width: 70ch; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.about-item { padding: 28px 24px 8px 0; display: flex; flex-direction: column; gap: 10px; }
.about-item + .about-item { padding-left: 24px; border-left: 1px solid var(--line); }
.about-item p { color: var(--muted); }
.workshop .stats { margin-top: 64px; }

/* Contact channels */
.office { margin-top: 32px; font-size: var(--t-sm); color: var(--fg); display: flex; gap: 16px; }
.office span { color: var(--muted); }
.channels { display: flex; flex-direction: column; gap: 14px; }
.channel {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 24px; min-height: 140px; text-decoration: none; color: var(--fg);
  background: rgba(20,26,35,.92); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .3s, transform .4s var(--ease-engage);
}
.channel:hover { border-color: var(--accent); transform: translateX(4px); }
.channel-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--accent); }
.channel-icon svg { width: 26px; height: 26px; }
.channel-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.channel-label { font-size: var(--t-xs); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.channel-value { font: 700 clamp(1rem, 1.5vw, 1.3rem)/1.2 var(--f-display); font-stretch: 112%; overflow-wrap: anywhere; }
.channel-note { font-size: var(--t-sm); color: var(--muted); }
.channel .arrow { font-size: 1.25rem; color: var(--accent); transition: transform .18s var(--ease-click); }
.channel:hover .arrow { transform: rotate(-45deg); }
.copy-btn { align-self: flex-start; margin: -6px 0 6px; background: none; border: 0; color: var(--muted); font-size: var(--t-xs); cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 4px; }
.copy-btn:hover { color: var(--fg); }

.site-footer .container { align-items: center; }

@media (max-width: 1024px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-item:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .projects, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-item, .about-item + .about-item { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .channel { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; }
  .channel-icon { width: 44px; height: 44px; }
  .channel .arrow { display: none; }
  .dlg-gallery img { width: 88%; }
  .brand-logo { height: 34px; }
}

/* ==========================================================================
   SEO-facing content: H1 kicker, full project text, FAQ, footer NAP (v13)
   ========================================================================== */
.h1-kicker { display: block; margin-bottom: 24px; letter-spacing: .14em; line-height: 1.4; font-stretch: 100%; }
.project-lead { color: var(--fg) !important; font-weight: 500; }
.project-desc {
  color: var(--muted); font-size: var(--t-sm); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dlg-body .project-desc { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: var(--t-lg); line-height: 1.6; color: var(--aluminium); max-width: 70ch; }

.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq h2 { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.faq-item summary:hover h3 { color: var(--accent); }
.faq-icon { position: relative; width: 16px; height: 16px; flex: none; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; background: var(--accent); transition: transform .3s var(--ease-engage); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-item p { color: var(--aluminium); padding: 0 40px 24px 0; max-width: 66ch; }

.footer-nap { font-style: normal; font-size: var(--t-xs); color: var(--muted); line-height: 1.8; }
.footer-nap a { color: var(--muted); text-decoration: none; }
.footer-nap a:hover { color: var(--fg); }
.site-footer .container { grid-template-columns: auto minmax(0, 1fr) auto; }
.copy-btn { min-height: 32px; }

@media (max-width: 860px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq h2 { position: static; }
  .site-footer .container { grid-template-columns: minmax(0, 1fr); }
}

/* Technology stack, grouped (v18) */
.stack { margin-top: 48px; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.stack-group { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stack-label { font-size: var(--t-xs); font-weight: 500; font-stretch: 100%; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); padding-top: 7px; }
.stack .ports { margin-top: 0; }
@media (max-width: 520px) {
  .stack-group { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stack-label { padding-top: 0; }
}

/* ---------- v19: project carousel ---------- */
.dlg-carousel { position: relative; padding: 20px 24px 0; }
.dlg-gallery { padding: 0; gap: 0; scrollbar-width: none; overscroll-behavior-x: contain; border: 1px solid var(--line); background: #0a0d11; }
.dlg-gallery::-webkit-scrollbar { display: none; }
.dlg-gallery img { width: 100%; border: 0; object-fit: contain; object-position: center; background: #0a0d11; scroll-snap-align: center; }
.dlg-nav { position: absolute; top: 50%; transform: translateY(-50%); margin-top: 10px; width: 48px; height: 48px; display: grid; place-items: center; background: rgba(14,17,22,.82); border: 1px solid var(--line); color: var(--fg); cursor: pointer; backdrop-filter: blur(6px); transition: border-color .2s, color .2s, opacity .2s; }
.dlg-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.dlg-nav:hover, .dlg-nav:focus-visible { border-color: var(--accent); color: var(--accent); }
.dlg-nav:disabled { opacity: 0; pointer-events: none; }
.dlg-prev { left: 36px; }
.dlg-next { right: 36px; }
.dlg-carousel.single .dlg-nav, .dlg-strip.single { display: none; }
.dlg-strip { display: flex; align-items: center; gap: 16px; padding: 12px 24px 20px; }
.dlg-count { flex: none; font-size: 13px; letter-spacing: .08em; color: var(--aluminium); }
.dlg-count b { color: var(--accent); font-weight: 500; }
.dlg-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.dlg-thumbs::-webkit-scrollbar { display: none; }
.dlg-thumbs button { flex: none; width: 72px; height: 45px; padding: 0; border: 1px solid var(--line); background: #0a0d11; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.dlg-thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dlg-thumbs button:hover { opacity: .85; }
.dlg-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); }
@media (max-width: 860px) {
  .dlg-gallery img { width: 100%; }
  .dlg-carousel { padding: 16px 16px 0; }
  .dlg-prev { left: 24px; } .dlg-next { right: 24px; }
  .dlg-nav { width: 40px; height: 40px; }
  .dlg-strip { padding: 10px 16px 16px; }
  .dlg-thumbs button { width: 56px; height: 35px; }
}

/* ---------- v20: booking CTAs ---------- */
.channel-primary { border-color: var(--accent); background: linear-gradient(135deg, rgba(255,107,26,.12), rgba(20,26,35,.92) 60%); }
.channel-primary .channel-label { color: var(--accent); }
.step-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 40px 0 8px; padding: 24px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: rgba(20,26,35,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.step-cta p { max-width: 56ch; color: var(--aluminium); line-height: 1.55; }
.step-cta .btn { flex: none; }
@media (max-width: 640px) { .step-cta { flex-direction: column; align-items: flex-start; } }

/* v22: links from capability cards to service pages */
.part-link { display: inline-block; margin-top: 14px; color: var(--accent); text-decoration: none; font-size: 13px; letter-spacing: .04em; }
.part-link:hover { text-decoration: underline; }

/* ==========================================================================
   v23 — WordPress: sections are core blocks (Group, Heading, List, Details, Buttons)
   ========================================================================== */
.wp-block-group { box-sizing: border-box; }
.pain-list { counter-reset: pain; }
.pain-list > * { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); counter-increment: pain; }
.pain-list > *::before { content: counter(pain, decimal-leading-zero); grid-row: 1 / span 2; font: 400 var(--t-sm) var(--f-mono); color: var(--accent); padding-top: 3px; }
.pain-list > * > * { grid-column: 2; }
.part-link a { color: inherit; text-decoration: none; }
.part-link a:hover { text-decoration: underline; }
.timeline > * { position: relative; }
.timeline > *::before { content: ""; position: absolute; left: -33px; top: 6px; width: 12px; height: 12px; border: 2px solid var(--line); background: var(--graphite); border-radius: 50%; transition: border-color .3s, background .3s; z-index: 1; }
.timeline > .is-on::before { border-color: var(--accent); background: var(--accent); }
.step-cta .wp-block-buttons { flex: none; }
.office strong { color: var(--muted); font-weight: 400; }
.project-case { position: relative; z-index: 1; align-self: flex-start; margin-top: auto; padding-top: 10px; font: 500 var(--t-xs) var(--f-mono); color: var(--muted); letter-spacing: .04em; }
.project-case:hover { color: var(--fg); }
.project-body::after { display: none; }
.project-open::before { content: "View project →"; position: absolute; left: 22px; bottom: 24px; font: 500 var(--t-xs) var(--f-mono); color: var(--accent); letter-spacing: .04em; }
.project-body { padding-bottom: 52px; }
.project-case { position: absolute; right: 22px; bottom: 24px; padding: 0; margin: 0; }
