/* Custom styles for 15/401 Motorsports */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll reveal base — visible by default for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animation classes applied via JS only */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(26, 8, 30, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Slow spin animation for hero circles */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-spin-reverse {
    animation: spin-reverse 15s linear infinite;
}

/* Mobile menu animations */
#mobileMenu.show {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu button active state */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a081e;
}

::-webkit-scrollbar-thumb {
    background: #7B2D8E;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a554b0;
}

/* Selection color */
::selection {
    background: rgba(245, 166, 35, 0.3);
    color: #fff;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F5A623;
    transition: width 0.2s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Image lazy load placeholder */
img {
    background: linear-gradient(135deg, #2a0e30 0%, #3f1547 100%);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-spin-slow,
    .animate-spin-reverse {
        animation: none;
    }
}
