/* ============================================
   B & M Glass Co — Exeter, NH
   Warm & Friendly Auto Glass Marketing Site
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --terracotta-50:  #fef0eb;
    --terracotta-100: #fde4d6;
    --terracotta-200: #f9c4b0;
    --terracotta-300: #f3a085;
    --terracotta-400: #ec7a58;
    --terracotta-500: #e06138;
    --terracotta-600: #C0603A;
    --terracotta-700: #a34d2c;
    --terracotta-800: #834028;
    --terracotta-900: #6b3724;
    --sand-50:  #fefdfb;
    --sand-100: #fdf6ee;
    --sand-200: #f5e6d3;
    --sand-300: #ebd0b3;
    --sand-400: #dfb88e;
    --sand-500: #d4a574;
    --sand-600: #b8895c;
    --sand-700: #966d47;
    --sand-800: #745438;
    --sand-900: #5c432e;
    --neutral-50:  #fafafa;
    --neutral-100: #f4f4f5;
    --neutral-200: #e4e4e7;
    --neutral-300: #d4d4d8;
    --neutral-400: #a1a1aa;
    --neutral-500: #71717a;
    --neutral-600: #52525b;
    --neutral-700: #3f3f46;
    --neutral-800: #27272a;
    --neutral-900: #18181b;
    --white: #ffffff;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 3px rgba(192, 96, 58, 0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(192, 96, 58, 0.08), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(192, 96, 58, 0.12), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-xl: 0 24px 60px rgba(192, 96, 58, 0.15), 0 8px 20px rgba(0,0,0,0.1);
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--neutral-700);
    background: var(--sand-50);
    -webkit-font-smoothing: antialiased;
    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; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- Typography --- */
h1, h2, h3, h4 { color: var(--neutral-800); line-height: 1.2; font-weight: 800; }
.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta-600);
    background: var(--terracotta-50);
    border: 1px solid var(--terracotta-200);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}
.section-tag.light { color: var(--sand-200); background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 16px; }
.section-title.light { color: var(--white); }
.section-subtitle { font-size: 1.1rem; color: var(--neutral-500); max-width: 600px; }
.section-subtitle.light { color: rgba(255,255,255,0.75); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header.light { margin-bottom: 60px; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--terracotta-600);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(192, 96, 58, 0.35);
}
.btn-primary:hover {
    background: var(--terracotta-700);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192, 96, 58, 0.4);
}
.btn-secondary {
    background: var(--white);
    color: var(--terracotta-600);
    border: 2px solid var(--terracotta-200);
}
.btn-secondary:hover {
    background: var(--terracotta-50);
    border-color: var(--terracotta-400);
    transform: translateY(-2px);
}
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-sm { padding: 10px 22px; font-size: 0.88rem; }
.btn-full { width: 100%; justify-content: center; padding: 16px 24px; }
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
    background: var(--white);
    color: var(--terracotta-600);
    border-color: var(--white);
    transform: translateY(-2px);
}
.btn-white {
    background: var(--white);
    color: var(--terracotta-600);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-white:hover {
    background: var(--sand-50);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 246, 238, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand-200);
    transition: var(--transition);
}
.header.scrolled {
    box-shadow: var(--shadow-md);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--terracotta-600);
}
.logo-icon { color: var(--terracotta-600); }
.logo-light .logo-icon { color: var(--sand-300); }
.logo-light { color: var(--sand-200); }
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--neutral-600);
    transition: var(--transition);
    position: relative;
}
.nav a:not(.btn):hover { color: var(--terracotta-600); }
.nav a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terracotta-500);
    border-radius: 2px;
    transition: var(--transition);
}
.nav a:not(.btn):hover::after { width: 100%; }
.nav-close { display: none; }
.nav-open { display: none; }

/* --- Mobile Nav --- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.nav-overlay.active { opacity: 1; visibility: visible; }

@media (max-width: 768px) {
    .nav-open { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--neutral-700); }
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--sand-50);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 40px;
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 1001;
        box-shadow: var(--shadow-xl);
    }
    .nav.active { transform: translateX(0); }
    .nav a { font-size: 1.1rem; }
    .nav-close {
        display: flex;
        position: absolute;
        top: 20px;
        right: 20px;
        color: var(--neutral-600);
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }
    .nav-close:hover { background: var(--sand-200); }
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--sand-100) 0%, var(--terracotta-50) 50%, var(--sand-200) 100%);
    padding: 120px 0 0;
    overflow: hidden;
}
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: radial-gradient(circle at 2px 2px, var(--terracotta-600) 1px, transparent 0);
    background-size: 32px 32px;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--terracotta-700);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    color: var(--neutral-800);
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-500);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 520px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { position: relative; }
.hero-img-wrapper {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 5/6;
}
.hero-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.hero-float-card {
    position: absolute;
    bottom: 40px;
    left: -30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}
.float-card-icon {
    width: 48px;
    height: 48px;
    background: var(--terracotta-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta-600);
    flex-shrink: 0;
}
.float-card-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--neutral-400); }
.float-card-value { font-weight: 800; color: var(--neutral-800); font-size: 0.95rem; }
.hero-wave { position: absolute; bottom: 0; left: 0; right: 0; line-height: 0; }

@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-image { max-width: 400px; margin: 40px auto 0; }
    .hero-float-card { left: 10px; bottom: 20px; }
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--sand-100);
}
.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;
    transition: var(--transition);
    border: 1px solid transparent;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--terracotta-200);
}
.service-icon {
    width: 64px;
    height: 64px;
    background: var(--terracotta-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta-600);
    margin-bottom: 20px;
    transition: var(--transition);
}
.service-card:hover .service-icon {
    background: var(--terracotta-600);
    color: var(--white);
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { font-size: 0.95rem; color: var(--neutral-500); line-height: 1.7; }

@media (max-width: 900px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* --- About --- */
.about { padding: 100px 0; background: var(--sand-50); }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-images { position: relative; }
.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 48/56;
}
.about-img-main img { width: 100%; height: 100%; object-fit: cover; }
.about-img-secondary {
    position: absolute;
    bottom: -30px;
    right: -20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 5px solid var(--sand-50);
    aspect-ratio: 3/2.8;
    width: 55%;
}
.about-img-secondary img { width: 100%; height: 100%; object-fit: cover; }
.about-experience-badge {
    position: absolute;
    top: -20px;
    right: 30px;
    background: var(--terracotta-600);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.exp-number { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1; }
.exp-text { font-size: 0.8rem; font-weight: 700; opacity: 0.9; margin-top: 4px; }
.about-content .section-tag { margin-bottom: 16px; }
.about-content .section-title { margin-bottom: 20px; }
.about-text { color: var(--neutral-500); margin-bottom: 16px; font-size: 1rem; }
.about-stats {
    display: flex;
    gap: 32px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 160px;
}
.stat-icon {
    width: 52px;
    height: 52px;
    background: var(--terracotta-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta-600);
    flex-shrink: 0;
}
.stat-value { font-weight: 800; font-size: 0.95rem; color: var(--neutral-800); }
.stat-label { font-size: 0.8rem; color: var(--neutral-400); font-weight: 600; }

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-images { max-width: 480px; margin: 0 auto; }
}

/* --- Why Us --- */
.why-us {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--terracotta-600) 0%, var(--terracotta-800) 100%);
    position: relative;
    overflow: hidden;
}
.why-us::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle at 2px 2px, var(--white) 1px, transparent 0);
    background-size: 28px 28px;
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}
.why-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}
.why-card:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-4px);
}
.why-card-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: rgba(255,255,255,0.2);
    line-height: 1;
    margin-bottom: 12px;
}
.why-card h3 { font-size: 1.1rem; color: var(--white); margin-bottom: 10px; }
.why-card p { font-size: 0.92rem; color: rgba(255,255,255,0.7); line-height: 1.7; }

@media (max-width: 900px) {
    .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .why-grid { grid-template-columns: 1fr; }
}

/* --- CTA Banner --- */
.cta-banner {
    padding: 80px 0;
    background: var(--sand-200);
    position: relative;
    overflow: hidden;
}
.cta-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.cta-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}
.cta-shape-1 { width: 300px; height: 300px; background: var(--terracotta-400); top: -80px; right: -60px; }
.cta-shape-2 { width: 200px; height: 200px; background: var(--sand-400); bottom: -60px; left: 10%; }
.cta-shape-3 { width: 120px; height: 120px; background: var(--terracotta-300); top: 30%; left: 5%; }
.cta-content { text-align: center; position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.cta-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--neutral-800); margin-bottom: 16px; }
.cta-text { font-size: 1.05rem; color: var(--neutral-500); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Contact --- */
.contact { padding: 100px 0; background: var(--sand-50); }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.contact-card-icon {
    width: 48px;
    height: 48px;
    background: var(--terracotta-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta-600);
    flex-shrink: 0;
}
.contact-card h4 { font-size: 0.95rem; color: var(--neutral-800); margin-bottom: 4px; }
.contact-card p { font-size: 0.9rem; color: var(--neutral-500); line-height: 1.6; }
.contact-card a { color: var(--terracotta-600); font-weight: 700; }
.contact-card a:hover { text-decoration: underline; }
.contact-map { border-radius: var(--radius-lg); overflow: hidden; margin-top: 8px; box-shadow: var(--shadow-sm); }

.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--sand-200);
}
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--neutral-700);
    margin-bottom: 6px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--sand-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--neutral-700);
    background: var(--sand-50);
    transition: var(--transition);
    outline: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--terracotta-400);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(192, 96, 58, 0.1);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--neutral-300); }
.contact-form textarea { resize: vertical; min-height: 120px; }

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}
.form-success.active { display: block; }
.success-icon { color: var(--terracotta-600); margin-bottom: 16px; }
.form-success h3 { font-size: 1.4rem; margin-bottom: 10px; }
.form-success p { color: var(--neutral-500); font-size: 0.95rem; }
.form-success a { color: var(--terracotta-600); font-weight: 700; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* --- Footer --- */
.footer {
    background: var(--neutral-800);
    color: var(--sand-300);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 48px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin-top: 16px; color: var(--sand-400); }
.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 16px;
}
.footer-links ul li { margin-bottom: 10px; }
.footer-links a {
    font-size: 0.9rem;
    color: var(--sand-400);
    transition: var(--transition);
}
.footer-links a:hover { color: var(--terracotta-300); }
.footer-contact p { font-size: 0.9rem; line-height: 1.8; }
.footer-contact a { color: var(--terracotta-300); font-weight: 700; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--neutral-500); }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* --- Scroll Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible {
    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; }
