/* ─── DESIGN TOKENS ──────────────────────────────────────────────────────── */
:root {
  /* Surface palette — deeper purple-blue base with vibrant accents */
  --bg: #0a0a14;
  --bg-2: #0f1020;
  --bg-elev: #14152a;
  --surface: #181a32;
  --surface-2: #1f2240;
  --border: rgba(167, 139, 250, 0.12);
  --border-strong: rgba(167, 139, 250, 0.28);

  /* Vibrant accents */
  --violet: #a78bfa;
  --violet-2: #7c3aed;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --pink: #f472b6;
  --amber: #f59e0b;
  --green: #10b981;
  --red: #ef4444;

  --text: #d6d8e6;
  --text-mid: #9ca3b8;
  --text-mute: #6b7090;
  --text-heading: #ffffff;

  /* Hero gradient — drives many accents */
  --grad-primary: linear-gradient(120deg, #22d3ee 0%, #a78bfa 60%, #f472b6 100%);
  --grad-soft:    linear-gradient(120deg, rgba(34,211,238,.15) 0%, rgba(167,139,250,.15) 100%);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --section-pad: 120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

a { color: var(--violet); text-decoration: none; transition: color .18s; }
a:hover { color: var(--cyan); }
code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cyan);
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

/* ─── BACKGROUND MESH (PARALLAX BASE) ────────────────────────────────────── */
.mesh {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.mesh-1 {
  background:
    radial-gradient(60% 40% at 12% 18%, rgba(124,58,237,0.35) 0%, transparent 60%),
    radial-gradient(50% 35% at 88% 12%, rgba(34,211,238,0.20) 0%, transparent 60%);
  filter: blur(60px);
}
.mesh-2 {
  background:
    radial-gradient(40% 30% at 78% 70%, rgba(244,114,182,0.18) 0%, transparent 60%),
    radial-gradient(55% 40% at 18% 80%, rgba(124,58,237,0.18) 0%, transparent 60%);
  filter: blur(70px);
}
.mesh-3 {
  background-image:
    linear-gradient(rgba(167,139,250,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 90%);
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,20,0.72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 28px; height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(167,139,250,0.45));
  object-fit: contain;
}
.brand-name { font-weight: 800; letter-spacing: 2.5px; color: var(--text-heading); font-size: 16px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-mid); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--violet); }
.nav-gh {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent !important;
  font-weight: 700 !important;
}

/* ─── HERO · INTEGRATION SHOWCASE ─────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 110px 32px 80px;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167,139,250,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 30%, transparent 80%);
  z-index: 0;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.65;
  pointer-events: none;
  will-change: transform;
}
.hero-orb-1 { top: 10%; left: -80px;  background: radial-gradient(circle, var(--violet-2) 0%, transparent 70%); }
.hero-orb-2 { top: 30%; right: -100px; background: radial-gradient(circle, var(--cyan-2)  0%, transparent 70%); }
.hero-orb-3 { bottom: 5%; left: 30%;  background: radial-gradient(circle, var(--pink)    0%, transparent 70%); opacity: 0.5; }

/* ─ Hero stage: single SVG with both wires and cards in shared coords ───── */
.stage-wrap {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto 60px;
  z-index: 2;
  will-change: transform;
}
.stage-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* Column labels — sit above each side */
.stage-label {
  fill: var(--text-mute);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.stage-label-right { text-anchor: end; }

/* Wires fade in, then a slow stroke-dash flow gives the impression of data
   moving through. Each wire gets a slightly different delay so the animation
   reads as a fan-in / fan-out rather than a single coordinated pulse. */
.wire {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
  opacity: 0;
  animation: wire-fade-in 1s ease forwards, wire-flow 4.5s linear infinite;
}
.wire-in  { stroke: url(#wire-in); }
.wire-out { stroke: url(#wire-out); }
.wires-in .wire:nth-child(1) { animation-delay: .25s, 0s; }
.wires-in .wire:nth-child(2) { animation-delay: .35s, .2s; }
.wires-in .wire:nth-child(3) { animation-delay: .45s, .4s; }
.wires-in .wire:nth-child(4) { animation-delay: .55s, .6s; }
.wires-in .wire:nth-child(5) { animation-delay: .65s, .8s; }
.wires-out .wire:nth-child(1) { animation-delay: .75s, .1s; }
.wires-out .wire:nth-child(2) { animation-delay: .85s, .3s; }
.wires-out .wire:nth-child(3) { animation-delay: .95s, .5s; }
.wires-out .wire:nth-child(4) { animation-delay: 1.05s, .7s; }
.wires-out .wire:nth-child(5) { animation-delay: 1.15s, .9s; }
.wires-out .wire:nth-child(6) { animation-delay: 1.25s, 1.1s; }
@keyframes wire-fade-in { to { opacity: 1; } }
@keyframes wire-flow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -200; } /* negative so flow direction matches data path */
}

/* Wires in the OUT group flow the opposite direction (positive offset) so the
   visual reads as data leaving the core toward the right-hand tools. */
.wire-out { animation: wire-fade-in 1s ease forwards, wire-flow-out 4.5s linear infinite; }
@keyframes wire-flow-out {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}

/* Connector dots — static after fade-in; no pulse so the diagram reads cleanly */
.conn-dot {
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7));
  opacity: 0;
  animation: dot-fade 1s ease 1.4s forwards;
}
.conn-dot-tool {
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
}
@keyframes dot-fade { to { opacity: 1; } }

/* SVG card text styling */
.ep-name {
  fill: var(--text-heading);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.ep-os {
  fill: var(--text-mute);
  font-family: var(--font);
  font-size: 11px;
}
.tool-name {
  fill: var(--text-heading);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
}
.tool-sub {
  fill: var(--text-mute);
  font-family: var(--font);
  font-size: 10.5px;
}

/* Cards animate in via opacity ONLY.
 *
 * SVG <g> elements use the `transform` ATTRIBUTE for layout positioning
 * (e.g. transform="translate(30 76)"). Setting CSS `transform` on the same
 * element overrides that attribute, collapsing every card to (0,0) and
 * stacking them on top of each other. We learned this the hard way — a
 * `transform: translate(0,0)` keyframe was hiding 10 of the 11 cards.
 *
 * So: opacity-only fade for the entrance, and a `filter: brightness()` on
 * hover instead of a translate. This preserves SVG positioning fully. */
.ep-card, .tool-card {
  opacity: 0;
  animation: card-fade-in .7s ease forwards;
  cursor: pointer;
  transition: filter .25s ease;
}
.ep-card:hover, .tool-card:hover { filter: brightness(1.18); }
.cards-fleet .ep-card:nth-of-type(1)  { animation-delay: .15s; }
.cards-fleet .ep-card:nth-of-type(2)  { animation-delay: .22s; }
.cards-fleet .ep-card:nth-of-type(3)  { animation-delay: .29s; }
.cards-fleet .ep-card:nth-of-type(4)  { animation-delay: .36s; }
.cards-fleet .ep-card:nth-of-type(5)  { animation-delay: .43s; }
.cards-tools .tool-card:nth-of-type(1) { animation-delay: .55s; }
.cards-tools .tool-card:nth-of-type(2) { animation-delay: .62s; }
.cards-tools .tool-card:nth-of-type(3) { animation-delay: .69s; }
.cards-tools .tool-card:nth-of-type(4) { animation-delay: .76s; }
.cards-tools .tool-card:nth-of-type(5) { animation-delay: .83s; }
.cards-tools .tool-card:nth-of-type(6) { animation-delay: .90s; }
@keyframes card-fade-in {
  to { opacity: 1; }
}

/* Endpoint pulse dot inside SVG cards */
.ep-pulse {
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.7));
  animation: ep-pulse 2s ease-in-out infinite;
}
@keyframes ep-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Core: rotating outer ring + label */
.core-ring-2 { animation: ring-spin 28s linear infinite; transform-origin: 620px 300px; }
.core-ring-3 { animation: ring-spin 38s linear infinite reverse; transform-origin: 620px 300px; }
@keyframes ring-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.core-name {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 5px;
  fill: url(#core-mark);
  text-anchor: middle;
}
.core-sub {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--text-mute);
  text-anchor: middle;
  letter-spacing: 1.2px;
}

/* ─── HERO COPY ──────────────────────────────────────────────────────────── */
.hero-copy {
  text-align: center;
  max-width: 920px;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .4px;
  color: var(--violet);
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  margin-bottom: 28px;
}
.badge-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(34,211,238,0.7);
  animation: ep-pulse 2s infinite;
}
.hero-h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--text-heading);
  margin-bottom: 28px;
}
.hero-h1 .word {
  display: inline-block;
  margin-right: 0.18em;
  opacity: 0;
  transform: translateY(40px);
  animation: word-pop 1s cubic-bezier(.2,.8,.2,1) forwards;
}
.hero-h1 .word:nth-child(1) { animation-delay: .1s; }
.hero-h1 .word:nth-child(2) { animation-delay: .18s; }
.hero-h1 .word:nth-child(3) { animation-delay: .26s; }
.hero-h1 .word:nth-child(4) { animation-delay: .34s; }
.hero-h1 .word:nth-child(5) { animation-delay: .44s; }
.hero-h1 .word:nth-child(6) { animation-delay: .52s; }
@keyframes word-pop {
  to { opacity: 1; transform: translateY(0); }
}
.hero-h1 .grad {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 30px rgba(167,139,250,0.45));
}
.hero-sub {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.7;
  color: var(--text);
  max-width: 760px;
  margin: 0 auto 36px;
  opacity: 0;
  animation: fade-up 1s ease .65s forwards;
}
.hero-cta {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
  opacity: 0;
  animation: fade-up 1s ease .8s forwards;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--grad-primary);
  color: #0a0a14;
  box-shadow: 0 8px 28px rgba(167,139,250,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(167,139,250,0.50); }
.btn-primary .arr { transition: transform .2s; }
.btn-primary:hover .arr { transform: translateX(4px); }
.btn-ghost {
  background: rgba(167,139,250,0.06);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { color: var(--cyan); border-color: var(--cyan); }

.hero-stack {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  max-width: 760px;
  margin: 0 auto;
  opacity: 0;
  animation: fade-up 1s ease .95s forwards;
}
.hero-stack > div {
  padding: 0 18px;
  display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--border);
}
.hero-stack > div:last-child { border-right: none; }
.stack-num {
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stack-label { font-size: 12px; color: var(--text-mute); letter-spacing: .4px; }

/* ─── SECTIONS ───────────────────────────────────────────────────────────── */
.section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 2;
}
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 22px;
}
.section-h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.018em;
  color: var(--text-heading);
  margin-bottom: 24px;
  max-width: 880px;
}
.section-h2 .grad {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 22px rgba(167,139,250,0.35));
}
.section-lead {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 760px;
  margin-bottom: 56px;
}
.section-lead em { color: var(--text); font-style: italic; }
.section-lead strong { color: var(--text-heading); font-weight: 600; }

/* ─── REVEAL ON SCROLL ───────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s); }
.in-view .reveal-up, .reveal-up.in-view { opacity: 1; transform: translateY(0); }

/* ─── PROBLEM ────────────────────────────────────────────────────────────── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.problem-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.problem-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .3s;
}
.problem-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.problem-card:hover::before { opacity: 0.5; }
.problem-card > * { position: relative; z-index: 1; }
.problem-icon {
  font-size: 28px;
  margin-bottom: 14px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.problem-card h3 { font-size: 16px; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.problem-card p  { font-size: 13.5px; color: var(--text-mid); line-height: 1.6; }

/* ─── INTEGRATE ──────────────────────────────────────────────────────────── */
.flow-rail {
  display: flex; align-items: stretch; gap: 0;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.rail-step {
  flex: 1; min-width: 240px;
  display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
}
.rail-num {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-primary); color: #0a0a14;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(167,139,250,0.4);
}
.rail-body strong { display: block; color: var(--text-heading); font-size: 15.5px; font-weight: 700; }
.rail-body span   { display: block; font-size: 13px; color: var(--text-mid); margin-top: 5px; line-height: 1.55; }
.rail-link {
  flex: 0 0 36px;
  position: relative;
}
.rail-link::before {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  transform: translateY(-50%);
}
@media (max-width: 760px) {
  .rail-link { display: none; }
}

.integration-targets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.target-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color .25s, transform .25s;
}
.target-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.target-icon {
  font-size: 24px; flex-shrink: 0;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.target-card strong { display: block; color: var(--text-heading); font-size: 14.5px; font-weight: 700; }
.target-card span   { display: block; font-size: 12.5px; color: var(--text-mid); margin-top: 4px; line-height: 1.55; }

/* ─── ARCHITECTURE ───────────────────────────────────────────────────────── */
.how-arch { display: flex; flex-direction: column; gap: 0; }
.arch-row {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}
.arch-tools { border-color: rgba(245,158,11,0.22); }
.arch-cp    { border-color: rgba(34,211,238,0.30); }
.arch-agent { border-color: rgba(167,139,250,0.30); }
.arch-row-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.arch-cells { display: flex; gap: 8px; flex-wrap: wrap; }
.cell {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.cell-cp    { color: #67e8f9; border-color: rgba(34,211,238,0.30); }
.cell-agent { color: #c4b5fd; border-color: rgba(167,139,250,0.30); }
.cell-os    { color: var(--text-mid); }
.arch-arrow {
  text-align: center;
  font-size: 11.5px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-family: var(--mono);
  letter-spacing: .8px;
  padding: 10px 0;
}

/* ─── ATTACK PATH VISUALIZATION ──────────────────────────────────────────── */
.ap-viz {
  position: relative;
  background: linear-gradient(180deg, #fbfbfd 0%, #f3f4fb 100%);
  border: 1px solid rgba(167,139,250,0.30);
  border-radius: 18px;
  padding: 28px 36px 36px;
  box-shadow: 0 30px 80px rgba(10,10,30,0.45), inset 0 1px 0 rgba(255,255,255,0.6);
  margin-bottom: 36px;
  overflow: hidden;
}
.ap-grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(124,58,237,0.20) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  opacity: 0.55;
}
.ap-svg {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.ap-topo {
  fill: none;
  stroke: url(#topo-stroke);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 6 7;
  opacity: 0;
  animation: topo-fade-in 1.4s ease .35s forwards;
}
@keyframes topo-fade-in { to { opacity: 0.85; } }

.ap-active {
  fill: none;
  stroke: url(#active-stroke);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(239,68,68,0.55));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: active-draw 2.2s cubic-bezier(.4,0,.2,1) 1s forwards;
}
.ap-paths-active path:nth-child(2) { animation-delay: 1.3s; }
.ap-paths-active path:nth-child(3) { animation-delay: 1.55s; }
@keyframes active-draw { to { stroke-dashoffset: 0; } }

.ap-node-label {
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  fill: #1f2937;
  text-anchor: middle;
}
.ap-node-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: #6b7280;
  text-anchor: middle;
}
.ap-node {
  transform-origin: center;
  transition: transform .25s;
  cursor: pointer;
}
.ap-node:hover { transform: scale(1.06); }
.ap-active-node circle:first-child {
  filter: url(#node-shadow) drop-shadow(0 0 10px rgba(239,68,68,0.35));
}

.ap-legend {
  display: flex; gap: 20px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(167,139,250,0.18);
  font-size: 12.5px;
  color: #4b5563;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ap-legend > div { display: flex; align-items: center; gap: 8px; }
.legend-swatch { display: inline-block; width: 22px; height: 3px; border-radius: 2px; }
.swatch-topo   { background: rgba(140,150,170,0.6); }
.swatch-active { background: linear-gradient(90deg, #ef4444, #f97316, #ef4444); box-shadow: 0 0 6px rgba(239,68,68,0.6); }
.ap-meta { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: #6b7280; }
.ap-meta strong { color: #1f2937; font-weight: 700; }

.ap-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.ap-feature {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--cyan), var(--violet)) 1;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.6;
  display: flex; flex-direction: column; gap: 6px;
}
.ap-feature strong { color: var(--text-heading); font-size: 13.5px; font-weight: 700; }

/* ─── PILLARS ────────────────────────────────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.pillar {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.pillar::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity .25s;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.pillar:hover::after { opacity: 1; }
.pillar-num {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 1.4px;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.pillar h3 { font-size: 18px; font-weight: 700; color: var(--text-heading); margin-bottom: 10px; }
.pillar p  { font-size: 13.5px; color: var(--text-mid); line-height: 1.65; }

/* ─── ROADMAP INFOGRAPHIC ────────────────────────────────────────────────── */
.rm-track {
  position: relative;
  padding: 60px 0 0;
}
.rm-line {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 120px;
  pointer-events: none;
}
.rm-path {
  fill: none;
  stroke: url(#rm-grad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
  filter: drop-shadow(0 4px 16px rgba(167,139,250,0.35));
}
.rm-stops {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}
.rm-stop { display: flex; flex-direction: column; align-items: center; }
.rm-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  position: relative;
}
.rm-dot span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-mute);
}
.rm-done .rm-dot { border-color: var(--green); background: rgba(16,185,129,0.10); }
.rm-done .rm-dot span { background: var(--green); }
.rm-active .rm-dot {
  border-color: var(--violet);
  background: rgba(167,139,250,0.10);
  box-shadow: 0 0 0 0 rgba(167,139,250,0.55);
  animation: dot-pulse 2.4s infinite;
}
.rm-active .rm-dot span { background: var(--violet); }
@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(167,139,250,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(167,139,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(167,139,250,0); }
}
.rm-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  width: 100%;
}
.rm-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.rm-done .rm-tag   { color: var(--green); }
.rm-active .rm-tag {
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.rm-card h4 { font-size: 14.5px; font-weight: 700; color: var(--text-heading); margin-bottom: 6px; }
.rm-card p  { font-size: 12.5px; color: var(--text-mid); line-height: 1.55; }

/* ─── CTA ────────────────────────────────────────────────────────────────── */
.section-cta { background: linear-gradient(180deg, transparent 0%, rgba(124,58,237,0.06) 100%); }
.section-cta h2 { max-width: 720px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.footer { background: var(--bg-elev); border-top: 1px solid var(--border); padding: 60px 0 0; position: relative; z-index: 2; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 48px;
}
.footer-brand p { font-size: 13px; color: var(--text-mid); margin-top: 16px; line-height: 1.65; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-head { font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-heading); margin-bottom: 14px; }
.footer-cols a { display: block; padding: 5px 0; font-size: 13px; color: var(--text-mid); }
.footer-cols a:hover { color: var(--violet); }
.footer-line { border-top: 1px solid var(--border); padding: 18px 0; }
.footer-line-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-mute);
  flex-wrap: wrap; gap: 12px;
}
.footer-status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot-green { background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,0.55); }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  /* Stage SVG scales with the viewport via viewBox + preserveAspectRatio,
     so we just shrink the container max-width. Below ~720 the SVG cards get
     too small to read; we hide labels on the smallest viewports. */
  .stage-wrap { max-width: 100%; }
}
@media (max-width: 900px) {
  .nav-links a:not(.nav-gh) { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-stack { grid-template-columns: repeat(2, 1fr); }
  .hero-stack > div { border-bottom: 1px solid var(--border); padding: 14px 16px; }
  .hero-stack > div:nth-child(2n) { border-right: none; }
  .hero-stack > div:nth-last-child(-n+2) { border-bottom: none; }
  .rm-stops { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .rm-line { display: none; }
}
@media (max-width: 720px) {
  /* Below this width the in-SVG card text goes sub-readable. The SVG itself
     still works as a high-level diagram, just less detailed. */
  .ep-os, .tool-sub { display: none; }
}

@media (max-width: 600px) {
  :root { --section-pad: 80px; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 12px 20px; }
  .hero { padding: 70px 16px 60px; }
  .ap-viz { padding: 16px 12px 20px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .rail-step { min-width: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .reveal-up { opacity: 1 !important; transform: none !important; }
}
