/* ======================================================
   MIS XV AÑOS · ANIMACIONES
   Todas son suaves, lentas y discretas.
   La fotografía de la quinceañera NO rota ni se inclina.
   ====================================================== */

/* ============ 1. APARICIÓN PROGRESIVA AL HACER SCROLL ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1s cubic-bezier(.22, .7, .25, 1),
    transform 1s cubic-bezier(.22, .7, .25, 1);
  transition-delay: var(--d, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Si el JS no se ejecuta, el contenido sigue siendo visible */
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* ============ 2. FOTOGRAFÍA · ENTRADA SUAVE (SIN ROTACIÓN) ============ */
.portrait {
  animation: fotoEntra 1.6s cubic-bezier(.22, .7, .25, 1) both;
}

@keyframes fotoEntra {
  from {
    opacity: 0;
    filter: blur(9px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* Brillo dorado que respira alrededor del marco (no toca la imagen) */
.portrait__aura {
  animation: auraRespira 6.5s ease-in-out infinite;
}

@keyframes auraRespira {
  0%,
  100% {
    opacity: .5;
  }
  50% {
    opacity: 1;
  }
}

.portrait__halo {
  animation: haloRespira 7s ease-in-out infinite;
}

@keyframes haloRespira {
  0%,
  100% {
    opacity: .45;
  }
  50% {
    opacity: 1;
  }
}

/* ============ 3. BRILLO SUAVE EN TÍTULOS DORADOS ============ */
.cover__title,
.chapter__title,
.chapter__date {
  animation: brilloSuave 5s ease-in-out infinite;
}

@keyframes brilloSuave {
  0%,
  100% {
    text-shadow: 0 0 22px var(--gold-glow);
  }
  50% {
    text-shadow: 0 0 34px rgba(212, 175, 55, .42);
  }
}

/* ============ 4. DESTELLOS EN ELEMENTOS DORADOS ============ */
.cover__crown-icon,
.ornament img,
.venue__icon img,
.countdown__num,
.cover__name,
.signature,
.cheer,
.closing__monogram {
  animation: destello 5.4s ease-in-out infinite;
}

@keyframes destello {
  0%,
  100% {
    filter: drop-shadow(0 0 6px var(--gold-glow));
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(244, 215, 122, .5));
  }
}

.cover__name,
.signature,
.cheer {
  animation-name: destelloBlanco;
}

@keyframes destelloBlanco {
  0%,
  100% {
    text-shadow: 0 2px 22px rgba(0, 0, 0, .4);
  }
  50% {
    text-shadow: 0 2px 32px rgba(244, 215, 122, .32);
  }
}

.countdown__num {
  animation-name: destelloNumero;
}

.moment {
  animation-name: destelloNumero;
}

.place__name,
.moment__date {
  animation: brilloSuave 5s ease-in-out infinite;
}

@keyframes destelloNumero {
  0%,
  100% {
    text-shadow: 0 0 16px var(--gold-glow);
  }
  50% {
    text-shadow: 0 0 30px rgba(212, 175, 55, .48);
  }
}

/* ============ 5. ESTRELLAS DORADAS PENDIENTES ============ */
.stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.stars i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 8px var(--gold-light);
  opacity: 0;
  animation: estrella 6.5s ease-in-out infinite;
}

@keyframes estrella {
  0%,
  100% {
    opacity: 0;
    transform: scale(.4);
  }
  40% {
    opacity: .9;
    transform: scale(1);
  }
  72% {
    opacity: .2;
    transform: scale(.65);
  }
}

/* ============ 6. FLORES · APARICIÓN + BALANCEO ============
   Cada esquina tiene un único bucle: los primeros tramos
   hacen la aparición y el resto el balanceo casi imperceptible.
   El reflejo (scale) va dentro del keyframe para no perderlo. */
.corners__item--tl {
  animation: floralTL 20s ease-in-out infinite;
}

.corners__item--tr {
  animation: floralTR 23s ease-in-out infinite;
}

.corners__item--bl {
  animation: floralBL 26s ease-in-out infinite;
}

.corners__item--br {
  animation: floralBR 21s ease-in-out infinite;
}

@keyframes floralTL {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  7% {
    opacity: .9;
    transform: translate(0, 0);
  }
  46% {
    opacity: .9;
    transform: translate(5px, 6px);
  }
  90% {
    opacity: .9;
    transform: translate(0, 0);
  }
  100% {
    opacity: .9;
    transform: translate(0, 0);
  }
}

@keyframes floralTR {
  0% {
    opacity: 0;
    transform: scaleX(-1) translate(0, 0);
  }
  7% {
    opacity: .9;
    transform: scaleX(-1) translate(0, 0);
  }
  46% {
    opacity: .9;
    transform: scaleX(-1) translate(5px, -5px);
  }
  90% {
    opacity: .9;
    transform: scaleX(-1) translate(0, 0);
  }
  100% {
    opacity: .9;
    transform: scaleX(-1) translate(0, 0);
  }
}

@keyframes floralBL {
  0% {
    opacity: 0;
    transform: scaleY(-1) translate(0, 0);
  }
  7% {
    opacity: .9;
    transform: scaleY(-1) translate(0, 0);
  }
  46% {
    opacity: .9;
    transform: scaleY(-1) translate(-5px, 5px);
  }
  90% {
    opacity: .9;
    transform: scaleY(-1) translate(0, 0);
  }
  100% {
    opacity: .9;
    transform: scaleY(-1) translate(0, 0);
  }
}

@keyframes floralBR {
  0% {
    opacity: 0;
    transform: scale(-1) translate(0, 0);
  }
  7% {
    opacity: .95;
    transform: scale(-1) translate(0, 0);
  }
  46% {
    opacity: .95;
    transform: scale(-1) translate(-5px, -6px);
  }
  90% {
    opacity: .95;
    transform: scale(-1) translate(0, 0);
  }
  100% {
    opacity: .95;
    transform: scale(-1) translate(0, 0);
  }
}

/* ============ 7. FLECHA DE DESPLAZAMIENTO ============ */
.scroll-cue__circle {
  animation: cueBounce 2.8s ease-in-out infinite;
}

@keyframes cueBounce {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 0 16px var(--gold-glow);
  }
  50% {
    transform: translateY(5px);
    box-shadow: 0 0 30px rgba(212, 175, 55, .42);
  }
}

.scroll-cue:hover .scroll-cue__circle {
  background: rgba(212, 175, 55, .16);
}

/* ============ 8. ECUALIZADOR DEL BOTÓN DE MÚSICA ============ */
@keyframes ecua {
  0%,
  100% {
    height: 3px;
  }
  50% {
    height: 9px;
  }
}

/* ============ 9. TRANSICIÓN AL ABRIR LA INVITACIÓN ============ */
.cover.is-leaving .cover__inner {
  animation: coverSale 1.05s cubic-bezier(.5, 0, .3, 1) both;
}

.cover.is-leaving .scroll-cue {
  animation: coverSaleCue .7s ease both;
}

@keyframes coverSale {
  to {
    opacity: 0;
    transform: translateY(-26px);
  }
}

@keyframes coverSaleCue {
  to {
    opacity: 0;
    transform: translateY(-14px);
  }
}

/* ============ 10. ACCESIBILIDAD ============ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .cover.is-leaving .cover__inner,
  .cover.is-leaving .scroll-cue {
    animation: none !important;
  }
}