/* ============================================
   ANIMATIONS
   ============================================ */

/* --- KEYFRAMES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes starPulse {
    0%, 100% {
        opacity: 0.5;
        r: attr(r);
    }
    50% {
        opacity: 1;
    }
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

@keyframes scrollDown {
    0% {
        top: 0;
        opacity: 1;
    }
    80% {
        top: 28px;
        opacity: 0;
    }
    81% {
        top: 0;
        opacity: 0;
    }
    100% {
        top: 0;
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* --- ANIMATION CLASSES --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-up.visible {
    animation: fadeInUp 0.7s ease forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
}

.fade-in-left.visible {
    animation: fadeInLeft 0.7s ease forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}

.fade-in-right.visible {
    animation: fadeInRight 0.7s ease forwards;
}

/* SVG star animations */
.star-pulse {
    animation: starPulse 3s ease-in-out infinite;
}

.star-twinkle {
    animation: starTwinkle 2.5s ease-in-out infinite;
}

/* Floating badge animation */
.floating-badge {
    animation: float 5s ease-in-out infinite;
}

.badge-2 {
    animation-delay: 1.5s;
}

/* Staggered children */
.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.5s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}