/*
  Carga este archivo DESPUÉS de tu hoja de estilos actual.
  No requiere cambios en el HTML: scroll-animations.js agrega las clases
  necesarias cuando cada bloque entra a la pantalla.
*/

@keyframes section1-left {
  from {
    left: 0;
  }
  to {
    left: -65%;
  }
}

@keyframes section1-right {
  from {
    right: 0;
  }
  to {
    right: -65%;
  }
}

@keyframes section1-seal {
  from {
    right: 50%;
  }
  to {
    right: -15%;
  }
}

@keyframes scroll-fade-up {
  from {
    opacity: 0;
    transform: translateY(2.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll-fade-left {
  from {
    opacity: 0;
    transform: translateX(-2.25rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scroll-fade-right {
  from {
    opacity: 0;
    transform: translateX(2.25rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scroll-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Solo se ocultan elementos cuando JavaScript está activo. */
.scroll-animations-active .scroll-reveal {
  opacity: 0;
  will-change: opacity, transform;
}

.scroll-animations-active .scroll-reveal--up.is-visible {
  animation: scroll-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scroll-animations-active .scroll-reveal--left.is-visible {
  animation: scroll-fade-left 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scroll-animations-active .scroll-reveal--right.is-visible {
  animation: scroll-fade-right 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scroll-animations-active .scroll-reveal--zoom.is-visible {
  animation: scroll-zoom-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Las piezas de la portada permanecen visibles hasta que JS esté listo. */
.scroll-animations-active .section1__wrapper--left,
.scroll-animations-active .section1__wrapper--right,
.scroll-animations-active .section1__seal {
  animation: none;
}

.scroll-animations-active .section--1.is-visible .section1__wrapper--left {
  animation: section1-left 1s ease-in-out 0.2s forwards;
}

.scroll-animations-active .section--1.is-visible .section1__wrapper--right {
  animation: section1-right 1s ease-in-out 0.2s forwards;
}

.scroll-animations-active .section--1.is-visible .section1__seal {
  animation: section1-seal 1s ease-in-out 0.2s forwards;
}

/* Pequeño desfase para los elementos que se revelan en grupo. */
.scroll-animations-active .section4__title {
  animation-delay: 0.05s;
}
.scroll-animations-active .section4__time {
  animation-delay: 0.18s;
}
.scroll-animations-active .section9__title {
  animation-delay: 0.05s;
}
.scroll-animations-active .section9__itinerary {
  animation-delay: 0.18s;
}
.scroll-animations-active .section15__bento {
  animation-delay: 0.12s;
}
.scroll-animations-active .section15__button {
  animation-delay: 0.22s;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-animations-active .scroll-reveal,
  .scroll-animations-active .section1__wrapper--left,
  .scroll-animations-active .section1__wrapper--right,
  .scroll-animations-active .section1__seal {
    opacity: 1;
    animation: none;
    transform: none;
  }
}
