/* ============================================
   Keyframe Animations
   ============================================ */

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-12px);
    }
    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% -200%;
    }
    50% {
        background-position: 200% 200%;
    }
    100% {
        background-position: -200% -200%;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
    }
}

/* ============================================
   Scroll Reveal Classes
   ============================================ */

.reveal {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.reveal.reveal-up {
    transform: translateY(40px);
}

.reveal.reveal-left {
    transform: translateX(-40px);
}

.reveal.reveal-right {
    transform: translateX(40px);
}

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

/* Stagger delays for grid children */
.features-grid .feature-card:nth-child(1),
.boards-grid .board-card:nth-child(1),
.awards-grid .award-card:nth-child(1),
.four-ds-grid .d-card:nth-child(1) {
    transition-delay: 0s;
}

.features-grid .feature-card:nth-child(2),
.boards-grid .board-card:nth-child(2),
.awards-grid .award-card:nth-child(2),
.four-ds-grid .d-card:nth-child(2) {
    transition-delay: 0.1s;
}

.features-grid .feature-card:nth-child(3),
.boards-grid .board-card:nth-child(3),
.awards-grid .award-card:nth-child(3),
.four-ds-grid .d-card:nth-child(3) {
    transition-delay: 0.2s;
}

.four-ds-grid .d-card:nth-child(4) {
    transition-delay: 0.3s;
}

/* Journal pills pop-in */
.journals-row .journal-pill {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.journals-row.visible .journal-pill {
    opacity: 1;
    transform: scale(1);
}

.journals-row .journal-pill:nth-child(1) { transition-delay: 0s; }
.journals-row .journal-pill:nth-child(2) { transition-delay: 0.08s; }
.journals-row .journal-pill:nth-child(3) { transition-delay: 0.16s; }
.journals-row .journal-pill:nth-child(4) { transition-delay: 0.24s; }
.journals-row .journal-pill:nth-child(5) { transition-delay: 0.32s; }

/* Timeline entry stagger */
.timeline-entry {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   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 {
        opacity: 1;
        transform: none;
    }

    .hero-label,
    .hero-name,
    .hero-title,
    .hero-mission,
    .hero-ctas {
        opacity: 1;
    }

    .timeline-entry {
        opacity: 1;
        transform: none;
    }

    .journals-row .journal-pill {
        opacity: 1;
        transform: none;
    }
}
