/* =============================================
   Wilburton Automotive LLC — Custom Styles
   Classic & Elegant | Deep Navy + Warm Gold
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --color-navy-950: #0a1a2b;
    --color-navy-900: #102a43;
    --color-navy-800: #243b53;
    --color-gold-500: #d4a017;
    --color-gold-400: #efcf64;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Lato', Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Hero Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-bounce-slow {
    animation: bounceSlow 2s ease-in-out infinite;
}

/* --- Scroll Reveal (Progressive Enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* --- Navbar Transitions --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

#navbar.scrolled .nav-text-color {
    color: #102a43;
}

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

#navbar.scrolled .nav-link {
    color: #243b53;
}

/* --- Service Card Hover --- */
.service-card {
    will-change: transform, box-shadow;
}

/* --- Mobile Menu Transitions --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
}

/* --- Selection --- */
::selection {
    background: #d4a017;
    color: #102a43;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* --- Smooth Scroll Offset for Fixed Nav --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- Reduced Motion --- */
@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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
