/* Randomized shooting-star system. Loaded after motion.css so it replaces the old two fixed hero stars. */

/* Disable the original two pseudo-element stars completely. */
.particles::before,
.particles::after {
  display: none !important;
  animation: none !important;
  content: none !important;
}

/* Every major page section receives its own clipped background star layer. */
.shooting-star-host {
  position: relative;
}

.shooting-star-field {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Keep actual page content above the stars while letting them remain visible over section backgrounds. */
.shooting-star-host > .container,
.shooting-star-host > .hero-content,
.site-footer.shooting-star-host > .container {
  position: relative;
  z-index: 2;
}

/*
  This is intentionally a 0x0 moving anchor. Do NOT use contain: paint here:
  paint containment clips descendants to the anchor's 0x0 box and makes every
  generated star invisible.
*/
.shooting-star {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  contain: style;
  will-change: transform, opacity;
}

/*
  The wrapper is the moving glowing head. The trail is right-anchored to that
  head. JS calculates its rotation from the exact same atan2(dy, dx) used for
  movement, so the bright head leads and the trail always extends behind it.
*/
.shooting-star-trail {
  position: absolute;
  top: 0;
  right: 0;
  height: 8px;
  overflow: visible;
  transform-origin: 100% 50%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 100% 50%, rgba(245, 255, 240, 1) 0 1.35px, rgba(190, 255, 167, 1) 1.5px 2.4px, rgba(141, 255, 103, 0.42) 2.8px, transparent 5.6px),
    linear-gradient(90deg, transparent 0%, rgba(111, 255, 76, 0.04) 14%, rgba(141, 255, 103, 0.24) 48%, rgba(141, 255, 103, 0.72) 78%, rgba(195, 255, 174, 1) 100%) center / 100% 2px no-repeat;
  filter:
    drop-shadow(0 0 3px rgba(197, 255, 177, 0.98))
    drop-shadow(0 0 7px rgba(141, 255, 103, 0.9))
    drop-shadow(0 0 14px rgba(111, 255, 76, 0.52));
}

.shooting-star-trail::after {
  position: absolute;
  top: 50%;
  right: -1.5px;
  width: 4px;
  height: 4px;
  content: "";
  transform: translateY(-50%);
  border-radius: 50%;
  background: #efffea;
  box-shadow:
    0 0 5px rgba(239, 255, 234, 1),
    0 0 11px rgba(141, 255, 103, 0.95),
    0 0 20px rgba(111, 255, 76, 0.55);
}

@media (max-width: 700px) {
  .shooting-star-trail {
    filter:
      drop-shadow(0 0 3px rgba(197, 255, 177, 0.95))
      drop-shadow(0 0 7px rgba(141, 255, 103, 0.72));
  }
}
