/* ═══════════════════════════════════════════════════════════
   ShakesVerse — Design System
   Inspired by Active Theory's immersive approach
   ═══════════════════════════════════════════════════════════ */

/* ─── Tokens ─── */
:root {
  --bg:       #030508;
  --bg-card:  rgba(255,255,255,0.025);
  --bg-glass: rgba(8,14,28,0.65);
  --border:   rgba(255,255,255,0.06);
  --border-h: rgba(255,255,255,0.12);

  --text:     #e2e8f0;
  --text-2:   rgba(255,255,255,0.55);
  --text-3:   rgba(255,255,255,0.3);

  --cyan:     #38bdf8;
  --blue:     #3b82f6;
  --purple:   #a78bfa;
  --amber:    #f59e0b;
  --red:      #ef4444;
  --green:    #22c55e;
  --pink:     #f472b6;

  --cyan-dim:   rgba(56,189,248,0.08);
  --red-dim:    rgba(239,68,68,0.08);
  --amber-dim:  rgba(245,158,11,0.08);
  --green-dim:  rgba(34,197,94,0.08);
  --purple-dim: rgba(167,139,250,0.08);

  --sans:  'Inter', -apple-system, system-ui, sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: auto; /* Lenis handles this */ }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── WebGL Canvas ─── */
#webgl-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ═══ LOADER ═══ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}
.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner { text-align: center; }
.loader-ring {
  width: 48px; height: 48px; margin: 0 auto 24px;
  border: 2px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--text-2);
  margin-bottom: 16px;
}
.loader-bracket { color: var(--cyan); }
.loader-bar {
  width: 200px; height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}
.loader-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 1px;
  animation: loaderFill 2s var(--ease-out) forwards;
}
@keyframes loaderFill { to { width: 100%; } }

/* ═══ NAVIGATION ═══ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: all 0.4s var(--ease-out);
}
.nav.scrolled {
  padding: 12px 40px;
  background: rgba(3,5,8,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img {
  width: 24px; height: 24px;
  filter: drop-shadow(0 0 6px rgba(56,189,248,0.4));
}
.nav-logo-text {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text);
}
.nav-version {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--cyan);
  padding: 2px 6px;
  border: 1px solid rgba(56,189,248,0.2);
  border-radius: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-2);
  transition: color 0.3s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--cyan); }
.nav-link.active::after { width: 100%; }

.nav-cta {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--bg);
  background: var(--cyan);
  padding: 8px 20px;
  border-radius: 4px;
  transition: all 0.3s;
}
.nav-cta:hover {
  background: #60ccf8;
  box-shadow: 0 0 20px rgba(56,189,248,0.3);
}

/* ═══ SECTIONS ═══ */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  z-index: 1;
}
.section-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 40px;
}
.section-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-tag::before {
  content: '//';
  color: var(--text-3);
}
.section-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.text-gradient {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 600px;
  margin-bottom: 56px;
}
.section-sub strong {
  color: var(--text);
  font-weight: 500;
}

/* ═══ HERO ═══ */
.section--hero {
  flex-direction: column;
  justify-content: center;
  padding-bottom: 0;
}
.hero-content {
  text-align: center;
  z-index: 2;
  padding: 0 40px;
}
.hero-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--text-3);
  margin-bottom: 32px;
}
.status-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
  box-shadow: 0 0 8px var(--green);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.status-sep { color: var(--border-h); }

.hero-title {
  margin-bottom: 28px;
}
.hero-line {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}
.hero-line-2 {
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 580px;
  margin: 0 auto 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 0;
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 14px 32px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
  border: none;
}
.btn--primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(56,189,248,0.3);
}
.btn-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--cyan));
  border-radius: 10px;
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.4s;
}
.btn--primary:hover .btn-glow { opacity: 0.5; }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--border-h);
  color: var(--text-2);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(56,189,248,0.05);
}
.btn--large { padding: 18px 48px; font-size: 0.85rem; }

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px 40px;
  margin-top: auto;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: rgba(3,5,8,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.stat { text-align: center; }
.stat-val {
  display: block;
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -1px;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--text-3);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-3);
  animation: float 2s ease-in-out infinite;
  z-index: 2;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══ TICKER ═══ */
.ticker-section {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.ticker-bar {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(3,5,8,0.7);
  backdrop-filter: blur(8px);
}
.ticker-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--cyan);
  border-right: 1px solid var(--border);
  background: rgba(56,189,248,0.03);
}
.ticker-dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
  box-shadow: 0 0 6px var(--red);
}
.ticker-track {
  display: flex;
  gap: 40px;
  animation: tickerScroll 60s linear infinite;
  white-space: nowrap;
  padding: 0 20px;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-2);
  flex-shrink: 0;
}
.ticker-item .t-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══ CAPABILITIES ═══ */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.cap-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--cyan)), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.cap-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.cap-card:hover::before { opacity: 1; }
.cap-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  margin-bottom: 20px;
}
.cap-icon svg { stroke: var(--accent); }
.cap-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.cap-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 16px;
}
.cap-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-3);
  padding: 6px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: inline-block;
}

/* ═══ LIVE INTELLIGENCE ═══ */
.intel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.intel-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}
.intel-card:hover {
  border-color: var(--border-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.intel-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
}
.intel-icon { font-size: 1rem; }
.intel-title {
  font-weight: 500;
  color: var(--text);
  flex: 1;
}
.intel-live {
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--green);
  animation: pulse 2s ease infinite;
}
.intel-card-body {
  padding: 20px;
  min-height: 160px;
}
.intel-loading {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  animation: blink 1.2s ease infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Transport */
.tube-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.75rem;
}
.tube-badge {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tube-name { flex: 1; color: var(--text-2); }
.tube-status { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 1px; }
.tube-status.good { color: var(--green); }
.tube-status.minor { color: var(--amber); }
.tube-status.severe { color: var(--red); }

/* Threat Stats */
.threat-stat {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.threat-stat:last-child { border-bottom: none; }
.threat-num {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
}
.threat-lbl {
  font-size: 0.75rem;
  color: var(--text-2);
}

/* Financial */
.fin-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.fin-item:last-child { border-bottom: none; }
.fin-source { color: var(--text-2); }
.fin-count { font-family: var(--mono); font-size: 0.7rem; color: var(--purple); }

/* Latest Observations */
.obs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.3s var(--ease-out) forwards;
  opacity: 0;
}
.obs-item:last-child { border-bottom: none; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.obs-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.obs-text {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.obs-time {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ═══ SOURCES ═══ */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-2);
  transition: all 0.3s var(--ease-out);
}
.source:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-h);
  transform: translateY(-2px);
}
.source-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
  flex-shrink: 0;
}
.source-n {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-3);
}

/* ═══ AGENTS ═══ */
.section--agents .section-inner { text-align: center; }
.section--agents .section-tag { justify-content: center; }
.section--agents .section-sub { margin: 0 auto 56px; }

.agents-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}
.agent {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.4s var(--ease-out);
  position: relative;
}
.agent:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.agent-avatar {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--g);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.agent-info { text-align: left; }
.agent-name {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.agent-role {
  font-size: 0.65rem;
  color: var(--text-3);
}
.agent-dot {
  position: absolute;
  top: 12px; right: 12px;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}
.agents-more {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-3);
  margin-top: 24px;
}

/* ═══ INFRASTRUCTURE ═══ */
.section--infra .section-inner { text-align: center; }
.section--infra .section-tag { justify-content: center; }
.section--infra .section-sub { margin: 0 auto 56px; }

.infra-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.infra-stat { text-align: center; }
.infra-num {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -2px;
}
.infra-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-3);
  text-transform: uppercase;
  margin-top: 4px;
}

.cluster-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.cluster-node {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s var(--ease-out);
  position: relative;
}
.cluster-node::before {
  content: '';
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}
.cluster-node:hover {
  border-color: var(--cyan);
  background: rgba(56,189,248,0.03);
  transform: translateY(-2px);
}
.cluster-node--gpu {
  grid-column: span 2;
  border-color: rgba(56,189,248,0.2);
  background: rgba(56,189,248,0.03);
}
.cluster-node--gpu .cn-label { color: var(--cyan); }
.cn-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.cn-role {
  font-size: 0.65rem;
  color: var(--text-3);
}
.cn-detail {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ═══ CTA ═══ */
.section--cta {
  min-height: 50vh;
  text-align: center;
  justify-content: center;
}
.cta-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}
.cta-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 32px;
}

/* ═══ FOOTER ═══ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  background: rgba(3,5,8,0.8);
}
.footer-inner {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-3);
}

/* ═══ CCTV LIVE FEEDS ═══ */
.section--cctv .section-inner { text-align: center; }
.section--cctv .section-tag { justify-content: center; }
.section--cctv .section-sub { margin: 0 auto 56px; }

.cctv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.cctv-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.4s var(--ease-out);
  aspect-ratio: 16/10;
}
.cctv-card--featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}
.cctv-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(56,189,248,0.12);
}
.cctv-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) contrast(1.1);
  transition: filter 0.4s;
}
.cctv-card:hover video {
  filter: brightness(1) contrast(1.05);
}

/* Scanline overlay for surveillance aesthetic */
.cctv-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  z-index: 2;
  pointer-events: none;
}

.cctv-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(3,5,8,0.85));
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}
.cctv-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--red);
}
.cctv-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: pulse 1.5s ease infinite;
}
.cctv-name {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--text);
}

.cctv-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cctv-note-icon { font-size: 1rem; }

/* ═══ NEURAL BRAIN — SEMANTIC CORE ═══ */
.section--neural {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, rgba(167,139,250,0.04) 0%, var(--bg) 70%);
}
#neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.neural-overlay {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 40px 80px;
}
.neural-overlay * { pointer-events: auto; }

.neural-header {
  text-align: center;
  margin-bottom: 40px;
}
.neural-header .section-tag { justify-content: center; }
.neural-title { text-align: center; }
.text-gradient-brain {
  background: linear-gradient(135deg, #a78bfa, #38bdf8, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: brainShimmer 4s ease-in-out infinite;
}
@keyframes brainShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.neural-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.neural-sub strong {
  color: var(--text);
  font-weight: 600;
}

/* Neural HUD Cards */
.neural-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.nhud-card {
  background: rgba(8,14,28,0.6);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(167,139,250,0.08);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.nhud-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.3), rgba(56,189,248,0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.nhud-card:hover {
  border-color: rgba(167,139,250,0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(167,139,250,0.08);
}
.nhud-card:hover::before { opacity: 1; }

/* Neural density ring */
.nhud-ring {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 12px;
}
.nhud-ring svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.nhud-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
}
.nhud-big {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.nhud-pulse {
  animation: neuralPulse 3s ease-in-out infinite;
}
@keyframes neuralPulse {
  0%, 100% { color: var(--cyan); text-shadow: 0 0 10px rgba(56,189,248,0.2); }
  50% { color: var(--purple); text-shadow: 0 0 20px rgba(167,139,250,0.4); }
}
.nhud-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.nhud-detail {
  font-size: 0.65rem;
  color: var(--text-3);
  line-height: 1.4;
}

/* Collection breakdown */
.nhud-card--vectors { text-align: left; }
.nhud-collections {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.nhud-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-3);
}
.nhud-col-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 4px var(--c);
  flex-shrink: 0;
}
.nhud-col-n {
  margin-left: auto;
  color: var(--text-2);
}

.neural-caption {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: var(--text-3);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ═══ REVEAL ANIMATIONS ═══ */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
  .agents-grid { grid-template-columns: repeat(3, 1fr); }
  .sources-grid { grid-template-columns: repeat(3, 1fr); }
  .cluster-visual { grid-template-columns: repeat(3, 1fr); }
  .stats-bar { gap: 24px; flex-wrap: wrap; }
  .neural-hud { grid-template-columns: repeat(2, 1fr); }
  .cctv-grid { grid-template-columns: repeat(2, 1fr); }
  .cctv-card--featured { grid-column: span 2; grid-row: span 1; aspect-ratio: 16/10; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .section-inner { padding: 80px 20px; }
  .capabilities-grid { grid-template-columns: 1fr; }
  .intel-grid { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
  .cluster-visual { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { gap: 16px; padding: 20px; }
  .stat-val { font-size: 1.2rem; }
  .infra-stats { gap: 24px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .neural-hud { grid-template-columns: 1fr; }
  .neural-overlay { padding: 60px 20px; }
  .cctv-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cctv-card--featured { grid-column: span 2; }
}
