/* assets/background-and-foreground/stars-video.css */
/* Neutral base for the starfield video (stable across hover) */

:root{
  --stars-brightness: 1.2;
  --stars-contrast: 1.0;
  --stars-saturate: 1.0;
  --stars-hue: 0deg;
  --stars-opacity: 1;
  --stars-blur: 0px;
  --stars-colorize: 0;
  --stars-invert: 0;
}

#stars-sky,
.stars-video-bg{
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  z-index: -1 !important;
  filter: none;
  opacity: var(--stars-opacity) !important;
  pointer-events: none !important;
  user-select: none !important;
  contain: paint;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
  animation: starsBlendCycle 300s steps(1, end) infinite;

}

/* Discrete GPU optimisation:
   Disable mix-blend-mode ONLY during the fade windows of the ambient day/night cycle.
   (mix-blend-mode is expensive because it forces per-frame blending of a full-screen video.)
   This keeps your normal look most of the time, and eases GPU during transitions.
*/
@keyframes starsBlendCycle {
  /* Hold HIGH (0% -> 40%) */
  0%, 40% { mix-blend-mode: screen; }

  /* Fade DOWN (40% -> 50%) */
  40.01%, 50% { mix-blend-mode: normal; }

  /* Hold LOW (50% -> 90%) */
  50.01%, 90% { mix-blend-mode: screen; }

  /* Fade UP (90% -> 100%) */
  90.01%, 100% { mix-blend-mode: normal; }
}
