#constellation,
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#particles {
  z-index: 1;
}

#noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 8s steps(4) infinite;
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

.watermark {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: clamp(6rem, 28vw, 18rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--cream);
  opacity: 0.04;
  pointer-events: none;
  z-index: 2;
  user-select: none;
  mix-blend-mode: soft-light;
}

#torch {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: radial-gradient(
    circle var(--spot-r) at var(--mx) var(--my),
    rgba(255, 235, 190, 0.16) 0%,
    rgba(255, 220, 150, 0.07) 32%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

html.spotlight-active #torch {
  opacity: 1;
  visibility: visible;
}

@media (pointer: coarse) {
  #torch {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #noise {
    animation: none;
  }
}
