/* ==========================================================================
   DATUM — Architecture & Build
   Type: Archivo (variable width — narrow caps for drawing lettering, regular for text)
         + IBM Plex Mono for figures, codes and coordinates.
   ========================================================================== */
@property --n { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --nt { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --nb { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --hn { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --paper: #EFECE5;
  --paper-2: #E7E3DA;
  --paper-3: #DDD8CD;
  --ink: #1A1A18;
  --ink-2: #57554F;
  --ink-3: #77746B;
  --accent: #2B46FF;
  --accent-ink: #1B2FCC;
  --warm: #FF5A1F;
  --n-bg: #0A1020;
  --n-fg: #E8ECF4;
  --n-fg-2: #A6AFC2;
  --n-fg-3: #717C92;
  --n-accent: #8E9CFF;

  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --bg: var(--paper);
  --ui-bg: color-mix(in oklab, var(--paper) 86%, transparent);
  --hair: color-mix(in oklab, var(--ink) 14%, transparent);
  --hair-2: color-mix(in oklab, var(--ink) 26%, transparent);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --narrow: 78%;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-ui: cubic-bezier(0.2, 0, 0, 1);
  --gutter: 32px;
  --header: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-loading { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: clip;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* paper grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
em { font-style: normal; }

/* drawing lettering: narrow caps, like a title block */
.tech {
  font-family: var(--sans);
  font-stretch: var(--narrow);
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1.35;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
/* figures, codes, coordinates */
.mono {
  font-family: var(--mono);
  font-stretch: normal;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-2); }
.kicker .dot { width: 7px; height: 7px; background: var(--accent); display: inline-block; }

/* display type */
.hero-title, .p-title, .sec-title, .cta-title, .cut-name, .card h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-stretch: 96%;
  font-kerning: normal;
  text-wrap: balance;
}
.hero-title em, .p-title em, .sec-title em { color: var(--fg-3); }
.ln { padding-bottom: 0.06em; margin-bottom: -0.06em; } /* SplitText mask lines: keep descenders */

/* ----------------------------------------------------------------- buttons */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; gap: 12px;
  height: var(--h);
  padding-inline: 18px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  font: 500 14px/1 var(--sans);
  letter-spacing: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition-property: scale, background-color, color, border-color;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; transition: translate 240ms var(--ease-out); }
.btn:not(:disabled):active { scale: 0.96; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--hair-2); }
.btn-small { --h: 36px; font-size: 13px; padding-inline: 14px 12px; }
.btn-wide { width: 100%; justify-content: space-between; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent); color: #fff; }
  .btn-ghost:hover { background: color-mix(in oklab, var(--fg) 6%, transparent); border-color: var(--fg-3); }
  .btn:hover svg { translate: 2px -2px; }
  .btn-ghost:hover svg { translate: 0 2px; }
}
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ----------------------------------------------------------------- loader: south elevation */
.loader { position: fixed; inset: 0; z-index: 100; }
.loader.is-done { pointer-events: none; }
.ld-bg { position: absolute; inset: 0; background: var(--paper); }
.ld-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.ld-p { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linecap: square; }
.ld-ink { stroke: var(--ink); stroke-width: 1.2; }
.ld-soft { stroke: var(--ink); stroke-opacity: 0.5; stroke-width: 1; }
.ld-axis { stroke: var(--accent); stroke-opacity: 0.6; stroke-width: 1; stroke-dasharray: 8 5; }
.ld-bubble { stroke: var(--accent); stroke-width: 1; fill: var(--paper); }
.ld-lev { stroke: var(--accent); stroke-width: 1; fill: var(--accent); }
.ld-ext { stroke: var(--accent); stroke-width: 1; }
.ld-dim { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ld-t { font-family: var(--sans); font-stretch: var(--narrow); font-weight: 500; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; fill: var(--ink-2); stroke: none; }
.ld-bn { fill: var(--accent); font-family: var(--mono); letter-spacing: 0; }
.ld-lv, .ld-dt { fill: var(--accent); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; text-transform: none; }
.ld-ls { fill: var(--ink-3); font-size: 9.5px; }
.ld-title { fill: var(--ink); font-weight: 600; font-size: 12px; }
.ld-scale { fill: var(--ink-2); font-family: var(--mono); letter-spacing: 0; }
.ld-axis, .ld-fade { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ld-p { animation: ld-draw 1s var(--ease-io) forwards; animation-delay: var(--d, 0ms); }
  .ld-axis, .ld-fade { animation: ld-fade 600ms ease forwards; animation-delay: var(--d, 0ms); }
}
@media (prefers-reduced-motion: reduce) {
  .ld-p { stroke-dashoffset: 0; }
  .ld-axis, .ld-fade { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .is-embed .ld-p { animation-duration: 650ms; animation-delay: calc(var(--d, 0ms) * 0.45); }
  .is-embed .ld-axis, .is-embed .ld-fade { animation-duration: 400ms; animation-delay: calc(var(--d, 0ms) * 0.45); }
}
.ld-svg.is-static .ld-p { animation: none; stroke-dashoffset: 0; }
.ld-svg.is-static .ld-axis, .ld-svg.is-static .ld-fade { animation: none; opacity: 1; }
@keyframes ld-draw { to { stroke-dashoffset: 0; } }
@keyframes ld-fade { to { opacity: 1; } }
.ld-meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px;
  display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2);
}
.ld-meta b { color: var(--ink); font-weight: 500; }
.ld-fail {
  position: absolute; left: 50%; bottom: 72px; translate: -50% 0;
  display: grid; justify-items: center; gap: 10px; text-align: center;
  padding: 18px 22px; max-width: calc(100% - 32px);
  background: var(--paper); border: 1px solid var(--hair-2);
}
.ld-fail .tech { color: var(--warm); }
.ld-fail p:not(.tech) { color: var(--ink-2); font-size: 14px; }
.loader.is-failed .ld-dim, .loader.is-failed .ld-dt { opacity: 0.25; }

/* ----------------------------------------------------------------- sheet change (navigation) */
.cut {
  position: fixed; inset: 0; z-index: 45;
  visibility: hidden;
  background: var(--paper);
  clip-path: inset(100% 0% 0% 0%);
  display: grid; place-items: center;
  pointer-events: none;
}
.cut-frame { position: absolute; inset: calc(var(--header) + 4px) 16px 16px 16px; border: 1px solid var(--hair); }
.cut-in { display: grid; justify-items: center; text-align: center; color: var(--ink); }
.cut-no { color: var(--accent); }
.cut-n { margin-top: 18px; font: 300 clamp(72px, 10vw, 150px)/0.9 var(--sans); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.cut-name { margin-top: 14px; font-size: clamp(28px, 3vw, 44px); line-height: 1; letter-spacing: -0.03em; }
.cut-sub { margin-top: 14px; color: var(--ink-2); }
.cut-line { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 1px; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* corner registration marks (stage frame + sheet change) */
.frame .c, .cut-frame .c { position: absolute; width: 13px; height: 13px; }
.frame .c::before, .frame .c::after, .cut-frame .c::before, .cut-frame .c::after { content: ""; position: absolute; background: var(--fg); }
.frame .c::before, .cut-frame .c::before { left: 6px; top: 0; width: 1px; height: 13px; }
.frame .c::after, .cut-frame .c::after { top: 6px; left: 0; height: 1px; width: 13px; }
.c.tl { left: -7px; top: -7px; } .c.tr { right: -7px; top: -7px; }
.c.bl { left: -7px; bottom: -7px; } .c.br { right: -7px; bottom: -7px; }

/* ----------------------------------------------------------------- header */
.site-header {
  --fg: color-mix(in oklab, var(--ink), var(--n-fg) calc(var(--hn) * 100%));
  --fg-2: color-mix(in oklab, var(--ink-2), var(--n-fg-2) calc(var(--hn) * 100%));
  --fg-3: color-mix(in oklab, var(--ink-3), var(--n-fg-3) calc(var(--hn) * 100%));
  --bg: color-mix(in oklab, var(--paper), var(--n-bg) calc(var(--hn) * 100%));
  --accent: color-mix(in oklab, #2B46FF, var(--n-accent) calc(var(--hn) * 100%));
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  color: var(--fg);
  transition: --hn 450ms ease;
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -18px 0; z-index: -1; pointer-events: none;
  --hdr-bg: color-mix(in oklab, var(--bg) 94%, transparent);
  background: linear-gradient(to bottom, var(--hdr-bg) 0%, var(--hdr-bg) 55%, transparent 100%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font: 600 15px/1 var(--sans); font-stretch: 112%; letter-spacing: 0.16em; }
.brand svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.brand svg path { stroke: var(--accent); }
.nav { display: flex; gap: 30px; color: var(--fg-2); }
.nav a { position: relative; padding-block: 8px; transition: color 200ms ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 380ms var(--ease-out);
}
.nav a.is-current { color: var(--fg); }
.nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) {
  .nav a:hover { color: var(--fg); }
  .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
}
.site-header .btn { justify-self: end; }
html.hdr-blue .site-header { --fg: #F4F2EC; --fg-2: rgba(244, 242, 236, 0.75); --bg: #2B46FF; --accent: #F4F2EC; }
html.hdr-blue .site-header .btn-primary { background: #F4F2EC; color: var(--accent-ink); }
@media (hover: hover) { html.hdr-blue .site-header .btn-primary:hover { background: #fff; color: var(--accent-ink); } }

/* ----------------------------------------------------------------- story stage */
.story { position: relative; }
.stage {
  --fg: color-mix(in oklab, var(--ink), var(--n-fg) calc(var(--nt) * 100%));
  --fg-2: color-mix(in oklab, var(--ink-2), var(--n-fg-2) calc(var(--nt) * 100%));
  --fg-3: color-mix(in oklab, var(--ink-3), var(--n-fg-3) calc(var(--nt) * 100%));
  --bg: color-mix(in oklab, color-mix(in oklab, var(--paper), var(--n-bg) calc(var(--nt) * 100%)), #4F63A6 calc(var(--nb) * 30%));
  --accent: color-mix(in oklab, #2B46FF, var(--n-accent) calc(var(--nt) * 100%));
  --ui-bg: color-mix(in oklab, var(--bg) 86%, transparent);
  --hair: color-mix(in oklab, var(--fg) 14%, transparent);
  --hair-2: color-mix(in oklab, var(--fg) 26%, transparent);
  --veil-c: color-mix(in oklab, color-mix(in oklab, var(--paper), #0C1424 calc(var(--nt) * 100%)), #4F63A6 calc(var(--nb) * 30%));
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  overflow: hidden;
  color: var(--fg);
  touch-action: pan-y;
}
@media (hover: hover) {
  html.is-intro[data-chapter="hero"] .stage { cursor: grab; }
  html.is-intro[data-chapter="hero"] .stage.is-dragging { cursor: grabbing; }
}
.stage.is-dragging { user-select: none; }
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--veil) 0%, var(--veil) 24%, color-mix(in oklab, var(--veil) 55%, transparent) 36%, color-mix(in oklab, var(--veil) 0%, transparent) 52%);
  --veil: color-mix(in oklab, var(--veil-c) calc(92% - var(--n) * 14%), transparent);
  opacity: 0;
  transition: opacity 900ms ease;
}
html.is-intro .veil { opacity: 1; }
.labels, .leaders { position: absolute; inset: 0; pointer-events: none; }
.leaders { width: 100%; height: 100%; overflow: visible; }
.leaders path { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; }
.stage-ui { position: absolute; inset: 0; pointer-events: none; }
.stage-ui > * { pointer-events: auto; }

.frame { position: absolute; inset: calc(var(--header) + 4px) 16px 16px 16px; border: 1px solid var(--hair); pointer-events: none !important; }
.view-readout { position: absolute; top: calc(var(--header) + 14px); left: 30px; color: var(--fg-3); pointer-events: none !important; font-size: 10px; }

/* hero */
.hero {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  gap: 32px;
  padding: calc(var(--header) + 40px) 44px 52px;
  pointer-events: none;
}
.hero > * { pointer-events: auto; }
.hero-main { max-width: 610px; }
.hero-title {
  margin-top: 22px;
  font-size: clamp(42px, 4.85vw, 80px);
  line-height: 0.97;
  letter-spacing: -0.04em;
}
.hero-sub { margin-top: 24px; max-width: 37ch; color: var(--fg-2); font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.hero-cta { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-meta {
  display: grid; width: 300px;
  border: 1px solid var(--hair-2);
  background: var(--ui-bg);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 10.5px;
}
.hero-meta div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--hair); }
.hero-meta div:last-child { border-bottom: 0; }
.hero-meta dt { color: var(--fg-3); }
.hero-meta dd { color: var(--fg); }
.hero-meta .hm-head { grid-template-columns: 1fr auto; }
.hero-meta .hm-head dt { color: var(--accent); }
.hero-meta .hm-head dd { color: var(--fg-3); text-transform: none; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  display: flex; align-items: center; gap: 26px; color: var(--fg-3); font-size: 10.5px; white-space: nowrap;
}
.scroll-cue > span { display: inline-flex; align-items: center; gap: 10px; }
.cue-drag svg { width: 20px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.cue-scroll i { width: 1px; height: 26px; background: var(--hair-2); position: relative; overflow: hidden; }
.cue-scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 10px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .cue-scroll i::after { animation: cue 1.9s var(--ease-io) infinite; }
  .cue-drag svg { animation: nudge 2.6s var(--ease-io) infinite; }
}
@keyframes cue { from { transform: translateY(-12px); } to { transform: translateY(30px); } }
@keyframes nudge { 0%, 100% { translate: -2px 0; } 50% { translate: 2px 0; } }

/* chapter panel */
.panel {
  position: absolute;
  left: 44px; top: 50%;
  width: min(410px, 31vw);
  translate: 0 -46%;
  transition: opacity 240ms ease;
}
.panel.is-hidden { opacity: 0; pointer-events: none; }
.p-kicker { display: flex; align-items: center; gap: 12px; color: var(--fg-2); }
.p-num {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 22px; padding-inline: 6px;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 11px;
}
.p-title {
  margin-top: 20px;
  font-size: clamp(32px, 3.05vw, 50px);
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.p-body { margin-top: 18px; color: var(--fg-2); font-size: 15.5px; line-height: 1.55; max-width: 40ch; text-wrap: pretty; }
.p-notes { margin-top: 24px; border-top: 1px solid var(--hair); }
.p-notes li {
  display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--hair);
  font-size: 14px; letter-spacing: 0; color: var(--fg);
}
.p-notes li span { color: var(--accent); font-size: 11px; padding-top: 2px; }
.p-metrics { margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair); }
.p-metrics div { padding: 12px 12px 0 0; }
.p-metrics div + div { padding-left: 12px; border-left: 1px solid var(--hair); }
.p-metrics dt { font-size: 10px; color: var(--fg-3); }
.p-metrics dd { margin-top: 8px; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.p-metrics b { font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.p-metrics i { font-style: normal; font-size: 10px; color: var(--fg-2); }
.p-options { margin-top: 24px; border-top: 1px solid var(--hair); }
.opt-row {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--hair);
  color: var(--fg-3);
  transition: color 250ms ease;
}
.opt-row .ok { font-size: 11px; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid currentColor; transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease; }
.opt-row .on { font-size: 14.5px; }
.opt-row .os { display: flex; gap: 4px; }
.opt-row .os i { width: 34px; height: 4px; background: var(--hair); position: relative; overflow: hidden; }
.opt-row .os i::after { content: ""; position: absolute; inset: 0; background: currentColor; transform-origin: left; transform: scaleX(var(--s)); transition: background-color 250ms ease; }
.opt-row.is-active { color: var(--fg); }
.opt-row.is-active .ok { background: var(--accent); color: #fff; border-color: var(--accent); }
.opt-row.is-active .os i::after { background: var(--accent); }
.opt-legend { margin-top: 10px; font-size: 9.5px; color: var(--fg-3); text-align: right; }
.p-hint { margin-top: 22px; color: var(--accent); }

/* chapter rail — sheet index, bottom-left */
.rail {
  position: absolute; left: 44px; bottom: 30px;
  width: min(410px, 31vw);
  transition: opacity 300ms ease;
}
.rail.is-hidden { opacity: 0; pointer-events: none; }
.rail-track { height: 1px; background: var(--hair-2); position: relative; margin-bottom: 4px; }
.rail-track i { position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.rail-items { display: flex; justify-content: space-between; }
.rail button {
  appearance: none; border: 0; background: none; cursor: pointer;
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 0 2px; min-width: 28px; color: var(--fg-3);
  font: inherit; font-size: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms ease;
}
.rail button::before { content: ""; position: absolute; left: 0; top: -4px; width: 1px; height: 7px; background: var(--hair-2); transition: height 200ms var(--ease-ui), background-color 200ms ease; }
.rail .r-num { font-size: 10.5px; }
.rail .r-name { position: absolute; top: 100%; left: 0; opacity: 0; translate: 0 -4px; white-space: nowrap; font-size: 10px; transition: opacity 220ms ease, translate 260ms var(--ease-ui); }
.rail button.is-active { color: var(--accent); }
.rail button.is-active::before { background: var(--accent); height: 9px; top: -5px; }
.rail button.is-active .r-name { opacity: 1; translate: 0 0; color: var(--fg); }
@media (hover: hover) {
  .rail button:hover { color: var(--fg); }
  .rail button:hover::before { height: 11px; top: -7px; background: var(--fg); }
  .rail button:hover .r-name { opacity: 1; translate: 0 0; }
  .rail:hover button.is-active:not(:hover) .r-name { opacity: 0; }
}

/* drawing title block */
.tblock {
  position: absolute; right: 30px; bottom: 30px;
  display: grid; grid-template-columns: 210px 116px;
  border: 1px solid var(--hair-2);
  background: var(--ui-bg);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 10.5px;
  transition: opacity 300ms ease;
  pointer-events: none !important;
}
.tblock.is-hidden { opacity: 0; }
.tb-cell { padding: 7px 10px; border-bottom: 1px solid var(--hair); display: flex; flex-direction: column; gap: 2px; }
.tb-cell:nth-child(odd) { border-right: 1px solid var(--hair); }
.tb-cell span { color: var(--fg-3); font-size: 9.5px; white-space: nowrap; }
.tb-cell b { font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cell b.mono { font-weight: 500; }
.tb-foot { border-bottom: 0; }
.tb-foot span { color: var(--fg-2); font-size: 9px; }

/* build bar & sun clock */
.buildbar, .sunclock {
  position: absolute; top: calc(var(--header) + 26px); left: 50%;
  translate: -18% 0;
  width: min(560px, 44vw);
  padding: 12px 14px 10px;
  background: var(--ui-bg);
  border: 1px solid var(--hair-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 300ms ease;
}
.buildbar.is-on, .sunclock.is-on { opacity: 1; }
.bb-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; }
.bb-w { color: var(--accent); font-size: 12px; }
.bb-name { color: var(--fg); font-size: 13px; letter-spacing: 0.05em; }
.bb-count { color: var(--fg-3); font-size: 11px; }
.bb-track { position: relative; margin-top: 10px; height: 14px; }
.bb-fill { position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--hair-2); }
.bb-fill::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.bb-ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.bb-ticks i { width: 7px; height: 7px; margin-top: 3px; background: var(--bg); border: 1px solid var(--hair-2); transition: background-color 200ms ease, border-color 200ms ease; }
.bb-ticks i.is-done { background: var(--accent); border-color: var(--accent); }
.sunclock { color: var(--fg-2); font-size: 12px; text-align: left; width: auto; padding: 9px 14px; }
.sunclock b { color: var(--warm); font-weight: 500; font-size: 13px; }

/* ----------------------------------------------------------------- 3D labels */
.lb { position: absolute; left: 0; top: 0; visibility: hidden; will-change: transform, opacity; }
.lb-in {
  position: relative; translate: -50% -50%; white-space: nowrap;
  font-family: var(--sans); font-stretch: var(--narrow); font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fg);
}
.lb-tag .lb-in {
  translate: -50% calc(-100% - 14px);
  padding: 5px 8px;
  background: var(--ui-bg);
  border: 1px solid var(--hair-2);
  color: var(--fg-2);
}
.lb-tag .lb-in::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: var(--hair-2); }
.lb-tag .lb-in::before { content: ""; position: absolute; left: calc(50% - 2.5px); top: calc(100% + 11.5px); width: 5px; height: 5px; background: var(--fg); }
.lb-tag b { color: var(--fg); font-weight: 600; margin-right: 6px; }
.lb-accent .lb-in { border-color: var(--accent); }
.lb-accent .lb-in b { color: var(--accent); }
.lb-accent .lb-in::before { background: var(--accent); }
.lb-pin .lb-in b { color: var(--accent); }
.lb-room .lb-in { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; }
.lb-room b { font-weight: 600; }
.lb-room span { color: var(--fg-3); font-family: var(--mono); letter-spacing: 0; text-transform: none; font-size: 10px; }
.lb-dim .lb-in { translate: -50% -125%; color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: 0; padding: 0 3px; background: var(--bg); }
.lb-level .lb-in { translate: calc(-100% - 10px) -50%; display: flex; gap: 8px; align-items: baseline; color: var(--fg-2); }
.lb-level b { color: var(--accent); font-weight: 500; font-family: var(--mono); letter-spacing: 0; }
.lb-level.lb-right .lb-in { translate: 12px -50%; }
.lb-bubble .lb-in { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--accent); background: var(--bg); color: var(--accent); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0; }
.lb-trace .lb-in { border-style: dashed; color: var(--fg-3); border-color: var(--fg-3); }
.lb-callout .lb-in { translate: 0 -50%; display: flex; gap: 10px; align-items: baseline; color: var(--fg-2); }
.lb-callout b { color: var(--accent); font-weight: 600; min-width: 92px; }
.lb-mass .lb-in {
  translate: -50% calc(-100% - 18px);
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 8px;
  background: var(--ui-bg); border: 1px solid var(--accent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lb-mass .lb-in::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 18px; background: var(--accent); }
.lb-mass .mk { width: 26px; height: 26px; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.lb-mass b { display: block; color: var(--fg); font-weight: 600; }
.lb-mass em { display: block; color: var(--fg-2); text-transform: none; letter-spacing: 0.01em; margin-top: 2px; font-stretch: 90%; font-weight: 400; font-size: 11px; }
.lb-mass .chosen { margin-left: 4px; padding: 3px 6px; border: 1px solid var(--accent); color: var(--accent); }
.lb-hour .lb-in { translate: -50% -170%; color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: 0; }
.lb-sun .lb-in { translate: -50% -50%; }
.lb-sun .sun { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 6px color-mix(in oklab, var(--warm) 22%, transparent), 0 0 0 14px color-mix(in oklab, var(--warm) 9%, transparent); }
.lb-north .lb-in { translate: -50% -50%; }
.north { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--fg); border-radius: 50%; font-size: 10px; position: relative; padding-top: 12px; }
.north i { position: absolute; left: 50%; top: 4px; translate: -50% 0; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 12px solid var(--fg); }

/* ----------------------------------------------------------------- sections */
.clients, .numbers { padding: 150px var(--gutter) 120px; position: relative; }
.sec-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 24px; align-items: end; }
.sec-head .kicker { grid-column: 1 / -1; }
.sec-title { grid-column: 1 / span 7; font-size: clamp(40px, 4.9vw, 78px); line-height: 0.98; letter-spacing: -0.04em; }
.sec-lede { grid-column: 9 / -1; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; text-wrap: pretty; }
.cards { margin-top: 76px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.card {
  position: relative;
  padding: 22px 24px 30px;
  display: flex; flex-direction: column;
  transition: background-color 250ms ease;
}
.card + .card { border-left: 1px solid var(--hair); }
.card-top { display: flex; justify-content: space-between; color: var(--ink-3); }
.card-top .mono { color: var(--accent); font-size: 11px; }
.iso { height: 168px; margin: 22px 0 26px; }
.iso svg { width: 100%; height: 100%; overflow: visible; }
.iso polygon { stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.iso .f-t { fill: #FBFAF6; } .iso .f-l { fill: #E4E0D6; } .iso .f-r { fill: #D2CDC1; }
.iso .plate .f-t { fill: transparent; } .iso .plate polygon { stroke: var(--hair-2); fill: transparent; }
.iso line { stroke-width: 1; vector-effect: non-scaling-stroke; }
.iso line.acc { stroke: var(--accent); stroke-dasharray: 3 3; }
.iso line.ink { stroke: var(--ink); }
.iso .lift { transition: transform 500ms var(--ease-out); }
.iso .lift .f-t { fill: #fff; }
.card h3 { font-size: 22px; line-height: 1.12; letter-spacing: -0.02em; }
.card p { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.card ul { margin-top: auto; padding-top: 24px; display: grid; gap: 0; }
.card li { padding: 8px 0; border-top: 1px solid var(--hair); color: var(--ink); font-size: 11px; }
.card li::before { content: "— "; color: var(--accent); }
@media (hover: hover) {
  .card:hover { background: color-mix(in oklab, var(--paper-2) 70%, transparent); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover .iso .lift { transform: translateY(-9px); }
}

.numbers { padding-top: 40px; }
.num-head { display: grid; gap: 24px; }
.num-head .sec-title { max-width: 16ch; }
.num-grid { margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hair-2); }
.num-grid div { padding: 18px 24px 0 0; }
.num-grid div + div { padding-left: 24px; border-left: 1px solid var(--hair); }
.num-grid dt { color: var(--ink-3); }
.num-grid dd { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.num-grid b { font-weight: 300; font-size: clamp(56px, 7vw, 112px); line-height: 0.9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.num-grid i { font-style: normal; font-size: 15px; color: var(--ink-2); }
.marquee { margin-top: 110px; border-block: 1px solid var(--hair); overflow: hidden; color: var(--ink-2); }
.mq-track { display: flex; gap: 28px; width: max-content; padding: 16px 0; font-size: 12px; }
.mq-track i { font-style: normal; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .mq-track { animation: mq 38s linear infinite; } }
@keyframes mq { to { transform: translateX(-50%); } }

/* contact: blueprint sheet */
.cta {
  position: relative;
  background-color: var(--accent);
  color: #F4F2EC;
  padding: 120px var(--gutter);
  background-image:
    linear-gradient(rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.cta .kicker { color: rgba(244, 242, 236, 0.75); }
.cta .kicker .dot { background: #F4F2EC; }
.cta-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; }
.cta-title { margin-top: 24px; font-size: clamp(44px, 5.3vw, 90px); line-height: 0.96; letter-spacing: -0.042em; }
.cta-title em { color: rgba(244, 242, 236, 0.62); }
.cta-lede { margin-top: 24px; max-width: 44ch; font-size: 17px; line-height: 1.5; color: rgba(244, 242, 236, 0.82); }
.cta-contacts { margin-top: 40px; display: flex; gap: 48px; }
.cta-contacts dt { color: rgba(244, 242, 236, 0.6); }
.cta-contacts dd { margin-top: 6px; font-size: 14px; text-transform: none; letter-spacing: 0.01em; font-stretch: normal; }
.cta-contacts a { border-bottom: 1px solid rgba(244, 242, 236, 0.4); transition: border-color 150ms ease; }
@media (hover: hover) { .cta-contacts a:hover { border-color: #F4F2EC; } }
.cta-form {
  display: grid; gap: 18px;
  padding: 28px;
  background: rgba(10, 20, 110, 0.22);
  border: 1px solid rgba(244, 242, 236, 0.3);
}
.field { display: grid; gap: 8px; }
.field label { color: rgba(244, 242, 236, 0.7); }
.field input, .field select {
  appearance: none; -webkit-appearance: none;
  height: 44px; width: 100%;
  padding: 0 2px;
  border: 0; border-bottom: 1px solid rgba(244, 242, 236, 0.45);
  border-radius: 0;
  background: transparent; color: #F4F2EC;
  font: 400 16px/1 var(--sans);
  transition: border-color 150ms ease;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, #F4F2EC 50%), linear-gradient(135deg, #F4F2EC 50%, transparent 50%); background-position: calc(100% - 12px) 19px, calc(100% - 7px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--ink); }
.field input::placeholder { color: rgba(244, 242, 236, 0.4); }
.field input:focus-visible, .field select:focus-visible { outline: none; border-bottom-color: #fff; }
.cta-form .btn-primary { background: #F4F2EC; color: var(--accent-ink); margin-top: 8px; }
@media (hover: hover) { .cta-form .btn-primary:hover { background: #fff; color: var(--accent-ink); } }
.cta-form.is-sent .btn-primary { background: transparent; color: #F4F2EC; border-color: rgba(244, 242, 236, 0.5); }
.form-note { color: rgba(244, 242, 236, 0.6); }

/* footer */
.footer { padding: 72px var(--gutter) 28px; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; color: var(--ink-2); }
.foot-grid div { display: grid; gap: 6px; align-content: start; }
.ft-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-grid a { color: var(--ink); position: relative; }
.foot-grid a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 320ms var(--ease-out); }
@media (hover: hover) { .foot-grid a:hover::after { transform: scaleX(1); transform-origin: left; } }
.ft-k { color: var(--ink-3); }
.wordmark { display: block; width: 100%; height: auto; margin-top: 72px; overflow: visible; }
.wm-guide { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0.45; vector-effect: non-scaling-stroke; }
.wm-letter { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }
.foot-base { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 20px; color: var(--ink-3); flex-wrap: wrap; }

/* ----------------------------------------------------------------- intro states */
html:not(.is-ready) .hero [data-in], html:not(.is-ready) .hero-title, html:not(.is-ready) .site-header, html:not(.is-ready) .stage-ui { opacity: 0; }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .hero-meta { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3) { border-left: 0; }
  .card:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .tblock { display: none; }
}
@media (max-width: 1000px) {
  .panel { width: min(380px, 40vw); left: 32px; }
  .rail { left: 32px; width: min(380px, 40vw); }
  .p-title { font-size: 34px; }
}
@media (max-width: 759px) {
  :root { --gutter: 16px; --header: 54px; }
  .nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .frame, .view-readout, .rail { display: none; }
  .hero { grid-template-columns: 1fr; padding: 0 16px 64px; }
  .hero-main { max-width: none; }
  .hero-title { font-size: clamp(36px, 10.2vw, 50px); margin-top: 14px; letter-spacing: -0.035em; }
  .hero-sub { font-size: 15px; margin-top: 14px; }
  .hero-cta { margin-top: 18px; }
  .hero-cta .btn { --h: 44px; flex: 1 1 auto; justify-content: space-between; }
  .scroll-cue { bottom: 22px; gap: 18px; font-size: 9.5px; }
  .panel {
    left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; translate: none;
    padding: 16px 16px 14px;
    background: var(--ui-bg);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--hair);
    max-height: 47svh; overflow: hidden;
  }
  .p-title { font-size: 27px; margin-top: 12px; }
  .p-body { font-size: 14px; margin-top: 10px; line-height: 1.45; }
  .p-notes { margin-top: 12px; }
  .p-notes li { padding: 6px 0; font-size: 13px; }
  .p-notes li:nth-child(n+4) { display: none; }
  .p-metrics { margin-top: 14px; }
  .p-metrics b { font-size: 22px; }
  .p-options { margin-top: 12px; }
  .opt-row { padding: 6px 0; }
  .opt-row .on { font-size: 13.5px; }
  .opt-row .os i { width: 22px; }
  .opt-legend { display: none; }
  .p-hint { margin-top: 12px; }
  .buildbar, .sunclock { left: 16px; right: 16px; width: auto; translate: none; top: calc(var(--header) + 12px); }
  .lb-callout, .leaders { display: none; }
  .lb-room span { display: none; }
  .lb-dim .lb-in { font-size: 8.5px; }
  .lb-tag .lb-in b { margin-right: 4px; }
  .lb-tag .lb-in { font-size: 9.5px; padding: 4px 6px; }
  .lb-mass em { display: none; }
  .veil { background: linear-gradient(to top, var(--veil) 0%, var(--veil) 30%, color-mix(in oklab, var(--veil) 0%, transparent) 56%); }
  .ld-meta { bottom: 20px; flex-direction: column; gap: 4px; }
  .cut-frame { inset: calc(var(--header) + 4px) 10px 10px 10px; }
  .clients, .numbers { padding: 96px 16px 72px; }
  .numbers { padding-top: 16px; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-title, .sec-lede { grid-column: 1 / -1; }
  .cards { grid-template-columns: 1fr; margin-top: 44px; }
  .card + .card { border-left: 0; border-top: 1px solid var(--hair); }
  .num-grid { grid-template-columns: repeat(2, 1fr); }
  .num-grid div:nth-child(3) { padding-left: 0; border-left: 0; }
  .num-grid div:nth-child(n+3) { margin-top: 28px; }
  .cta { padding: 84px 16px; }
  .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-contacts { flex-direction: column; gap: 18px; }
  .cta-form { padding: 20px; }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .cue-drag { display: none; }
}

/* the stylesheet is in: the page may show (index.html hides it until then) */
body { visibility: visible; }
