:root {
  --void: #020208;
  --cyan: #00E5FF;
  --violet: #7C4DFF;
  --pink: #FF4081;
  --acid: #76FF03;
  --gold: #FFD740;
  --light: #D8D8F0;
  --muted: #6A6A8A;
  --crt-green: #39FF14;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--light);
  font-family: 'JetBrains Mono', monospace;
  overflow-x: hidden;
  cursor: crosshair;
}

/* CRT SCANLINES — aggressive */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    transparent 0px, transparent 1px,
    rgba(0,0,0,0.15) 1px, rgba(0,0,0,0.15) 3px
  );
  pointer-events: none;
  z-index: 10000;
}

/* FLICKER */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,229,255,0.008);
  pointer-events: none;
  z-index: 9999;
  animation: crtFlicker 0.1s infinite;
}

@keyframes crtFlicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

@keyframes glitchX {
  0%,87%,100% { transform: translate(0); }
  88% { transform: translate(-4px, 1px); }
  90% { transform: translate(3px, -1px); }
  92% { transform: translate(-2px, 0); }
  94% { transform: translate(5px, 1px); }
  96% { transform: translate(-1px, -2px); }
}

@keyframes scanDrop {
  0% { top: -10%; }
  100% { top: 110%; }
}

@keyframes blink { 0%,49%{opacity:1}50%,100%{opacity:0} }
@keyframes fadeIn { from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)} }
@keyframes textCorrupt {
  0%,90%{text-shadow:none;transform:translate(0)}
  92%{text-shadow:2px 0 var(--pink),-2px 0 var(--cyan);transform:translate(-2px,1px)}
  94%{text-shadow:-1px 0 var(--acid);transform:translate(1px,-1px)}
  96%{text-shadow:3px 0 var(--violet);transform:translate(2px,0)}
  98%{text-shadow:none;transform:translate(-1px,1px)}
}

@keyframes dataScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulseBorder {
  0%,100% { border-color: rgba(0,229,255,0.1); }
  50% { border-color: rgba(0,229,255,0.4); }
}

/* SCANLINE SWEEP */
.scanline-sweep {
  position: fixed;
  top: -10%;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(transparent, rgba(0,229,255,0.06), transparent);
  z-index: 9998;
  animation: scanDrop 4s linear infinite;
  pointer-events: none;
}

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(2,2,8,0.92);
  border-bottom: 1px solid rgba(0,229,255,0.08);
  font-size: 11px;
}

nav .left { color: var(--cyan); display: flex; gap: 20px; }
nav .right { color: var(--muted); display: flex; gap: 16px; }
nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
nav a:hover { color: var(--cyan); }
nav .blink { animation: blink 1s step-end infinite; color: var(--acid); }

/* === HERO — DENSE CHAOS === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Background layers */
.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Data rain columns */
.data-rain {
  position: absolute;
  top: 0;
  width: 14px;
  height: 200%;
  font-size: 9px;
  line-height: 14px;
  color: var(--cyan);
  opacity: 0.07;
  animation: dataScroll 20s linear infinite;
  overflow: hidden;
  writing-mode: vertical-lr;
  word-break: break-all;
}

/* Glitch bars */
.glitch-bar {
  position: absolute;
  height: 3px;
  background: var(--pink);
  opacity: 0;
  animation: glitchBar 6s infinite;
  z-index: 5;
}

@keyframes glitchBar {
  0%,89%,100%{opacity:0}
  90%{opacity:0.6;width:40%}
  91%{opacity:0;width:20%}
  92%{opacity:0.4;width:60%}
  93%{opacity:0}
}

/* PCB border pattern */
.pcb-border-top, .pcb-border-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 20px;
  display: flex;
  overflow: hidden;
  z-index: 5;
}

.pcb-border-top { top: 60px; }
.pcb-border-bottom { bottom: 0; }

.pcb-strip {
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--acid);
  opacity: 0.15;
  animation: marquee 30s linear infinite;
}

/* STAR LOGO — glitched */
.hero-logo {
  position: relative;
  z-index: 10;
  margin-bottom: 24px;
  animation: glitchX 4s infinite;
}

.hero-logo svg {
  width: 200px;
  height: 200px;
  filter: drop-shadow(0 0 40px rgba(0,229,255,0.2)) drop-shadow(0 0 80px rgba(124,77,255,0.1));
}

/* Offset ghost copies */
.ghost-logo {
  position: absolute;
  top: 0; left: 0;
}

.ghost-logo.r { transform: translate(4px, -2px); opacity: 0.15; }
.ghost-logo.r svg path { fill: var(--pink) !important; }
.ghost-logo.b { transform: translate(-3px, 2px); opacity: 0.1; }
.ghost-logo.b svg path { fill: var(--acid) !important; }

/* TITLE */
.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(48px, 9vw, 110px);
  font-weight: 900;
  text-align: center;
  letter-spacing: 8px;
  text-transform: uppercase;
  z-index: 10;
  animation: textCorrupt 3s infinite;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-title .star-word { color: var(--light); }
.hero-title .project-word { color: var(--cyan); }

.hero-subtitle {
  font-size: 12px;
  letter-spacing: 6px;
  color: var(--muted);
  z-index: 10;
  margin-bottom: 32px;
}

.hero-subtitle .sep { color: var(--pink); }

/* Terminal-style info blocks scattered on hero */
.terminal-block {
  position: absolute;
  background: rgba(2,2,8,0.85);
  border: 1px solid rgba(0,229,255,0.12);
  padding: 10px 14px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
  z-index: 10;
  max-width: 220px;
  animation: pulseBorder 4s infinite;
}

.terminal-block .header {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.terminal-block .val { color: var(--acid); }
.terminal-block .err { color: var(--pink); }

/* CTA */
.hero-cta {
  display: flex;
  gap: 2px;
  z-index: 10;
  margin-bottom: 20px;
}

.btn-raw {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid var(--cyan);
  background: rgba(0,229,255,0.05);
  color: var(--cyan);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-raw:hover {
  background: var(--cyan);
  color: var(--void);
  box-shadow: 0 0 20px rgba(0,229,255,0.3), inset 0 0 20px rgba(0,229,255,0.1);
}

.btn-ghost {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }

/* === MARQUEE DATA STRIP === */
.data-strip {
  background: rgba(0,229,255,0.03);
  border-top: 1px solid rgba(0,229,255,0.08);
  border-bottom: 1px solid rgba(0,229,255,0.08);
  overflow: hidden;
  padding: 8px 0;
  position: relative;
  z-index: 1;
}

.data-strip-inner {
  display: flex;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
}

.data-strip-inner .highlight { color: var(--cyan); }
.data-strip-inner .warn { color: var(--pink); }
.data-strip-inner .ok { color: var(--acid); }

/* === SERVICES — DENSE GRID === */
.services {
  position: relative;
  z-index: 1;
  padding: 0;
}

.services-header {
  padding: 60px 20px 30px;
  border-bottom: 1px solid rgba(0,229,255,0.06);
}

.services-header h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  animation: textCorrupt 5s infinite;
}

.services-header h2 span { color: var(--cyan); }

.services-header .count {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 3px;
  margin-top: 8px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(0,229,255,0.04);
}

.service-cell {
  padding: 28px 20px;
  border-right: 1px solid rgba(0,229,255,0.04);
  border-bottom: 1px solid rgba(0,229,255,0.04);
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
}

.service-cell:hover {
  background: rgba(0,229,255,0.02);
}

.service-cell::before {
  content: attr(data-index);
  position: absolute;
  top: 8px; right: 12px;
  font-size: 8px;
  color: var(--muted);
  opacity: 0.3;
}

.service-cell .svc-color {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.service-cell .svc-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.service-cell .svc-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.service-cell .svc-tags {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--muted);
  opacity: 0.5;
  text-transform: uppercase;
}

.service-cell .svc-status {
  position: absolute;
  bottom: 8px; right: 12px;
  font-size: 8px;
  letter-spacing: 1px;
}

/* === MANIFESTO — COLLAGE STYLE === */
.manifesto {
  position: relative;
  padding: 100px 20px;
  overflow: hidden;
  border-top: 1px solid rgba(255,64,129,0.1);
  border-bottom: 1px solid rgba(255,64,129,0.1);
}

.manifesto-bg-text {
  position: absolute;
  font-family: 'Orbitron', sans-serif;
  font-size: 200px;
  font-weight: 700;
  color: rgba(0,229,255,0.02);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.manifesto-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.manifesto-content p {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 24px;
}

.manifesto-content .cy { color: var(--cyan); }
.manifesto-content .pk { color: var(--pink); }
.manifesto-content .ac { color: var(--acid); }
.manifesto-content .vi { color: var(--violet); }

.manifesto-note {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 3px;
  border-left: 2px solid var(--pink);
  padding-left: 12px;
}

/* === ECOSYSTEM NODES === */
.eco-section {
  padding: 80px 20px;
  position: relative;
  z-index: 1;
}

.eco-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 40px;
}

.eco-title span { color: var(--violet); }

.eco-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}

.eco-node {
  background: rgba(0,229,255,0.02);
  border: 1px solid rgba(0,229,255,0.06);
  padding: 20px 12px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
}

.eco-node:hover {
  background: rgba(0,229,255,0.06);
  border-color: rgba(0,229,255,0.2);
}

.eco-node .node-id {
  font-size: 7px;
  color: var(--muted);
  opacity: 0.4;
  margin-bottom: 8px;
}

.eco-node .node-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.eco-node .node-name {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.eco-node .node-status {
  font-size: 7px;
  margin-top: 6px;
  opacity: 0.5;
}

/* === STATS BAR === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(0,229,255,0.06);
  border-bottom: 1px solid rgba(0,229,255,0.06);
}

.stat {
  padding: 32px 20px;
  text-align: center;
  border-right: 1px solid rgba(0,229,255,0.04);
}

.stat .num {
  font-family: 'Orbitron', sans-serif;
  font-size: 48px;
  font-weight: 900;
}

.stat .lbl {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* === CTA TERMINAL === */
.cta-section {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-box {
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid rgba(0,229,255,0.1);
  padding: 40px;
  background: rgba(0,229,255,0.01);
  position: relative;
}

.cta-box::before {
  content: 'TRANSMISSION';
  position: absolute;
  top: -8px; left: 16px;
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--cyan);
  background: var(--void);
  padding: 0 8px;
}

.cta-box h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.cta-box h3 span { color: var(--cyan); }

.cta-box p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.cta-input-row {
  display: flex;
  gap: 0;
}

.cta-input-row input {
  flex: 1;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(0,229,255,0.1);
  border-right: none;
  color: var(--light);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  outline: none;
}

.cta-input-row input:focus { border-color: var(--cyan); }
.cta-input-row input::placeholder { color: var(--muted); opacity: 0.4; }

.cta-footer {
  font-size: 8px;
  color: var(--muted);
  opacity: 0.4;
  letter-spacing: 2px;
  margin-top: 16px;
}

/* === FOOTER === */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0,229,255,0.04);
  padding: 40px 20px 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand-col .f-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.footer-brand-col .f-logo span { color: var(--cyan); }

.footer-brand-col .f-tagline {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.footer-brand-col .f-status {
  font-size: 8px;
  color: var(--acid);
  letter-spacing: 1px;
}

.footer-col h4 {
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 14px;
  text-transform: uppercase;
  opacity: 0.5;
}

.footer-col a {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.03);
  font-size: 8px;
  color: var(--muted);
  opacity: 0.4;
  letter-spacing: 2px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .service-grid { grid-template-columns: 1fr; }
  .eco-map { grid-template-columns: repeat(3, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .terminal-block { display: none; }
  .data-rain { display: none; }
}
