/* Snow background: fixed canvas behind the page content inside <main data-snow>.
   z-index -1 keeps it under every block; it shows through transparent sections. */
main[data-snow] .snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* No backdrop-filter: blur on purpose. Over an animated canvas the browser
   would redo the blur every frame, which undoes the canvas performance gains. */

/* Entrance: the whole snow layer fades in from opacity 0 when the canvas is
   inserted. Animating the canvas element's opacity is done by the compositor,
   so it costs nothing per frame and works for every renderer/mode. */
main[data-snow] .snow-canvas {
  animation: snow-fade-in 1s ease-out both;
}

@keyframes snow-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  main[data-snow] .snow-canvas {
    animation: none;
  }
}
