/* ══════════════════════════════════════
   FERROS V4 — VISUAL-FIRST DESIGN
   ══════════════════════════════════════ */

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

:root {
  --brand-300: #5eead4;
  --brand-400: #2dd4bf;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --surface-0: #09090b;
  --surface-50: #0f0f12;
  --surface-100: #18181b;
  --surface-200: #27272a;
  --surface-300: #3f3f46;
  --surface-400: #71717a;
  --surface-500: #a1a1aa;
  --surface-600: #d4d4d8;
  --surface-700: #e4e4e7;
  --surface-800: #e4e4e7;
  --surface-900: #f4f4f5;
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.1);
  --border-hover: rgba(255,255,255,0.2);
  --border-brand: rgba(20,184,166,0.3);
  --r: 12px;
  --r-lg: 20px;
  --r-sm: 8px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--surface-0);
  color: var(--surface-700);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: 'JetBrains Mono', monospace; }
h1, h2, h3, h4 { color: var(--surface-900); line-height: 1.15; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  border-radius: var(--r-sm); font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s; border: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--brand-500); color: #fff; }
.btn-primary:hover { background: var(--brand-400); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(20,184,166,0.3); }
.btn-ghost { background: transparent; color: var(--surface-700); border: 1px solid var(--border-default); }
.btn-ghost:hover { border-color: var(--border-hover); color: var(--surface-900); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--r); }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; transition: all 0.3s;
  background: rgba(9,9,11,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { border-bottom-color: var(--border-subtle); padding: 12px 0; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 40px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--surface-500); transition: color 0.2s; }
.nav-links a:hover { color: var(--surface-900); }
.nav-ctas { display: flex; gap: 12px; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--surface-700); border-radius: 2px; transition: all 0.3s; }

.mobile-drawer {
  display: none; position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
  background: var(--surface-50); z-index: 200; transition: right 0.3s; border-left: 1px solid var(--border-subtle);
}
.mobile-drawer.open { right: 0; }
.mobile-drawer-inner { padding: 80px 24px 32px; display: flex; flex-direction: column; gap: 8px; }
.mobile-link { padding: 12px 16px; font-size: 1.1rem; font-weight: 500; color: var(--surface-700); border-radius: var(--r-sm); }
.mobile-link:hover { background: var(--surface-100); color: var(--surface-900); }
.mobile-ctas { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.mobile-ctas .btn { justify-content: center; }

/* ── HERO ── */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 120px 0 60px; overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black, transparent);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-tag-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--brand-400);
  margin-bottom: 24px; letter-spacing: 0.3px;
  padding: 8px 20px; border-radius: 100px;
  border: 1px solid var(--border-brand);
  background: rgba(20,184,166,0.06);
  transition: all 0.3s;
}
.hero-tag-link:hover {
  background: rgba(20,184,166,0.12);
  border-color: var(--brand-400);
  transform: translateY(-1px);
}
.hero-tag-arrow {
  transition: transform 0.2s;
}
.hero-tag-link:hover .hero-tag-arrow {
  transform: translateX(3px);
}
.hero-title {
  font-size: clamp(3rem, 7.5vw, 5.5rem); font-weight: 900;
  color: var(--surface-900); margin-bottom: 24px; letter-spacing: -0.03em;
}
.gradient-text {
  background: linear-gradient(135deg, var(--brand-300), var(--brand-500), var(--brand-300));
  background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--surface-600);
  max-width: 720px; margin: 0 auto 48px; line-height: 1.8;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── STAT REVEALS ── */
.stats-section { padding: 100px 0 80px; position: relative; overflow: hidden; }
.stats-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(20,184,166,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.stat-reveals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; z-index: 1; }

.stat-reveal {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px;
}
.stat-big {
  font-family: 'JetBrains Mono', monospace; font-weight: 800;
  font-size: clamp(2.8rem, 5vw, 4rem); color: var(--surface-900); line-height: 1;
  margin-bottom: 12px; letter-spacing: -0.02em;
}
.stat-glow {
  background: linear-gradient(135deg, var(--brand-300), var(--brand-500));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(20,184,166,0.4));
}
.stat-desc { font-size: 0.95rem; font-weight: 600; color: var(--surface-600); }

/* Infinity SVG stat */
.stat-infinity {
  width: 140px; height: clamp(2.8rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 20px rgba(45,212,191,0.5));
}
.infinity-svg { width: 100%; height: 100%; }

/* ── SECTIONS ── */
.section { padding: 120px 0; }
.section-dark { background: var(--surface-50); }
.section-tag { font-size: 0.85rem; font-weight: 700; color: var(--brand-400); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.section-title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; margin-bottom: 20px; letter-spacing: -0.02em; }
.section-sub-short { font-size: 1.1rem; color: var(--surface-600); max-width: 680px; line-height: 1.7; margin-bottom: 56px; }

/* ── LAYERS DIAGRAM ── */
.layers-diagram {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: 80px; max-width: 800px; margin-left: auto; margin-right: auto;
}
.layer {
  padding: 36px 32px; border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
}
.layer-edge {
  background: linear-gradient(135deg, rgba(20,184,166,0.04), rgba(20,184,166,0.01));
  border-color: var(--border-brand);
}
.layer-root {
  background: var(--surface-100);
  border-color: transparent;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.layer-root::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--root-border-angle, 0deg),
    rgba(251,191,36,0.4),
    rgba(245,158,11,0.15),
    rgba(251,191,36,0.05),
    rgba(245,158,11,0.15),
    rgba(251,191,36,0.4)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: root-border-spin 6s linear infinite;
  z-index: -1;
}
@property --root-border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes root-border-spin {
  to { --root-border-angle: 360deg; }
}
.layer-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.layer-badge {
  padding: 5px 14px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  background: rgba(20,184,166,0.15); color: var(--brand-400);
}
.layer-badge-root { background: rgba(255,255,255,0.06); color: var(--surface-500); }
.layer-timing { font-size: 0.8rem; color: var(--surface-500); }
.layer-desc { font-size: 0.9rem; color: var(--surface-500); line-height: 1.6; margin-top: 20px; }

/* Edge pairs */
.edge-pairs { display: flex; gap: 20px; flex-wrap: wrap; }
.edge-pair {
  display: flex; align-items: center; gap: 0; flex: 1; min-width: 180px;
  background: rgba(20,184,166,0.04); border: 1px solid rgba(20,184,166,0.12);
  border-radius: var(--r-sm); padding: 14px 16px;
}
.edge-node {
  font-size: 0.85rem; font-weight: 600; color: var(--surface-700);
  white-space: nowrap;
}
.edge-line {
  flex: 1; height: 2px; margin: 0 12px; position: relative;
  background: linear-gradient(90deg, var(--brand-400), rgba(20,184,166,0.3), var(--brand-400));
}
.edge-line-dot {
  position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-400); box-shadow: 0 0 8px rgba(20,184,166,0.6);
  animation: dot-slide 2s ease-in-out infinite;
}
@keyframes dot-slide {
  0%, 100% { left: 0; }
  50% { left: calc(100% - 8px); }
}
.edge-pair:nth-child(2) .edge-line-dot { animation-delay: 0.6s; }
.edge-pair:nth-child(3) .edge-line-dot { animation-delay: 1.2s; }

/* Root features */
.root-features { display: flex; gap: 8px; flex-wrap: wrap; }
.root-feat {
  padding: 6px 14px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
  background: var(--surface-200); color: var(--surface-600);
}

/* Connector */
.layer-connector {
  display: flex; align-items: center; gap: 16px; padding: 8px 0;
  justify-content: center;
}
.connector-track {
  width: 2px; height: 32px; position: relative; overflow: hidden;
  background: rgba(20,184,166,0.1); border-radius: 1px;
}
.connector-dot {
  position: absolute; left: -1px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand-400); box-shadow: 0 0 6px rgba(20,184,166,0.6);
  animation: flow-down 1.5s linear infinite;
}
.connector-dot-2 { animation-delay: 0.5s; }
.connector-dot-3 { animation-delay: 1s; }
@keyframes flow-down {
  0% { top: -4px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 32px; opacity: 0; }
}
.connector-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--surface-400);
}

/* ── NETTING REVEAL ── */
.netting-reveal {
  display: flex; align-items: center; justify-content: center; gap: 40px;
  margin-bottom: 16px;
}
.netting-left, .netting-right { text-align: center; }
.netting-number {
  font-family: 'JetBrains Mono', monospace; font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem); color: var(--surface-600);
}
.netting-one {
  color: var(--brand-400);
  font-size: clamp(3.5rem, 7vw, 6rem) !important;
  filter: drop-shadow(0 0 30px rgba(20,184,166,0.5));
}
.netting-label { font-size: 0.9rem; color: var(--surface-500); font-weight: 500; }
.netting-arrow-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0;
}
.netting-compress-line {
  width: 120px; height: 2px;
  background: linear-gradient(90deg, var(--surface-400), var(--brand-400));
  position: relative;
}
.netting-compress-line::after {
  content: '\2192'; position: absolute; right: -16px; top: -10px;
  font-size: 1.4rem; color: var(--brand-400);
}
.netting-arrow-text { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--surface-500); }
.netting-caption { text-align: center; color: var(--surface-500); font-size: 0.9rem; }

/* ── PROBLEMS ── */
.problems-visual { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.problem-item { text-align: center; padding: 40px 24px; }
.problem-visual-icon { height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.problem-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.problem-item p { color: var(--surface-500); font-size: 0.95rem; max-width: 280px; margin: 0 auto; }

/* Funnel (bottleneck) viz */
.funnel-viz { display: flex; align-items: center; gap: 0; }
.funnel-many {
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.funnel-tx {
  width: 32px; height: 3px; border-radius: 2px;
  background: var(--brand-400); opacity: 0.6;
  animation: funnel-flow 2s ease-in-out infinite;
}
.funnel-tx:nth-child(1) { width: 28px; animation-delay: 0s; }
.funnel-tx:nth-child(2) { width: 36px; animation-delay: 0.15s; }
.funnel-tx:nth-child(3) { width: 24px; animation-delay: 0.3s; }
.funnel-tx:nth-child(4) { width: 32px; animation-delay: 0.45s; }
.funnel-tx:nth-child(5) { width: 20px; animation-delay: 0.6s; }
@keyframes funnel-flow { 0%, 100% { opacity: 0.3; transform: translateX(0); } 50% { opacity: 0.8; transform: translateX(4px); } }
.funnel-neck {
  width: 36px; height: 50px; position: relative; margin: 0 2px;
  display: flex; align-items: center; justify-content: center;
}
.funnel-neck::before, .funnel-neck::after {
  content: ''; position: absolute; left: 0; right: 0;
  height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent;
}
.funnel-neck::before { top: 0; border-top: 14px solid rgba(248,113,113,0.2); }
.funnel-neck::after { bottom: 0; border-bottom: 14px solid rgba(248,113,113,0.2); }
.funnel-squeeze {
  width: 6px; height: 22px; background: rgba(248,113,113,0.4); border-radius: 3px;
  animation: squeeze-pulse 1.5s ease-in-out infinite;
}
@keyframes squeeze-pulse { 0%, 100% { background: rgba(248,113,113,0.3); } 50% { background: rgba(248,113,113,0.7); box-shadow: 0 0 12px rgba(248,113,113,0.4); } }
.funnel-out { display: flex; align-items: center; }
.funnel-tx-slow {
  width: 20px !important; height: 3px; background: rgba(248,113,113,0.4) !important;
  animation: funnel-slow 2s ease-in-out infinite !important;
}
@keyframes funnel-slow { 0%, 100% { opacity: 0.2; transform: translateX(0); } 50% { opacity: 0.5; transform: translateX(6px); } }

/* MEV viz */
.mev-viz { display: flex; align-items: center; gap: 6px; }
.mev-block {
  width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700;
}
.mev-1, .mev-2, .mev-3 { background: var(--surface-200); color: var(--surface-500); }
.mev-steal {
  background: rgba(248,113,113,0.15); color: #f87171; font-size: 1.2rem;
  animation: mev-bob 1s ease-in-out infinite;
}
@keyframes mev-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Friction viz */
.friction-viz { width: 160px; }
.friction-bar { height: 12px; border-radius: 6px; background: var(--surface-200); overflow: hidden; }
.friction-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--brand-500), #f87171);
  animation: friction-grow 3s ease-in-out infinite;
}
@keyframes friction-grow { 0% { width: 20%; } 50% { width: 100%; } 100% { width: 20%; } }
.friction-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.7rem; font-family: 'JetBrains Mono', monospace; color: var(--surface-500); }

/* ── TECH SHOWCASE ── */
.tech-showcase { margin-bottom: 64px; }
.tech-item {
  display: flex; align-items: flex-start; gap: 24px; padding: 32px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.tech-item:last-child { border-bottom: none; }
.tech-icon-wrap { flex-shrink: 0; }
.tech-icon-inner {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; font-weight: 800;
}
.tech-stablecoin { background: rgba(20,184,166,0.1); color: var(--brand-400); }
.tech-mev { background: rgba(248,113,113,0.1); color: #f87171; }
.tech-dag { background: rgba(192,132,252,0.1); color: #c084fc; }
.tech-clob { background: rgba(251,191,36,0.1); color: #fbbf24; }
.tech-text h3 { font-size: 1.2rem; margin-bottom: 6px; }
.tech-text p { color: var(--surface-600); font-size: 0.95rem; max-width: 600px; line-height: 1.6; }

/* ── COMPARISON TABLE ── */
.compare-block { margin-top: 16px; }
.compare-table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border-subtle); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare-table th, .compare-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
.compare-table th { background: var(--surface-100); color: var(--surface-500); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.compare-table td { color: var(--surface-600); }
.compare-table tr:last-child td { border-bottom: none; }
.row-label { color: var(--surface-700) !important; font-weight: 600; white-space: nowrap; }
.highlight-col { background: rgba(20,184,166,0.05) !important; color: var(--brand-300) !important; }
.highlight-col strong { color: var(--brand-300); }

/* ── SCALE RACE ── */
.scale-race { display: flex; flex-direction: column; gap: 14px; max-width: 900px; }
.scale-competitor, .scale-ferros { display: flex; flex-direction: column; gap: 6px; }
.scale-comp-header { display: flex; justify-content: space-between; align-items: baseline; }
.scale-comp-name { font-size: 0.9rem; font-weight: 600; color: var(--surface-600); }
.scale-comp-tps { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--surface-500); }
.scale-comp-ferros-name { color: var(--brand-400) !important; }
.scale-comp-ferros-tps { color: var(--brand-300) !important; font-weight: 700; }
.scale-bar-track { height: 32px; background: var(--surface-200); border-radius: 6px; overflow: hidden; position: relative; }
.scale-bar-fill {
  height: 100%; border-radius: 6px; min-width: 4px;
  width: 0; transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 12px;
}
.scale-bar-fill.animated { width: var(--target-width); }
.scale-bar-comp { background: var(--surface-300); min-width: 6px; }
.scale-bar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-500); }
.scale-bar-ferros { background: linear-gradient(90deg, var(--brand-700), var(--brand-500)); }
.scale-bar-glow { background: linear-gradient(90deg, var(--brand-600), var(--brand-400)); box-shadow: 0 0 30px rgba(20,184,166,0.3); }
.scale-bar-value { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 700; color: #fff; white-space: nowrap; }
.scale-divider {
  text-align: center; padding: 20px 0 12px; position: relative;
}
.scale-divider span {
  font-size: 0.85rem; font-weight: 700; color: var(--brand-400);
  text-transform: uppercase; letter-spacing: 1.5px;
  background: var(--surface-50); padding: 0 16px; position: relative; z-index: 1;
}
.scale-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
}
.scale-footnote { text-align: center; margin-top: 24px; font-size: 0.9rem; color: var(--surface-500); }
.scale-ferros-final .scale-comp-tps { font-size: 1rem; }

/* ── AGENT SECTION ── */
.agent-showcase { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 48px; }
.agent-feature {
  display: flex; gap: 16px; align-items: flex-start; padding: 24px;
  border-radius: var(--r); border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}
.agent-feature:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.af-icon {
  width: 40px; height: 40px; flex-shrink: 0; margin-top: 2px;
  color: var(--brand-400);
}
.af-icon svg { width: 100%; height: 100%; }
.agent-feature h3 { font-size: 1rem; margin-bottom: 4px; }
.agent-feature p { color: var(--surface-600); font-size: 0.9rem; line-height: 1.5; }

/* ── CODE WINDOWS ── */
.code-window {
  background: var(--surface-100); border: 1px solid var(--border-subtle);
  border-radius: var(--r); overflow: hidden;
}
.code-window-lg { max-width: 700px; }
.code-chrome {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface-50); border-bottom: 1px solid var(--border-subtle);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-300); }
.code-title { font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; color: var(--surface-500); }
.code-window pre { padding: 24px; overflow-x: auto; font-size: 0.85rem; line-height: 1.8; }
.code-window code { color: var(--surface-700); }
.c-kw { color: #c084fc; }
.c-type { color: var(--brand-400); }
.c-fn { color: #fbbf24; }
.c-num { color: #f87171; }
.c-comment { color: var(--surface-400); }
.c-str { color: #86efac; }

.agent-code-block { max-width: 600px; margin-left: auto; margin-right: auto; }
.code-caption-big { margin-top: 16px; font-size: 0.9rem; color: var(--surface-500); }
.code-caption-big code { background: var(--surface-100); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; color: var(--brand-400); }

/* ── CUDO ── */
.cudo-visual { display: flex; flex-direction: column; gap: 48px; }
.cudo-flow { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.cudo-flow-item { display: flex; align-items: center; gap: 12px; }
.cudo-flow-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 700;
  padding: 8px 20px; border-radius: 8px; background: var(--surface-200); color: var(--brand-400);
}
.cudo-flow-arrow { color: var(--surface-400); font-size: 1.2rem; }
.cudo-flow-dest { font-size: 0.85rem; color: var(--surface-600); font-weight: 500; }
.cudo-code-block { max-width: 700px; margin: 0 auto; }
.cudo-cta { text-align: center; margin-top: 48px; }
.btn-cudo {
  background: linear-gradient(135deg, var(--brand-500), #8b5cf6);
  color: #fff;
  border: none;
}
.btn-cudo:hover {
  background: linear-gradient(135deg, var(--brand-400), #a78bfa);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139,92,246,0.3);
}

/* ── ECONOMICS ── */
.econ-container { text-align: center; }
.econ-container .section-title { text-align: center; }
.econ-two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 80px; text-align: center; }
.econ-col {
  padding: 48px 32px; border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
  background: var(--surface-50);
}
.econ-header {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.econ-stable { color: var(--brand-400); }
.econ-frs { color: #c084fc; }
.econ-big-number {
  font-family: 'JetBrains Mono', monospace; font-weight: 900;
  font-size: clamp(3rem, 8vw, 5rem); margin-bottom: 12px;
  background: linear-gradient(135deg, var(--brand-300), var(--brand-500));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1;
}
.econ-pct { font-size: 0.5em; }
.econ-col p { color: var(--surface-600); font-size: 0.95rem; max-width: 320px; margin: 0 auto; line-height: 1.6; }

/* Flywheel */
.flywheel-viz { text-align: center; }
.fw-title { font-size: 1.5rem; font-weight: 800; color: var(--surface-900); margin-bottom: 40px; }
.fw-ring { position: relative; width: 400px; height: 400px; margin: 0 auto 32px; }
.fw-arrows { position: absolute; inset: 0; width: 100%; height: 100%; }
.fw-node {
  position: absolute; padding: 10px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  color: var(--surface-700); background: var(--surface-100); border: 1px solid var(--border-subtle);
  white-space: nowrap; transform: translate(-50%, -50%);
}
.fw-n1 { top: 5%; left: 50%; }
.fw-n2 { top: 35%; left: 95%; }
.fw-n3 { top: 80%; left: 80%; }
.fw-n4 { top: 80%; left: 20%; }
.fw-n5 { top: 35%; left: 5%; }
.fw-punchline {
  font-family: 'JetBrains Mono', monospace; font-size: 1rem; color: var(--brand-400);
}
.fw-punchline strong { color: var(--surface-900); }

/* ── CTA ── */
.section-cta { text-align: center; }
.cta-title { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 12px; }
.cta-sub { font-size: 1.1rem; color: var(--surface-600); margin-bottom: 48px; }
.cta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.cta-card {
  padding: 40px 28px; border-radius: var(--r-lg);
  background: var(--surface-100); border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}
.cta-card:hover { border-color: var(--border-brand); transform: translateY(-4px); }
.cta-icon {
  width: 36px; height: 36px; margin-bottom: 16px;
  color: var(--brand-400);
}
.cta-icon svg { width: 100%; height: 100%; }
.cta-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.cta-card p { color: var(--surface-600); font-size: 0.9rem; }

/* ── FOOTER ── */
.footer { background: var(--surface-0); border-top: 1px solid var(--border-subtle); padding: 64px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; margin-bottom: 48px; }
.footer-brand { max-width: 280px; }
.footer-brand img { margin-bottom: 12px; }
.footer-brand p { color: var(--surface-500); font-size: 0.9rem; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--surface-500); margin-bottom: 8px; }
.footer-col a { color: var(--surface-600); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--surface-900); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: 24px; }
.footer-bottom p { color: var(--surface-400); font-size: 0.8rem; }

/* ── SCROLL ANIMATIONS ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stat-reveals { grid-template-columns: repeat(2, 1fr); gap: 48px; }
  .fw-ring { width: 300px; height: 300px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-ctas { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-drawer { display: block; }
  .section { padding: 80px 0; }
  .hero-title { font-size: 2.6rem; }
  .stat-reveals { grid-template-columns: 1fr 1fr; gap: 40px; }
  .problems-visual { grid-template-columns: 1fr; gap: 16px; }
  .problem-item { padding: 24px; }
  .problem-visual-icon { height: 80px; }
  .agent-showcase { grid-template-columns: 1fr; }
  .econ-two-col { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.8rem; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
  .network-viz { height: 300px; }
  .netting-reveal { flex-direction: column; gap: 20px; }
  .netting-compress-line { width: 2px; height: 40px; background: linear-gradient(180deg, var(--surface-400), var(--brand-400)); }
  .netting-compress-line::after { content: '\2193'; right: -8px; top: auto; bottom: -16px; }
  .cudo-flow { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .fw-ring { width: 100%; max-width: 300px; height: 300px; }
  .scale-race { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .stat-reveals { grid-template-columns: 1fr; gap: 32px; }
  .infinity-container { width: 160px; height: 80px; }
}
