/* Unplug V2 — Hacker Edition */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --accent: #00e8ff;
  --accent-hover: #66f3ff;
  --accent-dim: rgba(0, 232, 255, 0.05);
  --accent-border: rgba(0, 232, 255, 0.18);
  --accent-glow: rgba(0, 232, 255, 0.35);

  --bg-base: #000000;
  --bg-surface: #050505;
  --bg-elevated: #0a0a0a;
  --bg-code: #020202;

  --text-primary: #b0b0b0;
  --text-secondary: #666666;
  --text-muted: #404040;
  --text-bright: #e0e0e0;

  --danger: #ff3333;
  --danger-dim: rgba(255, 51, 51, 0.08);
  --danger-border: rgba(255, 51, 51, 0.25);

  --glitch-magenta: #ff0080;

  --border: rgba(0, 232, 255, 0.06);
  --border-light: rgba(0, 232, 255, 0.12);

  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --container: 1100px;
  --section-pad: 100px;
  --r-sm: 2px; --r-md: 4px; --r-lg: 4px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

#root {
  position: relative;
  z-index: 1;
}

/* Animated terminal rain + glitch slices (canvas) */
.glitch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.glitch-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.glitch-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, rgba(0, 232, 255, 0.04), transparent 65%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(0, 232, 255, 0.015) 3px,
      rgba(0, 232, 255, 0.015) 4px
    );
  mix-blend-mode: screen;
  pointer-events: none;
}


/* CRT scanline overlay */
body::after {
  content: '';
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    transparent 0px, transparent 2px,
    rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px
  );
  pointer-events: none; z-index: 9999;
}

::selection { background: rgba(0, 232, 255, 0.25); color: #fff; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 48px; }
.section { padding: var(--section-pad) 0; position: relative; }
.section-surface { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.sh-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.15em; margin-bottom: 12px; display: block;
  opacity: 0.7;
}
.sh-num::before { content: '// '; color: var(--text-muted); }
.sh-title {
  font-family: var(--font-mono); font-size: 36px; font-weight: 700; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--text-bright);
}
.sh-sub {
  font-size: 15px; color: var(--text-secondary); margin-top: 12px;
  max-width: 600px; line-height: 1.7;
}

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 48px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: var(--font-mono); font-size: 16px; font-weight: 700;
  color: var(--accent); text-decoration: none; letter-spacing: 0.05em;
}
.nav-logo::before { content: '> '; color: var(--text-muted); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary);
  text-decoration: none; transition: color 0.15s;
}
.nav-link:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  text-decoration: none; border-radius: var(--r-md);
  padding: 10px 20px; transition: all 0.15s; border: none; cursor: pointer;
}
.btn-primary {
  background: var(--accent); color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 40px var(--accent-glow); }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--border-light); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* Terminal */
.terminal {
  background: var(--bg-code); border: 1px solid var(--border-light);
  border-radius: var(--r-lg); overflow: hidden;
}
.terminal-chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-title {
  flex: 1; text-align: center; font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); margin-right: 36px;
}
.terminal-body { padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.9; }

/* Code blocks */
.code-block {
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; font-family: var(--font-mono); font-size: 13px;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.code-label { font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.code-body { padding: 20px; line-height: 1.9; overflow-x: auto; }

/* Metrics */
.metric-row { display: flex; gap: 10px; flex-wrap: wrap; }
.metric {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 1px solid var(--border-light);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--accent);
}

/* Cards */
.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent-border); }

/* Syntax */
.sk { color: #ff6b6b; } .ss { color: #ffd93d; } .sc { color: #444; font-style: italic; }
.sf { color: #5ce0ff; } .sn { color: #ff9f43; } .sb { color: #ff6b6b; }
.sg { color: var(--accent); } .sp { color: #444; } .su { color: var(--accent); }

/* Before/After */
.mal-span { display: inline; padding: 1px 3px; margin: 0 -1px; transition: all 0.3s; }
.mal-span.hl { background: var(--danger-dim); color: var(--danger); text-decoration: underline; text-decoration-color: var(--danger-border); text-underline-offset: 3px; }
.mal-span.rd { background: var(--accent-dim); color: var(--accent); text-decoration: none; font-weight: 500; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* Pricing */
.price-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 32px 24px; display: flex; flex-direction: column;
  transition: border-color 0.15s;
}
.price-card.featured { border-color: var(--accent-border); box-shadow: 0 0 40px var(--accent-dim); }
.price-card:hover { border-color: var(--accent-border); }

/* Scan line overlay */
.scan-line-overlay { position: absolute; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; overflow: hidden; }
.scan-line {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow), 0 0 50px var(--accent-dim);
  animation: sweepRight 1.5s ease-in-out forwards;
}
@keyframes sweepRight { from { left: -2px; } to { left: 100%; } }

.footer { border-top: 1px solid var(--border); padding: 48px 0 32px; }
.footer a { color: var(--text-secondary); text-decoration: none; font-family: var(--font-mono); font-size: 13px; }
.footer a:hover { color: var(--accent); }

/* Deploy terminal */
.deploy-terminal { min-height: 200px; }
.deploy-install {
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 13px;
}
.deploy-code { line-height: 1.9; white-space: pre-wrap; }
.code-pre {
  margin: 0; padding: 0;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.75;
  white-space: pre; overflow-x: auto;
  color: var(--text-secondary); background: transparent; border: none;
}

/* Pipeline ASCII box — one padded string per line, tone via row class */
.pipeline-box {
  overflow-x: auto;
  font-family: var(--font-mono), 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.75;
}
.pipeline-line {
  white-space: pre;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.pipeline-border {
  color: rgba(0, 232, 255, 0.22);
}
.pipeline-divider {
  color: rgba(0, 232, 255, 0.35);
}
.pipeline-stage-label {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 18px var(--accent-glow);
}
.pipeline-timing {
  color: #ff9f43;
  font-weight: 500;
}
.pipeline-detail {
  color: var(--text-secondary);
}
.pipeline-muted {
  color: var(--text-muted);
}

/* ASCII border helper */
.ascii-box { position: relative; padding: 24px; }
.ascii-box::before {
  content: '┌' attr(data-title) '─────────────────────────────┐';
  position: absolute; top: 0; left: 0; color: var(--text-muted); font-size: 12px;
  white-space: pre; pointer-events: none;
}

/* Glitch text — logo-style chromatic split */
@keyframes glitch {
  0%, 86%, 100% {
    transform: none;
    opacity: 1;
    text-shadow: none;
  }
  88% {
    transform: translate(-3px, 0);
    opacity: 0.82;
    text-shadow: 3px 0 var(--accent), -3px 0 var(--glitch-magenta);
  }
  90% {
    transform: translate(3px, 1px);
    opacity: 0.9;
    text-shadow: -2px 0 var(--accent), 2px 0 var(--glitch-magenta);
  }
  92% {
    transform: translate(-2px, -1px);
    opacity: 0.75;
    text-shadow: 4px 0 rgba(0, 232, 255, 0.8), -4px 0 rgba(255, 0, 128, 0.6);
  }
  94% {
    transform: translate(2px, 0);
    opacity: 0.88;
    text-shadow: -3px 0 var(--accent), 3px 0 var(--glitch-magenta);
  }
}
