/**
 * Bee-Z — Paper Grain Shader Styles
 * Canvas layer + SVG fallback for prefers-reduced-motion users.
 */

/* ── Animated canvas layer (JS-driven) ───────────────────────────────── */
#bz-grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity, 0.048);
  mix-blend-mode: overlay;       /* blends naturally over dark backgrounds */
  will-change: contents;
}

/* ── Static SVG grain fallback (prefers-reduced-motion / no-JS) ──────── */
@media (prefers-reduced-motion: reduce) {
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    background-image:
      url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
  }
}

/* ── Vignette — deepens edges for a cinematic frame feel ─────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(
    ellipse 120% 100% at 50% 50%,
    transparent 45%,
    rgba(0, 0, 0, 0.55) 100%
  );
}
