/* ============================================================
   VANTIXIA - Cybernetic HUD design system
   Dark-first. Dual accents: red (offense) / cyan (defense).
   Fonts: Chakra Petch (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
  --void: #04070e;
  --panel: #0a1120;
  --panel-2: #0d1628;
  --line: rgba(102, 140, 255, 0.16);
  --line-soft: rgba(102, 140, 255, 0.08);
  --red: #ff3b57;
  --red-dim: rgba(255, 59, 87, 0.12);
  --red-glow: rgba(255, 59, 87, 0.35);
  --cyan: #39d0ff;
  --cyan-dim: rgba(57, 208, 255, 0.12);
  --cyan-glow: rgba(57, 208, 255, 0.35);
  --blue: #4f7cff;
  --text: #dbe6ff;
  --muted: #8294b8;
  --grad: linear-gradient(90deg, var(--red), var(--cyan));
  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-logo: 'Orbitron', sans-serif;
  --cut: 16px;
  --head-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

html {
  scrollbar-color: #22304f var(--void);
}
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--void); }
body::-webkit-scrollbar-thumb { background: #22304f; border-radius: 5px; }
body::-webkit-scrollbar-thumb:hover { background: #2f4370; }

body {
  margin: 0;
  background-color: var(--void);
  background-image:
    linear-gradient(rgba(90, 130, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 130, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7be0ff; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: #eef3ff;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 4.2rem); font-weight: 700; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--red); color: #fff; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--panel);
  color: var(--text);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- rebrand announcement banner (auto-dismisses) ---------- */

.rebrand-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 48px 11px 20px;
  background:
    linear-gradient(90deg, rgba(255, 59, 87, 0.14), rgba(57, 208, 255, 0.14)),
    rgba(6, 10, 20, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.rebrand-banner p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.rebrand-banner p i { color: var(--cyan); margin-right: 9px; }
.rebrand-banner strong { color: #fff; font-weight: 500; }
.rebrand-banner .nm { color: var(--red); font-weight: 500; }
.rebrand-banner.is-hiding { opacity: 0; transform: translateY(-100%); }

/* --- dissolve sequence: glitch, then shatter into drifting points --- */
@keyframes rb-jitter {
  0%   { transform: translate(0, 0) skewX(0deg); }
  25%  { transform: translate(-2px, 1px) skewX(-5deg); }
  50%  { transform: translate(2px, -1px) skewX(4deg); }
  75%  { transform: translate(-1px, 0) skewX(-2deg); }
  100% { transform: translate(0, 0) skewX(0deg); }
}
.rebrand-banner.is-glitching .rb-text {
  animation: rb-jitter 0.28s steps(3) 1;
  text-shadow: 1.5px 0 var(--red), -1.5px 0 var(--cyan);
}
/* the glyphs hand off to the particle canvas; the icon fades with the bar */
.rb-text.is-out .rb-seg { opacity: 0; }

.rb-dissolve-canvas {
  position: fixed;
  left: 0; top: 0;
  z-index: 131;
  pointer-events: none;
}

.rebrand-close {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 2px 9px 5px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.rebrand-close:hover { color: var(--red); border-color: var(--line); }

/* while the banner is up, push the fixed chrome down by its height */
body.banner-on .site-head { top: var(--banner-h, 46px); }
body.banner-on .scan-progress { top: var(--banner-h, 46px); }

@media (max-width: 640px) {
  .rebrand-banner { padding: 9px 42px 9px 14px; }
  .rebrand-banner p { font-size: 0.66rem; letter-spacing: 0.02em; }
  .rebrand-banner .tail { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rebrand-banner { transition: none; }
}

/* ---------- ambient canvas + scroll progress ---------- */

#net-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scan-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 200;
  background: transparent;
}
.scan-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* ---------- layout helpers ---------- */

.wrap { width: min(1180px, 92vw); margin-inline: auto; }

section { position: relative; padding: clamp(60px, 7vw, 96px) 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow b { color: var(--red); font-weight: 500; }
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 0 1 220px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before {
  content: "";
  height: 1px;
  flex: 0 1 220px;
  background: linear-gradient(270deg, var(--line), transparent);
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); }

.accent-red { color: var(--red); }
.accent-cyan { color: var(--cyan); }

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-red {
  background: linear-gradient(135deg, #ff3b57, #d91e3c);
  color: #fff;
}
.btn-red:hover { box-shadow: 0 6px 28px var(--red-glow); color: #fff; }

.btn-cyan {
  background: rgba(57, 208, 255, 0.06);
  border-color: rgba(57, 208, 255, 0.45);
  color: var(--cyan);
}
.btn-cyan:hover { background: rgba(57, 208, 255, 0.14); box-shadow: 0 6px 24px rgba(57, 208, 255, 0.2); color: #9ae7ff; }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- header ---------- */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--head-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, height 0.3s ease, top 0.6s ease;
}
.site-head.scrolled {
  height: 62px;
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.head-inner {
  width: min(1320px, 94vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-logo);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.15em;   /* echoes the spaced wordmark in the logo lockup */
  color: #eef3ff;           /* the mark carries the colour; the word stays clean */
  white-space: nowrap;
  transition: color 0.2s ease, filter 0.2s ease;
}
/* the V mark - height-driven so its natural aspect ratio is preserved */
.brand-mark {
  height: 34px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand:hover { color: #fff; filter: drop-shadow(0 0 10px rgba(57, 208, 255, 0.3)); }

@media (max-width: 400px) {
  .brand { font-size: 0.98rem; letter-spacing: 0.12em; gap: 8px; }
  .brand-mark { height: 28px; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
}
.site-nav a.nav-link {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 2px;
}
.site-nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a.nav-link:hover, .site-nav a.nav-link.active { color: var(--text); }
.site-nav a.nav-link:hover::after, .site-nav a.nav-link.active::after { transform: scaleX(1); }

.site-nav .btn { padding: 10px 22px; font-size: 0.78rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 46px; height: 42px;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.nav-toggle .bars {
  display: block;
  width: 20px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  position: relative;
  transition: background-color 0.2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--head-h) + 40px) 0 60px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero .sub {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 54ch;
  margin-bottom: 34px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 44px; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.hero-badges span::before { content: "◆ "; color: var(--cyan); font-size: 0.6rem; }

/* glitch headline */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.75;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
}
.glitch::before { color: var(--red); animation: glitch-a 3.2s infinite steps(1); }
.glitch::after { color: var(--cyan); animation: glitch-b 3.2s infinite steps(1); }
@keyframes glitch-a {
  0%, 91%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  92% { transform: translate(-3px, 2px); clip-path: inset(12% 0 58% 0); }
  94% { transform: translate(3px, -1px); clip-path: inset(64% 0 8% 0); }
  96% { transform: translate(-2px, 0); clip-path: inset(35% 0 42% 0); }
  98% { transform: none; clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  91% { transform: translate(3px, -2px); clip-path: inset(55% 0 20% 0); }
  93% { transform: translate(-3px, 1px); clip-path: inset(10% 0 72% 0); }
  95% { transform: translate(2px, 2px); clip-path: inset(42% 0 30% 0); }
  97% { transform: none; clip-path: inset(0 0 100% 0); }
}

/* terminal */
.term {
  border: 1px solid var(--line);
  background: rgba(6, 11, 22, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(57, 208, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.term-bar i:nth-child(1) { background: var(--red); }
.term-bar i:nth-child(2) { background: #ffb02e; }
.term-bar i:nth-child(3) { background: #2ee6a8; }
.term-bar .term-title { margin-left: 10px; }
.term-body {
  padding: 18px 20px 24px;
  min-height: 300px;
  color: #a9c4ff;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .ln-ok { color: #2ee6a8; }
.term-body .ln-warn { color: #ffb02e; }
.term-body .ln-red { color: var(--red); }
.term-body .ln-cyan { color: var(--cyan); }
.term-caret {
  display: inline-block;
  width: 9px; height: 16px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 50% { transform: translate(-50%, 8px); opacity: 0.4; } }

/* ---------- HUD cards ---------- */

.hud-card {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 30, 56, 0.55), rgba(9, 15, 30, 0.75));
  border: 1px solid var(--line);
  padding: 30px 28px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.hud-card:hover { transform: translateY(-5px); }

.hud-card .corner {
  position: absolute;
  width: 14px; height: 14px;
  border-style: solid;
  border-color: var(--muted);
  opacity: 0.5;
  transition: border-color 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.hud-card .corner.tl { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.hud-card .corner.br { bottom: 6px; right: 6px; border-width: 0 1px 1px 0; }

.hud-card.red:hover { border-color: rgba(255, 59, 87, 0.55); box-shadow: 0 14px 40px rgba(255, 59, 87, 0.12); }
.hud-card.red:hover .corner { border-color: var(--red); opacity: 1; }
.hud-card.cyan:hover { border-color: rgba(57, 208, 255, 0.55); box-shadow: 0 14px 40px rgba(57, 208, 255, 0.12); }
.hud-card.cyan:hover .corner { border-color: var(--cyan); opacity: 1; }

.hud-card .tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 14px;
}
.hud-card.red .tag { color: var(--red); }
.hud-card.cyan .tag { color: var(--cyan); }

.hud-card .icon {
  font-size: 1.7rem;
  margin-bottom: 18px;
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(6, 11, 22, 0.6);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.hud-card.red .icon { color: var(--red); }
.hud-card.cyan .icon { color: var(--cyan); }

.hud-card p { color: var(--muted); font-size: 0.94rem; }

.hud-card .card-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--line);        /* dashed = optional / available on request */
  background: transparent;
}
.hud-card .card-note i { font-size: 0.8rem; flex-shrink: 0; color: var(--cyan); }
.hud-card.red .card-note i { color: var(--red); }
.hud-card .card-note .opt { color: var(--cyan); font-weight: 500; }
.hud-card.red .card-note .opt { color: var(--red); }

.hud-card .card-link {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hud-card .card-link::after { content: " ›"; }

/* stretched-link pattern so whole card is clickable */
.hud-card .stretch::before { content: ""; position: absolute; inset: 0; z-index: 1; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* grid/flex children must be allowed to shrink below content width */
.hero-grid > *, .dossier > *, .split > *,
.grid-2 > *, .grid-3 > *, .grid-4 > *,
.team-grid > *, .channel-row > * { min-width: 0; }

/* ---------- stats / dossier panel ---------- */

.dossier {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(36px, 5vw, 70px);
  align-items: center;
}
/* "(formerly known as ...)" - a quiet parenthetical beside the brand name */
.formerly {
  font-size: 0.9em;
  color: var(--muted);
  opacity: 0.8;
  letter-spacing: 0.01em;
}

.dossier .lead-para { color: var(--muted); }
.dossier .lead-para strong { color: var(--text); font-weight: 600; }

.stat-panel {
  border: 1px solid var(--line);
  background: rgba(8, 13, 26, 0.75);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  padding: 12px;
}
.stat-panel .stat-head {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-cell {
  padding: 26px 18px 20px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.stat-cell:nth-child(2n) { border-right: 0; }
.stat-cell:nth-last-child(-n+2) { border-bottom: 0; }
.stat-cell .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #eef3ff;
  line-height: 1;
}
.stat-cell .num em { font-style: normal; color: var(--red); }
.stat-cell:nth-child(2n) .num em { color: var(--cyan); }
.stat-cell .lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}

/* ---------- protocol timeline ---------- */

.protocol { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--line); background: rgba(8, 13, 26, 0.6); }
.protocol .step {
  position: relative;
  padding: 34px 24px 30px;
  border-right: 1px solid var(--line-soft);
}
.protocol .step:last-child { border-right: 0; }
.protocol .step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--red);
  display: block;
  margin-bottom: 16px;
}
.protocol .step:nth-child(even)::before { color: var(--cyan); }
.protocol .step h4 { font-size: 1rem; margin-bottom: 10px; }
.protocol .step p { color: var(--muted); font-size: 0.86rem; margin: 0; }
.protocol .step:hover { background: rgba(19, 30, 56, 0.4); }

/* ---------- team ---------- */

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.team-card { text-align: center; padding-bottom: 26px; }
.team-card .ph {
  width: 118px; height: 118px;
  margin: 4px auto 18px;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  overflow: hidden;
  background: var(--panel-2);
  position: relative;
}
.team-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card .role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin: 6px 0 14px;
}
.team-card .socials { display: flex; justify-content: center; gap: 10px; position: relative; z-index: 2; }
.team-card .socials a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.team-card .socials a:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 12% 0%, rgba(255, 59, 87, 0.14), transparent 60%),
    radial-gradient(600px 220px at 88% 100%, rgba(57, 208, 255, 0.14), transparent 60%),
    rgba(8, 13, 26, 0.8);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  padding: clamp(44px, 6vw, 76px) clamp(28px, 6vw, 84px);
  text-align: center;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--muted); max-width: 56ch; margin: 0 auto 30px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

.channel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.channel {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 20px 22px;
}
.channel .icon { flex-shrink: 0; margin: 0; }
.channel h4 { margin: 0 0 4px; font-size: 0.95rem; }
.channel a.ch-link { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; position: relative; z-index: 2; }

/* ---------- page header (inner pages) ---------- */

.page-head {
  padding: calc(var(--head-h) + clamp(56px, 9vw, 110px)) 0 clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(700px 300px at 80% -10%, rgba(57, 208, 255, 0.08), transparent 65%),
    radial-gradient(700px 300px at 10% -10%, rgba(255, 59, 87, 0.08), transparent 65%);
}
.page-head .crumbs {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 20px;
}
.page-head .crumbs a { color: var(--muted); }
.page-head .crumbs a:hover { color: var(--cyan); }
.page-head .crumbs .sep { color: var(--red); margin: 0 8px; }
.page-head h1 { text-transform: uppercase; margin-bottom: 16px; }
.page-head .sub { color: var(--muted); max-width: 68ch; font-size: 1.05rem; margin: 0; }

/* ---------- content blocks ---------- */

.prose { max-width: 76ch; color: var(--muted); }
.prose strong { color: var(--text); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 0.95rem;
}
.check-list li::before {
  content: "▸";
  position: absolute;
  left: 6px;
  color: var(--cyan);
}
.check-list.red li::before { color: var(--red); }
.check-list li strong { color: var(--text); }

.divider-scan {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------- forms ---------- */

.form-hud { display: grid; gap: 18px; }
.form-hud label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.form-hud input, .form-hud textarea {
  width: 100%;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 14px 16px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-hud input:focus, .form-hud textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(57, 208, 255, 0.35);
}
.form-hud textarea { resize: vertical; min-height: 150px; }
.form-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  min-height: 1.4em;
  color: var(--cyan);
}
.form-status.err { color: var(--red); }

/* ---------- map ---------- */

.map-frame {
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  overflow: hidden;
  background: var(--panel);
}
.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  filter: invert(0.92) hue-rotate(185deg) saturate(0.7) brightness(0.9);
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line-soft);
  background: rgba(4, 7, 14, 0.9);
  padding: clamp(40px, 4.5vw, 60px) 0 0;
  /* no margin-top: the preceding section's bottom padding already spaces this,
     and stacking both left a large dead band above the footer */
  margin-top: 0;
}
/* the last section before the footer doesn't need full section padding below */
main > section:last-of-type { padding-bottom: clamp(28px, 3.5vw, 44px); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 44px;
}
.foot-grid h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.foot-grid .brand { font-size: 1.25rem; margin-bottom: 14px; }
.foot-grid .brand-mark { height: 40px; }
.foot-grid .tagline { color: var(--muted); font-size: 0.92rem; max-width: 32ch; }
.foot-links { display: grid; gap: 10px; }
.foot-links a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s, padding-left 0.2s;
}
.foot-links a::before { content: "▸ "; color: var(--red); font-size: 0.7rem; }
.foot-links a:hover { color: var(--cyan); padding-left: 4px; }

.foot-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.foot-social a {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--muted);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.foot-social a:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }

.foot-contact { display: grid; gap: 14px; font-size: 0.92rem; }
.foot-contact a { color: var(--muted); display: flex; gap: 12px; align-items: baseline; }
.foot-contact a i { color: var(--cyan); width: 16px; }
.foot-contact a:hover { color: var(--text); }

.foot-bottom {
  border-top: 1px solid var(--line-soft);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.foot-bottom a { color: var(--muted); }
.foot-bottom a:hover { color: var(--cyan); }

/* ---------- back to top ---------- */

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 13, 26, 0.9);
  border: 1px solid var(--line);
  color: var(--cyan);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, border-color 0.2s;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { border-color: var(--cyan); }

/* ---------- reveal on scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
[data-reveal="left"] { transform: translateX(-44px); }
[data-reveal="right"] { transform: translateX(44px); }
[data-reveal="zoom"] { transform: scale(0.9); }
[data-reveal="flip"] { transform: perspective(900px) rotateX(14deg) translateY(28px); }
[data-reveal].revealed { opacity: 1; transform: none; }

/* on narrow viewports horizontal slides would poke past the edge - fall back to vertical */
@media (max-width: 1100px) {
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(28px); }
}

/* ---------- error pages ---------- */

.err-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
}
.err-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(57, 208, 255, 0.25));
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .term { max-width: 640px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .protocol { grid-template-columns: repeat(2, 1fr); }
  .protocol .step { border-bottom: 1px solid var(--line-soft); }
  .dossier, .split { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 84vw);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 90px 36px 40px;
    background: rgba(5, 9, 18, 0.97);
    border-left: 1px solid var(--line);
    transform: translateX(105%);
    transition: transform 0.35s ease;
    z-index: 95;
  }
  .nav-open .site-nav { transform: none; }
  .site-nav a.nav-link { font-size: 1.05rem; }
  .nav-toggle { position: relative; z-index: 96; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2, .grid-4, .team-grid, .channel-row { grid-template-columns: 1fr; }
  .protocol { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: calc(var(--head-h) + 24px); }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .foot-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 440px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ---------- decorative parallax orbs + section numbers ---------- */

.orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}
.orb.red { background: radial-gradient(circle, var(--red), transparent 65%); }
.orb.cyan { background: radial-gradient(circle, var(--cyan), transparent 65%); }

.sec-num {
  position: absolute;
  top: 8px;
  right: 2vw;
  z-index: -1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(110px, 18vw, 230px);
  line-height: 1;
  color: rgba(110, 145, 255, 0.05);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

/* ---------- card spotlight (mouse-follow glow) ---------- */

.hud-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(57, 208, 255, 0.09), transparent 65%);
}
.hud-card.red::after {
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 59, 87, 0.09), transparent 65%);
}
.hud-card:hover::after { opacity: 1; }

/* ---------- protocol scan line (draws on reveal) ---------- */

.protocol { position: relative; }
.protocol::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--grad);
  box-shadow: 0 0 14px var(--cyan-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
  z-index: 1;
}
.protocol.revealed::before { transform: scaleX(1); }

/* ---------- standards ticker ---------- */

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 10, 20, 0.65);
  padding: 14px 0;
  position: relative;
}
.ticker::before, .ticker::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, var(--void), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--void), transparent); }
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 36s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 28px;
  white-space: nowrap;
}
.ticker-track span::before { content: "◆"; color: var(--red); margin-right: 28px; font-size: 0.6rem; }
.ticker-track span:nth-child(even)::before { color: var(--cyan); }
@keyframes ticker-scroll {
  to { transform: translateX(-50%); }
}

/* ---------- FAQ accordion ---------- */

.faq { display: grid; gap: 14px; }
.faq-item {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 30, 56, 0.45), rgba(9, 15, 30, 0.65));
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: border-color 0.25s ease;
}
.faq-item[open] { border-color: rgba(57, 208, 255, 0.45); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: #eef3ff;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .fx {
  flex-shrink: 0;
  font-family: var(--font-mono);
  color: var(--cyan);
  transition: transform 0.3s ease;
}
.faq-item[open] summary .fx { transform: rotate(45deg); color: var(--red); }
.faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 0.95rem; }
.faq-body p { margin: 0; }

/* ---------- standards / frameworks panel ---------- */

.std-panel {
  border: 1px solid var(--line);
  background: rgba(8, 13, 26, 0.6);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.std-panel > * { min-width: 0; }
.std-panel .std-head h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.std-panel .std-head p { color: var(--muted); margin: 0; }
.std-grid { display: flex; flex-wrap: wrap; gap: 12px; align-content: center; }
.std-grid span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 9px 15px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: border-color 0.2s, color 0.2s;
}
.std-grid span::before { content: "\25C6 "; color: var(--cyan); font-size: 0.6rem; }
.std-grid span:nth-child(2n)::before { color: var(--red); }
.std-grid span:hover { border-color: var(--cyan); color: #fff; }
@media (max-width: 820px) { .std-panel { grid-template-columns: 1fr; } }

/* ---------- blog listing ---------- */

.post-card { padding: 0; display: flex; flex-direction: column; }
.post-card .post-img {
  height: 210px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.post-card .post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85) contrast(1.05);
  transition: transform 0.5s ease;
}
.post-card:hover .post-img img { transform: scale(1.05); }
.post-card .post-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card .post-body h3 { font-size: 1.15rem; }
.post-card .post-body p { flex: 1; }
.post-card .meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.post-card .meta b { color: var(--cyan); font-weight: 500; }

/* ---------- blog filter chips ---------- */

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(8, 13, 26, 0.7);
  border: 1px solid var(--line);
  padding: 9px 18px;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--cyan); }
.chip[aria-pressed="true"] { color: #04070e; background: var(--cyan); border-color: var(--cyan); font-weight: 500; }
.chip[data-cat="ai-security"][aria-pressed="true"],
.chip[data-cat="testing-ai"][aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.chip .n { opacity: 0.6; margin-left: 6px; }

.post-card.is-hidden { display: none; }

.blog-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 22px;
}
.blog-count b { color: var(--cyan); font-weight: 500; }

.post-card .cat-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(4, 7, 14, 0.82);
  border: 1px solid var(--line);
  color: var(--cyan);
}
.post-card.red .cat-badge { color: var(--red); }
.post-card .post-img { position: relative; }

/* ---------- article meta bar + related ---------- */

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.article-meta .badge {
  padding: 5px 12px;
  border: 1px solid var(--line);
  color: var(--cyan);
}
.article-meta .badge.red { color: var(--red); }
.article-meta .dot { color: var(--red); }

/* ---------- article prose (legacy blog content restyled) ---------- */

.article-hero {
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  overflow: hidden;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.article-hero img { display: block; width: 100%; max-height: 480px; object-fit: cover; }
.article-hero img.par { height: clamp(240px, 42vw, 460px); max-height: none; will-change: transform; }

.article-prose { max-width: 860px; margin-inline: auto; color: var(--muted); font-size: 1.02rem; }
.article-prose :is(h1, h2, h3, h4, h5) {
  color: #eef3ff !important;
  font-family: var(--font-display);
  text-align: left !important;
  margin: 1.8em 0 0.6em;
}
.article-prose h1 { font-size: 1.55rem; }
.article-prose h4 { font-size: 1.15rem; }
.article-prose p { color: var(--muted) !important; text-align: left !important; }
.article-prose img {
  display: block;
  max-width: min(100%, 640px);
  width: auto;
  height: auto;
  margin: 36px auto;
  border: 1px solid var(--line);
  padding: 6px;
  background: rgba(8, 13, 26, 0.6);
}
.article-prose ul, .article-prose ol { color: var(--muted); padding-left: 24px; }
.article-prose a { color: var(--cyan); }
.article-prose center { display: block; text-align: center; }
.article-prose [style*="background"] { background: transparent !important; }

/* ---------- legal pages (privacy / terms) ---------- */

.legal { max-width: 840px; margin-inline: auto; }
.legal .updated {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 6px 12px;
  margin-bottom: 24px;
}
.legal .lead { color: var(--text); font-size: 1.08rem; }
.legal h2 {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: clamp(1.25rem, 2.3vw, 1.6rem);
  text-transform: none;
  letter-spacing: 0;
  margin: 2.1em 0 0.55em;
  color: #eef3ff;
}
.legal h2 .n {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cyan);
}
.legal h2:nth-of-type(even) .n { color: var(--red); }
.legal p { color: var(--muted); }
.legal a { color: var(--cyan); }
.legal ul { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.legal ul li { position: relative; padding-left: 26px; color: var(--muted); }
.legal ul li::before { content: "\25B8"; position: absolute; left: 4px; color: var(--red); }
.legal ul li strong { color: var(--text); }
.legal .ack {
  margin-top: 2.6em;
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 26, 0.6);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  color: var(--text);
}
.article-prose br + br { display: none; }

/* ---------- Lenis smooth scroll ---------- */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- scroll-story: pinned Shield Protocol sequence ---------- */

.story {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 40px 0;
}
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.story-shield {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.shield-svg {
  width: min(360px, 74vw);
  height: auto;
  overflow: visible;
  transition: filter 0.4s ease;
}
.shield-path, .shield-check { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.shield-path { stroke: url(#shieldGrad); stroke-width: 3; }
.shield-check { stroke: var(--cyan); stroke-width: 7; }
.shield-plate {
  fill: rgba(57, 208, 255, 0.03);
  stroke: var(--line);
  stroke-width: 1;
}
.shield-readout { text-align: center; font-family: var(--font-mono); }
.shield-readout .integrity {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.shield-readout .label {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.story-copy .story-head {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  text-transform: uppercase;
  margin: 14px 0 28px;
}
.story-lines { display: grid; gap: 20px; }
.story-line {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  color: var(--text);
  margin: 0;
}
.story-line b {
  font-family: var(--font-mono);
  color: var(--red);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.story-line:nth-child(even) b { color: var(--cyan); }
.story-line.show { opacity: 1 !important; visibility: visible !important; transform: none !important; }

@media (max-width: 767px) {
  .story { min-height: auto; padding: clamp(60px, 11vw, 96px) 0; }
  .story-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .story-lines { max-width: 32rem; margin-inline: auto; text-align: left; }
}

/* ---------- horizontal fade-rail ---------- */

.rail { position: relative; }
.rail-viewport { position: relative; }
/* mobile: cards stack and need the same side gutter as .wrap */
.rail-track { display: grid; grid-template-columns: 1fr; gap: 22px; padding-inline: 4vw; }

@media (min-width: 768px) {
  .rail {
    overflow: hidden;
    min-height: 74vh;
    display: flex;
    align-items: center;
  }
  /* Heading pinned together with the cards: stacks them as one block so
     there's no dead band between the copy and the rail. */
  .rail.rail-stage {
    flex-direction: column;
    align-items: stretch;      /* keep the track's left edge at 0 for the x-scrub maths */
    justify-content: center;
    min-height: 100vh;
    padding-top: calc(var(--head-h) + 10px);   /* clear the fixed header while pinned */
    padding-bottom: 18px;
    gap: clamp(14px, 2vw, 26px);
  }
  .rail-stage .rail-head { flex: 0 0 auto; }
  .rail-stage .section-head { margin-bottom: 0; }
  .rail-stage .rail-track { flex: 0 0 auto; }
  .rail-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    padding: 8px 6vw;
    gap: 26px;
  }
  .rail-track > * { flex: 0 0 clamp(300px, 30vw, 380px); }
  .rail-fade::before, .rail-fade::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 11vw;
    z-index: 4;
    pointer-events: none;
  }
  .rail-fade::before { left: 0; background: linear-gradient(90deg, var(--void), transparent); }
  .rail-fade::after { right: 0; background: linear-gradient(270deg, var(--void), transparent); }
}
.rail-hint {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 0;
}
.rail-hint::before { content: "◄ "; color: var(--red); }
.rail-hint::after { content: " ►"; color: var(--cyan); }
@media (min-width: 768px) { .rail-hint { display: block; } }

/* ---------- word-reveal (masked heading) ---------- */

.w { display: inline-block; overflow: hidden; vertical-align: top; }
.w > span { display: inline-block; will-change: transform; }

/* ---------- sticky blog filter bar ---------- */

.blog-filter.sticky-filter {
  position: sticky;
  top: 68px;
  z-index: 20;
  padding: 14px 0;
  margin-bottom: 26px;
  background: rgba(4, 7, 14, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

/* ---------- scan-line (scrub process indicator) ---------- */

.has-scanline { position: relative; }
.scanline-bar {
  position: absolute;
  top: -1px; left: 0;
  height: 2px;
  width: 100%;
  background: var(--grad);
  box-shadow: 0 0 14px var(--cyan-glow);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story { min-height: auto; }
  .rail { min-height: auto; overflow: visible; }
  .rail-track { display: grid; grid-template-columns: 1fr; width: auto; }
  .scanline-bar { transform: scaleX(1); }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .glitch::before, .glitch::after { display: none; }
  .ticker-track { animation: none; }
  .orb, .sec-num, [data-parallax] { transform: none !important; }
}
