
/* =====================================
   PINK FLORAL GARDEN
   ANIMATIONS STYLESHEET
===================================== */

/* OPENING SCREEN */

@keyframes openingFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes openingCardReveal {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.opening-screen {
    animation: openingFadeIn 1s ease both;
}

.opening-card {
    animation: openingCardReveal 1.2s ease both;
}

/* OPENING SCREEN EXIT */

.opening-screen.hide {
    animation: openingExit 1s ease forwards;
}

@keyframes openingExit {
    to {
        opacity: 0;
        visibility: hidden;
        transform: scale(1.05);
    }
}

/* HERO CONTENT */

@keyframes heroReveal {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-tag {
    animation: heroReveal 1s ease 0.2s both;
}

.hero h1 {
    animation: heroReveal 1.2s ease 0.4s both;
}

.hero-date {
    animation: heroReveal 1.2s ease 0.7s both;
}

.hero-description {
    animation: heroReveal 1.2s ease 0.9s both;
}

.hero .btn {
    animation: heroReveal 1.2s ease 1.1s both;
}

/* FLOATING FLOWERS */

@keyframes floatFlower {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(8deg);
    }
}

.hero-flower {
    animation: floatFlower 6s ease-in-out infinite;
}

.hero-flower.right {
    animation-delay: 1.5s;
}

/* FLOATING PETALS */

@keyframes fallingPetal {
    0% {
        transform: translate3d(0, -10vh, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    50% {
        transform: translate3d(50px, 50vh, 0) rotate(180deg);
    }

    90% {
        opacity: 0.7;
    }

    100% {
        transform: translate3d(-30px, 110vh, 0) rotate(360deg);
        opacity: 0;
    }
}

.petal {
    animation: fallingPetal 10s linear infinite;
}

/* HEARTBEAT */

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }

    15% {
        transform: scale(1.2);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }

    60% {
        transform: scale(1);
    }
}

.couple-heart {
    animation: heartbeat 2s ease-in-out infinite;
}

/* BUTTON EFFECT */

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(213, 139, 158, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(213, 139, 158, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(213, 139, 158, 0);
    }
}

.opening-card .btn {
    animation: buttonPulse 2.5s infinite;
}

/* SECTION DIVIDER */

@keyframes dividerReveal {
    from {
        width: 0;
    }

    to {
        width: 100px;
    }
}

.section-divider {
    animation: dividerReveal 1.2s ease both;
}

/* IMAGE HOVER */

.couple-image img,
.event-image img,
.gallery-item img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.couple-image:hover img {
    transform: scale(1.06);
}

/* EVENT CARD */

.event-card {
    transition:
        transform 0.5s ease,
        box-shadow 0.5s ease;
}

.event-card:hover {
    box-shadow: 0 20px 45px rgba(130, 75, 90, 0.18);
}

/* GALLERY OVERLAY */

.gallery-item::after {
    transition: opacity 0.5s ease;
}

/* COUNTDOWN ANIMATION */

@keyframes countdownGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.18);
    }
}

.countdown-box {
    animation: countdownGlow 4s ease-in-out infinite;
}

.countdown-box:nth-child(2) {
    animation-delay: 0.5s;
}

.countdown-box:nth-child(3) {
    animation-delay: 1s;
}

.countdown-box:nth-child(4) {
    animation-delay: 1.5s;
}

/* MUSIC BUTTON */

@keyframes musicRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.music-button.playing {
    animation: musicRotate 5s linear infinite;
}

/* SCROLL REVEAL */

.reveal,
.reveal-left,
.reveal-right {
    will-change: opacity, transform;
}

.reveal.active,
.reveal-left.active,
.reveal-right.active {
    will-change: auto;
}

/* FOOTER HEART */

.footer .heart {
    display: inline-block;
    animation: heartbeat 1.8s ease-in-out infinite;
}

/* BACK TO TOP */

.back-to-top {
    transition:
        opacity 0.4s ease,
        visibility 0.4s ease,
        transform 0.4s ease;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* NAVIGATION */

.navbar {
    transition:
        background 0.4s ease,
        padding 0.4s ease,
        box-shadow 0.4s ease;
}

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--dark-pink);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* CLOSING SECTION */

@keyframes closingReveal {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.closing-title {
    animation: closingReveal 1.5s ease both;
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}
