/* crt.css — scanlines, vignette, flicker, screen curvature */

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}

/* scanlines */
body::before {
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.32) 3px,
    rgba(0, 0, 0, 0.32) 4px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}

/* vignette + faint red bleed at the edges */
body::after {
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.75) 100%),
    linear-gradient(to bottom, rgba(255, 47, 47, 0.05), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 78%, rgba(255, 47, 47, 0.06));
}

/* the sweeping bright bar that rolls down the screen */
body .crt-sweep {
  position: fixed;
  left: 0;
  right: 0;
  height: 22vh;
  top: -25vh;
  z-index: 91;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  animation: crt-sweep 7s linear infinite;
}

/* dialogs sit above the CRT layers */
.dialog {
  z-index: 120;
}

.skip-link {
  z-index: 200;
}

@media (prefers-reduced-motion: reduce) {
  body .crt-sweep {
    animation: none;
    display: none;
  }
  body::before {
    opacity: 0.35;
  }
}
