/* ========================================
   Commercial Driving Academy — Custom Styles
   Classic & Elegant | Burgundy + Blush
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #8a2626;
    color: #fefdfb;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f3;
}
::-webkit-scrollbar-thumb {
    background: #a82f2f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8a2626;
}

/* ========================================
   Animations
   ======================================== */

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

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Always visible fallback for reduced motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========================================
   Navbar
   ======================================== */
#navbar.scrolled {
    background: rgba(48, 13, 13, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled #nav-logo-text {
    color: #fefdfb;
}

#navbar.scrolled #nav-logo-sub {
    color: #f9d0d0;
}

#navbar.scrolled a:not([class*="bg-cream"]) {
    color: #fce4e4;
}

#navbar.scrolled a:not([class*="bg-cream"]):hover {
    color: #fefdfb;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-nav-link {
    font-size: 1.25rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

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

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

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

@media (min-width: 768px) {
    #hero h1 {
        letter-spacing: -0.02em;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    nav, #mobile-menu, .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    #hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    #hero h1, #hero p {
        color: #300d0d;
    }
}
