/*
 * Site-wide background effects, ported from www/assets/index-style-gradient.css
 * (gradient canvas + grain + vignette + scanlines + perspective grid).
 * Purely decorative: every layer is position:fixed, z-index below .pv-site (8)
 * and pointer-events:none so it never blocks interaction or reflows content.
 */

#pv-gradient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  --gradient-color-1: #0047bb;
  --gradient-color-2: #ff8200;
  --gradient-color-3: #ac4fc6;
  --gradient-color-4: #000000;
}

.pv-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.06;
  pointer-events: none;
  background-image: url('../img/noise.gif');
}

.pv-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0.72) 86%);
}

.pv-scanline {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.09;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(217, 217, 214, 0.1) 0,
    rgba(217, 217, 214, 0.1) 1px,
    transparent 1px,
    transparent 3px
  );
}

.pv-perspective-grid {
  position: fixed;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 40vh;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.08) 65%, rgba(0, 0, 0, 0) 100%),
    repeating-linear-gradient(to right, rgba(0, 71, 187, 0.28) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(to top, rgba(172, 79, 198, 0.24) 0 1px, transparent 1px 56px);
  transform-origin: center bottom;
  transform: perspective(600px) rotateX(71deg);
  animation: pv-grid-drift 11s linear infinite;
}

@keyframes pv-grid-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 60px 0, 0 56px; }
}

/* Static fallback when the WebGL canvas is disabled via the Customizer or
   when prefers-reduced-motion is set - keeps the same DA without motion. */
body.pv-static-bg #pv-gradient-canvas {
  display: none;
}

body.pv-static-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, rgba(0, 71, 187, 0.35), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(255, 130, 0, 0.3), transparent 55%),
    radial-gradient(circle at 50% 90%, rgba(172, 79, 198, 0.3), transparent 60%),
    #000;
}