/* ============================================================
   AGENTIC TRACE — site.css
   Brand: obsidian/platinum/signal-teal per brand-tokens.json (identity v4)
   Type: Inter (body) · IBM Plex Mono (technical) · Michroma (display)
   Scheme: "The Trace Ledger" — one fluid 12-col shell (1280), a 3/12
   index rail at >=1024 that carries each section's facts, hairline rules
   at section boundaries and ledger rows only, no radius, no cards,
   no buttons, teal budget ~1% (hard cap 5%).
   Narrative: identity (hero watermark) -> route (network) -> seal (core).
   Bleeds: exactly two, both right-edge, both clipped — the hero watermark
   and the platform paper field. Everything else lives inside its column.
   ============================================================ */

:root {
  /* v4 production palette */
  --at-primary:    #ECEAE5;   /* platinum */
  --at-accent:     #0EAAA5;   /* signal teal */
  --at-graphite:   #848B92;
  --at-background: #090B10;
  --at-obsidian:   #05070A;
  --at-ink:        #11151B;
  --at-paper:      #F7F7F4;

  --platinum-300: #D9D7D2;
  --teal-900:     #083735;
  --paper-rule:   #D9D7D2;
  --paper-ink:    #3A4048;

  --bg:        var(--at-obsidian);
  --divider:   #4E6377;
  --rule:      #29313A;
  --text:      var(--at-primary);
  /* canonical graphite remains the secondary dark-surface text — 5.8:1 on
     obsidian and comfortably above the WCAG AA 4.5:1 body-text threshold */
  --text-dim:  var(--at-graphite);
  --accent:    var(--at-accent);
  --figure-ink: #6B727A;   /* figure strokes/leaders — WCAG 1.4.11 safe on paper */
  --focus-ring: 2px solid var(--accent);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Michroma", "Eurostile Next Extended", var(--font-body);

  /* shell + grid */
  --shell: 1280px;
  --gutter: clamp(16px, 2vw, 24px);
  --pad: clamp(20px, 4vw, 40px);
  --pad-safe-l: max(var(--pad), env(safe-area-inset-left, 0px));
  --pad-safe-r: max(var(--pad), env(safe-area-inset-right, 0px));
  --header-h: 72px;
  --header-space: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  --draw-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* fluid type scale, ratio ~1.22 */
  --t--1: clamp(12px, 0.72rem + 0.1vw, 13px);   /* mono labels */
  --t-0:  clamp(16px, 0.9rem + 0.25vw, 17px);   /* body */
  --t-1:  clamp(18px, 1.05rem + 0.4vw, 21px);   /* lede */
  --t-2:  clamp(19px, 1.05rem + 0.4vw, 21px);   /* row / spec titles (Inter 600) */
  --t-3:  clamp(28px, 1.5rem + 0.8vw, 31px);    /* engage h2 */
  --t-4:  clamp(28px, 1.4rem + 1.6vw, 40px);    /* section h2 */
  --t-5:  clamp(34px, 1.6rem + 3.4vw, 84px);    /* hero h1 */
  --lh-body: 1.6;

  /* 8px rhythm */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 32px; --s-5: 40px;
  --s-6: 48px; --s-8: 64px; --s-12: 96px; --s-16: 128px;

  /* section cadence: generous / tight */
  --sec-gen:   clamp(56px, 4vw + 24px, 96px);
  --sec-tight: clamp(40px, 3vw + 16px, 72px);
}

@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face {
  font-family: "Michroma";
  src: url("../fonts/Michroma-Regular.woff2") format("woff2"), url("../fonts/Michroma-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-space) + 8px); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--t-0);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--teal-900); color: var(--at-primary); }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }

img { display: block; max-width: 100%; height: auto; }

.shell, .at-shell, .hero-grid {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-safe-l) var(--pad-safe-r);
}
.shell { container-type: inline-size; container-name: shell; }

.mono { font-family: var(--font-mono); }
.teal { color: var(--accent); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--at-obsidian);
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

.at-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Shared 12-col grid + column roles ---------- */
.at-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.at-col-kicker {
  grid-column: 1 / 4;
  display: grid;
  align-content: start;
  row-gap: var(--s-3);
  min-width: 0;
}
.at-col-content { grid-column: 4 / 13; min-width: 0; }

/* Mono text link — the only "action" style on the page */
.at-textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--platinum-300);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.at-textlink:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.at-page { position: relative; flex: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-space);
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(5,7,10,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-mark { width: auto; height: 36px; transform: translateY(-1px); }
.brand-word { width: auto; height: 16px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav .nav-cta {
  color: var(--at-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--platinum-300);
  text-underline-offset: 5px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--at-primary);
  margin: 2.5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; padding-block: 8px 16px; background: var(--at-obsidian); border-bottom: 1px solid var(--divider); }
.mobile-menu a {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  padding: 13px 0;
  min-height: 44px;
  border-bottom: 1px solid var(--divider);
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ---------- Hero: identity ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 5vw, 88px) 0 var(--sec-gen);
  background: var(--at-obsidian);
  overflow: clip;
}

.hero-grid {
  position: relative;
  isolation: isolate;
  grid-template-rows: auto;
  align-items: start;
}

.hero-kicker { grid-row: 1; z-index: 1; }
.hero-kicker-tagline {
  color: var(--text);
  font-size: var(--t--1);
  letter-spacing: 0.18em;
  line-height: 1.6;
}
/* two deliberate lines in the rail (>=1024); one running line with all three separators below */
.hero-kicker-tagline .tagline-mid { display: none; }
.hero-facts-list {
  list-style: none;
  display: grid;
  border-top: 1px solid var(--divider);
}
.hero-facts-list li {
  padding: var(--s-1) 0;
  border-bottom: 1px solid var(--divider);
  font-size: var(--t--1);
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.hero-content {
  position: relative;
  z-index: 1;
  grid-column: 4 / 10;
  grid-row: 1;
  min-width: 0;
  container-type: inline-size;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, min(var(--t-5), 11.8cqi), 84px);
  line-height: 1.02;
  letter-spacing: 0;
  margin-left: 0;
  margin-bottom: var(--s-4);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

.hero-lede {
  max-width: 56ch;
  color: var(--text);
  font-size: var(--t-1);
  line-height: 1.5;
  margin-bottom: var(--s-3);
}

.hero-positioning {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: var(--t-0);
  line-height: var(--lh-body);
  margin-bottom: var(--s-5);
}

.hero-action { margin: -10px 0 0; }

/* Bleed 1 of 2: the canonical fingerprint component is a quiet background
   layer. It leaves through the right edge only and never competes with copy. */
.hero-art {
  grid-column: 9 / 13;
  grid-row: 1;
  align-self: stretch;
  position: relative;
  overflow: clip;
  min-height: 400px;
  margin-right: calc(-1 * var(--pad-safe-r));
  pointer-events: none;
  user-select: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 46%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 46%, #000 100%);
}
.hero-fingerprint {
  position: absolute;
  right: 0;
  bottom: 0;
  height: min(520px, 64vh);
  width: auto;
  aspect-ratio: 507 / 640;
  max-width: none;
  transform: translateX(28%);
  opacity: 0.11;
}

/* ---------- Sections (shared) ---------- */
.section { border-top: 1px solid var(--divider); }

.section-kicker {
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
  padding-top: 0.35em;
}
.section h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--t-4);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-left: 0;
  margin-bottom: var(--s-3);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.section-intro { max-width: 60ch; color: var(--text-dim); font-size: var(--t-0); line-height: var(--lh-body); margin-bottom: var(--s-6); }

/* ---------- Capabilities: ledger ---------- */
.at-capabilities {
  background: var(--at-background);
  padding-block: var(--sec-tight);
}

.at-caps-head { margin-bottom: var(--s-5); align-items: start; }
.at-caps-h2 { grid-column: 4 / 10; margin-bottom: 0; }

.at-tag-list {
  list-style: none;
  display: grid;
  border-top: 1px solid var(--divider);
  padding-top: var(--s-1);
}
.at-tag-list li {
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.04em;
  line-height: 1.6;
  padding: 2px 0;
}

.at-ledger {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 0;
}

.at-row {
  position: relative;
  align-items: start;
  grid-column: 1 / -1;
  padding: var(--s-3) 0;
}
.at-row:last-child { border-bottom: 1px solid var(--divider); }

/* the row's only rule: draws in on scroll, static with JS off */
.at-row-rule {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
  pointer-events: none;
}

.at-row-num {
  grid-column: 1 / 4;
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.18em;
  padding-top: 0.35em;
}

.at-row-content { grid-column: 4 / 11; min-width: 0; }
.at-row-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--t-2);
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  margin-bottom: var(--s-1);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.at-row-desc {
  font-size: var(--t-0);
  line-height: var(--lh-body);
  color: var(--text-dim);
  max-width: 58ch;
}

.at-group-header {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: baseline;
  padding: var(--s-4) 0 var(--s-2);
  border-top: 1px solid var(--divider);
  margin-top: var(--s-3);
}
.at-group-header:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.at-group-index {
  grid-column: 1 / 4;
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.at-group-label {
  grid-column: 4 / 6;
  color: var(--text);
  font-size: var(--t-2);
  font-weight: 600;
}
.at-group-description {
  grid-column: 6 / 13;
  color: var(--text-dim);
  font-size: var(--t-0);
  line-height: 1.45;
}

/* Row 05 — the section's sole teal: carried by the ledger index, not a stray bar. */
.at-row--accent .at-row-num { color: var(--accent); }

/* ---------- Platform: paper field + network (route) ---------- */
/* Bleed 2 of 2: the paper background is full-bleed; content stays in the shell. */
.at-platform {
  background: var(--at-paper);
  color: var(--at-background);
  border-top-color: var(--paper-rule);
  padding-block: var(--sec-tight);
}
.at-platform .section-kicker { color: var(--paper-ink); }
.at-platform-h2 { max-width: 16ch; color: var(--at-background); }
.at-platform-intro {
  max-width: 60ch;
  font-size: var(--t-0);
  line-height: var(--lh-body);
  color: var(--paper-ink);
}
.at-platform-head { margin-bottom: var(--s-4); }

.at-network-figure { grid-column: 1 / -1; margin: 0; min-width: 0; }
.at-network-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 220;
}
.at-network { display: block; width: 100%; height: 100%; overflow: visible; }
.at-network path,
.at-network circle {
  fill: none;
  stroke: var(--figure-ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.at-network-traces path { stroke-width: 1.2; opacity: 0.8; }
.at-network circle { fill: var(--at-paper); }
.at-network circle.at-node-c { fill: var(--accent); stroke: var(--accent); }
.at-network-route { stroke: var(--at-background); stroke-width: 2.4; }
.at-network-letters { display: block; }
.at-network-letters text {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  fill: var(--at-background);
  stroke: none;
}

figcaption { min-width: 0; }
.at-route-note {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: var(--s-1) 0;
  border-top: 1px solid var(--paper-rule);
  border-bottom: 1px solid var(--paper-rule);
  color: var(--paper-ink);
  font-size: var(--t--1);
  letter-spacing: 0.04em;
}
.at-route-label {
  color: var(--at-background);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.at-nodes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--s-3);
  align-items: start;
  list-style: none;
  position: relative;
  margin-top: var(--s-2);
}
.at-nodes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--paper-rule);
}
.at-node {
  position: relative;
  padding-top: var(--s-2);
  min-width: 0;
}
.at-node::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid var(--at-graphite);
  border-radius: 50%;
  background: var(--at-paper);
}
.at-node-step {
  font-size: var(--t--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--figure-ink);
  line-height: 1.4;
  margin-bottom: 6px;
}
.at-node-step span { color: var(--at-background); }
.at-node-title {
  font: 600 var(--t-2)/1.3 var(--font-body);
  color: var(--at-background);
  margin-bottom: var(--s-1);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.at-node-body {
  font-size: var(--t-0);
  line-height: 1.6;
  color: var(--paper-ink);
}

/* ---------- Security ---------- */
.at-blueprint {
  position: relative;
  background: var(--at-obsidian);
  overflow: clip;
  isolation: isolate;
  padding-block: var(--sec-tight);
}
.at-blueprint .at-grid { position: relative; z-index: 1; }
.at-blueprint-h2 { max-width: 14ch; }
.at-blueprint .section-intro { margin-bottom: var(--s-5); }

/* Security controls: the same numbered ledger language as Capabilities,
   set as a two-column grid (three rows) so six controls stay dense and scannable. */
.at-spec-ledger {
  grid-column: 4 / 13;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: calc(var(--gutter) * 2);
  row-gap: var(--s-4);
  border-bottom: 1px solid var(--divider);
}
.at-spec-item {
  position: relative;
  min-width: 0;
  padding: var(--s-2) 0 var(--s-3);
}
.at-spec-item .at-row-num { padding-top: 0; }
/* The section's one teal moment sits on the first control index. */
.at-spec-item:first-child .at-row-num { color: var(--accent); }

.at-spec-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--t-2);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--text);
  margin: var(--s-1) 0 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.at-spec-body {
  font-size: var(--t-0);
  line-height: var(--lh-body);
  color: var(--text-dim);
  max-width: 52ch;
  margin-top: 6px;
}

/* ---------- Assurance ---------- */
.at-schedule {
  background: var(--at-background);
  padding-block: var(--sec-tight);
}
.at-schedule .section-intro { margin-bottom: var(--s-6); }

.at-assurance-grid {
  grid-column: 4 / 13;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.at-assurance-card {
  min-width: 0;
  min-height: 200px;
  padding: var(--s-3) var(--s-4) var(--s-4) 0;
  border-right: 1px solid var(--divider);
}
.at-assurance-card + .at-assurance-card { padding-left: var(--s-4); }
.at-assurance-card:last-child { border-right: 0; }
.at-assurance-index {
  display: block;
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.18em;
  margin-bottom: var(--s-4);
}
.at-assurance-label {
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--s-1);
}
.at-assurance-title {
  font: 600 var(--t-2)/1.3 var(--font-body);
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: var(--s-2);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}
.at-assurance-body {
  color: var(--text-dim);
  font-size: var(--t-0);
  line-height: var(--lh-body);
  max-width: 34ch;
}
.at-assurance-footnote {
  grid-column: 4 / 13;
  margin-top: var(--s-2);
  color: var(--text-dim);
  font-size: var(--t--1);
  letter-spacing: 0.06em;
}

/* ---------- Engage: primary seal mark on the left axis ---------- */
.at-engage {
  background: var(--at-obsidian);
  padding-block: var(--sec-tight);
}
.at-engage-grid { align-items: start; }
.at-engage-rail { row-gap: var(--s-3); }
.at-engage-mark {
  height: clamp(144px, 12vw, 192px);
  width: auto;
  justify-self: start;
  margin: 0;
}
.at-engage-h2 { font-size: var(--t-3); line-height: 1.2; margin-bottom: var(--s-3); }

.at-engage-contact {
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
  display: grid;
  gap: var(--s-1);
  justify-items: start;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.at-engage-contact .at-textlink:not(:hover):not(:focus-visible) { color: var(--text); }

.at-engage-form { display: grid; gap: var(--s-3); max-width: 560px; }
.at-form-note {
  max-width: 52ch;
  margin-bottom: var(--s-4);
  color: var(--text-dim);
  font-size: var(--t-0);
  line-height: var(--lh-body);
}
.at-form-status {
  min-height: 1.6em;
  color: var(--accent);
  font-size: var(--t--1);
  line-height: 1.4;
}
.at-form-draft {
  width: 100%;
  min-height: 132px;
  color: var(--text);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--divider);
  padding: var(--s-2);
  font: 400 var(--t-0)/1.5 var(--font-body);
  resize: vertical;
}
.at-field input[aria-invalid="true"],
.at-field textarea[aria-invalid="true"] { border-bottom-color: var(--accent); }
.at-field { display: grid; gap: 6px; }
.at-field label {
  font-size: var(--t--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.at-field input,
.at-field textarea {
  width: 100%;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--divider);
  padding: 8px 0;
  resize: vertical;
}
.at-field input:focus,
.at-field textarea:focus {
  outline: none;
  border-bottom-color: var(--text);
}
.at-field input:focus-visible,
.at-field textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
main#main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.at-engage-submit { margin-top: 4px; }

/* ---------- Footer: the last ledger row ---------- */
.site-footer {
  border-top: 1px solid var(--divider);
  background: var(--at-obsidian);
  padding-block: var(--s-6) calc(var(--s-6) + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--s-3);
  align-items: end;
}
.footer-brand { grid-column: 1 / 4; display: block; }
.footer-brand img { height: 40px; width: auto; }
.footer-meta { grid-column: 4 / 13; display: grid; gap: var(--s-1); min-width: 0; }
.footer-copy { font-size: var(--t--1); letter-spacing: 0.06em; color: var(--text-dim); }

/* ---------- 404 ---------- */
.at-404-title { font-size: clamp(22px, 1.2rem + 1.4vw, 36px); letter-spacing: 0.04em; }

/* ---------- Hover: pointer devices only ---------- */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .brand:hover, .nav a:hover, .footer-brand:hover { text-decoration: none; }
  .nav a:hover { color: var(--at-primary); }
  .nav .nav-cta:hover { text-decoration: underline; text-decoration-color: var(--at-primary); }
  .at-textlink:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
  }
}

/* ---------- Rail: sticky index at >=1024 ---------- */
@media (min-width: 1024px) {
  .at-col-kicker { position: sticky; top: calc(var(--header-space) + var(--s-3)); align-self: start; }
  .hero-kicker { position: static; }
  .at-engage-kicker { grid-row: 1; }
  .at-engage-rail { grid-row: 2; position: static; margin-top: var(--s-4); }
  .at-engage-content { grid-row: 1 / span 2; }
}

/* ---------- >=1440: the watermark exits through the viewport edge, not the shell;
   the headline column widens so the H1 grows with the screen ---------- */
@media (min-width: 1440px) {
  .hero-content { grid-column: 4 / 11; }
  .hero-art {
    grid-column: 10 / 13;
    margin-right: calc(-1 * ((100vw - var(--shell)) / 2 + var(--pad-safe-r)));
  }
  .hero-fingerprint { transform: translateX(22%); }
}

/* ---------- 1024–1439 ---------- */
@media (max-width: 1439px) and (min-width: 1024px) {
  .hero-art { min-height: 420px; }
  .at-node-step { letter-spacing: 0.1em; }
  .hero-kicker-tagline { letter-spacing: 0.14em; }
  .hero-fingerprint { height: min(420px, 62vh); opacity: 0.09; transform: translateX(24%); }
  .at-row-content { grid-column: 4 / 12; }
}

/* ---------- <1024: rail collapses to a kicker line; hamburger nav ---------- */
@media (max-width: 1023px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu:not([hidden]) { display: block; }

  .at-grid { row-gap: var(--s-3); }
  .at-col-kicker, .at-col-content { grid-column: 1 / -1; }
  .at-spec-ledger, .at-assurance-grid { grid-column: 1 / -1; }
  .at-assurance-footnote { grid-column: 1 / -1; }
  .at-col-kicker { row-gap: var(--s-2); margin-bottom: 0; }
  .at-caps-head { row-gap: var(--s-2); }
  .at-caps-head .at-col-kicker { display: contents; }
  .at-caps-head .section-kicker { grid-column: 1 / -1; }
  .at-caps-h2 { grid-column: 1 / -1; }
  .at-caps-head .at-tag-list { grid-column: 1 / -1; order: 1; margin-top: var(--s-2); }
  .at-tag-list { display: flex; flex-wrap: wrap; gap: 2px var(--s-3); border-top: 0; padding-top: 0; }

  .hero { padding-bottom: var(--sec-tight); }
  .hero-grid { grid-template-rows: auto auto; row-gap: var(--s-4); }
  .hero-kicker { grid-column: 1 / -1; grid-row: 2; row-gap: var(--s-2); }
  .hero-kicker-tagline .tagline-br { display: none; }
  .hero-kicker-tagline .tagline-mid { display: inline; }
  .hero-facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); border-top: 0; }
  .hero-facts-list li { border-top: 1px solid var(--divider); border-bottom: 0; }
  .hero-content { grid-column: 1 / -1; grid-row: 1; }
  .hero--404 .hero-kicker { grid-row: 1; }
  .hero--404 .hero-content { grid-row: 2; }
  /* The canonical fingerprint stays as a low-contrast field behind the copy. */
  .hero-art {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(72%, 420px);
    height: 100%;
    min-height: 0;
    margin-right: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 58%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 58%, #000 100%);
  }
  .hero-fingerprint { height: 100%; opacity: 0.045; transform: translateX(72%); }

  .at-row-num { grid-column: 1 / 2; }
  .at-row-content { grid-column: 2 / 13; }

  .at-group-header {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: 4px;
  }
  .at-group-index { grid-column: 1; }
  .at-group-label { grid-column: 2; min-width: 0; }
  .at-group-description { grid-column: 1 / -1; }

  .at-spec-ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .at-network-figure { grid-column: 1 / -1; }
  .at-network-letters text { font-size: 28px; }
  .at-nodes {
    grid-template-columns: 1fr;
    row-gap: 0;
    padding-left: var(--s-1);
  }
  .at-nodes::before { display: none; }
  .at-nodes::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--s-1) + 4px);
    border-left: 1px solid var(--paper-rule);
    pointer-events: none;
  }
  .at-node {
    padding: var(--s-2) var(--s-2);
    border-top: 1px solid var(--paper-rule);
  }

  .at-engage-rail { order: 1; grid-template-columns: auto 1fr; column-gap: var(--s-4); align-items: center; margin-top: var(--s-2); }
  .at-engage-mark { height: 112px; margin: 0; }
  .at-engage-form { max-width: none; }

  .footer-brand, .footer-meta { grid-column: 1 / -1; }
  .footer-brand img { height: 36px; }
}

/* ---------- <768 ---------- */
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .brand { gap: 10px; }
  .brand-mark { height: 32px; }
  .brand-word { height: 14px; }

  .hero-lede, .hero-positioning { max-width: none; }

  .at-row { grid-template-columns: 1fr; row-gap: var(--s-1); }
  .at-row-num, .at-row-content { grid-column: 1 / -1; }
  .at-row-desc { max-width: none; }

  .at-spec-ledger { grid-template-columns: 1fr; column-gap: 0; }
  .at-spec-body { max-width: none; }

  .at-assurance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .at-assurance-card { min-height: 220px; }
}

/* ---------- <480 ---------- */
@media (max-width: 479px) {
  .at-network-letters text { font-size: 36px; }
  .hero-facts-list { grid-template-columns: 1fr; }
  .at-nodes { grid-template-columns: 1fr; row-gap: 0; }
  .at-nodes {
    padding-left: var(--s-1);
  }
  .at-nodes::before { display: none; }
  .at-nodes::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--s-1) + 4px);
    border-left: 1px solid var(--paper-rule);
    pointer-events: none;
  }
  .at-node {
    padding: var(--s-2) var(--s-2) var(--s-2) var(--s-2);
    border-top: 1px solid var(--paper-rule);
  }
  .at-route-note { flex-wrap: wrap; gap: 4px var(--s-2); }
  .at-engage-rail { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .hero-art { width: 78%; }
  .at-assurance-grid { grid-template-columns: 1fr; }
  .at-assurance-card,
  .at-assurance-card + .at-assurance-card {
    min-height: 0;
    padding: var(--s-3) 0;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }
  .at-assurance-card:last-child { border-bottom: 0; }
  .at-assurance-index { margin-bottom: var(--s-2); }
}

/* ---------- Motion: scroll reveal (JS-gated so nothing hides without it) ----------
   Contract (main.js):
     .at-reveal-rule    hairline draws 0 -> 100% (scaleX); SVG <path> draws via dashoffset
     .at-reveal-kicker  instant on, no transition
     .at-reveal-group   ancestor; staged children receive class-based delays in DOM order
   Draw ease is always cubic-bezier(0.16,1,0.3,1); opacity is linear. */
html.js .at-reveal-rule:not(path) {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--draw-ease) var(--at-reveal-delay, 0ms);
}
html.js .at-reveal-rule:not(path).at-in { transform: none; }

html.js path.at-reveal-rule {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s var(--draw-ease) var(--at-reveal-delay, 0ms);
}
html.js path.at-reveal-rule.at-in { stroke-dashoffset: 0; }

html.js .at-reveal-kicker { opacity: 0; transition: none; }
html.js .at-reveal-kicker.at-in { opacity: 1; }

/* Delays are class-based so the strict site CSP never needs a style attribute. */
html.js .at-ledger .at-reveal-delay-1,
html.js .at-spec-ledger .at-reveal-delay-1 { --at-reveal-delay: 60ms; }
html.js .at-ledger .at-reveal-delay-2,
html.js .at-spec-ledger .at-reveal-delay-2 { --at-reveal-delay: 120ms; }
html.js .at-ledger .at-reveal-delay-3,
html.js .at-spec-ledger .at-reveal-delay-3 { --at-reveal-delay: 180ms; }
html.js .at-ledger .at-reveal-delay-4,
html.js .at-spec-ledger .at-reveal-delay-4 { --at-reveal-delay: 240ms; }
html.js .at-ledger .at-reveal-delay-5,
html.js .at-spec-ledger .at-reveal-delay-5 { --at-reveal-delay: 300ms; }
html.js .at-ledger .at-reveal-delay-6,
html.js .at-spec-ledger .at-reveal-delay-6 { --at-reveal-delay: 360ms; }
html.js .at-ledger .at-reveal-delay-7,
html.js .at-spec-ledger .at-reveal-delay-7 { --at-reveal-delay: 420ms; }
html.js .at-ledger .at-reveal-delay-8,
html.js .at-spec-ledger .at-reveal-delay-8 { --at-reveal-delay: 480ms; }
html.js .at-network-wrap .at-reveal-delay-1 { --at-reveal-delay: 80ms; }
html.js .at-network-wrap .at-reveal-delay-2 { --at-reveal-delay: 160ms; }
html.js .at-network-wrap .at-reveal-delay-3 { --at-reveal-delay: 240ms; }
html.js .at-network-wrap .at-reveal-delay-4 { --at-reveal-delay: 320ms; }
html.js .at-network-wrap .at-reveal-delay-5 { --at-reveal-delay: 400ms; }
html.js .at-network-wrap .at-reveal-delay-6 { --at-reveal-delay: 480ms; }
html.js .at-network-wrap .at-reveal-delay-7 { --at-reveal-delay: 560ms; }
html.js .at-network-wrap .at-reveal-delay-8 { --at-reveal-delay: 640ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .at-reveal-rule { transform: none !important; }
  path.at-reveal-rule { stroke-dashoffset: 0 !important; }
  .at-reveal-kicker { opacity: 1 !important; }
}
