/* ============================================================
   AEY - site.css
   Light, strictly monochrome: ink on paper, greys by opacity, no accent
   colour. Every colour runs through the tokens below; translucent ink is
   rgb(var(--ink) / a), translucent paper rgb(var(--paper) / a).
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: 17 17 17;        /* #111 */
  --paper: 250 250 250;   /* #fafafa */
  --bg: rgb(var(--paper));
  --fg: rgb(var(--ink));
  --panel: #f1f1f1;
  --muted: rgb(var(--ink) / 0.6);
  --hair: rgb(var(--ink) / 0.14);
  --accent: var(--fg);    /* monochrome: emphasis is ink, weight and rules, never colour */
  --gutter: clamp(20px, 4vw, 64px);
  --maxw: 1600px;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: clip;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

a { color: inherit; text-decoration: none; }

/* ---------- Centrepiece canvas + fallback ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* no-WebGL fallback: a glow that breathes, one star layer drifting and one
   twinkling. Reduced motion runs the same, slower. */
#fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgb(var(--ink) / 0.10), transparent 38%);
  opacity: 0.5;
  animation: fb-breathe 8s ease-in-out infinite alternate;
}
#fallback::before, #fallback::after { content: ""; position: absolute; inset: -8%; will-change: transform, opacity; }
#fallback::before {
  background:
    radial-gradient(1px 1px at 20% 30%, rgb(var(--ink) / 0.5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgb(var(--ink) / 0.4), transparent),
    radial-gradient(1px 1px at 40% 70%, rgb(var(--ink) / 0.35), transparent),
    radial-gradient(1px 1px at 85% 25%, rgb(var(--ink) / 0.4), transparent),
    radial-gradient(1px 1px at 30% 85%, rgb(var(--ink) / 0.3), transparent),
    radial-gradient(1px 1px at 60% 15%, rgb(var(--ink) / 0.35), transparent);
  animation: fb-drift 24s ease-in-out infinite alternate;
}
#fallback::after {
  background:
    radial-gradient(2px 2px at 12% 55%, rgb(var(--ink) / 0.8), transparent),
    radial-gradient(2px 2px at 52% 38%, rgb(var(--ink) / 0.7), transparent),
    radial-gradient(2px 2px at 78% 80%, rgb(var(--ink) / 0.7), transparent),
    radial-gradient(2px 2px at 90% 45%, rgb(var(--ink) / 0.6), transparent),
    radial-gradient(2px 2px at 35% 12%, rgb(var(--ink) / 0.65), transparent),
    radial-gradient(2px 2px at 65% 92%, rgb(var(--ink) / 0.6), transparent),
    radial-gradient(2px 2px at 8% 22%, rgb(var(--ink) / 0.6), transparent),
    radial-gradient(2px 2px at 44% 64%, rgb(var(--ink) / 0.7), transparent),
    radial-gradient(2px 2px at 72% 30%, rgb(var(--ink) / 0.65), transparent),
    radial-gradient(2px 2px at 24% 76%, rgb(var(--ink) / 0.6), transparent),
    radial-gradient(2px 2px at 58% 6%, rgb(var(--ink) / 0.6), transparent),
    radial-gradient(2px 2px at 94% 68%, rgb(var(--ink) / 0.7), transparent);
  animation: fb-twinkle 3.2s ease-in-out infinite alternate, fb-drift 30s ease-in-out infinite alternate-reverse;
}
@keyframes fb-breathe { from { opacity: 0.4; } to { opacity: 0.62; } }
@keyframes fb-drift { from { transform: translate3d(-2%, 1%, 0); } to { transform: translate3d(2%, -1%, 0); } }
@keyframes fb-twinkle { from { opacity: 0.25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #fallback { animation-duration: 16s; }
  #fallback::before { animation-duration: 48s; }
  #fallback::after { animation-duration: 6.4s, 60s; }
}
html.no-webgl #scene { display: none; }
html.no-webgl #fallback { display: block; }

/* ---------- Layout grid ---------- */
.grid {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
.h1 {
  font-size: clamp(44px, 7.2vw, 128px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
}
.h2 {
  font-size: clamp(36px, 5vw, 84px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}
.body {
  font-size: clamp(17px, 1.2vw, 19px);
  color: var(--fg);
  max-width: 40ch;
  margin: 0;
}
.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}
.label .idx { color: var(--fg); margin-right: 1.2em; }
.wordmark {
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__brand {
  display: inline-flex;
  align-items: baseline;
  font-size: 18px;
}
/* logo: solid accent dot on the baseline right after the Y
   (0.15em diameter, 0.13em gap incl. the 0.04em tracking after the Y) */
.brand-dot {
  display: inline-block;
  width: max(3px, 0.15em);
  height: max(3px, 0.15em);
  margin-left: 0.09em;
  background: var(--accent);
  border-radius: 50%;
  vertical-align: baseline;
}
.nav__links {
  display: flex;
  gap: clamp(18px, 2.4vw, 40px);
}
.nav__links a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--fg); }
.nav__links a.is-current { color: var(--fg); }
body.menu-open .nav__menu { visibility: hidden; }

/* Accent focus ring, site-wide */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav__menu {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  padding: 0;
}

/* ---------- Mobile overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 20px var(--gutter);
}
/* keep the nav (and AEY wordmark) visible above the open overlay */
.nav { z-index: 70; }
.overlay[hidden] { display: none; }
.overlay__close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  padding: 0;
}
.overlay__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12vh;
}
.overlay__links a {
  font-size: clamp(32px, 9vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 12vh;
}
.hero__inner { width: 100%; }
.hero__text { max-width: 60ch; display: flex; flex-direction: column; gap: 22px; }
.hero__text .label { margin-bottom: 4px; }
.hero__sub { color: var(--muted); max-width: 44ch; }
.hero__text { text-shadow: 0 0 18px var(--bg), 0 0 36px rgb(var(--paper) / .85); }
.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 12vh;
}

/* ============================================================
   Homepage hero: the "entity" systems schematic. Scoped to .ent-* /
   .hero--home. A rectangular, strictly MONOCHROME grid of modules wired
   by orthogonal routes, with chain-reaction cascades. Inline SVG +
   vanilla JS (js/hero/entity.js). Black, white and greys only — no accent.
   ============================================================ */
.hero--home { align-items: center; }
.hero--home .hero__scroll { display: none; }    /* the visual invites scroll; avoid overlap */
.hero--home .hero__text { text-shadow: none; }   /* text no longer overlaps the visual */
.hero__inner--split { width: 100%; }

@media (min-width: 901px) {
  .hero--home { padding: 92px 0 48px; min-height: 100svh; }
  .hero__inner--split {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: auto auto;
    column-gap: clamp(30px, 4.5vw, 70px);
    row-gap: clamp(18px, 2.2vw, 28px);
    align-items: start;
  }
  .hero--home .hero__text { grid-column: 1; grid-row: 1; max-width: 44ch; }
  .ent      { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .ent-meta { grid-column: 1; grid-row: 2; align-self: end; }
}
/* short desktop viewports: shrink the headline so the whole hero fits the fold */
@media (min-width: 901px) and (max-height: 880px) {
  .hero--home .h1 { font-size: clamp(40px, 5.2vw, 72px); }
  .hero--home { padding: 80px 0 34px; }
}
@media (min-width: 901px) and (max-height: 720px) {
  .hero--home .h1 { font-size: clamp(34px, 4.4vw, 56px); }
  .hero--home .hero__sub { font-size: 15px; }
  .hero--home .hero__text { gap: 16px; }
  .hero--home { padding: 70px 0 26px; }
}

.ent { margin: 0; width: 100%; }
.ent-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ent-live { display: block; }

/* two baked layouts, swapped by width (aspect-ratio reserves the box: no CLS) */
.ent-svg { display: block; width: 100%; height: auto; overflow: visible; margin-inline: auto; }
.ent-svg--wide { aspect-ratio: 640 / 560; max-height: calc(100svh - 150px); }
.ent-svg--tall { display: none; aspect-ratio: 360 / 720; }
@media (max-width: 600px) {
  .ent-svg--wide { display: none; }
  .ent-svg--tall { display: block; max-height: none; }
}

/* shared mono label font for the in-diagram text */
.ent-feedlbl, .ent-bandhdr, .ent-celllbl, .ent-depttag, .ent-plbl, .ent-pstate,
.ent-loghdr, .ent-logline, .ent-remotelbl, .ent-livecount {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- modules: rectangular tiles with hairline borders ---- */
.ent-tile { fill: var(--bg); stroke: rgb(var(--ink) / 0.20); stroke-width: 1; }
.ent-tile--feed { stroke: rgb(var(--ink) / 0.30); stroke-dasharray: 2 2; }  /* dashed = external */
.ent-tile--band { stroke: rgb(var(--ink) / 0.44); }
.ent-tile--dept { stroke: rgb(var(--ink) / 0.18); }
.ent-tile--log  { stroke: rgb(var(--ink) / 0.18); }
/* a module lights when a cascade packet arrives */
.is-lit > .ent-tile { stroke: var(--fg); fill: rgb(var(--ink) / 0.08); }
.ent-cell-d.is-lit .ent-celllbl { fill: var(--fg); }

/* orthogonal backplane routes + travelling packets */
.ent-route { stroke: rgb(var(--ink) / 0.12); stroke-width: 0.7; fill: none; }
.ent-route--ext { stroke: rgb(var(--ink) / 0.17); stroke-dasharray: 2 2.5; }
.ent-packet { fill: var(--fg); }

/* external feeds */
.ent-feedlbl { fill: rgb(var(--ink) / 0.74); letter-spacing: 0.06em; }
.ent-feed.is-lit .ent-feedlbl { fill: var(--fg); }

/* data layer band */
.ent-bandhdr { fill: rgb(var(--ink) / 0.72); font-size: 8.5px; letter-spacing: 0.08em; }
.ent-celllbl { fill: rgb(var(--ink) / 0.58); letter-spacing: 0.06em; }
.ent-div { stroke: rgb(var(--ink) / 0.18); stroke-width: 1; }
.ent-lock, .ent-lock-sh { fill: none; stroke: rgb(var(--ink) / 0.6); stroke-width: 1; }

/* departments */
.ent-lbl {
  fill: rgb(var(--ink) / 0.82); font-family: "Geist", system-ui, sans-serif;
  font-weight: 500; font-size: 12px; letter-spacing: 0.05em;
}
.ent-dept.is-lit .ent-lbl { fill: var(--fg); }
.ent-depttag { fill: rgb(var(--ink) / 0.5); letter-spacing: 0.02em; }
.ent-srctile { fill: var(--bg); stroke: rgb(var(--ink) / 0.4); stroke-width: 0.8; }
.ent-plbl { fill: rgb(var(--ink) / 0.5); letter-spacing: 0.01em; }

/* process state cells: MANUAL (hollow) -> AUTO (inverted white); GATE outlined */
.ent-pcell { fill: var(--bg); stroke: rgb(var(--ink) / 0.30); stroke-width: 1;
  transition: fill 0.3s ease, stroke 0.3s ease; }
.ent-pcell.is-auto { fill: var(--fg); stroke: var(--fg); }
.ent-pcell.is-gate { fill: var(--bg); stroke: rgb(var(--ink) / 0.62); stroke-dasharray: 2 1.4; }
.ent-pcell.is-held { fill: rgb(var(--ink) / 0.12); stroke: var(--fg); stroke-dasharray: none; }
.ent-pcell.is-approved { fill: var(--fg); stroke: var(--fg); stroke-dasharray: none; }
.ent-pcell.is-lit { stroke: var(--fg); }
.ent-pstate { fill: rgb(var(--ink) / 0.62); letter-spacing: 0.02em; }
.ent-pstate.is-inv { fill: var(--bg); font-weight: 600; }

/* audit log module */
.ent-loghdr { fill: rgb(var(--ink) / 0.6); font-size: 8px; letter-spacing: 0.1em; }
.ent-logline { fill: rgb(var(--ink) / 0.5); letter-spacing: 0.01em; }
.ent-logline.is-head { fill: rgb(var(--ink) / 0.9); }

/* remote operations: frame + health ticks */
.ent-frame { fill: none; stroke: rgb(var(--ink) / 0.1); stroke-width: 1; }
.ent-remotelbl { fill: rgb(var(--ink) / 0.42); font-size: 8px; letter-spacing: 0.14em; }
.ent-livecount { fill: rgb(var(--ink) / 0.86); font-size: 8px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.ent-health { fill: rgb(var(--ink) / 0.5); }

@media (prefers-reduced-motion: reduce) {
  .ent-pcell { transition: none; }
}

/* ---- counters + model line (HTML, crisp text; beside the figure) ---- */
.ent-meta { width: 100%; }
.ent-model {
  color: var(--muted); margin: 0 0 14px;
  text-transform: none; letter-spacing: 0.01em; font-size: 12px;
}
.ent-counters__kick { color: var(--muted); margin: 0 0 12px; }
.ent-counters__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair); border-left: 1px solid var(--hair);
}
.ent-stat {
  padding: 10px 12px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.ent-stat__val {
  font-size: clamp(19px, 1.6vw, 24px); font-weight: 500; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--fg);
}
.ent-stat__lab { font-size: 9.5px; color: var(--muted); letter-spacing: 0.07em; line-height: 1.3; }

/* ---- phone: headline/sub/button, then the visual, then the counters ---- */
@media (max-width: 900px) {
  .hero--home { min-height: auto; align-items: stretch; padding: 110px 0 10vh; }
  .hero__inner--split { display: flex; flex-direction: column; gap: 28px; }
  .hero--home .hero__text { order: 1; }
  .ent { order: 2; }
  .ent-meta { order: 3; }
}
@media (max-width: 600px) {
  .ent-counters__grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  align-self: flex-start;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 14px 22px;
  border: 1px solid var(--fg);
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 18vh 0;
  border-top: 1px solid var(--hair);
}
.section__head { margin-bottom: 8vh; max-width: 60ch; }
.section__head .label { margin-bottom: 24px; }
.section__head .h2 { margin-bottom: 28px; }
.section__intro { color: var(--muted); max-width: 44ch; }

/* What we do - three columns */
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.cols--4 { grid-template-columns: repeat(4, 1fr); }
.col {
  padding: 36px 32px 36px 0;
  border-left: 1px solid var(--hair);
  padding-left: 32px;
}
.col:first-child { border-left: none; padding-left: 0; }
.col__name {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.col .body { color: var(--muted); }

/* Deployment timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__row {
  display: grid;
  grid-template-columns: 120px 220px 1fr;
  align-items: baseline;
  gap: 24px;
  padding: 36px 0;
  border-top: 1px solid var(--hair);
}
.timeline__row:last-child { border-bottom: 1px solid var(--hair); }
.timeline__num {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--muted);
}
.timeline__name {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.timeline__line { color: var(--muted); max-width: 44ch; }

/* Products */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.product {
  display: block;
  padding: 44px 40px 44px 0;
  border-left: 1px solid var(--hair);
  padding-left: 40px;
  transition: background 0.2s ease;
}
a.product:hover { background: rgb(var(--ink) / 0.03); }
.product:first-child { border-left: none; padding-left: 0; }
.product .label { margin-bottom: 20px; }
.product__name {
  font-size: clamp(30px, 3.6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 20px;
}
.product .body { color: var(--muted); }

/* Principles 2x2 */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--hair);
  border-left: 1px solid var(--hair);
}
.principle {
  padding: 44px 40px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.principle__name {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.principle .body { color: var(--muted); }

/* Contact */
.section--contact { min-height: 80vh; }
.contact__addr { margin-top: 36px; }
.contact__placeholder {
  color: var(--muted);
  font-size: clamp(17px, 1.2vw, 19px);
  border-bottom: 1px dashed var(--muted);
  padding-bottom: 2px;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 72px 0 40px;
  border-top: 1px solid var(--hair);
  background: var(--bg);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer__brand .wordmark { font-size: 20px; }
.footer__tag {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.5;
}
.footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  justify-content: start;
}
.footer__nav a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  transition: color 0.2s ease;
}
.footer__nav a:hover { color: var(--fg); }
.footer__legal {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- "Explore / more" text links ---------- */
.more-link { margin-top: 48px; }
.more-link a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 6px;
  transition: border-color 0.2s ease;
}
.more-link a:hover { border-color: var(--fg); }
.more-link .btn { border-bottom: 1px solid var(--fg); padding-bottom: 14px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__menu { display: inline-block; }
  .cols { grid-template-columns: 1fr; }
  .col { border-left: none; padding-left: 0; border-top: 1px solid var(--hair); }
  .col:first-child { border-top: none; }
  .products { grid-template-columns: 1fr; }
  .product { border-left: none; padding-left: 0; border-top: 1px solid var(--hair); }
  .product:first-child { border-top: none; }
  .principles { grid-template-columns: 1fr; }
  .timeline__row {
    grid-template-columns: 64px 1fr;
    grid-template-areas: "num name" "num line";
    gap: 6px 16px;
  }
  .timeline__num { grid-area: num; }
  .timeline__name { grid-area: name; }
  .timeline__line { grid-area: line; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  .section { padding: 14vh 0; }
  .hero { padding-bottom: 14vh; }
}

/* ============================================================
   PAGE STYLES (Build 2)
   ============================================================ */

/* Sub-page hero: a touch more top room under the fixed nav */
.page-hero { min-height: 100vh; }
.page-hero .hero__text { max-width: 62ch; }
.page-hero .h1 { max-width: 11ch; }
.page-hero .hero__sub { max-width: 46ch; }

/* ---------- Platform: scrolling layers ---------- */
#pl-layers { position: relative; }
.pl-layer { min-height: 140vh; position: relative; }
.pl-layer__inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.pl-cap {
  max-width: 44ch;
  opacity: 0.26;
  transition: opacity 0.5s ease;
  text-shadow: 0 0 18px var(--bg), 0 0 36px rgb(var(--paper) / .85);
}
.pl-cap.is-active { opacity: 1; }
.pl-cap .label { margin-bottom: 20px; }
.pl-cap .h2 { margin-bottom: 22px; }
.pl-cap .body { color: var(--muted); }

@media (max-width: 900px) {
  .pl-layer { min-height: 150vh; }
  .pl-cap { opacity: 0.4; }
  .pl-cap.is-active { opacity: 1; }
  .pl-layer__inner { align-items: flex-end; padding-bottom: 12vh; }
}

/* ---------- Deployments: interactive field map ---------- */
/* The particle map is drawn by the fixed canvas, but it is pinned every
   frame to .dp-stage (the right column on desktop, below the text on
   mobile), so it never crosses the text column. */
#dp-map {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh 0 9vh;
  border-top: 1px solid var(--hair);
}
.dp-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 40px;
  scroll-margin-top: 96px;
}
.dp-tabs::-webkit-scrollbar { display: none; }
.dp-tab {
  flex: 0 0 auto;
  background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
  padding: 14px 18px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.dp-tab:hover { color: var(--fg); }
.dp-tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.dp-layout {
  display: grid;
  grid-template-columns: minmax(0, 44ch) minmax(0, 1fr);
  column-gap: clamp(48px, 6vw, 120px);
  align-items: start;
}
.dp-body { min-height: 260px; max-width: 44ch; }
.dp-stage {
  position: relative;
  height: clamp(400px, calc(100vh - 300px), 640px);
  border: 1px solid var(--hair);
  background:
    radial-gradient(ellipse at 40% 45%, rgb(var(--ink) / 0.025), transparent 70%),
    var(--bg);
  contain: layout paint;
}
.dp-mapwrap { position: absolute; inset: 0; }
.dp-canvas { display: block; width: 100%; height: 100%; }
.dp-status {
  position: absolute; top: 12px; right: 12px; bottom: 12px;
  width: 284px;
  display: flex; flex-direction: column;
  padding: 14px 14px 12px;
  background: rgb(var(--paper) / 0.84);
  border: 1px solid var(--hair);
  font-size: 10px; line-height: 1.35; letter-spacing: 0.12em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: rgb(var(--ink) / 0.86);
}
.dp-status p { margin: 0; }
.dp-status__kicker { color: var(--accent); margin-bottom: 10px !important; }
.dp-status__title { color: var(--fg); }
.dp-status__core { color: var(--muted); margin: 4px 0 12px !important; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.dp-status__rows { list-style: none; margin: 0; padding: 0; flex: 1; min-height: calc(8 * 25px); }
.dp-status__rows li {
  display: grid; grid-template-columns: 9px minmax(0, 1fr) 52px 46px; align-items: center; column-gap: 6px;
  height: 25px; border-bottom: 1px solid rgb(var(--ink) / 0.06);
  color: rgb(var(--ink) / 0.4); transition: color .3s ease;
}
.dp-status__rows li.is-on { color: rgb(var(--ink) / 0.9); }
.dp-st__dot { width: 5px; height: 5px; border: 1px solid currentColor; }
.dp-status__rows li.is-on .dp-st__dot { background: var(--fg); border-color: var(--fg); }
.dp-st__name { letter-spacing: 0.06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-st__val { text-align: right; color: var(--muted); }
.dp-st__state { text-align: right; font-size: 9px; }
.dp-status__rows li.is-on .dp-st__state { color: var(--fg); }
.dp-status__foot { margin-top: 10px !important; color: var(--muted); font-size: 9px; }
.dp-h3 {
  font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.dp-list { list-style: none; margin: 0; padding: 0; }
.dp-list li {
  color: var(--muted);
  font-size: clamp(16px, 1.15vw, 18px);
  padding: 12px 0;
  border-top: 1px solid var(--hair);
}
.dp-note { margin-top: 40px; color: var(--muted); max-width: 52ch; }

@media (max-width: 900px) {
  #dp-map { padding-top: 10vh; justify-content: flex-start; }
  .dp-tabs { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-margin-top: 80px; }
  .dp-layout { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .dp-body { min-height: 0; max-width: none; }
  .dp-stage { height: auto; display: flex; flex-direction: column; }
  .dp-mapwrap { position: relative; inset: auto; height: clamp(280px, 80vw, 380px); }
  .dp-status { position: relative; top: auto; right: auto; bottom: auto; width: auto; border: 0; border-top: 1px solid var(--hair); }
}

/* ---------- How we work: stages beside a spine ---------- */
.hw-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  opacity: 0.4;
  transition: opacity 0.5s ease;
}
.hw-stage.is-active { opacity: 1; }
.hw-content {
  margin-left: 38%;
  max-width: 54ch;
  text-shadow: 0 0 18px var(--bg), 0 0 36px rgb(var(--paper) / .85);
}
.hw-stage--prove .hw-content {
  border-left: 1px solid var(--accent);
  padding-left: 32px;
  margin-left: calc(38% - 32px);
}
.hw-flag {
  color: var(--accent);
  margin-bottom: 20px;
}
.hw-index {
  display: block;
  font-size: clamp(56px, 9vw, 150px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--muted);
}
.hw-name {
  font-size: clamp(36px, 5vw, 76px);
  font-weight: 500;
  letter-spacing: -0.035em;
  margin: 8px 0 44px;
}
.hw-cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hair);
  border-left: 1px solid var(--hair);
}
.hw-cell {
  padding: 26px 28px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.hw-cell .label { margin-bottom: 14px; }
.hw-cell .body { color: var(--muted); font-size: 16px; }

@media (max-width: 900px) {
  .hw-content { margin-left: 18%; }
  .hw-stage--prove .hw-content { margin-left: calc(18% - 20px); padding-left: 20px; }
  .hw-stage { min-height: auto; padding: 14vh 0; opacity: 1; }
}
@media (max-width: 600px) {
  .hw-cells { grid-template-columns: 1fr; }
  .hw-content { margin-left: 12%; }
  .hw-stage--prove .hw-content { margin-left: calc(12% - 18px); }
}

/* ---------- Products: screenshots, features, pricing ---------- */
.shot { margin: 0 0 24px; }
.shot--full { margin-top: 24px; }
.shot__frame {
  border: 1px solid var(--hair);
  background: var(--bg);
  overflow: hidden;
}
/* screenshots in greyscale: the product UI's own gold accents would break the monochrome page */
.shot__frame img { display: block; width: 100%; height: auto; filter: grayscale(1); }
/* live layer over the screenshots (js/pages/products.js); absolutely
   positioned, so it never shifts layout */
.shot__frame { position: relative; }
.shot-live__scan {
  position: absolute; top: 0; bottom: 0; left: 0; width: 1px; pointer-events: none;
  background: rgb(var(--ink) / 0.22); box-shadow: -40px 0 60px rgb(var(--ink) / 0.05); will-change: transform;
}
.shot-live {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26px; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 0 10px; overflow: hidden; white-space: nowrap;
  background: rgb(var(--paper) / 0.78); border-top: 1px solid var(--hair);
  font: 400 10px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: 0.04em; color: rgb(var(--ink) / 0.62);
}
.shot-live__dot { flex: none; width: 6px; height: 6px; border: 1px solid rgb(var(--ink) / 0.7); }
.shot-live__dot.is-on { background: var(--fg); }
.shot-live__tag { flex: none; color: rgb(var(--ink) / 0.42); }
.shot-live__line { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: rgb(var(--ink) / 0.88); }
.shot-live__n { flex: none; color: rgb(var(--ink) / 0.42); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .shot-live__n { display: none; } .shot-live { gap: 8px; height: 20px; padding: 0 8px; font-size: 9px; } }
.shot__cap { margin: 12px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.shot-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.feature-list { list-style: none; margin: 56px 0 0; padding: 0; }
.feature-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--hair);
}
.feature-list .feature-row:last-child { border-bottom: 1px solid var(--hair); }
.feature-name {
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.feature-line { color: var(--muted); max-width: 52ch; }

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--hair);
}
.plan {
  padding: 36px 32px;
  border-right: 1px solid var(--hair);
  border-top: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
}
.plan__name { font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; letter-spacing: -0.02em; margin: 0 0 20px; }
.plan__seats { font-size: 14px; color: var(--fg); margin: 0 0 18px; }
.plan__inc { color: var(--muted); margin: 0 0 28px; }
.plan__btn { margin-top: auto; align-self: flex-start; }
.plan-extra { margin-top: 0; border-top: none; border-bottom: 1px solid var(--hair); }

.disclaimer { margin-top: 40px; font-size: 12px; color: var(--muted); max-width: 70ch; line-height: 1.6; }

@media (max-width: 900px) {
  .shot-two { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 8px; }
  .plans { grid-template-columns: 1fr; border-left: none; }
  .plan { border-right: none; }
}

/* ---------- Trust: numbered answer list ---------- */
.num-list { list-style: none; margin: 0; padding: 0; }
.num-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--hair);
}
.num-list .num-row:last-child { border-bottom: 1px solid var(--hair); }
.num-idx {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.num-title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.num-body .body { color: var(--muted); max-width: 56ch; }
.num-body .more-link { margin-top: 28px; }

/* ---------- Company ---------- */
.co-section { padding: 12vh 0; }
.co-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}
.co-grid > .label { padding-top: 6px; }
.co-text { max-width: 60ch; }
.co-text .body { font-size: clamp(20px, 1.8vw, 26px); color: var(--fg); line-height: 1.5; }
.co-h2 { margin: 0 0 28px; max-width: 18ch; }
.co-h2 + .body { color: var(--muted); font-size: clamp(17px, 1.2vw, 19px); }
.placeholder {
  margin-top: 20px;
  color: var(--muted);
  font-size: 15px;
  border: 1px dashed var(--muted);
  padding: 16px 18px;
  max-width: 56ch;
}
.co-legal { color: var(--muted); font-size: 14px; margin: 0; }
.co-legal-ph { display: inline-block; border: 1px dashed var(--muted); margin-top: 16px; }

/* ---------- Contact form ---------- */
.ct-section { padding-top: 22vh; min-height: 100vh; }
.ct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.ct-intro { max-width: none; }
.ct-intro .h1 { font-size: clamp(44px, 5.4vw, 96px); max-width: 10ch; text-wrap: balance; }
.ct-intro .hero__sub { max-width: 40ch; margin-top: 22px; }
.ct-formwrap {
  max-width: 44ch;
  background: rgb(var(--paper) / 0.5);
  backdrop-filter: blur(2px);
}
.ct-about { color: var(--muted); margin: 0 0 24px; }
.ct-form { display: flex; flex-direction: column; gap: 28px; }
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted); margin-bottom: 10px;
}
.field input,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hair);
  color: var(--fg);
  font-family: inherit;
  font-size: 17px;
  padding: 8px 0;
  border-radius: 0;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--fg);
}
.field input[aria-invalid],
.field textarea[aria-invalid] { border-bottom-color: var(--accent); }
.field__err {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.field__err::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
}
.ct-submit { align-self: flex-start; margin-top: 8px; }
.ct-note { font-size: 13px; color: var(--muted); margin: 0; }
.ct-thanks { padding: 8px 0; }
.ct-thanks .body { color: var(--muted); margin-top: 20px; }

@media (max-width: 900px) {
  .num-row { grid-template-columns: 48px 1fr; gap: 16px; }
  .co-grid { grid-template-columns: 1fr; gap: 16px; }
  .ct-grid { grid-template-columns: 1fr; }
  .ct-formwrap { max-width: none; }
  .ct-section { padding-top: 18vh; }
}

/* ============================================================
   RESEARCH PAGE ("Pushing the limits")
   Shared tokens, one accent, hairline grids. Scoped to .rs-*.
   ============================================================ */
.rs-section { --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* hero: the ported router draws quietly behind the headline */
#rs-hero { position: relative; overflow: hidden; }
.rs-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}
#rs-hero .hero__inner, #rs-hero .hero__scroll { position: relative; z-index: 2; }

/* section head label lights when a field points at it */
.rs-section .section__head .label.is-lit { color: var(--accent); }

/* sub-group header: label + hairline rule + label */
.rs-grp {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 64px 0 24px;
}
.rs-grp:first-of-type { margin-top: 0; }
.rs-grp .label { white-space: nowrap; }
.rs-grp__rule { flex: 1 1 auto; height: 1px; background: var(--hair); }

/* demo grid: hairline separators, no gap (matches .principles) */
.rs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
  border-left: 1px solid var(--hair);
}
.rs-tile {
  background: var(--panel);
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
}
/* the only decorative accent on the page: marks what we build now */
.rs-tile--new { border-top: 2px solid var(--accent); margin-top: -1px; }

.rs-viz {
  position: relative;
  aspect-ratio: 4 / 3;      /* reserves space, so no layout shift */
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}
.rs-viz canvas { display: block; width: 100%; height: 100%; }
.rs-meta {
  position: absolute;
  left: 0; bottom: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgb(var(--paper) / 0.8);
  padding: 3px 7px;
  pointer-events: none;
}
.rs-body { padding: 20px 20px 24px; }
.rs-title {
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.rs-eq {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.rs-cap { font-size: 15px; color: var(--muted); max-width: 44ch; margin: 0; }

/* fields hover-map */
.rs-fields { margin-top: 8px; }
.rs-fields__list { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.rs-field {
  flex: 0 0 auto;
  background: none;
  border: none;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}
.rs-field:hover, .rs-field.is-lit, .rs-field:focus-visible {
  color: var(--fg);
  background: rgb(var(--ink) / 0.03);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.rs-fields__cap { margin: 28px 0 0; max-width: 60ch; }

.rs-close { text-align: left; }
.rs-close .label { color: var(--fg); font-size: 13px; }

@media (max-width: 1200px) {
  .rs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .rs-grid { grid-template-columns: 1fr; }
  .rs-grp { margin: 44px 0 20px; flex-wrap: wrap; }
  .rs-body { padding: 16px 16px 20px; }
}

/* ---------- Reviewer pass ---------- */
[hidden] { display: none !important; }
.nav { transition: background-color .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.nav.is-scrolled {
  background: rgb(var(--paper) / .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--hair);
}

/* ============================================================
   DEFENCE PAGE: perception console (simulation). Scoped to .df-*.
   ============================================================ */
.df-section { --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.df-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  border: 1px solid var(--hair);
  background: var(--panel);
}
.df-stage { min-width: 0; border-right: 1px solid var(--hair); }
.df-viz {
  position: relative;
  aspect-ratio: 16 / 10;    /* reserves space, so no layout shift */
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}
.df-viz canvas { display: block; width: 100%; height: 100%; }
.df-sim {
  position: absolute; left: 0; top: 0;
  background: rgb(var(--paper) / 0.8);
  color: var(--fg);
  padding: 6px 10px;
  font-size: 10px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  pointer-events: none;
}
.df-sim::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.df-hud {
  position: absolute; left: 0; bottom: 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.02em;
  color: var(--muted); background: rgb(var(--paper) / 0.8); padding: 3px 7px;
  pointer-events: none;
}
.df-controls { display: flex; flex-wrap: wrap; border-left: 0; }
.df-controls__gap { flex: 1 1 auto; border-right: 1px solid var(--hair); }
.df-btn {
  background: none; border: none; border-right: 1px solid var(--hair);
  color: var(--muted); font-family: inherit; font-size: 13px; letter-spacing: 0.01em;
  padding: 14px 18px; cursor: pointer; text-align: left;
  transition: color 0.2s ease, background 0.2s ease;
}
.df-controls .df-btn:last-child { border-right: none; }
.df-btn:hover, .df-btn:focus-visible { color: var(--fg); background: rgb(var(--ink) / 0.03); }
.df-btn.is-on { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }
.df-btn--sm { padding: 6px 10px; font-size: 12px; border: 1px solid var(--hair); }
.df-btn--sm + .df-btn--sm { margin-left: 6px; }
.df-side { display: flex; flex-direction: column; min-width: 0; }
.df-panel { padding: 20px; border-bottom: 1px solid var(--hair); }
.df-panel:last-child { border-bottom: none; flex: 1 1 auto; }
.df-panel__head { display: flex; justify-content: space-between; margin-bottom: 14px; }
.df-count { color: var(--accent); font-family: var(--mono); }
.df-queue, .df-log { list-style: none; margin: 0; padding: 0; }
.df-cue {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  padding: 10px 0; border-top: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 8px;
}
.df-cue:first-child { border-top: none; padding-top: 0; }
.df-cue.is-pending { color: var(--fg); }
.df-cue.is-pending .df-cue__text::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-right: 8px; }
.df-cue__state { text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; }
.df-cue__act { font-family: "Geist", system-ui, sans-serif; }
.df-log li {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  line-height: 1.5; padding: 4px 0; overflow-wrap: anywhere;
}
.df-log li:first-child { color: var(--fg); }
.df-note { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }

@media (max-width: 1100px) {
  .df-console { grid-template-columns: 1fr; }
  .df-stage { border-right: none; border-bottom: 1px solid var(--hair); }
}
@media (max-width: 600px) {
  .df-viz { aspect-ratio: 4 / 5; }
  .df-btn { padding: 12px 14px; }
  .df-controls__gap { display: none; }
  .df-panel { padding: 16px; }
}

/* ---------- Defence page: AEY Swarm ---------- */
.sw-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border-bottom: 1px solid var(--hair);
  min-height: 37px;
}
.sw-strip span { padding: 10px 14px; border-right: 1px solid var(--hair); white-space: nowrap; }
.sw-strip .sw-strip__cov { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }
.sw-fleet li { white-space: pre; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.sw-fleet li:first-child { color: var(--muted); }
.sw-fleet li.is-acc { color: var(--accent); }
.sw-markets { margin-top: 72px; }
.sw-markets .label { margin-bottom: 14px; }
.sw-arch { margin-top: 96px; }
.sw-arch__head { margin-bottom: 40px; }
.sw-arch__head .label { margin-bottom: 18px; }
.sw-flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hair); border-left: 1px solid var(--hair);
}
.sw-node {
  position: relative; padding: 24px 22px 28px;
  border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  background: var(--panel);
}
.sw-node + .sw-node::before {         /* flow arrow between steps */
  content: ""; position: absolute; left: -6px; top: 34px;
  width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
}
.sw-node--gate { border-top: 2px solid var(--accent); margin-top: -1px; }
.sw-node__idx { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.sw-node .label { display: block; margin-bottom: 10px; }
.sw-node__name { font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; letter-spacing: -0.02em; margin: 0 0 10px; }
.sw-node__body { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }
#df-swarm .feature-list { margin-top: 72px; }
@media (max-width: 1100px) {
  .sw-flow { grid-template-columns: 1fr; }
  .sw-node + .sw-node::before { left: 28px; top: -6px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--muted); border-bottom: 0; }
}

/* nine nav items: keep one line down to the 900px menu breakpoint */
.nav__links a { white-space: nowrap; }
@media (max-width: 1200px) {
  .nav__links { gap: clamp(12px, 1.5vw, 24px); }
  .nav__links a { font-size: 11px; letter-spacing: 0.12em; }
}
@media (max-width: 600px) { .df-sim__more { display: none; } }


/* ============================================================
   Split sections: text left, a live visual or the call to action
   right, so wide screens don't show a blank right half. One
   column below 900px (the visual or aside drops under the text).
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
.split > .section__head { margin-bottom: 0; }
.split--cta { align-items: end; }
.split__aside { justify-self: end; max-width: 44ch; }
.split__aside .body { color: var(--muted); margin: 0 0 32px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split__aside { justify-self: start; }
}

/* Defence: small live simulations beside the text-only capabilities */
.df-mini { margin: 0; border: 1px solid var(--hair); background: var(--panel); }
.df-mini .df-viz { border-bottom: 0; }
.df-mini .df-sim { font-family: var(--mono); letter-spacing: 0.04em; }

/* Nav: five sections plus Contact as the one bordered action */
.nav__links { align-items: center; }
.nav__links a.nav__cta {
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 9px 14px;
  margin-left: clamp(0px, 0.6vw, 8px);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav__links a.nav__cta:hover, .nav__links a.nav__cta.is-current { background: var(--fg); color: var(--bg); }

/* Contact on phones: the streams stay in the band behind the headline,
   fading out before the first field (contact.js fades them on scroll) */
@media (max-width: 900px) {
  .page-contact #scene {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 28%, transparent 44%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 28%, transparent 44%);
  }
}

/* a split head followed by its list or note keeps the old spacing */
.split + .feature-list, .split + .timeline, .split + .disclaimer { margin-top: 8vh; }
.split .section__head .more-link { margin-top: 28px; }
/* the engagement stepper is one row: a shorter panel */
.df-viz.df-viz--short { aspect-ratio: 16 / 7; }
@media (max-width: 600px) { .df-viz.df-viz--short { aspect-ratio: 4 / 3; } }
