/* global core animations */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cinematicBlurOut {
    0% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(-30px) scale(0.98);
    }
}

@keyframes cinematicBlurIn {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(30px) scale(1.02);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) scale(1);
    }
}

.text-slide-out {
    animation: cinematicBlurOut 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.text-slide-in {
    animation: cinematicBlurIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}



@keyframes sectionReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        filter: blur(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* loading spinner */
.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(0, 78, 204, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* modal expanding card mode to support shared-element transitions */
.modal-overlay.expanding-card,
.modal-overlay.expanding-card .modal-box {
    animation: none !important;
}

/* reduced motion support */
@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;
    }

    .hero-text-fade,
    .text-slide-in,
    .text-slide-out,
    .fade-in {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    .scanning-line-overlay {
        display: none !important;
    }
}

body.reduced-motion *,
body.reduced-motion ::before,
body.reduced-motion ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

body.reduced-motion .hero-text-fade,
body.reduced-motion .text-slide-in,
body.reduced-motion .text-slide-out,
body.reduced-motion .fade-in {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
}

body.reduced-motion .scanning-line-overlay {
    display: none !important;
}   