/* ============================================
   TrueSouth Motorsports — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Navigation */
.nav-text {
    color: #065f46;
    transition: color 0.3s ease;
}

.nav-subtext {
    color: #047857;
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 95, 70, 0.08);
}

.navbar-scrolled .nav-text {
    color: #065f46;
}

.navbar-scrolled .nav-subtext {
    color: #047857;
}

/* Mobile menu links */
.mobile-link {
    display: block;
}

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* Scroll reveal — progressive enhancement */
/* Default state: visible (no JS required) */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS adds .revealed, animate in */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion: keep everything visible */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

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

::-webkit-scrollbar-track {
    background: #faf5eb;
}

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}

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

/* Selection */
::selection {
    background: #065f46;
    color: #fdfbf7;
}

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

/* Form inputs */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Button hover lift */
button, a {
    transition: all 0.2s ease;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #d1fae5 0%, #ece0b8 100%);
}

/* Print styles */
@media print {
    nav, #contactForm, #formSuccess {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
