/* codyingram.org — CRT fallback (no-WebGL only).
 *
 * The real color-tube overlay is the WebGL veil in crt.js. This stylesheet is
 * the static safety net: crt.js adds a <div class="crt-screen"> ONLY when it
 * can't get a WebGL context, so these rules give those visitors plain
 * scanlines + a vignette with no animation. Strengths come from the :root
 * custom properties the generator emits from config.json's "crt" block.
 */

.crt-screen {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
}

/* horizontal scanlines */
.crt-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, var(--crt-scan, 0.15)) 0px,
    rgba(0, 0, 0, var(--crt-scan, 0.15)) 1px,
    transparent 1px,
    transparent var(--crt-scan-size, 3px)
  );
}

/* tube vignette */
.crt-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: calc(var(--crt-curve, 2%) * 2.2);
  background: radial-gradient(
    135% 135% at 50% 50%,
    transparent 48%,
    rgba(0, 0, 0, var(--crt-vig, 0.55)) 100%
  );
  box-shadow: inset 0 0 55px rgba(0, 0, 0, calc(var(--crt-vig, 0.55) * 0.7));
}
