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

/* Base state for animated elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from left */
.animate-slide-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-slide-left.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.animate-slide-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-slide-right.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up */
.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* Fade in only */
.animate-fade {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.animate-fade.animated {
    opacity: 1;
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-children.animated > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.animated > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.animated > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.animated > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.animated > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.animated > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.animated > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.animated > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-children.animated > * {
    opacity: 1;
    transform: translateY(0);
}

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

/* Slow zoom on hero background */
@keyframes heroZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

.hero__bg {
    animation: heroZoom 20s ease-out forwards;
}

/* Hero content entrance */
@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__content {
    animation: heroFadeUp 1s ease-out 0.3s both;
}

.hero__content .hero__subtitle {
    animation: heroFadeUp 1s ease-out 0.6s both;
}

.hero__content .hero__actions {
    animation: heroFadeUp 1s ease-out 0.9s both;
}

/* ========================================
   COUNTER ANIMATION
   ======================================== */

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.trust-bar__item {
    animation: countUp 0.6s ease-out both;
}

.trust-bar__item:nth-child(1) { animation-delay: 0.1s; }
.trust-bar__item:nth-child(2) { animation-delay: 0.2s; }
.trust-bar__item:nth-child(3) { animation-delay: 0.3s; }
.trust-bar__item:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   FLOATING / PULSE
   ======================================== */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse-hover:hover {
    animation: pulse 1s ease-in-out infinite;
}

/* ========================================
   PAGE TRANSITIONS
   ======================================== */

@keyframes pageIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

main {
    animation: pageIn 0.4s ease-out;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

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

    .animate-on-scroll,
    .animate-slide-left,
    .animate-slide-right,
    .animate-scale,
    .animate-fade,
    .stagger-children > * {
        opacity: 1;
        transform: none;
    }

    .hero__bg {
        animation: none;
    }
}
