/* Fire Particle Animation */
@keyframes riseAndFade {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.8;
        filter: blur(0px);
    }
    50% {
        opacity: 0.6;
        filter: blur(1px);
    }
    100% {
        transform: translateY(-100px) translateX(calc(var(--x-drift) * 20px)) scale(0.5);
        opacity: 0;
        filter: blur(2px);
    }
}

.fire-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center, #ffdd1f, #ff5f2e, #C41E1E);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 10px 2px rgba(255, 120, 50, 0.5);
    transform-origin: center bottom;
    bottom: 0;
    animation: riseAndFade 1.5s ease-out forwards;
    will-change: transform, opacity;
}

/* Add different speeds and paths for particles */
.fire-particle:nth-of-type(2n) {
    --x-drift: 1;
    animation-duration: 1.2s;
}

.fire-particle:nth-of-type(2n+1) {
    --x-drift: -1;
    animation-duration: 1.8s;
}

.fire-particle:nth-of-type(3n) {
    --x-drift: 0.5;
    animation-duration: 1.6s;
}

.fire-particle:nth-of-type(3n+1) {
    --x-drift: -0.5;
    animation-duration: 1.3s;
}

/* Scroll animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes */
.animate-slideInUp {
    animation: slideInUp 0.8s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.8s ease-out forwards;
}

/* Staggered animations */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

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

    .fire-particle {
        display: none;
    }
}