/* ==========================================================================
   ANIMATIONS.CSS - Scroll Reveal, Keyframes, Transitions
   ========================================================================== */

/* Scroll Reveal */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(var(--animate-distance, 30px));
    transition: opacity var(--transition-slower), transform var(--transition-slower);
}

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

/* Stagger Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 300ms; }

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

/* Hero */
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes hero-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 50px rgba(0, 212, 255, 0.5); }
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.5; }
}

.hero__scroll-indicator {
    animation: scroll-bounce 2s ease-in-out infinite;
}

/* Stats Counter */
.stat__number.is-counting {
    animation: count-up 0.6s ease-out forwards;
}

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

/* Button Pulse */
@keyframes button-pulse {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50% { box-shadow: var(--shadow-lg); }
}

.btn--primary:hover {
    animation: button-pulse 1.5s ease-in-out infinite;
}

/* Icon Bounce */
@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.feature-card:hover .feature-card__icon {
    animation: icon-bounce 0.5s ease;
}

/* Particle Animation */
@keyframes particle-float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -10px); }
    50% { transform: translate(20px, 0); }
    75% { transform: translate(10px, 10px); }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: particle-float 8s ease-in-out infinite;
}

.particle:nth-child(2n) { animation-duration: 12s; animation-delay: -2s; }
.particle:nth-child(3n) { animation-duration: 10s; animation-delay: -4s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll, .stagger-children > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero__scroll-indicator, .particle { animation: none; }
    .btn--primary:hover { animation: none; }
}
