/* ═══════════════════════════════════════════════════════════
   AeP Labs — Agent Economic Protocol
   Hardware-Anchored Inference Security
   ═══════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, variable, offline-safe) ── */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/Fraunces.woff2") format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/Manrope.woff2") format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/JetBrainsMono.woff2") format('woff2');
}

/* ── Tokens ── */
:root {
  /* Command Steel — cool = system/nominal, warm = heat/threat */
  --bg:            #070a0e;
  --bg-elevated:   #0c1116;
  --bg-card:       #0e141b;
  --border:        #1a2530;
  --border-bright: #27333f;
  --text:          #e7edf2;
  --text-dim:      #8794a2;
  --text-faint:    #6a7784;
  --accent:        #6fbdde;
  --accent-bright: #a6dcf2;
  --green:         #6dd99e;
  --yellow:        #e6c66f;
  --orange:        #e89a5d;
  --red:           #e0716f;
  --academic:      #5b8fc9;
  --academic-bright:#86b4e6;

  --mono:  'JetBrains Mono', ui-monospace, monospace;
  --sans:  'Manrope', system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, serif;

  --maxw: 1200px;
  --pad: clamp(20px, 4vw, 40px);
  --radius: 4px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(111,189,222,0.28); color: #fff; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }
strong { font-weight: 600; color: var(--text); }
code { font-family: var(--mono); font-size: 0.86em; color: var(--accent-bright); }
.mono-dim { font-family: var(--mono); color: var(--text-faint); font-weight: 400; }
sub { font-size: 0.7em; }

/* ══ Fixed background layers ══ */
#entropy-field {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  opacity: 0.55;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(111,189,222,0.07), transparent 55%),
    radial-gradient(140% 100% at 50% 120%, rgba(7,10,14,0.9), transparent 60%),
    linear-gradient(180deg, rgba(7,10,14,0.4), rgba(7,10,14,0.75));
}
.scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.35;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
}
main, nav, .footer { position: relative; z-index: 2; }

/* ══ Scroll progress ══ */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  z-index: 100; box-shadow: 0 0 12px rgba(111,189,222,0.6);
  transition: width 0.1s linear;
}

/* ══ Nav ══ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad);
  background: rgba(7,10,14,0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
#nav.scrolled { background: rgba(7,10,14,0.86); border-bottom-color: var(--border); }

.brand { display: flex; align-items: baseline; gap: 8px; color: var(--text); }
.brand-mark { color: var(--accent); display: inline-flex; align-self: center; }
.brand-word { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.02em; }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em; color: var(--text-faint); }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-dim); position: relative; padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }

.nav-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid var(--border-bright);
  padding: 6px 11px; border-radius: 100px; white-space: nowrap;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ══ Layout primitives ══ */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(72px, 11vw, 140px) var(--pad);
}
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-num {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
  padding-left: 16px; position: relative;
}
.sec-num::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 8px; height: 1px;
  background: var(--accent);
}
h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.06;
  letter-spacing: -0.02em; color: var(--text);
}
h2 em { color: var(--accent); font-style: italic; }
.sec-lede { margin-top: 22px; font-size: clamp(15px, 1.7vw, 18px); color: var(--text-dim); line-height: 1.7; max-width: 64ch; }
h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 2.4vw, 24px); letter-spacing: -0.01em; line-height: 1.2; }

/* ══ Buttons ══ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.03em;
  padding: 13px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.22s var(--ease); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #04141b; font-weight: 600; }
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(111,189,222,0.5); }
.btn-ghost { border-color: var(--border-bright); color: var(--text-dim); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ══════════════════ HERO ══════════════════ */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(130px, 17vw, 190px) var(--pad) clamp(48px, 7vw, 80px);
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 68px);
  align-items: center;
}
.eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--text-faint); text-transform: uppercase; margin-bottom: 28px;
}
.eyebrow .tick { width: 24px; height: 1px; background: var(--border-bright); }
h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(36px, 6.2vw, 76px); line-height: 1.02;
  letter-spacing: -0.03em; color: var(--text);
}
h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.lede { margin-top: 28px; font-size: clamp(16px, 1.9vw, 20px); color: var(--text-dim); max-width: 56ch; line-height: 1.65; }
.lede strong { color: var(--accent-bright); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin-top: 48px; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--border);
}
.stat { background: var(--bg-elevated); padding: 18px 16px; }
.stat-num { display: block; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 28px); color: var(--accent); font-weight: 500; letter-spacing: -0.02em; }
.stat-label { display: block; margin-top: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; color: var(--text-faint); text-transform: uppercase; line-height: 1.3; }

/* Live Monitor */
.monitor {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-bright); border-radius: 8px;
  padding: 20px; position: relative; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.03);
}
.monitor::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 40% at 90% 0%, rgba(111,189,222,0.08), transparent 60%);
}
.monitor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.monitor-title { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--text-dim); }
.monitor-tier { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--green); transition: color 0.2s; }
.monitor-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-bottom: 14px;
}
.monitor-bars .bar {
  flex: 1; min-width: 0; border-radius: 1px 1px 0 0;
  background: var(--academic-bright); transition: height 0.16s linear, background 0.16s linear;
  align-self: flex-end;
}
.monitor-msg {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--text-faint);
  min-height: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.monitor-chips { display: flex; gap: 6px; margin-top: 14px; }
.monitor-chips span {
  flex: 1; text-align: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em;
  padding: 6px 4px; border-radius: 3px; border: 1px solid var(--border-bright); color: var(--text-faint);
  transition: all 0.2s;
}

.trust-strip {
  display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: clamp(40px, 6vw, 68px);
  padding-top: 26px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--text-faint); text-transform: uppercase;
}
.trust-strip strong { color: var(--accent); font-weight: 500; }

/* ══════════════════ THE GAP ══════════════════ */
.gap-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }

.stack {
  border: 1px solid var(--border-bright); border-radius: 8px; padding: 22px;
  background: var(--bg-elevated); position: relative;
}
.stack-node {
  border: 1px solid var(--border-bright); border-radius: 6px; padding: 14px 16px;
  background: var(--bg-card); transition: all 0.4s var(--ease);
}
.node-k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text); }
.node-v { margin-top: 5px; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.02em; transition: color 0.3s; }
.node-brain .diamond, .node-stem .diamond { color: var(--accent); }
.node-stem { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(111,189,222,0.2); }
.node-stem .node-k { color: var(--accent-bright); }
.stack-conn { height: 20px; width: 1px; background: var(--border-bright); margin: 0 auto; }
.stack-root { margin-top: 16px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text-faint); text-transform: uppercase; }

.sim-controls { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.sim-status { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--green); margin-bottom: 12px; min-height: 14px; transition: color 0.3s; }
.btn-sim { width: 100%; justify-content: center; background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-sim:hover:not(:disabled) { background: rgba(111,189,222,0.1); }
.btn-sim:disabled { opacity: 0.55; cursor: default; border-color: var(--border-bright); color: var(--text-faint); }

.gap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gap-col { border: 1px solid var(--border); border-radius: 6px; padding: 20px; background: rgba(12,17,22,0.5); }
.gap-col-accent { border-color: var(--border-bright); background: linear-gradient(180deg, rgba(111,189,222,0.04), transparent); }
.gap-col-head { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text); }
.gap-col-sub { margin-top: 4px; font-size: 13px; color: var(--text-faint); font-style: italic; margin-bottom: 16px; }
.list-diamond { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.list-diamond li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.list-diamond li::before { content: '◇'; position: absolute; left: 0; top: 0; color: var(--text-faint); font-size: 11px; }
.list-accent li::before { content: '◆'; color: var(--accent); }
.list-academic li::before { content: '◆'; color: var(--academic); }
.list-diamond li strong { color: var(--text); }

/* ══════════════════ VIGNETTES ══════════════════ */
.vignettes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.vignette-card {
  border: 1px solid var(--border); border-left: 2px solid var(--vb, var(--accent));
  border-radius: 6px; padding: 24px; background: var(--bg-card);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.vignette-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(0,0,0,0.7); }
.vg-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vb, var(--accent)); }
.vg-title { margin-top: 12px; margin-bottom: 16px; }
.vg-row { margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.vg-row .vg-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); display: block; margin-bottom: 3px; }
.vg-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--vb, var(--accent)); letter-spacing: 0.02em; }

/* ══════════════════ ARCHITECTURE LOOP ══════════════════ */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.loop-step {
  border: 1px solid var(--border); border-radius: 6px; padding: 22px 20px; background: var(--bg-card);
  position: relative; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.loop-step:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.loop-step .ls-num { font-family: var(--mono); font-size: 26px; color: var(--border-bright); font-weight: 700; line-height: 1; }
.loop-step .ls-key { margin-top: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent); }
.loop-step .ls-title { margin-top: 14px; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.loop-step .ls-desc { margin-top: 10px; font-size: 13px; color: var(--text-dim); line-height: 1.55; }
.loop-step .ls-arrow { position: absolute; right: -13px; top: 32px; color: var(--border-bright); font-size: 14px; z-index: 3; }

.formula {
  margin-top: 32px; padding: 28px; border: 1px solid var(--border-bright); border-radius: 8px;
  background: var(--bg-elevated); text-align: center;
}
.formula-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.formula-eq { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 34px); color: var(--text); letter-spacing: 0.01em; }
.formula-eq em { color: var(--accent); font-style: italic; }
.formula-eq .sum { font-size: 1.25em; color: var(--accent); vertical-align: -0.12em; margin: 0 0.1em; }

/* ══════════════════ RESPONSE GAUGE ══════════════════ */
.gauge { max-width: 860px; }
.gauge-track {
  position: relative; height: 14px; border-radius: 100px; overflow: hidden;
  display: flex; border: 1px solid var(--border-bright);
}
.gauge-band { flex: 1; }
.band-ok { background: linear-gradient(90deg, rgba(109,217,158,0.25), rgba(109,217,158,0.5)); }
.band-warn { background: linear-gradient(90deg, rgba(230,198,111,0.35), rgba(230,198,111,0.6)); }
.band-throttle { background: linear-gradient(90deg, rgba(232,154,93,0.45), rgba(232,154,93,0.7)); }
.band-halt { background: linear-gradient(90deg, rgba(217,109,109,0.55), rgba(217,109,109,0.85)); }
.gauge-marker {
  position: absolute; top: -5px; width: 3px; height: 24px; background: var(--text);
  left: 12.5%; transform: translateX(-50%); border-radius: 2px;
  box-shadow: 0 0 12px rgba(255,255,255,0.8); transition: left 0.4s var(--ease);
}
.gauge-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.tier-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; font-weight: 500;
  padding: 12px; border: 1px solid var(--border-bright); border-radius: var(--radius);
  background: transparent; color: var(--text-dim); cursor: pointer; transition: all 0.22s var(--ease);
}
.tier-btn:hover { color: var(--text); border-color: var(--text-faint); }
.tier-btn.active { color: var(--text); }
.tier-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gauge-caption { margin-top: 22px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.03em; }
.tier-detail {
  margin-top: 16px; padding: 22px; border: 1px solid var(--border-bright); border-left-width: 3px;
  border-radius: 6px; background: var(--bg-card); transition: border-color 0.3s, background 0.3s;
}
.tier-detail .td-name { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.tier-detail .td-desc { margin-top: 10px; font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ══════════════════ PRIMITIVES ══════════════════ */
.prim-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.prim-card { border: 1px solid var(--border); border-radius: 6px; padding: 26px; background: var(--bg-card); transition: border-color 0.3s, transform 0.3s var(--ease); }
.prim-card:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.prim-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.prim-card h3 { margin-top: 14px; margin-bottom: 12px; }
.prim-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.prim-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ══════════════════ CODE WINDOW ══════════════════ */
.code-window { border: 1px solid var(--border-bright); border-radius: 8px; overflow: hidden; background: #0b0e12; box-shadow: 0 30px 60px -34px rgba(0,0,0,0.8); }
.code-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.code-dots { display: flex; gap: 6px; }
.code-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-bright); display: block; }
.code-file { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.04em; }
.code-path { font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-left: auto; }
.code-body { padding: 24px; overflow-x: auto; }
.code-body code { display: block; font-family: var(--mono); font-size: clamp(11.5px, 1.3vw, 13.5px); line-height: 1.75; color: var(--text-dim); white-space: pre; }
.tok-kw { color: var(--academic-bright); }
.tok-fn { color: var(--accent-bright); }
.tok-str { color: var(--green); }
.tok-com { color: var(--text-faint); font-style: italic; }
.tok-type { color: var(--yellow); }
.tok-macro { color: var(--orange); }
.tok-num { color: var(--orange); }

/* ══════════════════ BENCHMARKS ══════════════════ */
.bench-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.bench-cell { background: var(--bg-card); padding: 32px 26px; transition: background 0.3s; }
.bench-cell:hover { background: var(--bg-elevated); }
.bench-num { font-family: var(--serif); font-size: clamp(34px, 5vw, 52px); font-weight: 400; color: var(--accent); letter-spacing: -0.02em; line-height: 1; }
.bench-num .bu { font-size: 0.5em; color: var(--accent-bright); margin-left: 2px; }
.bench-label { margin-top: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text); }
.bench-sub { margin-top: 6px; font-size: 12px; color: var(--text-faint); line-height: 1.5; }

/* ══════════════════ SWARM DEMO ══════════════════ */
.swarm-section { max-width: 1120px; }
.swarm-wrap { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: stretch; }
.swarm-stage { position: relative; border: 1px solid var(--border-bright); border-radius: 8px; overflow: hidden; background: radial-gradient(120% 120% at 50% 0%, #0e1319, #080a0d); min-height: 380px; }
#swarm-canvas { display: block; width: 100%; height: 100%; }
.swarm-hud { position: absolute; left: 16px; bottom: 16px; right: 16px; pointer-events: none; }
.swarm-readout {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--green); background: rgba(8,10,13,0.72); border: 1px solid var(--border); border-radius: 4px;
  padding: 8px 12px; backdrop-filter: blur(4px); transition: color 0.3s;
}
.swarm-panel { border: 1px solid var(--border); border-radius: 8px; padding: 24px; background: var(--bg-card); display: flex; flex-direction: column; gap: 18px; }
.swarm-metric { border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.swarm-metric:nth-child(3) { border-bottom: none; padding-bottom: 0; }
.swarm-metric-num { display: block; font-family: var(--serif); font-size: 32px; color: var(--accent); font-weight: 500; line-height: 1; }
.swarm-metric-num span { font-size: 0.5em; color: var(--text-faint); }
.swarm-metric-lbl { display: block; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.swarm-btn { width: 100%; justify-content: center; margin-top: auto; }
.swarm-legend { display: flex; flex-direction: column; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.swarm-legend span { display: flex; align-items: center; gap: 9px; }
.swarm-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lg-ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.lg-cap { background: var(--red); box-shadow: 0 0 8px var(--red); }
.lg-sev { background: var(--border-bright); border: 1px solid var(--red); }

/* ══════════════════ DUAL-USE ══════════════════ */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dual-card { border: 1px solid var(--border-bright); border-radius: 8px; padding: 34px; position: relative; overflow: hidden; }
.dual-defense { background: linear-gradient(180deg, rgba(217,109,109,0.05), var(--bg-card)); }
.dual-commercial { background: linear-gradient(180deg, rgba(91,143,201,0.05), var(--bg-card)); }
.dual-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.dual-defense .dual-tag { color: var(--red); }
.dual-commercial .dual-tag { color: var(--academic-bright); }
.dual-card h3 { margin-bottom: 14px; }
.dual-card p { font-size: 14px; color: var(--text-dim); line-height: 1.65; }

/* ══════════════════ RESEARCH ══════════════════ */
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.research-facts { border: 1px solid var(--border); border-radius: 8px; padding: 8px 24px; background: var(--bg-card); }
.rf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.rf-row:last-child { border-bottom: none; }
.rf-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.rf-v { font-size: 14px; color: var(--text); text-align: right; }
.rf-status { font-family: var(--mono); color: var(--green); letter-spacing: 0.1em; }
.research-parties { display: flex; flex-direction: column; gap: 20px; }
.party { border: 1px solid var(--border); border-radius: 8px; padding: 22px; background: var(--bg-card); flex: 1; display: flex; flex-direction: column; justify-content: center; }
.party-role { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.party-name { margin-top: 8px; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.party-meta { margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.pi-card { border: 1px solid var(--border-bright); border-radius: 8px; padding: clamp(24px, 4vw, 40px); background: linear-gradient(180deg, var(--bg-elevated), var(--bg-card)); }
.pi-role { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.pi-name { margin-top: 8px; font-family: var(--serif); font-size: clamp(24px, 3.4vw, 32px); font-weight: 500; }
.pi-title { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.pi-creds { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.pi-creds li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--text-dim); }
.pi-creds li::before { content: '↳'; position: absolute; left: 0; color: var(--accent); }
.pi-note { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-dim); line-height: 1.7; }
.pi-note em { color: var(--text); }
.sow-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.sow-card { border: 1px solid var(--border); border-radius: 6px; padding: 20px; background: rgba(12,17,22,0.6); }
.sow-num { font-family: var(--mono); font-size: 20px; color: var(--border-bright); font-weight: 700; }
.sow-title { margin-top: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--text); }
.sow-desc { margin-top: 10px; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }

/* ══════════════════ PATENTS ══════════════════ */
.patent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 24px; }
.patent-card { border: 1px solid var(--border); border-radius: 6px; padding: 26px; background: var(--bg-card); transition: border-color 0.3s, transform 0.3s var(--ease); }
.patent-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.patent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.patent-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.patent-status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; color: var(--text-faint); border: 1px solid var(--border-bright); padding: 4px 8px; border-radius: 100px; }
.patent-card h3 { font-size: 18px; margin-bottom: 10px; }
.patent-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.strategy-note { border: 1px solid var(--border-bright); border-radius: 8px; padding: 24px 28px; background: linear-gradient(90deg, rgba(111,189,222,0.05), transparent); font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.strategy-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); margin-right: 8px; }

/* ══════════════════ ECOSYSTEM ══════════════════ */
.eco { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.eco-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.eco-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.eco-chips span {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--text-dim);
  border: 1px solid var(--border-bright); border-radius: 100px; padding: 8px 15px; transition: all 0.2s var(--ease);
}
.eco-chips span:hover { border-color: var(--accent); color: var(--text); }

/* ══════════════════ FAQ ══════════════════ */
.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 18px; padding: 22px 4px;
  font-family: var(--sans); font-size: clamp(15px, 1.8vw, 17px); font-weight: 500; color: var(--text);
  transition: color 0.2s;
}
.faq-q:hover { color: var(--accent); }
.faq-icon { flex: none; width: 18px; height: 18px; position: relative; margin-left: auto; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; background: var(--accent); transition: transform 0.3s var(--ease); }
.faq-icon::before { top: 8px; left: 0; width: 18px; height: 2px; }
.faq-icon::after { top: 0; left: 8px; width: 2px; height: 18px; }
.faq-item.open .faq-icon::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-a-inner { padding: 0 40px 24px 4px; font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }

/* ══════════════════ CONTACT ══════════════════ */
.contact { text-align: center; }
.contact-inner { max-width: 720px; margin: 0 auto; }
.contact .sec-num { padding-left: 0; }
.contact .sec-num::before { display: none; }
.contact-mail {
  display: inline-block; margin-top: 32px; font-family: var(--serif);
  font-size: clamp(24px, 4.5vw, 46px); color: var(--accent); letter-spacing: -0.02em;
  border-bottom: 1px solid transparent; transition: border-color 0.3s, color 0.3s;
}
.contact-mail:hover { color: var(--accent-bright); border-bottom-color: var(--accent); }
.contact-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 44px; }
.contact-badges span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--text-faint); }

/* ══════════════════ FOOTER ══════════════════ */
.footer { border-top: 1px solid var(--border); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 44px var(--pad); display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.footer-brand { font-size: 14px; color: var(--text-dim); }
.footer-brand .brand-word { font-size: 16px; }
.footer-tag { margin-top: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--text-faint); text-transform: uppercase; }
.footer-legal { font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.02em; max-width: 46ch; text-align: right; line-height: 1.6; }

/* ══════════════════ REVEAL ══════════════════ */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ══════════════════ RESPONSIVE ══════════════════ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .monitor { max-width: 520px; }
  .gap-layout { grid-template-columns: 1fr; }
  .vignettes, .prim-lists, .prim-cards, .dual, .research-grid, .patent-grid, .eco, .swarm-wrap { grid-template-columns: 1fr; }
  .loop { grid-template-columns: 1fr 1fr; }
  .loop-step .ls-arrow { display: none; }
  .bench-grid { grid-template-columns: 1fr 1fr; }
  .sow-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .gap-cols { grid-template-columns: 1fr; }
  .loop, .bench-grid { grid-template-columns: 1fr; }
  .footer-legal { text-align: left; }
  .gauge-labels { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════ MOTION SAFETY ══════════════════ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  #entropy-field { display: none; }
}
