/* ==========================================================================
   JN BIKERS · BRUJA MOTERA EN ESCOBA VOLADORA (ANIMACIÓN SVG + CSS 60 FPS)
   Cruza el cielo de la página periódicamente en modo Halloween Motero,
   con gato negro copiloto, farol calabaza 3000K, estela mágica y murciélagos escolta.
   Fondo 100% Transparente · Pointer-events: none · Responsive Desktop & Mobile
   ========================================================================== */

.witch-flyover-sky {
  position: fixed !important;
  top: 16%;
  left: 0 !important;
  width: 100vw !important;
  height: 185px !important;
  pointer-events: none !important;
  z-index: 9999 !important;
  overflow: visible !important;
  display: none;
  background: transparent !important;
}

body[data-atmosphere="halloween"] .witch-flyover-sky {
  display: block !important;
}

.witch-flyover-sky .witchWrapper {
  position: absolute;
  top: 8px;
  left: -500px;
  width: 460px;
  height: 175px;
  transform: scale(0.82);
  transform-origin: top left;
  display: block;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 8px 18px rgba(9, 4, 16, 0.55)) drop-shadow(0 0 14px rgba(255, 109, 0, 0.22));
}

[data-theme="light"] .witch-flyover-sky .witchWrapper {
  filter: drop-shadow(0 10px 20px rgba(28, 10, 46, 0.38)) drop-shadow(0 0 12px rgba(255, 109, 0, 0.3));
}

/* Vuelo activo de la Bruja cruzando la pantalla con ondulación orgánica */
.witch-flyover-sky .witchWrapper.is-flying {
  opacity: 1;
  visibility: visible;
  animation: witchFlyAcross 11.5s linear forwards;
}

@keyframes witchFlyAcross {
  0% {
    left: -500px;
    top: 16px;
    transform: scale(0.82) rotate(-3deg);
  }
  22% {
    top: -14px;
    transform: scale(0.82) rotate(2.5deg);
  }
  50% {
    left: calc(50vw - 175px);
    top: 8px;
    transform: scale(0.82) rotate(-2.5deg);
  }
  78% {
    top: -18px;
    transform: scale(0.82) rotate(2deg);
  }
  100% {
    left: calc(100vw + 70px);
    top: 6px;
    transform: scale(0.82) rotate(-2deg);
  }
}

@media (max-width: 768px) {
  .witch-flyover-sky {
    top: 10% !important;
    height: 125px !important;
  }
  .witch-flyover-sky .witchWrapper {
    transform: scale(0.54);
  }
  .witch-flyover-sky .witchWrapper.is-flying {
    animation: witchFlyAcrossMobile 9.2s linear forwards;
  }
  @keyframes witchFlyAcrossMobile {
    0% {
      left: -340px;
      top: 12px;
      transform: scale(0.54) rotate(-2.5deg);
    }
    50% {
      left: calc(50vw - 110px);
      top: -12px;
      transform: scale(0.54) rotate(2deg);
    }
    100% {
      left: calc(100vw + 45px);
      top: 8px;
      transform: scale(0.54) rotate(-2deg);
    }
  }
}

.witch-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* --- Micro-animaciones articuladas a 60 FPS --- */
.witch-cape {
  transform-box: fill-box;
  transform-origin: 85% 22%;
  animation: witchCapeWave 0.44s ease-in-out infinite alternate;
}

@keyframes witchCapeWave {
  0% { transform: rotate(-2.5deg) skewX(0deg) scaleX(0.98); }
  100% { transform: rotate(4deg) skewX(-4deg) scaleX(1.04); }
}

.witch-hair {
  transform-box: fill-box;
  transform-origin: 90% 35%;
  animation: witchHairFlow 0.52s ease-in-out infinite alternate;
}

@keyframes witchHairFlow {
  0% { transform: rotate(-2deg); }
  100% { transform: rotate(4.5deg) translateY(-1.5px); }
}

.witch-hat-tip {
  transform-box: fill-box;
  transform-origin: 55% 90%;
  animation: witchHatBob 0.68s ease-in-out infinite alternate;
}

@keyframes witchHatBob {
  0% { transform: rotate(-2deg); }
  100% { transform: rotate(3.5deg); }
}

.witch-bristles--upper {
  transform-box: fill-box;
  transform-origin: 95% 65%;
  animation: witchBristleUpper 0.32s ease-in-out infinite alternate;
}

.witch-bristles--lower {
  transform-box: fill-box;
  transform-origin: 95% 35%;
  animation: witchBristleLower 0.36s ease-in-out infinite alternate;
}

@keyframes witchBristleUpper {
  0% { transform: rotate(-2deg); }
  100% { transform: rotate(3.2deg); }
}

@keyframes witchBristleLower {
  0% { transform: rotate(2.5deg); }
  100% { transform: rotate(-3deg); }
}

.witch-lantern-pendulum {
  transform-box: fill-box;
  transform-origin: 12% 4%;
  animation: witchLanternSwing 0.85s ease-in-out infinite alternate;
}

@keyframes witchLanternSwing {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(7deg); }
}

.witch-cat-tail {
  transform-box: fill-box;
  transform-origin: 85% 90%;
  animation: witchCatTailSway 0.62s ease-in-out infinite alternate;
}

@keyframes witchCatTailSway {
  0% { transform: rotate(-9deg); }
  100% { transform: rotate(9deg); }
}

.witch-cat-eye {
  animation: witchCatBlink 3.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes witchCatBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.12); }
}

/* Murciélagos escolta batiendo alas al frente (equivalente a los renos de Navidad) */
.witch-escort-bat .bat-wings {
  transform-box: fill-box;
  transform-origin: center 60%;
  animation: witchEscortFlap 0.26s ease-in-out infinite alternate;
}

.witch-escort-bat--two .bat-wings {
  animation-duration: 0.31s;
  animation-delay: -0.14s;
}

.witch-escort-bat--one {
  animation: witchBatHover 1.1s ease-in-out infinite alternate;
}

.witch-escort-bat--two {
  animation: witchBatHover 1.35s ease-in-out infinite alternate-reverse;
}

@keyframes witchEscortFlap {
  0% { transform: scaleY(1) translateY(0); }
  100% { transform: scaleY(0.32) translateY(3px); }
}

@keyframes witchBatHover {
  0% { transform: translateY(-3px); }
  100% { transform: translateY(4px); }
}

/* Estela de polvo estelar y chispas calabaza/violeta detrás de la escoba */
.witch-spark {
  animation: witchSparkTrail 0.9s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.witch-spark.s2 { animation-delay: -0.18s; animation-duration: 1.05s; }
.witch-spark.s3 { animation-delay: -0.36s; animation-duration: 0.82s; }
.witch-spark.s4 { animation-delay: -0.54s; animation-duration: 1.12s; }
.witch-spark.s5 { animation-delay: -0.72s; animation-duration: 0.95s; }
.witch-spark.s6 { animation-delay: -0.28s; animation-duration: 1.2s; }

@keyframes witchSparkTrail {
  0% {
    opacity: 0.95;
    transform: translateX(0) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-34px) translateY(-5px) scale(0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .witch-flyover-sky .witchWrapper.is-flying {
    animation: none;
    display: none;
  }
}

