/* Animations for domain website */

/* Neon text animation */
@keyframes neon-pulse {
    0% {
        text-shadow: 
            0 0 5px var(--color-accent),
            0 0 10px var(--color-accent),
            0 0 20px var(--color-accent);
    }
    50% {
        text-shadow: 
            0 0 5px var(--color-accent),
            0 0 15px var(--color-accent),
            0 0 30px var(--color-accent),
            0 0 40px var(--color-accent);
    }
    100% {
        text-shadow: 
            0 0 5px var(--color-accent),
            0 0 10px var(--color-accent),
            0 0 20px var(--color-accent);
    }
}

.neon-text {
    animation: neon-pulse 2s infinite;
}

/* Stats counter animation using CSS only */
.stat-item:nth-child(1) .stat-number {
    counter-reset: count 0;
    animation: count-10 2s forwards ease-out;
}

.stat-item:nth-child(2) .stat-number {
    counter-reset: count 0;
    animation: count-500 2s forwards ease-out;
}

.stat-item:nth-child(3) .stat-number {
    counter-reset: count 0;
    animation: count-98 2s forwards ease-out;
}

.stat-item .stat-number::after {
    content: counter(count);
}

@keyframes count-10 {
    0% { counter-increment: count 0; }
    10% { counter-increment: count 1; }
    20% { counter-increment: count 2; }
    30% { counter-increment: count 3; }
    40% { counter-increment: count 4; }
    50% { counter-increment: count 5; }
    60% { counter-increment: count 6; }
    70% { counter-increment: count 7; }
    80% { counter-increment: count 8; }
    90% { counter-increment: count 9; }
    100% { counter-increment: count 10; }
}

@keyframes count-500 {
    0% { counter-increment: count 0; }
    10% { counter-increment: count 50; }
    20% { counter-increment: count 100; }
    30% { counter-increment: count 150; }
    40% { counter-increment: count 200; }
    50% { counter-increment: count 250; }
    60% { counter-increment: count 300; }
    70% { counter-increment: count 350; }
    80% { counter-increment: count 400; }
    90% { counter-increment: count 450; }
    100% { counter-increment: count 500; }
}

@keyframes count-98 {
    0% { counter-increment: count 0; }
    10% { counter-increment: count 10; }
    20% { counter-increment: count 20; }
    30% { counter-increment: count 30; }
    40% { counter-increment: count 40; }
    50% { counter-increment: count 50; }
    60% { counter-increment: count 60; }
    70% { counter-increment: count 70; }
    80% { counter-increment: count 80; }
    90% { counter-increment: count 90; }
    100% { counter-increment: count 98; }
}

/* CSS-only animation trigger on scroll using intersection observer fallback */
@media (prefers-reduced-motion: no-preference) {
    .stat-item .stat-number {
        opacity: 0;
    }
    
    .stat-item.visible .stat-number {
        opacity: 1;
    }
}

/* Feature icon animation */
@keyframes icon-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.feature-icon:hover::before {
    animation: icon-pulse 1s infinite;
}

/* Service card hover animation */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Button hover animation */
.btn-primary {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 232, 195, 0.3);
}

/* FAQ animation */
.faq-answer {
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-question::after {
    transition: transform 0.3s ease;
}

/* Testimonial card hover animation */
.testimonial-card {
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Page transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} 