/* ============================================
   Fred's Auto Clinic — Custom Styles
   Palette: Emerald Green (#059669) + Cream (#F5F0E8)
   ============================================ */

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

:root {
    --emerald-50:  #ECFDF5;
    --emerald-100: #D1FAE5;
    --emerald-200: #A7F3D0;
    --emerald-300: #6EE7B7;
    --emerald-400: #34D399;
    --emerald-500: #10B981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065F46;
    --emerald-900: #064E3B;
    --cream-50:    #FBF9F4;
    --cream-100:   #F5F0E8;
    --cream-200:   #EDE6D6;
    --cream-300:   #E0D5C0;
    --text-dark:   #1A2E23;
    --text-mid:    #3D5A47;
    --text-light:  #6B8F78;
    --white:       #FFFFFF;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(5,150,105,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(5,150,105,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(5,150,105,0.14), 0 4px 12px rgba(0,0,0,0.08);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--cream-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--emerald-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--emerald-700);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--emerald-600);
    color: var(--white);
    border-color: var(--emerald-600);
    box-shadow: 0 4px 14px rgba(5,150,105,0.35);
}

.btn-primary:hover {
    background: var(--emerald-700);
    border-color: var(--emerald-700);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5,150,105,0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--emerald-700);
    border-color: var(--white);
    transform: translateY(-2px);
}

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

.btn-outline-light:hover {
    background: var(--white);
    color: var(--emerald-700);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* --- Section Tags --- */
.section-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--emerald-600);
    background: var(--emerald-50);
    border: 1px solid var(--emerald-200);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-tag-light {
    color: var(--emerald-300);
    background: rgba(52,211,153,0.15);
    border-color: rgba(52,211,153,0.3);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

.section-title-light {
    color: var(--white);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-mid);
    max-width: 600px;
}

.section-desc-light {
    color: rgba(255,255,255,0.8);
}

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

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(251,249,244,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cream-200);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--emerald-700);
}

.logo-light .logo-text {
    color: var(--cream-100);
}

.logo-light .logo-icon circle {
    fill: #34D399;
}

/* --- Navigation --- */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu li a {
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-mid);
    border-radius: 50px;
    transition: all 0.2s ease;
}

.nav-menu li a:hover {
    color: var(--emerald-700);
    background: var(--emerald-50);
}

.nav-cta {
    background: var(--emerald-600) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(5,150,105,0.25);
}

.nav-cta:hover {
    background: var(--emerald-700) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--emerald-900);
    padding-top: 72px;
}

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

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

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(6,78,59,0.92) 0%,
        rgba(5,150,105,0.80) 50%,
        rgba(4,120,87,0.88) 100%
    );
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(6,78,59,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 24px 100px;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: var(--cream-100);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 28px;
}

.hero-headline {
    font-size: clamp(2.75rem, 7vw, 5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.08;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-headline br {
    display: none;
}

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.85);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-trust {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 2;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

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

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

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    border: 1px solid var(--cream-200);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--emerald-200);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--emerald-100);
    border-color: var(--emerald-300);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.65;
}

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

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

.about-image {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.about-img-float {
    position: absolute;
    bottom: -30px;
    right: -30px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--cream-50);
}

.about-img-float img {
    width: 260px;
    height: 180px;
    object-fit: cover;
}

.about-stat {
    position: absolute;
    top: -20px;
    left: -20px;
    background: var(--emerald-600);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.about-stat .stat-number {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    line-height: 1.2;
}

.about-stat .stat-label {
    font-size: 0.78rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.about-content .section-title {
    margin-bottom: 24px;
}

.about-text {
    font-size: 1.02rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: 16px;
}

.about-features {
    margin-top: 32px;
    display: grid;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* --- Why Us --- */
.why-us {
    background: linear-gradient(135deg, var(--emerald-800) 0%, var(--emerald-600) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.why-us::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52,211,153,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.why-us::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(110,231,183,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    position: relative;
    z-index: 1;
}

.why-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all 0.3s ease;
}

.why-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-4px);
}

.why-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 3rem;
    color: rgba(52,211,153,0.35);
    line-height: 1;
    margin-bottom: 16px;
}

.why-card h3 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 12px;
}

.why-card p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
}

/* --- CTA --- */
.cta {
    background: var(--cream-100);
    padding: 80px 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--emerald-700) 0%, var(--emerald-500) 100%);
    border-radius: var(--radius-lg);
    padding: 64px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.cta-content .section-tag {
    margin-bottom: 20px;
}

.cta-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    color: var(--white);
    margin-bottom: 16px;
}

.cta-text {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    max-width: 440px;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* --- Contact --- */
.contact {
    background: var(--cream-50);
    padding: 100px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}

.contact-info {
    display: grid;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.25s ease;
}

.info-card:hover {
    border-color: var(--emerald-200);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-card h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
}

.info-card a {
    color: var(--emerald-600);
}

.info-card a:hover {
    color: var(--emerald-700);
    text-decoration: underline;
}

.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.contact-form h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.form-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--cream-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--cream-50);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--emerald-400);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}

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

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

.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-200);
    border-radius: var(--radius-sm);
    color: var(--emerald-700);
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- Map --- */
.map-section {
    background: var(--cream-200);
}

.map-section iframe {
    width: 100%;
    height: 320px;
    display: block;
}

/* --- Footer --- */
.footer {
    background: var(--emerald-900);
    color: rgba(255,255,255,0.75);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
    display: grid;
    gap: 10px;
}

.footer-links ul li a {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links ul li a:hover {
    color: var(--emerald-300);
    text-decoration: none;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-contact a {
    color: rgba(255,255,255,0.65);
}

.footer-contact a:hover {
    color: var(--emerald-300);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Hidden state for JS-enhanced reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(251,249,244,0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        border-bottom: 1px solid var(--cream-200);
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li a {
        display: block;
        padding: 12px 16px;
        width: 100%;
    }

    .nav-cta {
        text-align: center;
        margin-top: 8px;
    }

    .hero-headline {
        font-size: clamp(2.25rem, 10vw, 3.5rem);
    }

    .hero-headline br {
        display: inline;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-trust {
        gap: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-img-float {
        right: 10px;
        bottom: -20px;
    }

    .about-stat {
        left: 10px;
        top: -16px;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        flex-direction: column;
        text-align: center;
        padding: 48px 28px;
    }

    .cta-text {
        max-width: 100%;
    }

    .cta-actions {
        justify-content: center;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content {
        padding: 40px 16px 80px;
    }

    .services, .about, .why-us, .contact {
        padding: 72px 0;
    }

    .service-card {
        padding: 28px 22px;
    }

    .contact-form-wrap {
        padding: 28px 20px;
    }

    .btn-lg {
        padding: 16px 28px;
        font-size: 0.95rem;
    }
}
