/* ── Design Tokens — Phosphor Oscilloscope Theme ───────────── */

:root {
  /* Color */
  --bg-deep:                 #050807;
  --bg-elevated:             #0d1814;
  --bg-surface:              rgba(74, 222, 128, 0.04);
  --bg-surface-strong:       rgba(74, 222, 128, 0.08);

  --accent-phosphor:         #4ade80;
  --accent-phosphor-glow:    rgba(74, 222, 128, 0.55);
  --accent-amber:            #fbbf24;  /* reserved — CH2 */

  --text-primary:            #f0f7f2;
  --text-body:               #c8d8cd;
  --text-dim:                #7a9485;
  --text-tag:                #c8e0d0;
  --text-tag-unused:         #4a5550;

  --border-phosphor:         rgba(74, 222, 128, 0.18);
  --border-phosphor-strong:  rgba(74, 222, 128, 0.45);
  --border-phosphor-dim:     rgba(120, 140, 130, 0.18);

  /* Typography */
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Radius / spacing */
  --radius:     8px;
  --radius-lg:  12px;

  /* Motion */
  --transition: 0.25s ease;
  --transition-snap: cubic-bezier(0.4, 0, 0.2, 1);

  /* Background patterns */
  --grid-bg:
    linear-gradient(rgba(74, 222, 128, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.045) 1px, transparent 1px);
  --grid-size: 28px 28px;

  --scanlines:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 2px,
      rgba(74, 222, 128, 0.025) 2px,
      rgba(74, 222, 128, 0.025) 3px
    );
}

/* Body baseline scaled up for readability */
html { font-size: 17.5px; }

@media (max-width: 600px) {
  html { font-size: 16px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* HTML root paints the deep phosphor gradient (canvas paints over it) */
html {
  background: radial-gradient(ellipse at top, var(--bg-elevated) 0%, var(--bg-deep) 70%) fixed;
}
body { background: transparent !important; }

/* Animated PCB pulse canvas — fixed full-viewport, sits above the html bg
   but below all content. Using z-index: 0 + explicit z-index on content
   (more reliable than z-index: -1 across browsers). */
#pcb-pulse-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* All content sits above the canvas */
.nav, .landing-hero, .hero, .section, .footer, .section-divider {
  position: relative;
  z-index: 1;
}

/* Section utility — transparent so the animated bg shows through.
   No per-section grid (was misaligning between sections). */
.phosphor-bg {
  position: relative;
  background: transparent;
}
.phosphor-bg > * { position: relative; z-index: 1; }
