/* Halverson's Auto Repair — redesign.
   One page, three themes. Each theme sets tokens on body[data-theme],
   then adds a few layout touches of its own at the bottom of the file. */

/* ---------- Theme tokens ---------- */

body[data-theme="workshop"] {
  --bg: #14161a;
  --surface: #1d2026;
  --surface-2: #23272e;
  --text: #f3f1ea;
  --muted: #a9acb3;
  --line: #31353d;
  --accent: #ffb000;
  --accent-text: #ffb000;
  --accent-ink: #14161a;
  --header-bg: #0d0f12;
  --header-text: #f3f1ea;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --radius: 3px;
  --btn-radius: 3px;
  --head-weight: 700;
  --head-transform: uppercase;
  --head-spacing: 0.01em;
  --head-lh: 0.95;
  --h1: clamp(3rem, 7.5vw, 5.75rem);
  --h2: clamp(2.2rem, 4.5vw, 3.25rem);
  --h3: 1.5rem;
}

body[data-theme="mainstreet"] {
  --bg: #f6efe2;
  --surface: #fffaf1;
  --surface-2: #ece2cf;
  --text: #22302a;
  --muted: #56645b;
  --line: #dccfb6;
  --accent: #b5452c;
  --accent-text: #a83d25;
  --accent-ink: #ffffff;
  --header-bg: #1f4d3a;
  --header-text: #f6efe2;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --radius: 16px;
  --btn-radius: 999px;
  --head-weight: 600;
  --head-transform: none;
  --head-spacing: -0.01em;
  --head-lh: 1.06;
  --h1: clamp(2.6rem, 6vw, 4.5rem);
  --h2: clamp(1.9rem, 3.8vw, 2.75rem);
  --h3: 1.3rem;
}

body[data-theme="cleanline"] {
  --bg: #ffffff;
  --surface: #f4f6fa;
  --surface-2: #e9edf5;
  --text: #0f172a;
  --muted: #566072;
  --line: #e1e6ef;
  --accent: #1d4ed8;
  --accent-text: #1d4ed8;
  --accent-ink: #ffffff;
  --header-bg: #ffffff;
  --header-text: #0f172a;
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 12px;
  --btn-radius: 10px;
  --head-weight: 800;
  --head-transform: none;
  --head-spacing: -0.03em;
  --head-lh: 1.08;
  --h1: clamp(2.5rem, 5.5vw, 4.25rem);
  --h2: clamp(1.8rem, 3.5vw, 2.5rem);
  --h3: 1.15rem;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  padding-bottom: 84px; /* room for the preview bar */
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  line-height: var(--head-lh);
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { margin-bottom: 32px; }
.section-head p { margin: 10px 0 0; color: var(--muted); }
.accent { color: var(--accent-text); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: var(--btn-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-size: 1.4rem;
  line-height: 1;
}
.brand-text {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-size: 1.3rem;
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  line-height: 1;
  white-space: nowrap;
}
.brand-text span { opacity: 0.7; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: inherit; text-decoration: none; font-weight: 500; font-size: 0.97rem; opacity: 0.85; white-space: nowrap; }
.site-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.header-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
  display: none;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: min(var(--radius), 10px);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.phone { color: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- Hero ---------- */

.hero { padding: clamp(48px, 8vw, 104px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--accent-text); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }
.lede { margin: 22px 0 28px; max-width: 34em; font-size: 1.2rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; color: var(--muted); font-size: 0.95rem; }
.trust li::before { content: "✓"; margin-right: 8px; color: var(--accent-text); font-weight: 700; }

.ticket { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ticket-title { margin: 0 0 12px; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.35rem; text-transform: var(--head-transform); letter-spacing: var(--head-spacing); line-height: 1.1; }
.slots li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.slot-day { flex: 1; font-weight: 600; }
.slot-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.slots a { padding: 6px 14px; border-radius: var(--btn-radius); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.slots a:hover { background: var(--accent); color: var(--accent-ink); }
.ticket-note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }

/* ---------- Services ---------- */

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: svc; }
.card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.service-grid .card { display: flex; flex-direction: column; counter-increment: svc; }
.service-grid .card p { margin: 8px 0 0; color: var(--muted); font-size: 0.98rem; }
.service-grid .card .price { margin-top: auto; padding-top: 16px; color: var(--accent-text); font-weight: 600; }

/* ---------- About ---------- */

.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.about h2 { margin-bottom: 18px; }
.about p { color: var(--muted); max-width: 36em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.stats div { padding: 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.stats dt { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; letter-spacing: var(--head-spacing); color: var(--accent-text); }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Reviews ---------- */

.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.review { margin: 0; display: flex; flex-direction: column; gap: 18px; }
.review blockquote { margin: 0; font-size: 1.05rem; }
.review blockquote::before { content: "★★★★★"; display: block; margin-bottom: 10px; color: var(--accent-text); letter-spacing: 2px; font-size: 0.95rem; }
.review figcaption { margin-top: auto; font-weight: 600; }
.review figcaption span { display: block; color: var(--muted); font-weight: 400; font-size: 0.92rem; }

/* ---------- Visit / booking ---------- */

.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.visit-info h2 { margin-bottom: 18px; }
address { font-style: normal; font-size: 1.15rem; margin-bottom: 20px; }
.hours { width: 100%; max-width: 380px; border-collapse: collapse; }
.hours th, .hours td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours th { font-weight: 600; }
.hours td { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.visit-call { margin-top: 20px; color: var(--muted); }
.visit-call a { font-weight: 600; }

[hidden] { display: none !important; }
.form-body { display: grid; gap: 14px; }
.book-form h3 { margin-bottom: 4px; }
.form-done { display: grid; gap: 12px; justify-items: start; padding: 12px 0; outline: none; }
.form-done p { margin: 0; }
.done-detail { font-weight: 600; font-size: 1.1rem; color: var(--accent-text); }
.done-note { color: var(--muted); }
.open-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}
.open-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.open-status.is-open::before { background: #2fa35f; }
.card-link { align-self: flex-start; margin-top: 8px; padding: 6px 0; font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.book-form label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.book-form input, .book-form select, .book-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: min(var(--radius), 10px);
  background: var(--bg);
  color: var(--text);
  font: 400 1rem var(--font-body);
}
.book-form textarea { resize: vertical; }
.book-form ::placeholder { color: var(--muted); opacity: 0.7; }
.form-status { margin: 0; color: var(--accent-text); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer-row p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .nav-toggle { display: grid; }
  .header-cta { margin-left: auto; }
  .header-row { gap: 12px; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 20px 16px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a { padding: 13px 0; font-size: 1.05rem; opacity: 1; }
}
@media (max-width: 900px) {
  .hero-grid, .about-grid, .visit-grid { grid-template-columns: 1fr; }
  .service-grid, .review-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .phone { display: none; }
  .brand-text { font-size: 1.1rem; }
  .brand-text span { display: none; }
  .site-header .btn { padding-inline: 12px; }
  .service-grid, .review-grid, .field-row { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
}

/* =====================================================
   Theme 1 — Workshop: dark, bold, high-vis amber
   ===================================================== */

body[data-theme="workshop"] .hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(255, 176, 0, 0.1), transparent 70%),
    var(--bg);
}
body[data-theme="workshop"] .hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 16px, #14161a 16px 32px);
}
body[data-theme="workshop"] .ticket { border-top: 4px solid var(--accent); }
body[data-theme="workshop"] .section-head h2::after,
body[data-theme="workshop"] .about h2::after,
body[data-theme="workshop"] .visit-info h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 14px;
  background: var(--accent);
}
body[data-theme="workshop"] .service-grid .card { border-left: 4px solid var(--accent); }
body[data-theme="workshop"] .service-grid .card::before {
  content: counter(svc, decimal-leading-zero);
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--muted);
}
body[data-theme="workshop"] .btn { text-transform: uppercase; letter-spacing: 0.05em; }

/* =====================================================
   Theme 2 — Main Street: warm, friendly, heritage
   ===================================================== */

body[data-theme="mainstreet"] .site-header { border-bottom-color: transparent; }
body[data-theme="mainstreet"] .brand-mark { border-radius: 50%; background: #f6efe2; color: #1f4d3a; }
body[data-theme="mainstreet"] .site-header .btn-primary { background: #f6efe2; color: #1f4d3a; }
body[data-theme="mainstreet"] .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #1f4d3a;
  color: #f6efe2;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}
body[data-theme="mainstreet"] h1 .accent { font-style: italic; }
body[data-theme="mainstreet"] .ticket {
  transform: rotate(1.5deg);
  border: 2px dashed #c9b993;
  box-shadow: 0 18px 40px rgba(60, 40, 10, 0.12);
}
body[data-theme="mainstreet"] .card { box-shadow: 0 2px 0 var(--line); }
body[data-theme="mainstreet"] .about { background: #1f4d3a; color: #f6efe2; border: 0; }
body[data-theme="mainstreet"] .about p { color: #d5e0d6; }
body[data-theme="mainstreet"] .stats div { background: #f6efe2; border: 0; }
body[data-theme="mainstreet"] .stats dd { color: #56645b; }
body[data-theme="mainstreet"] .btn-ghost { border-color: #22302a; }

/* =====================================================
   Theme 3 — Clean Line: bright, minimal, modern
   ===================================================== */

body[data-theme="cleanline"] .hero {
  background: linear-gradient(180deg, #f4f6fa 0%, #ffffff 100%);
  text-align: center;
}
body[data-theme="cleanline"] .hero-grid { grid-template-columns: 1fr; justify-items: center; }
body[data-theme="cleanline"] .hero-copy { max-width: 780px; }
body[data-theme="cleanline"] .lede { margin-inline: auto; }
body[data-theme="cleanline"] .actions,
body[data-theme="cleanline"] .trust { justify-content: center; }
body[data-theme="cleanline"] .eyebrow { letter-spacing: 0.06em; font-size: 0.82rem; }
body[data-theme="cleanline"] .ticket {
  width: 100%;
  max-width: 860px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  text-align: left;
}
body[data-theme="cleanline"] .slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
body[data-theme="cleanline"] .slots li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
body[data-theme="cleanline"] .slot-time { grid-column: 1; grid-row: 2; }
body[data-theme="cleanline"] .slots a { grid-column: 2; grid-row: 1 / span 2; background: var(--accent); color: #fff; }
body[data-theme="cleanline"] .ticket-note { border-top: 0; padding-top: 0; }
body[data-theme="cleanline"] .section-head { text-align: center; }
body[data-theme="cleanline"] .card { background: #fff; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
body[data-theme="cleanline"] .service-grid .card:hover { border-color: #b9c6e4; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07); }
body[data-theme="cleanline"] .stats div { background: #fff; }
body[data-theme="cleanline"] .stats dt { color: var(--text); }

@media (max-width: 600px) {
  body[data-theme="cleanline"] .slots { grid-template-columns: 1fr; }
  body[data-theme="mainstreet"] .ticket { transform: none; }
}
