/* =============================================
   MATRIX MISSIONS - Premium Animations Library
   Smooth, Professional, Fintech-Grade Effects
   ============================================= */

/* ========== Animation States ========== */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--transition-slower), transform var(--transition-slower);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for card grids */
.stagger-1 {
    transition-delay: 0ms;
}

.stagger-2 {
    transition-delay: 100ms;
}

.stagger-3 {
    transition-delay: 200ms;
}

.stagger-4 {
    transition-delay: 300ms;
}

.stagger-5 {
    transition-delay: 400ms;
}

.stagger-6 {
    transition-delay: 500ms;
}

/* ========== Fade Animations ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    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);
    }
}

/* ========== Scale Animations ========== */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

/* ========== Glow Pulse Animation ========== */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(212, 168, 83, 0.3),
            0 0 40px rgba(212, 168, 83, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(212, 168, 83, 0.5),
            0 0 60px rgba(212, 168, 83, 0.2);
    }
}

/* ========== Hero Background Animation ========== */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.5;
    }

    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-10px) translateX(-10px);
        opacity: 0.6;
    }

    75% {
        transform: translateY(-30px) translateX(5px);
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ========== Text Animations ========== */
@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blinkCursor {

    0%,
    100% {
        border-right-color: var(--accent-primary);
    }

    50% {
        border-right-color: transparent;
    }
}

@keyframes textReveal {
    0% {
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }

    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* ========== Line Drawing Animation ========== */
@keyframes drawLine {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* ========== Floating Animation ========== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ========== Rotate Animation ========== */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ========== Slide Animations ========== */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========== Utility Animation Classes ========== */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ========== Delay Classes ========== */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.delay-600 {
    animation-delay: 600ms;
}

.delay-700 {
    animation-delay: 700ms;
}

.delay-800 {
    animation-delay: 800ms;
}

.delay-1000 {
    animation-delay: 1000ms;
}

/* ========== Duration Classes ========== */
.duration-slow {
    animation-duration: 1s;
}

.duration-slower {
    animation-duration: 1.5s;
}

.duration-slowest {
    animation-duration: 2s;
}

/* ========== Hover Effects ========== */
.hover-lift {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

.hover-glow {
    transition: box-shadow var(--transition-smooth);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

.hover-scale {
    transition: transform var(--transition-smooth);
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* ========== Page Transition ========== */
.page-transition {
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.1s forwards;
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {

    .animate-on-scroll,
    .animate-fade-in,
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-scale-in,
    .animate-float,
    .animate-glow,
    .animate-gradient,
    .animate-shimmer {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }
}