*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #191127;
  --bg-panel: #180f26;
  --bg-card: #23133a;
  --bg-card-hover: #1f1232;
  --border: #3a1c63;
  --border-glow: #5e309d;
  --cyan: #883CF0;
  --cyan-dim: #873cf026;
  --green: #34d399;
  --green-dim: #34d39944;
  --amber: #fbbf24;
  --amber-dim: #fbbf2444;
  --red: #f87171;
  --red-dim: #f8717144;
  --blue: #60a5fa;
  --blue-bright: #3b82f6;
  --purple: #a78bfa;
  --text: #e2e8f0;
  --text-dim: #d6d6d6;
  --text-muted: #d6d6d6;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* === GRID BACKGROUND === */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, #3a1c63 0%, transparent 70%);
}

/* === SCANLINE === */
.scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
  animation: scanDown 6s linear infinite;
  z-index: 1000;
  pointer-events: none;
}

@keyframes scanDown {
  0% { top: -2px; }
  100% { top: 100vh; }
}

/* === CONTAINER === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* === NAV === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: #180f26;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

nav .nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 6px;
  color: var(--cyan);
  text-transform: uppercase;
  position: relative;
}

.logo::after {
  content: '▮';
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
  color: var(--cyan);
}

@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s;
  font-family: 'JetBrains Mono', monospace;
}

.nav-links a:hover { color: var(--cyan); }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--green-dim); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
}

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -2px;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero h1 .accent { color: var(--cyan); }
.hero h1 .dim { color: var(--text-muted); }

.hero-desc {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === LIVE STATS BAR === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 80px;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

.stat-cell {
  background: var(--bg-panel);
  padding: 28px 24px;
  text-align: center;
  transition: background 0.3s;
  cursor: default;
}

.stat-cell:hover { background: var(--bg-card-hover); }

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
}

.stat-value.cyan { color: var(--cyan); }
.stat-value.green { color: var(--green); }
.stat-value.amber { color: var(--amber); }
.stat-value.blue { color: var(--blue); }

/* === SECTION HEADERS === */
.section-header {
  margin-bottom: 56px;
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}

section { padding: 100px 0; }

/* === ARCHITECTURE DIAGRAM === */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.arch-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arch-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}

.arch-node::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: transform 0.35s;
}

.arch-node:hover::before,
.arch-node.active::before { transform: scaleX(1); }

.arch-node:hover,
.arch-node.active {
  background: var(--bg-card-hover);
  border-color: var(--cyan-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px #8f22ee11;
}

.arch-node .node-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.arch-node .node-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.arch-node .node-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.arch-center {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.arch-center::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan-dim), transparent 40%, transparent 60%, #5e309d);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.core-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.core-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 12px;
}

.core-desc {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 340px;
  margin: 0 auto 24px;
}

.arch-pulse {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid var(--cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  position: relative;
  animation: rotateRing 12s linear infinite;
}

.arch-pulse::before, .arch-pulse::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--cyan-dim);
}

.arch-pulse::before {
  inset: -20px;
  animation: rotateRing 18s linear infinite reverse;
}

.arch-pulse::after {
  inset: -40px;
  animation: rotateRing 24s linear infinite;
  border-color: #5e309d;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.arch-pulse-inner {
  font-size: 36px;
  animation: none;
}

/* === LIVE THREAT FEED === */
.threat-feed {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.feed-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.feed-controls {
  display: flex;
  gap: 8px;
}

.feed-btn {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.feed-btn:hover, .feed-btn.active {
  background: var(--cyan);
  color: var(--bg-deep);
  border-color: var(--cyan);
}

.feed-body {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.feed-row {
  display: grid;
  grid-template-columns: 80px 100px 1fr 120px 100px;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid #3a1c63;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  transition: background 0.2s;
  align-items: center;
  animation: rowSlide 0.4s ease-out;
}

@keyframes rowSlide {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.feed-row:hover { background: var(--bg-card-hover); }

.severity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.severity.critical { background: var(--red-dim); color: var(--red); }
.severity.high { background: var(--amber-dim); color: var(--amber); }
.severity.medium { background: #3b82f644; color: var(--blue); }
.severity.low { background: var(--green-dim); color: var(--green); }

.feed-source { color: var(--text-dim); }
.feed-event { color: var(--text); }
.feed-ip { color: var(--text-muted); }
.feed-time { color: var(--text-muted); text-align: right; }

/* === FEATURES === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 28px;
  transition: all 0.4s;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: scaleX(0);
  transition: transform 0.4s;
}

.feature-card:hover::after { transform: scaleX(1); }

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.333);
}

.feature-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #7c5cfc1f;
  border: 1px solid var(--cyan-dim);
  border-radius: 12px;
  font-size: 22px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* === INTERACTIVE PIPELINE === */
.pipeline {
  display: flex;
  gap: 0;
  align-items: stretch;
  position: relative;
  margin: 40px 0;
}

.pipeline-step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.pipeline-step:first-child { border-radius: 12px 0 0 12px; }
.pipeline-step:last-child { border-radius: 0 12px 12px 0; }

.pipeline-step.lit {
  background: var(--bg-card-hover);
  border-color: var(--cyan-dim);
}

.pipeline-step.lit .pipe-num { color: var(--cyan); border-color: var(--cyan); }

.pipe-num {
  font-family: 'JetBrains Mono', monospace;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 13px;
  margin: 0 auto 14px;
  color: var(--text-muted);
  transition: all 0.3s;
}

.pipe-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.pipe-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.pipe-arrow {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: var(--text-muted);
  font-size: 16px;
}

/* === MINI CHARTS === */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 60px;
}

.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.chart-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
}

.bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  transition: height 1s ease;
  position: relative;
  cursor: pointer;
}

.bar:hover { filter: brightness(1.3); }

.bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}

.donut-chart {
  display: flex;
  align-items: center;
  gap: 32px;
}

.donut-svg { width: 140px; height: 140px; }

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
}

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
}

.footer-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  letter-spacing: 6px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .arch-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .pipeline { flex-direction: column; }
  .pipeline-step:first-child { border-radius: 12px 12px 0 0; }
  .pipeline-step:last-child { border-radius: 0 0 12px 12px; }
  .pipe-arrow { display: none; }
  .chart-row { grid-template-columns: 1fr; }
  .feed-row { grid-template-columns: 80px 1fr 100px; }
  .feed-source, .feed-ip { display: none; }
  .nav-links { display: none; }
}