/* ============================================
   Jeffreys Driving School — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2D1B2D;
}
::-webkit-scrollbar-thumb {
    background: #6B4C6E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9B5985;
}

/* Selection color */
::selection {
    background: #D4A84B;
    color: #2D1B2D;
}

/* ============================================
   Reveal Animations (Progressive Enhancement)
   ============================================ */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up.animated {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-left.animated {
        opacity: 1;
        transform: translateX(0);
    }
    .reveal-right.animated {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Initial hidden state for JS-gated animations */
.js-enabled .reveal-up {
    opacity: 0;
    transform: translateY(30px);
}
.js-enabled .reveal-left {
    opacity: 1;
    transform: translateX(-30px);
}
.js-enabled .reveal-right {
    opacity: 1;
    transform: translateX(30px);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   Navbar
   ============================================ */
.nav-scrolled {
    background: rgba(26, 15, 26, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .font-serif {
    color: #F9F3F7 !important;
}

/* ============================================
   Hero section
   ============================================ */
#hero {
    position: relative;
}

/* ============================================
   Card hover effects
   ============================================ */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(107, 76, 110, 0.15);
}

/* ============================================
   Button focus states
   ============================================ */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A84B;
    outline-offset: 2px;
}

/* ============================================
   Form inputs
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15);
}

/* ============================================
   Testimonial cards
   ============================================ */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(107, 76, 110, 0.12);
}

/* ============================================
   Mobile menu animation
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}
