/* A light field of blue embers that stays with the viewport while scrolling. */
.blue-particles {
  --particle-rise: -110vh;
  position: fixed;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}

.blue-particle {
  position: absolute;
  left: var(--left);
  bottom: -24px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, #d4f3ff 0%, #78d5ff 35%, #218cff 70%, #218cff00 100%);
  box-shadow: 0 0 7px 1px #168dff88, 0 0 17px 2px #007bff26;
  filter: blur(var(--blur));
  animation: blue-particle-rise var(--duration) var(--delay) linear infinite;
}

@keyframes blue-particle-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  12% { opacity: var(--alpha); }
  50% {
    transform: translate3d(var(--sway), calc(var(--particle-rise) * .5), 0);
  }
  85% { opacity: var(--alpha); }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), var(--particle-rise), 0);
  }
}

/* The existing Motion button also follows the system's reduced-motion setting. */
.motion-off .blue-particle,
.particles-paused .blue-particle {
  animation-play-state: paused;
}

@supports (height: 100svh) {
  .blue-particles { --particle-rise: -110svh; }
}

@media (max-width: 650px) {
  .blue-particle:nth-child(n + 33) { display: none; }
  .blue-particles { opacity: .8; }
}
