/* =============================================
   ANIMATIONS — LUNA PAWS SHELTER
   ============================================= */

/* --- Fade-in on Scroll --- */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Stagger Delays --- */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* --- Button Press --- */
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* --- Card Hover Lift (supplemental) --- */
.cat-card:hover,
.step-card:hover,
.role-card:hover,
.value-card:hover,
.testimonial-card:hover,
.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* --- Nav link underline animation --- */
@keyframes navUnderline {
    from { width: 0; }
    to { width: 100%; }
}

/* --- Floating cards --- */
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Gentle pulse for badges --- */
@keyframes gentlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.hero-badge {
    animation: gentlePulse 3s ease-in-out infinite;
}

/* --- Particle animation --- */
@keyframes drift {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* --- Hamburger animation --- */
.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Smooth image load --- */
img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded,
img[src] {
    opacity: 1;
}

/* Force visible for non-JS */
noscript img,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* --- Focus states for accessibility --- */
.btn:focus-visible,
.nav-link:focus-visible,
.filter-btn:focus-visible,
.faq-question:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* --- Reduced Motion --- */
@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;
    }

    .animate-fade-up {
        opacity: 1;
        transform: none;
    }

    .particle {
        display: none;
    }

    img {
        opacity: 1;
    }
}