/* ============================================
   JC & M Auto Repair — Custom Styles
   Classic & Elegant Design System
   ============================================ */

/* ---- Custom Properties ---- */
:root {
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', system-ui, -apple-system, sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

/* ---- Base & Reset ---- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: var(--color-teal-700);
    color: white;
}

/* ---- Section Labels ---- */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--color-teal-700);
    border-radius: 50%;
}

/* ---- Navigation ---- */
#navbar {
    backdrop-filter: none;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .font-serif {
    color: var(--color-slate-900);
}

/* ---- Hero Animations ---- */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-stats {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1s;
}

.hero-image-main {
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-image-accent {
    animation: slideInRight 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(32px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Service Cards ---- */
.service-card {
    transition: transform var(--transition-medium), background-color var(--transition-medium);
}

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

/* ---- Testimonial Cards ---- */
.testimonial-card {
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---- Image Hover Effects ---- */
.about-image-main img,
.hero-image-main img {
    transition: transform var(--transition-slow);
}

.about-image-main:hover img,
.hero-image-main:hover img {
    transform: scale(1.02);
}

/* ---- Button Focus States ---- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-teal-700);
    outline-offset: 2px;
}

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

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

/* ---- Decorative Divider ---- */
.divider-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.divider-ornament::before,
.divider-ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--color-slate-200);
}

.divider-ornament svg {
    color: var(--color-teal-700);
    flex-shrink: 0;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 1023px) {
    .section-label::before {
        display: none;
    }
    
    .hero-image-accent {
        display: none;
    }
    
    .about-image-main img {
        height: 350px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 16px;
    }
    
    .hero-stats > div {
        text-align: center;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    #contact-form {
        padding: 1.5rem;
    }
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #mobile-menu-btn,
    .hero-cta,
    button[type="submit"] {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-title,
    h2 {
        color: black;
    }
}

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