/* =========================================================
   ANIMATIONS.CSS — THE CINEMATIC MOTION SYSTEM
   ========================================================= */

@keyframes gentle-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-9px);
    }
}

@keyframes sacred-glow {
    0%, 100% {
        opacity: .55;
        transform: scale(.96);
    }
    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

@keyframes bell-swing {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

@keyframes cloud-drift-back {
    0%, 100% {
        transform: translate3d(-8%, 0, 0);
    }
    50% {
        transform: translate3d(24%, -2%, 0);
    }
}

@keyframes cloud-drift-front {
    0%, 100% {
        transform: translate3d(8%, 0, 0);
    }
    50% {
        transform: translate3d(-24%, 3%, 0);
    }
}

@keyframes button-shimmer {
    0%, 65% {
        left: -70%;
    }
    90%, 100% {
        left: 140%;
    }
}

@keyframes scroll-pulse {
    0%, 100% {
        opacity: .5;
        transform: translateY(0) rotate(45deg);
    }
    50% {
        opacity: 1;
        transform: translateY(8px) rotate(45deg);
    }
}

@keyframes equalizer {
    0%, 100% {
        transform: scaleY(.35);
    }
    50% {
        transform: scaleY(1);
    }
}

@keyframes ring-pulse {
    0%, 100% {
        opacity: .6;
        transform: scale(1);
    }
    50% {
        opacity: .15;
        transform: scale(1.18);
    }
}

@keyframes vow-glow {
    0%, 100% {
        opacity: .45;
        text-shadow: 0 0 0 transparent;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 20px #F6D99D;
    }
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes opening-appear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes star-breathe {
    0%, 100% {
        opacity: .25;
    }
    50% {
        opacity: .5;
    }
}

@keyframes light-rays {
    0%, 100% {
        opacity: .5;
    }
    50% {
        opacity: .9;
    }
}

@keyframes text-gold-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.12);
    }
}

@keyframes light-transition {
    0% {
        opacity: 0;
        visibility: visible;
    }
    45%, 55% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}


/* OPENING ANIMATIONS */

.opening-scene__content {
    animation: opening-appear 1.6s var(--ease-luxury) both;
}

.opening-monogram__halo {
    animation: sacred-glow 4s ease-in-out infinite;
}

.opening-diya__glow {
    animation: sacred-glow 2.8s ease-in-out infinite;
}

.opening-scene__stars {
    animation: star-breathe 7s ease-in-out infinite;
}

.temple-bell {
    animation: bell-swing 4.8s ease-in-out infinite;
}

.temple-bell--right {
    animation-delay: -2.4s;
}

.luxury-button__shine {
    animation: button-shimmer 6s ease-in-out infinite;
}


/* HERO ANIMATIONS */

.hero-cloud--back {
    animation: cloud-drift-back 95s ease-in-out infinite;
}

.hero-cloud--front {
    animation: cloud-drift-front 70s ease-in-out infinite;
}

.hero-sun-glow {
    animation: sacred-glow 10s ease-in-out infinite;
}

.hero-light-rays {
    animation: light-rays 12s ease-in-out infinite;
}

.hero-name {
    animation: text-gold-glow 8s ease-in-out infinite;
}

.scroll-indicator__diamond {
    animation: scroll-pulse 2s ease-in-out infinite;
}


/* TYPOGRAPHIC LETTERS */

.split-letter {
    display: inline-block;
    transform-origin: center bottom;
    will-change: transform, opacity;
}

.split-word {
    display: inline-block;
    white-space: nowrap;
}


/* MUSIC */

.music-toggle.is-playing .music-toggle__ring {
    animation: ring-pulse 2s ease-in-out infinite;
}

.music-toggle.is-playing .music-toggle__equalizer i {
    animation: equalizer 1s ease-in-out infinite;
}

.music-toggle__equalizer i:nth-child(1) {
    animation-delay: -.2s;
}

.music-toggle__equalizer i:nth-child(2) {
    animation-delay: -.7s;
}

.music-toggle__equalizer i:nth-child(3) {
    animation-delay: -.4s;
}

.music-toggle__equalizer i:nth-child(4) {
    animation-delay: -.9s;
}

.music-toggle__equalizer i:nth-child(5) {
    animation-delay: -.1s;
}


/* DIVINE UNION */

.vow-symbols span {
    animation: vow-glow 3s ease-in-out infinite;
    animation-delay: calc(var(--vow-index) * .28s);
}

.closing-lotus__glow {
    animation: sacred-glow 5s ease-in-out infinite;
}

.divine-light.is-active {
    animation: light-transition 2.2s ease-in-out both;
}


/* PERFORMANCE */

body.page-hidden *,
.scene.is-offscreen .hero-cloud,
.scene.is-offscreen .hero-sun-glow,
.scene.is-offscreen .hero-light-rays,
.scene.is-offscreen .vow-symbols span,
.scene.is-offscreen .closing-lotus__glow {
    animation-play-state: paused !important;
}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .hero-cloud,
    .temple-bell,
    .hero-name,
    .opening-monogram__halo,
    .opening-diya__glow,
    .vow-symbols span {
        animation: none !important;
    }

    .split-letter {
        transform: none !important;
        opacity: 1 !important;
    }

    .particle-canvas {
        display: none;
    }
}
