/* ============================================
   EverConnect - Animations
   ============================================ */

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.3s; }

/* Reveal from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Reveal from right */
.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Hero Animations --- */
.hero-content {
    animation: heroFadeIn 0.8s ease forwards;
}

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

.hero-illustration {
    animation: heroFadeIn 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* Floating animation for the mockup */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-mockup {
    animation: float 5s ease-in-out infinite;
}

/* --- Gradient Border Glow --- */
@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(79, 70, 229, 0.2); }
    50% { box-shadow: 0 0 40px rgba(79, 70, 229, 0.4); }
}

.pricing-card.featured {
    animation: borderGlow 3s ease-in-out infinite;
}

/* --- FPS Counter Pulse --- */
@keyframes fpsPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mockup-fps {
    animation: fpsPulse 2s ease-in-out infinite;
}

/* --- Stat counter fade --- */
.stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-item:nth-child(1) { transition-delay: 0.1s; }
.stat-item:nth-child(2) { transition-delay: 0.2s; }
.stat-item:nth-child(3) { transition-delay: 0.3s; }
.stat-item:nth-child(4) { transition-delay: 0.4s; }

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

    .reveal, .reveal-left, .reveal-right, .stat-item {
        opacity: 1;
        transform: none;
    }

    .hero-content, .hero-illustration {
        animation: none;
        opacity: 1;
    }
}
