/* ==========================================================================
   Atlas Automotive Repair - mobile-first design system
   Palette: deep red + maroon on warm white. Anton display, Inter body.
   No multicolor gradients. No one-sided colored borders.
   ========================================================================== */

:root {
    --red:       #a30a05;
    --red-dark:  #7c0a07;
    --red-bright:#d11f0f;
    --maroon:    #3c130f;
    --ink:       #1a1a1a;
    --ink-soft:  #4d4744;
    --paper:     #ffffff;
    --bg:        #faf8f7;
    --panel:     #f4eeec;
    --line:      #e6dedb;
    --gold:      #e8a90c;

    --font-display: "Anton", "Arial Narrow", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

    --wrap: 1180px;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(28, 12, 10, 0.10);
    --shadow-sm: 0 4px 14px rgba(28, 12, 10, 0.08);
    --space: clamp(2.6rem, 6vw, 5rem);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
ul { margin: 0; padding: 0; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin: 0 0 0.5em;
    color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 5.5vw, 3rem); }
h3 { font-size: clamp(1.2rem, 3.5vw, 1.5rem); }
h4 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 0 0 .4em; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---- Kicker label + section heading (full-width rule, no side borders) ---- */
.kicker {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    color: var(--red);
    margin-bottom: 0.6rem;
}
.section { padding: var(--space) 0; }
.section-head { max-width: 720px; margin-bottom: 2.2rem; }
.section-head.center { margin-left: auto; margin-right: auto; }
.rule { height: 4px; width: 64px; background: var(--red); border-radius: 4px; margin: 0.8rem 0 0; }
.section-head.center .rule { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    font-family: var(--font-body); font-weight: 700; font-size: 1rem;
    padding: 0.85rem 1.5rem; border-radius: 999px; cursor: pointer;
    border: 2px solid transparent; transition: transform .15s ease, background .15s ease, color .15s ease;
    text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: #f1eae8; color: var(--red-dark); }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.08rem; }
.btn-block { width: 100%; }

/* ---- Announcement bar ---- */
.announce {
    background: var(--maroon); color: #fff; text-align: center;
    font-size: 0.92rem; font-weight: 600; letter-spacing: 0.02em;
}
.announce .wrap { padding-top: 9px; padding-bottom: 9px; }

/* ---- Header / nav (mobile-first) ---- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; padding-bottom: 12px; gap: 1rem;
}
.brand img { width: auto; height: 48px; }
.nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
    width: 46px; height: 42px; padding: 9px; background: var(--ink); border: none;
    border-radius: 10px; cursor: pointer;
}
.nav-toggle-bar { display: block; height: 3px; width: 100%; background: #fff; border-radius: 3px; transition: .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
    box-shadow: var(--shadow);
}
.primary-nav.open { max-height: 80vh; overflow: auto; }
.primary-nav ul { display: flex; flex-direction: column; padding: 8px 20px 18px; gap: 2px; }
.primary-nav a {
    display: block; padding: 13px 8px; font-weight: 600; color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.primary-nav a.is-active { color: var(--red); }
.primary-nav .nav-cta, .primary-nav .nav-call { margin-top: 10px; }
.primary-nav .nav-cta a, .primary-nav .nav-call a { border-bottom: none; }
.primary-nav .btn { width: 100%; }

/* ---- Hero ---- */
.hero { position: relative; background: var(--maroon); color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.28; }
.hero-inner { position: relative; padding: clamp(3rem, 9vw, 6rem) 0; }
.hero h1 { color: #fff; max-width: 14ch; }
.hero p { font-size: 1.15rem; max-width: 52ch; color: #f3e9e7; }
.hero .btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.hero-warranty {
    display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.6rem;
    background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.25);
    padding: 0.6rem 1rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
}

/* ---- Trust bar ---- */
.trust { background: var(--paper); border-bottom: 1px solid var(--line); }
.trust .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem 2.5rem; padding: 1.4rem 20px; }
.trust img { height: 46px; width: auto; opacity: 0.9; }

/* ---- Generic panels / cards ---- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.bg-panel { background: var(--panel); }
.bg-ink { background: var(--ink); color: #fff; }
.bg-ink h2, .bg-ink h3 { color: #fff; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); height: 100%; }
.card h3 { color: var(--red); }
.card .card-icon { font-size: 1.6rem; margin-bottom: .4rem; }

/* ---- Service "offer / don't offer" lists ---- */
.list-check li, .list-x li { position: relative; padding: 0.5rem 0 0.5rem 2rem; border-bottom: 1px solid var(--line); list-style: none; }
.list-check li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.list-x li::before { content: "✕"; position: absolute; left: 0; color: var(--ink-soft); font-weight: 800; }

/* ---- Pricing ---- */
.price-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm); }
.price-card .price-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.price-card .price { font-family: var(--font-display); color: var(--red); font-size: 1.6rem; white-space: nowrap; }
.price-note { font-size: 0.92rem; color: var(--ink-soft); }

/* ---- FAQ accordion ---- */
.faq-cat { font-family: var(--font-display); text-transform: uppercase; color: var(--ink); font-size: 1.35rem; margin: 2rem 0 0.8rem; }
.faq-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.7rem; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; color: var(--ink);
    padding: 1.05rem 3rem 1.05rem 1.1rem; position: relative; }
.faq-q::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--red); line-height: 1; }
.faq-item.open .faq-q::after { content: "\2212"; }
.faq-a { padding: 0 1.1rem; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; color: var(--ink-soft); }
.faq-item.open .faq-a { padding: 0 1.1rem 1.1rem; max-height: 1600px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---- Reviews (native cards) ---- */
.review-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.review-card .stars { color: var(--gold); letter-spacing: 2px; }
.review-card .who { font-weight: 700; margin-top: 0.6rem; }
.review-meta { font-size: 0.85rem; color: var(--ink-soft); }

/* ---- Embed (scheduler / map) ---- */
.embed-frame { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: var(--shadow-sm); }
.embed-frame iframe { width: 100%; border: 0; display: block; }

/* ---- CTA band ---- */
.cta-band { background: var(--red); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.4rem; }

/* ---- Contact info blocks ---- */
.info-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.info-item { display: flex; flex-direction: column; }
.info-item .label { font-weight: 700; }

/* ---- Forms ---- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
    width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--red); border-color: var(--red); }
.form-note { font-size: 0.9rem; color: var(--ink-soft); }
.alert { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; border: 1px solid var(--line); }
.alert-success { background: #eef7ee; border-color: #bcdcbb; color: #1f5d22; }
.alert-error { background: #fdecea; border-color: #f3c0bb; color: #8a1c12; }

/* ---- Footer ---- */
.site-footer { background: var(--maroon); color: #f1e6e4; margin-top: var(--space); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding: 3rem 20px 2rem; }
.footer-logo { background: #fff; border-radius: 10px; padding: 8px 10px; height: auto; width: 170px; }
.site-footer h3 { color: #fff; font-size: 1.15rem; margin-bottom: 0.7rem; }
.site-footer a { color: #f1e6e4; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0 0 0.5rem; }
.footer-links { list-style: none; }
.footer-links li { padding: 0.2rem 0; }
.social { display: flex; gap: 1rem; margin-top: 0.8rem; font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.6rem; padding: 1.5rem 20px; border-top: 1px solid rgba(255,255,255,0.12); }
.badges img { height: 52px; width: auto; background: #fff; padding: 7px 9px; border-radius: 8px; }
.footer-bottom { background: rgba(0,0,0,0.22); font-size: 0.86rem; }
.footer-bottom .wrap { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 20px; text-align: center; }

/* ---- Back to top ---- */
.to-top {
    position: fixed; right: 16px; bottom: 16px; z-index: 90;
    background: var(--red); color: #fff; border: none; cursor: pointer;
    font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em;
    padding: 0.7rem 1rem; border-radius: 999px; box-shadow: var(--shadow);
    opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.to-top.show { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Breakpoints
   ========================================================================== */
@media (min-width: 640px) {
    .grid.cols-2 { grid-template-columns: 1fr 1fr; }
    .info-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero .btn-row .btn { min-width: 0; }
}

@media (min-width: 980px) {
    .nav-toggle { display: none; }
    .primary-nav {
        position: static; max-height: none; overflow: visible; box-shadow: none;
        border-bottom: none; background: transparent;
    }
    .primary-nav ul { flex-direction: row; align-items: center; padding: 0; gap: 0.3rem; }
    .primary-nav a { border-bottom: none; padding: 0.5rem 0.85rem; border-radius: 8px; }
    .primary-nav a:hover { background: var(--panel); }
    .primary-nav a.is-active { background: var(--panel); color: var(--red); }
    .primary-nav .nav-cta { margin: 0 0 0 0.5rem; }
    .primary-nav .nav-call { display: none; }
    .primary-nav .btn { width: auto; }
    .brand img { height: 54px; }

    .grid.cols-2 { grid-template-columns: 1fr 1fr; }
    .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
    .footer-bottom .wrap { flex-direction: row; justify-content: space-between; }
    .hero-inner { padding: clamp(4rem, 9vw, 7rem) 0; }

    .split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; transition: none !important; }
}
