/* Fondo animado L2 Enjoy — partículas + aurora */

.animated-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.animated-bg__aurora,
.animated-bg__aurora::before,
.animated-bg__aurora::after {
  position: absolute;
  inset: -20%;
  content: "";
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: enjoyAurora 18s ease-in-out infinite alternate;
}

.animated-bg__aurora {
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(234, 196, 133, 0.22) 0%,
    transparent 55%
  );
}

.animated-bg__aurora::before {
  background: radial-gradient(
    ellipse at 70% 60%,
    rgba(42, 120, 180, 0.25) 0%,
    transparent 50%
  );
  animation-duration: 22s;
  animation-delay: -6s;
}

.animated-bg__aurora::after {
  background: radial-gradient(
    ellipse at 50% 90%,
    rgba(234, 196, 133, 0.12) 0%,
    transparent 45%
  );
  animation-duration: 26s;
  animation-delay: -12s;
}

.animated-bg__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.animated-bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(9, 25, 38, 0.45) 100%
  );
}

/* Capa por sección (home) — entre bg e contenido */
.section__fx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.section__fx canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.section__bg {
  z-index: 0;
}

.section__fx::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 46, 78, 0.35) 0%,
    transparent 35%,
    transparent 65%,
    rgba(17, 46, 78, 0.2) 100%
  );
}

/* Brillo sutil en páginas internas */
body.body--inner .animated-bg {
  opacity: 0.85;
}

body.body--inner .animated-bg__aurora {
  opacity: 0.5;
}

@keyframes enjoyAurora {
  0% {
    transform: translate(-3%, -2%) scale(1);
  }
  50% {
    transform: translate(2%, 3%) scale(1.08);
  }
  100% {
    transform: translate(4%, -1%) scale(1.04);
  }
}

@media (max-width: 1024px) {
  .animated-bg__aurora,
  .animated-bg__aurora::before,
  .animated-bg__aurora::after {
    filter: blur(60px);
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-bg__aurora,
  .animated-bg__aurora::before,
  .animated-bg__aurora::after {
    animation: none;
  }

  .animated-bg__canvas,
  .section__fx canvas {
    display: none;
  }
}
