/* =========================================================
   NMFT STUDIO — COSMOS-FX.CSS
   Efectos adicionales al fondo estrellado base (.cosmos/.stars):
   estrella fugaz aleatoria + satélite cruzando despacio.
   Pensado para inyectarse dentro del contenedor .cosmos junto
   a .stars y .glow, sin tocar la estructura existente.
   ========================================================= */

/* ---------- Estrella fugaz ---------- */
.estrella-fugaz {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.55);
  pointer-events: none;
  animation: cosmos-fx-cruzar 1s linear forwards;
  will-change: transform, opacity;
}

.estrella-fugaz::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 70px;
  height: 1px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.7), transparent);
  transform: translateY(-50%) rotate(180deg);
  transform-origin: right center;
}

@keyframes cosmos-fx-cruzar {
  0%   { opacity: 0; transform: translate(0, 0) rotate(var(--angulo)); }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--distancia) * -1), var(--distancia)) rotate(var(--angulo)); }
}

/* ---------- Satélite ---------- */
.cosmos-satelite {
  position: absolute;
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: rgba(235, 240, 245, 0.85);
  pointer-events: none;
  animation:
    cosmos-fx-satelite-cruzar var(--duracion) linear forwards,
    cosmos-fx-satelite-titileo 1.1s ease-in-out infinite;
  will-change: transform, opacity;
}

/* leve resplandor frío, distinto del cálido de las estrellas */
.cosmos-satelite::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: rgba(180, 210, 255, 0.35);
  filter: blur(1.5px);
}

@keyframes cosmos-fx-satelite-cruzar {
  0%   { opacity: 0; transform: translate(0, 0); }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}

@keyframes cosmos-fx-satelite-titileo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .estrella-fugaz,
  .cosmos-satelite,
  .cosmos-satelite::after {
    display: none !important;
  }
}
