/* ─── CRT OVERLAY ─────────────────────────────────────────────────────────────
   All CRT/tube television effects live here.
   Toggle individual effects by commenting out the relevant rule.
──────────────────────────────────────────────────────────────────────────── */

#crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;       /* always on top */
  pointer-events: none;
}

/* 1. SCANLINES ──────────────────────────────────────────────────────────── */
#crt-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.13) 2px,
    rgba(0, 0, 0, 0.13) 4px
  );
  /* To change scanline spacing, edit the 2px / 4px values above */
}

/* 2. VIGNETTE ───────────────────────────────────────────────────────────── */
#crt-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

/* 3. SCREEN FLICKER ─────────────────────────────────────────────────────── */
#crt-overlay {
  animation: crt-flicker 8s linear infinite;
}
@keyframes crt-flicker {
  0%, 89%, 91%, 93%, 100% { opacity: 1; }
  90%  { opacity: 0.92; }
  92%  { opacity: 0.96; }
}

/* 4. NOISE GRAIN (driven by js/crt.js) ─────────────────────────────────── */
#noise-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.035;
  mix-blend-mode: screen;
  /* Lower opacity = subtler grain. Set to 0 to disable. */
}

/* ─── CHROMATIC ABERRATION (used on logo in sections.css) ────────────────── */
.logo-wrap {
  position: relative;
  display: inline-block;
}
.logo-wrap .ca-r {
  position: absolute;
  inset: 0;
  color: rgba(255, 60, 60, 0.3);
  mix-blend-mode: screen;
  transform: translate(3px, 0);
  pointer-events: none;
}
.logo-wrap .ca-b {
  position: absolute;
  inset: 0;
  color: rgba(60, 60, 255, 0.3);
  mix-blend-mode: screen;
  transform: translate(-3px, 0);
  pointer-events: none;
}
