/* ============================================
   A-Z Driving School — Editorial Style
   Terracotta + Sand Color Palette
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #c96f3f;
    color: white;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content visible without JS
   ============================================ */

/* Default state: visible (for no-JS / reduced motion) */
.reveal-up {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays for grid items */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, 
                padding-top 0.4s ease, 
                padding-bottom 0.4s ease,
                box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.08);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    position: relative;
}

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

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

/* Menu lines animation */
.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ============================================
   Scroll Indicator
   ============================================ */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: float 2s ease-in-out infinite;
}

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

/* ============================================
   Button Hover Effects
   ============================================ */
a {
    text-decoration: none;
}

/* ============================================
   Service Card Tilt Effect (subtle)
   ============================================ */
.service-card {
    will-change: transform;
}

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

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

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

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

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c96f3f;
    outline-offset: 4px;
    border-radius: 4px;
}

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    .scroll-indicator,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .reveal-up {
        opacity: 1 !important;
        transform: none !important;
    }
}
