/* 
 * Astro-Tanks Animation System
 * Strictly restricted to generic CSS properties (transform, opacity)
 * to avoid Layout Reflows or transform thrashing.
 */

/* Entry Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 1.5s;
}

/* Scroll Indication Elements */
/* Easing creates a weighty float cycle instead of a generic hover */
@keyframes floatWheel {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--steel-gray);
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--steel-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -2px;
    animation: floatWheel 2s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}

/* Keyframes */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Loader Spin (Transform only) */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(241, 201, 139, 0.2);
    border-top-color: var(--thruster);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* IntersectionObserver reveal utility classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}


/* Accessibility - Respect prefers-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;
    }

    /* We still want to reveal, just instantly */
    .reveal-on-scroll {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}