/* ============================================
   D and D Automotive — Custom Styles
   Premium Dark Luxury Theme
   Forest Green + Gold Accents
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --color-dark-950: #040605;
    --color-dark-900: #080b0a;
    --color-dark-850: #0d1110;
    --color-forest-950: #0f1a0c;
    --color-forest-900: #1f341b;
    --color-gold-400: #d4af5a;
    --color-gold-500: #c9a24e;
    --color-off-white: #f0ebe0;
}

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

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

body {
    background-color: var(--color-dark-950);
    color: var(--color-off-white);
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 175, 90, 0.3);
    color: var(--color-off-white);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-dark-950);
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 90, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 90, 0.5);
}

/* --- Navbar --- */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: transparent;
}

#navbar.scrolled {
    background: rgba(4, 6, 5, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 90, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold-400);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--color-gold-400) !important;
}

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

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

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

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

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

/* --- Menu Button Animation --- */
.menu-line {
    display: block;
}

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

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

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

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Scroll Indicator Animation --- */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* --- Hover Effects --- */
a, button {
    -webkit-tap-highlight-color: transparent;
}

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

textarea {
    field-sizing: content;
}

/* --- Select Dropdown --- */
select option {
    background: #0d1110;
    color: #f0ebe0;
}

/* --- Button Focus --- */
button:focus-visible, a:focus-visible {
    outline: 2px solid var(--color-gold-400);
    outline-offset: 2px;
}

/* --- 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) {
    .scroll-reveal {
        /* Desktop: content is visible by default, JS adds animation */
    }
}
