/* ==========================================================================
   Hero Animations
   ========================================================================== */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Initial states */
.hero-text,
.hero .lead,
.hero .btn {
    opacity: 0;
    will-change: transform, opacity;
    animation-play-state: paused;
    animation-fill-mode: both;
}

/* Animation assignments */
.hero-text {
    animation: heroFadeIn 1s ease-out forwards;
}

.hero .lead {
    animation: heroFadeIn 1s ease-out 0.3s forwards;
}

.hero .btn {
    animation: heroFadeIn 1s ease-out 0.6s forwards;
}

/* Animation play state when page is loaded */
.loaded .hero-text,
.loaded .hero .lead,
.loaded .hero .btn {
    animation-play-state: running;
}

/* ==========================================================================
   Section Animations
   ========================================================================== */
.section .animate {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    will-change: transform, opacity;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section .animate.active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   List Animations
   ========================================================================== */
.animate-list {
    list-style: none;
    padding-left: 0;
}

.animate-list li {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    will-change: transform, opacity;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: calc(var(--item-index, 0) * 0.1s);
}

.animate-list.active li {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Fallback for browsers that don't support CSS custom properties */
.animate-list li:nth-child(1) { transition-delay: 0.1s; }
.animate-list li:nth-child(2) { transition-delay: 0.2s; }
.animate-list li:nth-child(3) { transition-delay: 0.3s; }
.animate-list li:nth-child(4) { transition-delay: 0.4s; }
.animate-list li:nth-child(5) { transition-delay: 0.5s; }

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-text,
    .hero .lead,
    .hero .btn,
    .section .animate,
    .animate-list li {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Class-based motion reduction (for JavaScript toggle) */
.reduce-motion .hero-text,
.reduce-motion .hero .lead,
.reduce-motion .hero .btn,
.reduce-motion .section .animate,
.reduce-motion .animate-list li {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Add this to your CSS */
.reduce-animations .hero-text,
.reduce-animations .hero .lead,
.reduce-animations .hero .btn,
.reduce-animations .section .animate,
.reduce-animations .animate-list li {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .hero-text,
    .hero .lead,
    .hero .btn,
    .section .animate,
    .animate-list li {
        opacity: 1 !important;
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}