/* ============================================
   Milford Driving School — Custom Styles
   Classic & Elegant Design System
   ============================================ */

/* --- Custom Tailwind Configuration --- */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* --- Custom Properties --- */
:root {
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Lato', system-ui, sans-serif;
    
    --color-forest-950: #0a1a0f;
    --color-forest-900: #112717;
    --color-forest-800: #1a3a2a;
    --color-forest-700: #1f461f;
    --color-forest-600: #2a5c29;
    --color-forest-500: #3d7a3c;
    --color-forest-400: #619d60;
    --color-forest-300: #8fb88e;
    --color-forest-200: #b9d0b8;
    --color-forest-100: #dce7dd;
    --color-forest-50: #f0f4f1;
    
    --color-cream-950: #33271e;
    --color-cream-900: #5c4837;
    --color-cream-800: #705741;
    --color-cream-700: #886b4c;
    --color-cream-600: #a3855e;
    --color-cream-500: #baa078;
    --color-cream-400: #ceb896;
    --color-cream-300: #dfcfb8;
    --color-cream-200: #ece4d4;
    --color-cream-100: #f5f0e8;
    --color-cream-50: #faf8f4;
}

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

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

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: #112717;
    background-color: #faf8f4;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
}

/* --- Section Utilities --- */
.section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #3d7a3c;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    color: #112717;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #1f461f;
    opacity: 0.7;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Navigation --- */
.nav-text {
    color: #1a3a2a;
}

#navbar.scrolled .nav-text {
    color: #1a3a2a;
}

#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 58, 42, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* --- Mobile Menu --- */
.mobile-nav-link {
    font-family: var(--font-serif);
}

/* --- Service Cards --- */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* --- Program Cards --- */
.program-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.program-card:hover {
    transform: translateY(-3px);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

/* --- Scroll Reveal Animations --- */
/* Default state: visible (for progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Only apply hidden state when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* --- Decorative Divider --- */
.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(to right, transparent, #b9d0b8, transparent);
}

.divider-ornament svg {
    flex-shrink: 0;
}

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

/* --- Selection Color --- */
::selection {
    background-color: #dce7dd;
    color: #112717;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8fb88e;
}
