/* ==========================================================================
   Black Titan Research — "Monolith" direction.
   Graphite ground, bone text, titanium accent, expanded Archivo display.
   ========================================================================== */

:root {
  color-scheme: dark;
  --void: #0a0b0e;
  --slab: #111318;
  --slab-2: #171a20;
  --line: rgba(233, 230, 223, 0.12);
  --line-strong: rgba(233, 230, 223, 0.28);
  --bone: #e9e6df;
  --ash: #8f949c;
  --ti: #b8c2cc;
  --ember: #d9742b;
  --ok: #6fbf95;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  padding-inline: var(--gutter);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ti); outline-offset: 3px; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }

.eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px rgba(217, 116, 43, 0.18); vertical-align: 1px; margin-right: 0.5rem; }
.dot.amber { box-shadow: 0 0 6px rgba(217, 116, 43, 0.6); margin-right: 0.45rem; }

/* ---------- status bar ---------- */
.statusbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 2rem;
  padding-block: 0.5rem; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash);
  font-variant-numeric: tabular-nums;
}
.statusbar b { color: var(--bone); font-weight: 500; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding-block: 1rem; border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 14, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand {
  display: flex; align-items: center; gap: 0.8rem;
  font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 118;
  font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.15;
}
.brand svg { width: 30px; height: 30px; color: var(--bone); flex: none; }
.top nav { display: flex; gap: 1.6rem; font-size: 0.86rem; color: var(--ash); }
.top nav a { transition: color 0.2s; }
.top nav a:hover { color: var(--bone); }
.top-cta { white-space: nowrap; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 40px; height: 40px; background: none; border: 1px solid var(--line-strong); cursor: pointer; padding: 0 9px; }
.nav-toggle span { display: block; height: 1.5px; background: var(--bone); transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.95rem 1.5rem; border: 1px solid var(--bone); cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn.primary { background: var(--bone); color: var(--void); }
.btn.primary:hover { background: #fff; }
.btn.ghost { border-color: var(--line-strong); color: var(--bone); background: none; }
.btn.ghost:hover { border-color: var(--bone); }
.top .btn.ghost { padding: 0.7rem 1.1rem; font-size: 0.66rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto;
  column-gap: 2rem; align-items: start;
  padding-top: clamp(3rem, 9vh, 6.5rem);
  border-bottom: 1px solid var(--line);
}
.hero .field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .titan { position: absolute; top: 0; right: -10%; width: 64%; height: 100%; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; grid-column: 1; grid-row: 1; padding-bottom: clamp(3rem, 8vh, 6rem); }
h1 {
  font-weight: 800; font-variation-settings: "wdth" 112;
  font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: 0.98; letter-spacing: -0.025em; text-transform: uppercase;
  margin-block: 1.2rem 1.6rem;
}
h1 em {
  font-style: normal; color: transparent;
  background: linear-gradient(100deg, #dde3e9 0%, #8d98a4 38%, #eef2f5 58%, #7c8692 100%);
  -webkit-background-clip: text; background-clip: text;
}
.lede { max-width: 34rem; font-size: 1.08rem; color: var(--ash); }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }

/* telemetry panel (HUD over the black body) */
.panel { background: rgba(17, 19, 24, 0.9); border: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.telemetry { position: relative; z-index: 1; grid-column: 2; grid-row: 1; align-self: end; justify-self: end; width: min(100%, 380px); margin-bottom: 2.5rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.readouts { display: grid; grid-template-columns: repeat(2, 1fr); }
.readout { display: flex; flex-direction: column; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
.readout:nth-child(odd) { border-right: 1px solid var(--line); }
.readout .k { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.readout .v { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.6rem; line-height: 1.1; margin-top: 0.3rem; letter-spacing: -0.01em; }
.readout .v small { font-size: 0.8rem; color: var(--ash); font-weight: 500; margin-left: 0.15rem; }
.readout .d { font-family: var(--mono); font-size: 0.6rem; color: var(--ok); margin-top: 0.2rem; }
.readout .d.flat { color: var(--ash); }
.spark { padding: 0.7rem 0.9rem 0.5rem; }
.spark canvas { width: 100%; height: 72px; display: block; }
.legend { display: flex; gap: 1.2rem; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); margin-top: 0.45rem; }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: 3px; margin-right: 0.4rem; background: var(--ti); }
.legend i.dim { background: var(--line-strong); }
.panel-foot { padding: 0.5rem 0.9rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.06em; color: var(--ash); }

/* capabilities marquee on the hero's bottom edge */
.marquee { grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 1; overflow: hidden; border-top: 1px solid var(--line); padding-block: 0.8rem; background: rgba(10, 11, 14, 0.55); }
.track { display: flex; width: max-content; animation: slide 60s linear infinite; }
.set { display: flex; white-space: nowrap; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.set > span::after { content: "\00B7"; margin-inline: 1.6rem; color: var(--ti); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.facts li { padding: 1.1rem 1.2rem 1.1rem 0; border-right: 1px solid var(--line); }
.facts li + li { padding-left: 1.2rem; }
.facts li:last-child { border-right: 0; }
.facts span { display: block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); margin-bottom: 0.3rem; }
.facts b { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 105; font-size: 1.05rem; letter-spacing: -0.01em; }
.facts b small { display: block; font-family: var(--mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.08em; color: var(--ash); margin-top: 0.15rem; }

/* ---------- sections ---------- */
.block { padding-block: clamp(4rem, 9vh, 7rem); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 2rem; }
.side { display: flex; flex-direction: column; gap: 0.6rem; }
.side-note { font-family: var(--mono); font-size: 0.72rem; color: var(--ash); line-height: 1.7; max-width: 18rem; }
.big {
  font-family: var(--display); font-weight: 500; font-variation-settings: "wdth" 100;
  font-size: clamp(1.35rem, 2.5vw, 2.15rem); line-height: 1.3; letter-spacing: -0.015em; max-width: 46rem; text-wrap: pretty;
}
.big strong { font-weight: 700; color: var(--ti); }
h2 { font-weight: 700; font-variation-settings: "wdth" 108; font-size: clamp(1.7rem, 3.4vw, 2.8rem); line-height: 1.05; letter-spacing: -0.025em; margin-top: 0.6rem; }
.block-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2.5rem; }
.block-head p { color: var(--ash); max-width: 30rem; }

.chip {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-strong); color: var(--bone); white-space: nowrap;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--ti); }
.chip.forming { color: var(--ash); border-color: var(--line); }
.chip.forming i { background: var(--ash); }
.chip.done { color: var(--ash); }
.chip.done i { background: var(--line-strong); }

/* ---------- figures ---------- */
.fig { display: grid; gap: 0.8rem; min-width: 0; margin-top: 3rem; }
.fig-title { display: flex; gap: 0.8rem; align-items: baseline; font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1rem; line-height: 1.3; }
.fig-title .no { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--ti); white-space: nowrap; font-weight: 400; }
.fig-scroll { overflow-x: auto; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); padding-block: 0.75rem; }
.fig-scroll svg { display: block; width: 100%; min-width: 560px; height: auto; }
.fig-box { border: 1px solid var(--line); background: var(--slab); padding: 1.2rem; }
.fig-box svg { display: block; width: 100%; max-width: 640px; height: auto; margin-inline: auto; }
figcaption { font-size: 0.86rem; line-height: 1.5; color: var(--ash); max-width: 64rem; }
figcaption b { font-weight: 500; color: var(--bone); }
/* chart parts */
.fig .gl line { stroke: var(--line); stroke-width: 1; }
.fig .ax line { stroke: rgba(233, 230, 223, 0.55); stroke-width: 1; }
.fig .tk text { font-family: var(--mono); font-size: 12px; fill: var(--ash); }
.fig .lb, .fig .lb text, .fig .lg text { font-family: var(--body); font-size: 12.5px; fill: var(--ash); }
.fig .lb.it { font-style: italic; }
.fig .fr { fill: none; stroke: var(--ti); stroke-width: 2; stroke-linecap: round; }
.fig .pt-s { fill: var(--ti); stroke: var(--void); stroke-width: 2; }
.fig .pt-h { fill: var(--void); stroke: var(--ti); stroke-width: 2; }
.fig .pl text { font-family: var(--body); font-size: 12.5px; fill: var(--bone); }
.fig .neg line { stroke: var(--ember); stroke-width: 1; }
.fig .neg-t { font-family: var(--mono); font-weight: 700; fill: var(--ember); }
/* operating model parts */
.model-fig .c-a { fill: rgba(184, 194, 204, 0.08); stroke: rgba(233, 230, 223, 0.6); stroke-width: 1.2; }
.model-fig .c-b { fill: none; stroke: rgba(233, 230, 223, 0.6); stroke-width: 1.2; }
.model-fig .t-big { font-family: var(--display); font-weight: 600; font-size: 20px; fill: var(--bone); }
.model-fig .t-mono { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; fill: var(--ash); }
.model-fig .t-mono.hi { fill: var(--bone); }
.model-fig .t-mid { font-family: var(--display); font-weight: 500; font-size: 14px; fill: var(--ti); }
.model-fig .flow { fill: none; stroke: rgba(233, 230, 223, 0.7); stroke-width: 1.1; }
.model-fig .arr { fill: var(--bone); }

/* ---------- selected work ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 2.5rem; }
.case { background: var(--slab); padding: 1.8rem 1.6rem; display: flex; flex-direction: column; gap: 0.9rem; }
.case .sector { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.case h3 { font-weight: 800; font-variation-settings: "wdth" 110; font-size: 2rem; letter-spacing: -0.02em; line-height: 1; text-transform: uppercase; }
.case p { color: var(--ash); font-size: 0.94rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line-strong); padding: 0.25rem 0.5rem; color: var(--bone); }
.case .outcome { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ti); font-size: 0.92rem; }
.index-wrap { overflow-x: auto; }
.index { border-top: 1px solid var(--line); font-size: 0.92rem; min-width: 760px; }
.index li { display: grid; grid-template-columns: 6rem 15rem minmax(0, 0.8fr) minmax(0, 1.2fr) 9rem; gap: 1.2rem; align-items: center; padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.index li:hover { background: var(--slab); }
.index .head { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); padding-block: 0.5rem; }
.index .head:hover { background: none; }
.index .yr { font-family: var(--mono); font-size: 0.7rem; color: var(--ash); white-space: nowrap; }
.index .cn { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; }
.index .sec, .index .typ { color: var(--ash); }

/* ---------- research table ---------- */
.tbl-wrap { overflow-x: auto; }
table.programs { width: 100%; border-collapse: collapse; min-width: 720px; }
table.programs caption { caption-side: top; text-align: left; font-size: 0.9rem; color: var(--ash); padding-bottom: 0.9rem; max-width: 60rem; }
table.programs caption b { color: var(--bone); font-weight: 500; }
table.programs caption em { color: var(--bone); font-style: italic; }
table.programs th { text-align: left; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); font-weight: 400; padding: 0.7rem 0.8rem 0.7rem 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
table.programs td { vertical-align: top; padding: 1.2rem 0.8rem 1.2rem 0; border-bottom: 1px solid var(--line); }
table.programs tr:hover td { background: var(--slab); }
table.programs td.code { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ti); white-space: nowrap; width: 7rem; padding-top: 1.45rem; padding-left: 0.6rem; }
table.programs td.title { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.015em; width: 28%; }
table.programs td.scope { color: var(--ash); font-size: 0.95rem; max-width: 36rem; }
table.programs td.state { white-space: nowrap; width: 8rem; padding-top: 1.25rem; padding-right: 0.6rem; text-align: right; }

/* ---------- engagements ---------- */
.slabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.slab { background: var(--slab); padding: 1.8rem 1.6rem 2rem; display: flex; flex-direction: column; gap: 0.9rem; min-height: 15rem; transition: background 0.2s; }
.slab:hover { background: var(--slab-2); }
.slab .idx { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--ash); }
.slab h3 { font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.2; margin-top: auto; }
.slab p { color: var(--ash); font-size: 0.92rem; }

/* ---------- method pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--slab); }
.stage { position: relative; padding: 1.4rem 1.3rem 1.6rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.5rem; }
.stage:last-child { border-right: 0; }
.stage .n { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ti); }
.stage h3 { font-weight: 800; font-variation-settings: "wdth" 110; font-size: 1.7rem; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.stage .t { font-family: var(--mono); font-size: 0.66rem; color: var(--ash); letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.stage p { color: var(--ash); font-size: 0.92rem; }
.stage .exit { margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--line); color: var(--bone); font-size: 0.86rem; }
.stage .exit span { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); margin-bottom: 0.2rem; }
.stage::after { content: "→"; position: absolute; right: -0.55rem; top: 1.3rem; font-family: var(--mono); color: var(--ash); background: var(--slab); padding: 0 0.15rem; z-index: 1; }
.stage:last-child::after { content: none; }

/* ---------- institute ---------- */
.inst-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 3rem; align-items: start; }
.inst-emblem { display: flex; justify-content: center; }
.roundel { width: min(100%, 360px); height: auto; color: var(--bone); opacity: 0.85; }
.roundel .ring { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 110; font-size: 13.5px; letter-spacing: 0.26em; fill: currentColor; }
.roundel .vg { stroke: var(--ti); }
.roundel .vgf { fill: var(--ti); }
.roundel .disc { fill: var(--slab-2); }
.roundel .shade { opacity: 0.5; }
.inst-copy { display: flex; flex-direction: column; gap: 2rem; }
.inst-copy > p { color: var(--ash); font-size: 1.05rem; max-width: 42rem; }
.founder { border: 1px solid var(--line); background: var(--slab); padding: 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.4rem; max-width: 42rem; }
.founder h3 { font-weight: 700; font-variation-settings: "wdth" 108; font-size: 1.5rem; letter-spacing: -0.02em; margin-top: 0.4rem; }
.founder .role { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ti); }
.founder p { color: var(--ash); font-size: 0.94rem; }
.founder p:not(.role) { margin-top: 0.4rem; }
.xref { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone); border-bottom: 1px solid var(--line-strong); align-self: flex-start; padding-bottom: 2px; margin-top: 0.6rem; }
.xref:hover { border-color: var(--bone); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem 1.5rem; max-width: 42rem; }
.principles li { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; font-size: 0.98rem; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.model-fig { margin-top: 4rem; grid-template-columns: minmax(0, 1fr); }

/* ---------- writing ---------- */
.notes { border-top: 1px solid var(--line); }
.notes li { display: grid; grid-template-columns: 7rem minmax(0, 1fr) 10rem auto; gap: 1.5rem; align-items: center; padding: 1.3rem 0.6rem; border-bottom: 1px solid var(--line); transition: background 0.2s; }
.notes li:hover { background: var(--slab); }
.notes .code { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--ti); }
.notes h3 { font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.015em; }
.notes p { color: var(--ash); font-size: 0.9rem; }

/* ---------- contact ---------- */
.contact .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
.contact-lede { color: var(--ash); max-width: 30rem; margin-top: 0.6rem; }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.4rem; margin-top: 1.6rem; font-size: 0.95rem; }
.contact-list dt { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); padding-top: 0.3rem; }
.contact-list dd a { border-bottom: 1px solid var(--line-strong); }
.contact-list dd a:hover { border-color: var(--bone); }
.form { display: grid; gap: 1rem; background: var(--slab); border: 1px solid var(--line); padding: 1.8rem; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: 0.4rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.form input, .form textarea { font-family: var(--body); font-size: 1rem; font-weight: 300; color: var(--bone); background: var(--void); border: 1px solid var(--line-strong); padding: 0.8rem 0.9rem; width: 100%; }
.form textarea { resize: vertical; min-height: 8rem; }
.form input:focus, .form textarea:focus { border-color: var(--ti); outline: none; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.form-note { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--ash); }

/* ---------- footer ---------- */
footer { padding-block: 3rem 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
footer .brand { margin-bottom: 1rem; }
footer p { color: var(--ash); font-size: 0.9rem; max-width: 26rem; }
footer ul { display: grid; gap: 0.45rem; font-size: 0.9rem; color: var(--ash); }
footer ul li:first-child { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone); margin-bottom: 0.3rem; }
footer ul a:hover { color: var(--bone); }
.legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; color: var(--ash); }

/* ---------- case-study pages (site/work/*.html) ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); padding-top: 2rem; }
.crumbs a:hover { color: var(--bone); }
.case-hero { padding-block: 2rem clamp(2.5rem, 6vh, 4rem); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 3rem; align-items: end; }
.case-hero h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); margin-block: 1rem 1.2rem; }
.case-hero .lede { max-width: 38rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--slab); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.2rem; }
.stat b { font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 108; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.02em; line-height: 1; color: var(--bone); }
.stat b small { font-size: 0.5em; color: var(--ti); font-weight: 600; margin-left: 0.2rem; }
.stat span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.case-facts { grid-template-columns: repeat(4, 1fr); }
.prose { max-width: 42rem; color: var(--ash); font-size: 1.02rem; display: grid; gap: 1rem; }
.prose strong { color: var(--bone); font-weight: 500; }
.prose ul { display: grid; gap: 0.6rem; padding-left: 1.1rem; list-style: square; }
.prose li::marker { color: var(--ti); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.two-col h3 { font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.15rem; letter-spacing: -0.015em; margin-bottom: 0.8rem; }
.diagram-host { border: 1px solid var(--line); background: var(--slab); padding: 1rem; overflow-x: auto; }
.diagram-host svg.diagram { display: block; width: 100%; min-width: 640px; height: auto; }
.diagram .grp rect { fill: rgba(233, 230, 223, 0.025); stroke: var(--line-strong); stroke-dasharray: 4 4; }
.diagram .grp-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.4px; fill: var(--ash); }
.diagram .node rect { fill: var(--slab-2); stroke: var(--line-strong); stroke-width: 1; }
.diagram .node.model rect { stroke: var(--ti); }
.diagram .node.io rect { fill: var(--void); stroke-dasharray: 3 3; }
.diagram .node.human rect { fill: var(--void); stroke: var(--ember); }
.diagram .node.store rect { fill: var(--slab); }
.diagram .node .inner { fill: none; stroke: var(--line); stroke-width: 1; }
.diagram .node .title { font-family: var(--body); font-size: 12.5px; font-weight: 500; fill: var(--bone); }
.diagram .node .sub { font-family: var(--mono); font-size: 9.5px; fill: var(--ash); }
.diagram .badge-bg { fill: var(--void); stroke: var(--line-strong); }
.diagram .badge { font-family: var(--mono); font-size: 8.5px; fill: var(--ti); letter-spacing: 0.6px; }
.diagram .edge path { fill: none; stroke: rgba(233, 230, 223, 0.5); stroke-width: 1.1; }
.diagram .edge.dash path { stroke-dasharray: 4 3; }
.diagram .arrowhead { fill: rgba(233, 230, 223, 0.7); }
.diagram .lbl-bg { fill: var(--void); }
.diagram .lbl { font-family: var(--mono); font-size: 9px; fill: var(--ash); letter-spacing: 0.5px; }
.scene-wrap { border: 1px solid var(--line-strong); background: var(--void); aspect-ratio: 16 / 9; max-width: 100%; }
.scene-wrap canvas { display: block; width: 100%; height: 100%; }
.film { display: grid; gap: 0.8rem; }
.film video { display: block; width: 100%; height: auto; background: var(--void); border: 1px solid var(--line-strong); aspect-ratio: 16 / 9; }
.film-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ash); }
.film-meta a { color: var(--bone); border-bottom: 1px solid var(--line-strong); }
.ill-note { font-family: var(--mono); font-size: 0.68rem; line-height: 1.7; color: var(--ash); border-left: 2px solid var(--ember); padding-left: 0.9rem; max-width: 46rem; }
.stack { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.stack span { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line-strong); padding: 0.4rem 0.7rem; color: var(--bone); }
.case-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 3rem; border-bottom: 1px solid var(--line); }
.case-cta h2 { margin: 0; }
.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 3rem; }
.case-nav a { background: var(--slab); padding: 1.3rem 1.5rem; display: grid; gap: 0.3rem; }
.case-nav a:hover { background: var(--slab-2); }
.case-nav a:last-child { text-align: right; }
.case-nav span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.case-nav b { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.05rem; }
/* thumbnails on the home page cases */
.case .thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); margin: -0.2rem 0 0.2rem; background: var(--void); }
.case .more { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bone); border-bottom: 1px solid var(--line-strong); align-self: flex-start; }
.case .more:hover { border-color: var(--bone); }
.index .cn a { border-bottom: 1px solid transparent; }
.index .cn a:hover { border-color: var(--bone); }

/* infographics and lab strip */
.infographic { margin: 0; }
.infographic img { display: block; width: 100%; max-width: 520px; height: auto; border: 1px solid var(--line-strong); }
.lab { margin-top: 3rem; border-top: 1px solid var(--line-strong); padding-top: 2rem; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 2rem; }
.lab-head p:not(.eyebrow) { color: var(--ash); font-size: 0.92rem; margin-top: 0.5rem; max-width: 18rem; }
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.lab-grid li { background: var(--slab); padding: 1.3rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }
.lab-grid h4 { font-family: var(--display); font-weight: 600; font-variation-settings: "wdth" 104; font-size: 1.05rem; letter-spacing: -0.015em; }
.lab-grid p { color: var(--ash); font-size: 0.9rem; }
.lab-grid .tags { margin-top: auto; padding-top: 0.4rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .top nav { gap: 1.2rem; font-size: 0.8rem; }
  .hero { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
}
@media (max-width: 900px) {
  .top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(10, 11, 14, 0.98); border-bottom: 1px solid var(--line); padding: 0.4rem var(--gutter) 1rem; }
  .top nav.open { display: flex; }
  .top nav a { padding: 0.8rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--bone); }
  .top-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; padding-top: 2.5rem; }
  .hero .titan { right: -30%; width: 110%; top: 2rem; height: 60%; opacity: 0.55; }
  .hero-copy { padding-bottom: 2.5rem; }
  .telemetry { grid-column: 1; grid-row: 2; justify-self: stretch; width: 100%; margin-bottom: 2rem; }
  .marquee { grid-row: 3; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(2) { border-right: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .facts li:nth-child(3) { padding-left: 0; }
  .split, .contact .split { grid-template-columns: 1fr; }
  .cases, .slabs { grid-template-columns: 1fr; }
  .slab { min-height: 0; }
  .pipeline { grid-template-columns: 1fr; }
  .stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .stage:last-child { border-bottom: 0; }
  .stage::after { content: "↓"; right: 1.3rem; top: auto; bottom: -0.7rem; }
  .inst-grid { grid-template-columns: 1fr; }
  .roundel { width: min(100%, 300px); }
  .principles { grid-template-columns: 1fr 1fr; }
  .notes li { grid-template-columns: 1fr; gap: 0.4rem; }
  footer { grid-template-columns: 1fr; }
  .case-hero { grid-template-columns: 1fr; }
  .case-facts { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .case-nav { grid-template-columns: 1fr; }
  .case-nav a:last-child { text-align: left; }
  .lab, .lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .statusbar span:nth-child(4) { display: none; }
  .readout .v { font-size: 1.35rem; }
  .form .row2 { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .case h3 { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track { animation: none; }
  .marquee { overflow-x: auto; scrollbar-width: thin; }
  .btn, .top nav a, .slab, .index li, .notes li { transition: none; }
}
