/* ============================================
   C&B Used Cars and Parts — Styles
   Emerald Green + Cream | Clean Minimalist
   ============================================ */

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

:root {
    --emerald-900: #022c22;
    --emerald-800: #064e3b;
    --emerald-700: #065f46;
    --emerald-600: #047857;
    --emerald-500: #059669;
    --emerald-400: #10b981;
    --emerald-100: #d1fae5;
    --emerald-50:  #ecfdf5;

    --cream-50:  #fefdf8;
    --cream-100: #fefce8;
    --cream-200: #fef9c3;
    --cream-300: #fde68a;
    --cream-400: #fcd34d;

    --stone-50:  #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--stone-800);
    background-color: var(--cream-50);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--emerald-700);
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    font-size: 0.875rem;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* --- Loader --- */
.loader {
    position: fixed;
    inset: 0;
    background: var(--emerald-900);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
    border-bottom-color: var(--stone-200);
    box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-mark {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.375rem;
    color: var(--emerald-700);
    letter-spacing: -0.02em;
}
.logo-text {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--stone-600);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: none;
}
@media (min-width: 640px) {
    .logo-text { display: block; }
}

/* Nav */
.nav-list {
    display: none;
    list-style: none;
    align-items: center;
    gap: 32px;
}
@media (min-width: 768px) {
    .nav-list { display: flex; }
}
.nav-link {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--stone-600);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color var(--transition);
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--emerald-600);
    transition: width var(--transition);
}
.nav-link:hover,
.nav-link:focus {
    color: var(--emerald-700);
}
.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}
.nav-cta {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--emerald-700);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 20px;
    border: 1px solid var(--emerald-600);
    border-radius: 2px;
    transition: all var(--transition);
}
.nav-cta:hover {
    background: var(--emerald-700);
    color: #fff;
    border-color: var(--emerald-700);
}

/* Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}
@media (min-width: 768px) {
    .menu-toggle { display: none; }
}
.menu-toggle-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--stone-700);
    transition: all var(--transition);
    transform-origin: center;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    top: 72px;
    background: rgba(254, 253, 248, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}
.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}
.mobile-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 24px;
}
.mobile-nav-list {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mobile-nav-link {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--stone-800);
    padding: 16px 0;
    transition: color var(--transition);
}
.mobile-nav-link:hover {
    color: var(--emerald-700);
}
.mobile-nav-divider {
    height: 1px;
    background: var(--stone-200);
    margin: 16px 0;
}
.mobile-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--emerald-700);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 28px;
    border: 1px solid var(--emerald-600);
    border-radius: 2px;
    transition: all var(--transition);
    margin-top: 8px;
}
.mobile-nav-cta:hover {
    background: var(--emerald-700);
    color: #fff;
    border-color: var(--emerald-700);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--emerald-900);
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(2, 44, 34, 0.92) 0%,
        rgba(6, 78, 59, 0.85) 50%,
        rgba(4, 120, 87, 0.75) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 24px 80px;
    max-width: 800px;
}
.hero-greeting {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--emerald-400);
    margin-bottom: 20px;
}
.hero-title {
    font-family: var(--font-serif);
    font-weight: 300;
    line-height: 1.05;
    margin-bottom: 24px;
}
.hero-title-main {
    display: block;
    font-size: clamp(2.75rem, 7vw, 5rem);
    color: #fff;
    letter-spacing: -0.02em;
}
.hero-title-accent {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    color: var(--emerald-300);
    font-style: italic;
    font-weight: 300;
    margin-top: 4px;
    letter-spacing: 0.01em;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 300;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 40px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}
.hero-details {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.hero-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.02em;
}
.hero-detail svg {
    color: var(--emerald-400);
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: 2px;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-emerald {
    background: var(--emerald-700);
    color: #fff;
    border: 1px solid var(--emerald-700);
}
.btn-emerald:hover {
    background: var(--emerald-800);
    border-color: var(--emerald-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(4, 120, 87, 0.3);
}
.btn-light {
    background: #fff;
    color: var(--emerald-800);
    border: 1px solid #fff;
}
.btn-light:hover {
    background: var(--cream-100);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-ghost-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}
.btn-ghost-light:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.08);
}
.btn-full {
    width: 100%;
}

/* Hero scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.4);
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* --- Divider --- */
.divider {
    padding: 0;
}
.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--stone-300), transparent);
}

/* --- Section Shared --- */
.section-label {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--emerald-600);
    margin-bottom: 16px;
}
.section-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    color: var(--stone-900);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}
.section-desc {
    font-size: 1rem;
    font-weight: 300;
    color: var(--stone-600);
    line-height: 1.8;
    max-width: 560px;
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--cream-50);
}
.services .section-label,
.services .section-title,
.services .section-desc {
    margin-bottom: 48px;
}
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--stone-200);
    border: 1px solid var(--stone-200);
}
@media (min-width: 640px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}
.service-card {
    background: var(--cream-50);
    padding: 40px 32px;
    transition: all var(--transition);
}
.service-card:hover {
    background: #fff;
}
.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-700);
    margin-bottom: 24px;
}
.service-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.375rem;
    color: var(--stone-900);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.service-desc {
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--stone-600);
    line-height: 1.75;
}

/* --- About --- */
.about {
    padding: 100px 0;
    background: #fff;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: center;
}
@media (min-width: 900px) {
    .about-grid { grid-template-columns: 1fr 1fr; gap: 72px; }
}
.about-image {
    position: relative;
}
.about-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}
.about-image-wrapper img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
@media (min-width: 640px) {
    .about-image-wrapper img { height: 500px; }
}
.about-image-accent {
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 120px;
    height: 120px;
    border: 1px solid var(--emerald-200);
    border-radius: 2px;
    z-index: -1;
}
@media (min-width: 640px) {
    .about-image-accent { width: 160px; height: 160px; }
}
.about-content .section-label { margin-bottom: 16px; }
.about-content .section-title { margin-bottom: 24px; }
.about-text {
    font-size: 1rem;
    font-weight: 300;
    color: var(--stone-600);
    line-height: 1.85;
    margin-bottom: 16px;
}
.about-values {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.value-item {
    display: flex;
    align-items: center;
    gap: 16px;
}
.value-line {
    width: 32px;
    height: 1px;
    background: var(--emerald-500);
    flex-shrink: 0;
}
.value-text {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--stone-700);
}

/* --- Vehicles --- */
.vehicles {
    padding: 100px 0;
    background: var(--cream-50);
}
.vehicles .section-label,
.vehicles .section-title,
.vehicles .section-desc {
    margin-bottom: 48px;
}
.vehicles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
}
@media (min-width: 768px) {
    .vehicles-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
.vehicle-card {
    background: #fff;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--stone-200);
    transition: all var(--transition);
}
.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: var(--emerald-200);
}
.vehicle-image {
    overflow: hidden;
}
.vehicle-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.vehicle-card:hover .vehicle-image img {
    transform: scale(1.04);
}
.vehicle-info {
    padding: 28px 24px;
}
.vehicle-name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.375rem;
    color: var(--stone-900);
    margin-bottom: 8px;
}
.vehicle-desc {
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--stone-600);
    line-height: 1.7;
}
.vehicles-cta {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.vehicles-cta p {
    font-size: 1rem;
    color: var(--stone-600);
    font-weight: 300;
}

/* --- Contact --- */
.contact {
    padding: 100px 0;
    background: #fff;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
}
@media (min-width: 900px) {
    .contact-grid { grid-template-columns: 1fr 1fr; gap: 72px; }
}
.contact-info .section-label { margin-bottom: 16px; }
.contact-info .section-title { margin-bottom: 20px; }
.contact-desc {
    font-size: 1rem;
    font-weight: 300;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 40px;
}
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.contact-detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--stone-200);
    border-radius: 2px;
    color: var(--emerald-700);
    flex-shrink: 0;
}
.contact-detail-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone-400);
    margin-bottom: 4px;
}
.contact-detail-value {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--stone-800);
    line-height: 1.6;
}
.contact-link {
    color: var(--emerald-700);
    transition: color var(--transition);
}
.contact-link:hover {
    color: var(--emerald-500);
    text-decoration: underline;
}

/* Form */
.contact-form-wrapper {
    background: var(--cream-50);
    padding: 40px 32px;
    border: 1px solid var(--stone-200);
    border-radius: 2px;
}
@media (min-width: 640px) {
    .contact-form-wrapper { padding: 48px 40px; }
}
.form-title {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--stone-900);
    margin-bottom: 32px;
}
.form-group {
    margin-bottom: 24px;
}
.form-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone-500);
    margin-bottom: 8px;
}
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--stone-800);
    background: #fff;
    border: 1px solid var(--stone-300);
    border-radius: 2px;
    outline: none;
    transition: border-color var(--transition);
    -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus {
    border-color: var(--emerald-500);
}
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--stone-400);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
}
.form-success {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--emerald-50);
    border: 1px solid var(--emerald-200);
    border-radius: 2px;
    color: var(--emerald-800);
    font-size: 0.9375rem;
    font-weight: 400;
}
.form-success svg {
    color: var(--emerald-600);
    flex-shrink: 0;
}

/* --- Map --- */
.map-section {
    border-top: 1px solid var(--stone-200);
}
.map-container iframe {
    filter: grayscale(0.5) contrast(1.05);
    transition: filter var(--transition);
}
.map-container iframe:hover {
    filter: grayscale(0);
}

/* --- Footer --- */
.site-footer {
    background: var(--emerald-900);
    color: rgba(255,255,255,0.65);
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand { }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.footer-logo-mark {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.375rem;
    color: var(--emerald-400);
}
.footer-logo-text {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.footer-tagline {
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.75;
    max-width: 300px;
    color: rgba(255,255,255,0.5);
}
.footer-heading {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 20px;
}
.footer-links ul,
.footer-contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.footer-link {
    font-size: 0.9375rem;
    font-weight: 300;
    color: rgba(255,255,255,0.65);
    transition: color var(--transition);
}
.footer-link:hover {
    color: var(--emerald-400);
}
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.6;
}
.footer-contact-list svg {
    color: var(--emerald-500);
    flex-shrink: 0;
    margin-top: 3px;
}
.footer-contact-link {
    color: rgba(255,255,255,0.65);
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-contact-link:hover {
    color: var(--emerald-400);
}
.footer-bottom {
    margin-top: 56px;
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
.footer-bottom p {
    font-size: 0.8125rem;
    font-weight: 300;
    color: rgba(255,255,255,0.35);
}
.footer-bottom a {
    color: rgba(255,255,255,0.5);
    transition: color var(--transition);
}
.footer-bottom a:hover {
    color: var(--emerald-400);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: none;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-scroll { animation: none; }
}

/* --- Utility --- */
@media (max-width: 480px) {
    .container { padding: 0 20px; }
    .hero-content { padding: 100px 20px 60px; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
}
