/* ============================================
   Joel's Automotive Repairs — Styles
   Charcoal + Coral Palette | Clean Minimalist
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --charcoal-900: #1a1a1a;
    --charcoal-800: #2d2d2d;
    --charcoal-700: #3d3d3d;
    --charcoal-600: #555555;
    --charcoal-500: #6e6e6e;
    --charcoal-400: #9a9a9a;
    --charcoal-300: #c4c4c4;
    --charcoal-200: #e0e0e0;
    --charcoal-100: #f0f0f0;
    --charcoal-50: #f7f7f7;
    
    --coral-600: #c44536;
    --coral-500: #e05242;
    --coral-400: #e86a5c;
    --coral-300: #f09085;
    --coral-200: #f7b8b0;
    --coral-100: #fce4e0;
    --coral-50: #fef5f3;
    
    --white: #ffffff;
    --off-white: #fafafa;
    
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    
    --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
    --shadow-md: 0 4px 16px rgba(26, 26, 26, 0.06);
    --shadow-lg: 0 12px 40px rgba(26, 26, 26, 0.08);
    --shadow-xl: 0 24px 60px rgba(26, 26, 26, 0.1);
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--charcoal-800);
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--coral-500);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--charcoal-900);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--charcoal-600);
    max-width: 520px;
    line-height: 1.7;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 4px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}

.btn-primary {
    background: var(--charcoal-900);
    color: var(--white);
    border-color: var(--charcoal-900);
}

.btn-primary:hover {
    background: var(--charcoal-700);
    border-color: var(--charcoal-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.btn-coral {
    background: var(--coral-500);
    color: var(--white);
    border-color: var(--coral-500);
}

.btn-coral:hover {
    background: var(--coral-600);
    border-color: var(--coral-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-white-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-white-outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.btn-full {
    width: 100%;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: all 0.4s var(--ease-out);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled .logo {
    color: var(--charcoal-900);
}

.navbar.scrolled .nav-links a {
    color: var(--charcoal-700);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--white);
    letter-spacing: -0.01em;
}

.logo .dot {
    color: var(--coral-500);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.25s ease;
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--white);
}

.btn-nav {
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--coral-500);
    color: var(--white) !important;
    border-radius: 4px;
    transition: all 0.3s var(--ease-out) !important;
}

.btn-nav:hover {
    background: var(--coral-600) !important;
    transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--white);
    transition: all 0.3s ease;
}

.navbar.scrolled .mobile-toggle span {
    background: var(--charcoal-800);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 680px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.82) 0%,
        rgba(26, 26, 26, 0.65) 50%,
        rgba(26, 26, 26, 0.50) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding-top: 72px;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--coral-300);
    margin-bottom: 24px;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    font-weight: 500;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.hero-headline em {
    font-style: italic;
    color: var(--coral-300);
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 560px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.4; transform: scaleY(0.7); }
}

/* --- Services --- */
.services {
    padding: 120px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-header .section-desc {
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.service-card {
    padding: 48px 36px;
    background: var(--white);
    border: 1px solid var(--charcoal-100);
    transition: all 0.4s var(--ease-out);
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--coral-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    background: var(--charcoal-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--charcoal-200);
    border-radius: 4px;
    margin-bottom: 24px;
    color: var(--coral-500);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    border-color: var(--coral-500);
    background: var(--coral-50);
}

.service-card h3 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--charcoal-900);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.925rem;
    color: var(--charcoal-500);
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 120px 0;
    background: var(--charcoal-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border-radius: 2px;
}

.about-image::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    border: 1.5px solid var(--coral-200);
    border-radius: 2px;
    z-index: -1;
}

.about-content {
    padding: 20px 0;
}

.about-text {
    font-size: 1rem;
    color: var(--charcoal-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin: 40px 0;
    padding: 32px 0;
    border-top: 1px solid var(--charcoal-200);
    border-bottom: 1px solid var(--charcoal-200);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--charcoal-900);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--charcoal-500);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- CTA --- */
.cta {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: var(--charcoal-900);
}

.cta-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(224, 82, 66, 0.15) 0%, transparent 60%);
}

.cta .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-eyebrow {
    color: var(--coral-300);
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 500;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Contact --- */
.contact {
    padding: 120px 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info {
    padding-top: 10px;
}

.contact-desc {
    font-size: 1rem;
    color: var(--charcoal-500);
    line-height: 1.75;
    margin-bottom: 48px;
    max-width: 440px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--charcoal-200);
    border-radius: 4px;
    color: var(--coral-500);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--charcoal-400);
    margin-bottom: 4px;
}

.contact-item a,
.contact-item p {
    font-size: 0.95rem;
    color: var(--charcoal-700);
    line-height: 1.6;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--coral-500);
}

/* Form */
.contact-form-wrapper {
    background: var(--charcoal-50);
    border: 1px solid var(--charcoal-100);
    border-radius: 4px;
    padding: 48px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal-600);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--charcoal-900);
    background: var(--white);
    border: 1.5px solid var(--charcoal-200);
    border-radius: 4px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.25s ease;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--coral-400);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--charcoal-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--coral-50);
    border: 1px solid var(--coral-200);
    border-radius: 4px;
    color: var(--coral-600);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-success.show {
    display: flex;
}

/* --- Map --- */
.map-section {
    border-top: 1px solid var(--charcoal-100);
}

.map-section iframe {
    display: block;
    width: 100%;
    height: 400px;
    filter: grayscale(0.3);
}

/* --- Footer --- */
.footer {
    background: var(--charcoal-900);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 64px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    padding: 6px 0;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--coral-400);
}

.footer-contact p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-contact a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    padding: 4px 0;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--coral-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        padding: 40px;
        transition: right 0.4s var(--ease-out);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-links a {
        color: var(--charcoal-700) !important;
        font-size: 1rem;
    }
    
    .nav-links a:hover {
        color: var(--coral-500) !important;
    }
    
    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .hero {
        min-height: 600px;
    }
    
    .hero-headline {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 36px 28px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image img {
        height: 400px;
    }
    
    .about-image::after {
        display: none;
    }
    
    .about-stats {
        gap: 28px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .contact-form-wrapper {
        padding: 32px 24px;
    }
    
    .cta {
        padding: 80px 0;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .services,
    .about,
    .contact {
        padding: 80px 0;
    }
    
    .section-header {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-details {
        gap: 24px;
    }
}

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