/* =============================================================
   High Boost Automotive — shared stylesheet
   Palette extracted from the real brand (gold-on-black, German-flag stripe).
   Two-theme, mobile-first, static site.

   TOKEN ROLES (guard #4/#5 — "don't give one token two jobs"):
   --on-brand : light text/icon sitting on an always-dark surface
                (header, hero, footer, dark CTA labels). NEVER remapped.
   --on-gold  : dark label on a GOLD fill (#111113). NEVER remapped.
   --on-red   : white label on the flag-red "Call now" fill. NEVER remapped.
   --surface  : card/panel fill. Light #FFFFFF -> Dark #1C1D20 (flips).
   --gold-text: small gold-coloured text on the page ground. Light-mode
                #8A6410; dark-mode lifted #E4BC5C. (Never #C99A2E as small text.)
   ============================================================= */

:root {
  /* Brand constants — fixed in both themes */
  --brand-black: #111113;
  --brand-black-deep: #0B0B0C;
  --gold: #C99A2E;          /* rules, marks, large display, gold fills only */
  --gold-lift: #E4BC5C;     /* small gold text on dark surface */
  --red: #C8102E;           /* "Call now" action + flag stripe only */
  --red-deep: #B00E28;

  /* Fixed cross-theme labels (guard #5 — never remap) */
  --on-brand: #F4F4F3;      /* light text on always-dark surfaces */
  --on-gold: #111113;       /* dark label on gold fill */
  --on-red: #FFFFFF;        /* white label on red fill */

  /* Light theme (default) */
  --ground: #F4F4F3;        /* page background */
  --surface: #FFFFFF;       /* card/panel fill */
  --band: #EAEAE8;          /* quiet section band */
  --text: #161616;          /* body text (~16:1 on ground) */
  --muted: #5C5C5F;         /* secondary text */
  --hairline: #DAD9D5;      /* borders */
  --gold-text: #7F5C0D;     /* small gold text on light — 5.1:1 on the #EAEAE8 band, 5.5:1 on the ground, 6.1:1 on white (the earlier #8A6410 was only 4.46:1 on the band) */
  --red-text: #A8121F;      /* small red text on light ground */

  --surface-border: var(--hairline);
  --surface-shadow: 0 1px 2px rgba(17,17,19,.06), 0 6px 20px rgba(17,17,19,.06);

  --maxw: 1180px;
  --radius: 10px;
  --gap: clamp(1rem, 3vw, 2rem);

  --font-head: "Rajdhani", "Oswald", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  /* Dark theme mapping (design-language §2).
     Surface vs ground (guard #3): the hand-guessed #1C1D20 on #0B0B0C only
     measured 1.17:1 in-browser during QA — well under 1.35. Lifted to #2C2D36,
     measured 1.44:1 vs the #0B0B0C ground, border to #3E4048 (~1.48:1 vs surface). */
  --ground: #0B0B0C;
  --surface: #2C2D36;
  --band: #1A1A1E;
  --text: #ECECEA;
  --muted: #9A9A9C;
  --hairline: #3A3B42;
  --gold-text: var(--gold-lift);  /* small gold text lifts on dark */
  --red-text: #F07184;

  --surface-border: #3E4048;      /* visible border on dark cards — 1.48:1 vs the surface (guard #3) */
  --surface-shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
}

/* -------------------------------------------------- reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-text); }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 6vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); text-transform: uppercase; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--band { background: var(--band); }
.section__eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 600;
  font-size: .85rem;
  color: var(--gold-text);
  margin: 0 0 .6rem;
}
.section__lead { color: var(--muted); max-width: 60ch; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--on-gold);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* focus visibility */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

/* flag stripe motif: black / red / gold */
.flag-stripe {
  height: 4px;
  background: linear-gradient(90deg,
    var(--brand-black) 0 33.33%,
    var(--red) 33.33% 66.66%,
    var(--gold) 66.66% 100%);
}

/* -------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: 1rem; line-height: 1;
  padding: .85rem 1.4rem; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, background-color .15s ease, border-color .15s ease;
  min-height: 46px;
}
.btn:active { transform: translateY(1px); }

.btn--gold { background: var(--gold); color: var(--on-gold); }
.btn--gold:hover { background: #d9a838; color: var(--on-gold); }

.btn--red { background: var(--red); color: var(--on-red); }
.btn--red:hover { background: var(--red-deep); color: var(--on-red); }

.btn--ghost {
  background: transparent; color: var(--text); border-color: var(--hairline);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-text); }

/* ghost button on an always-dark surface (hero/header) */
.on-dark .btn--ghost { color: var(--on-brand); border-color: rgba(244,244,243,.4); }
.on-dark .btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* -------------------------------------------------- chips / eyebrows on dark
   guard #8: chips on always-dark surfaces stay light-on-dark in BOTH themes */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-body); font-weight: 500; font-size: .82rem;
  padding: .32rem .7rem; border-radius: 999px;
  border: 1px solid var(--hairline); color: var(--muted); background: transparent;
}
.chip--todo {
  border-color: var(--gold); color: var(--gold-text);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700; padding: .18rem .5rem;
}
/* chips sitting on an always-dark surface: forced light-on-dark, both themes */
.on-dark .chip { color: var(--on-brand); border-color: rgba(244,244,243,.35); }
.on-dark .chip--todo { color: var(--gold-lift); border-color: rgba(228,188,92,.6); }

/* -------------------------------------------------- header / nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand-black); color: var(--on-brand);
}
.header-row {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px; padding-block: .5rem;
}

/* brand lockup — shrinks but never forces h-scroll (guard #2) */
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  flex: 0 1 auto; min-width: 0;
  text-decoration: none; color: var(--on-brand);
}
.brand__mark { flex: 0 0 auto; display: flex; width: 30px; height: 30px; }
.brand__mark svg { width: 100%; height: 100%; }
.brand__word {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: 1.15rem; color: var(--gold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__word .full { display: none; }
.brand__word .short { display: inline; }

nav.main-nav { margin-left: auto; }
.nav-list {
  list-style: none; display: flex; align-items: center; gap: 1.3rem;
  margin: 0; padding: 0;
}
.main-nav a:not([class]) {
  color: var(--on-brand); text-decoration: none; font-weight: 500;
  white-space: nowrap; padding: .4rem 0; font-size: .98rem;
}
.main-nav a:not([class]):hover,
.main-nav a:not([class])[aria-current="page"] { color: var(--gold); }
.main-nav a:not([class])[aria-current="page"] { border-bottom: 2px solid var(--gold); }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-actions .tel-link {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--on-brand); text-decoration: none; font-weight: 700;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.header-actions .tel-link:hover { color: var(--gold); }
.header-actions .btn { padding: .6rem 1rem; font-size: .9rem; min-height: 40px; }

/* theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  background: transparent; border: 1px solid rgba(244,244,243,.3);
  border-radius: var(--radius); color: var(--on-brand); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* hamburger */
.nav-toggle {
  display: none;
  width: 44px; height: 44px; flex: 0 0 auto;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(244,244,243,.3);
  border-radius: var(--radius); color: var(--on-brand); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* -------------------------------------------------- mobile nav (drawer)
   Breakpoint chosen so the inline nav + actions fit above it (guard #2).
   BOTH the "Book a service" button AND the phone link move into the drawer. */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  nav.main-nav {
    position: fixed; inset: 0 0 0 auto; z-index: 150;
    width: min(84vw, 340px);
    background: var(--brand-black); color: var(--on-brand);
    transform: translateX(100%); transition: transform .25s ease;
    padding: 5rem 1.5rem 2rem; overflow-y: auto;
    box-shadow: -20px 0 40px rgba(0,0,0,.4);
    margin-left: 0;
  }
  nav.main-nav.open { transform: translateX(0); }

  .nav-list { flex-direction: column; align-items: stretch; gap: .4rem; }
  .main-nav a:not([class]) {
    display: block; padding: .8rem .2rem; font-size: 1.1rem;
    border-bottom: 1px solid rgba(244,244,243,.12);
  }

  /* actions that live in the drawer on mobile */
  .nav-drawer-actions { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.4rem; }
  .nav-drawer-actions .btn { width: 100%; }
  .nav-drawer-actions .tel-link {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    color: var(--on-brand); text-decoration: none; font-weight: 700;
    font-family: var(--font-body); font-variant-numeric: tabular-nums;
    padding: .7rem; border: 1px solid rgba(244,244,243,.3); border-radius: var(--radius);
  }
  .nav-drawer-actions .tel-link:hover { color: var(--gold); border-color: var(--gold); }

  /* hide the in-bar actions on mobile (guard #2 — nothing left to wrap) */
  .header-actions { display: none; }

  .nav-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid rgba(244,244,243,.3);
    border-radius: var(--radius); color: var(--on-brand); cursor: pointer;
  }
  .nav-close svg { width: 22px; height: 22px; }

  .nav-backdrop {
    position: fixed; inset: 0; z-index: 140;
    background: rgba(0,0,0,.5); opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}

/* desktop: no drawer-only bits, no close/backdrop */
@media (min-width: 981px) {
  .nav-close, .nav-drawer-actions { display: none; }
}

/* full wordmark shows at >=1280 (guard #2) */
@media (min-width: 1280px) {
  .brand__word .full { display: inline; }
  .brand__word .short { display: none; }
  .brand__word { font-size: 1.35rem; }
}

/* -------------------------------------------------- hero (always dark) */
.hero {
  background:
    linear-gradient(180deg, rgba(11,11,12,.72), rgba(11,11,12,.92)),
    radial-gradient(circle at 78% 12%, rgba(201,154,46,.22), transparent 45%),
    var(--brand-black-deep);
  color: var(--on-brand);
  position: relative;
}
.hero__inner { padding-block: clamp(3rem, 9vw, 6.5rem); max-width: 46rem; }
.hero h1 { color: var(--on-brand); }
.hero h1 .accent { color: var(--gold); }
.hero__eyebrow {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .16em;
  font-weight: 600; color: var(--gold); margin-bottom: .8rem; font-size: .9rem;
}
.hero__lead { font-size: 1.15rem; color: var(--on-brand); opacity: .9; max-width: 42ch; }
.hero__tagline {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold); font-weight: 600; font-size: 1rem; margin-top: 1.5rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* -------------------------------------------------- award / trust strip (dark) */
.trust-strip {
  background: var(--brand-black); color: var(--on-brand);
  border-top: 1px solid rgba(244,244,243,.1);
  border-bottom: 1px solid rgba(244,244,243,.1);
}
.trust-strip__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem;
  padding-block: 1rem; font-size: .95rem;
}
.trust-strip__item { display: inline-flex; align-items: center; gap: .5rem; }
.trust-strip__item .star { color: var(--gold); }
.trust-strip .sep { color: rgba(244,244,243,.3); }
.trust-strip strong { color: var(--gold); font-family: var(--font-head); letter-spacing: .02em; }

/* -------------------------------------------------- generic grid + cards */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  box-shadow: var(--surface-shadow);
  padding: 1.5rem; display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 1rem; }
.card__link {
  margin-top: auto; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 700; font-size: .9rem;
  color: var(--gold-text); text-decoration: none;
}
.card__link:hover { color: var(--gold); }
.card__icon {
  display: flex; align-items: center; justify-content: center;   /* guard #6 */
  width: 48px; height: 48px; flex: 0 0 auto; margin-bottom: 1rem;
  border-radius: var(--radius); background: rgba(201,154,46,.14); color: var(--gold);
}
.card__icon svg { width: 26px; height: 26px; }
[data-theme="dark"] .card__icon { color: var(--gold-lift); }

/* clickable service card */
a.card { text-decoration: none; transition: transform .1s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--gold); }

/* -------------------------------------------------- image placeholder block
   No real photos retrievable; sources.md empty. Clearly-flagged placeholders. */
.img-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(201,154,46,.06) 0 12px, transparent 12px 24px),
    var(--band);
  border: 1px dashed var(--gold); border-radius: var(--radius);
  color: var(--muted); padding: 1.5rem; min-height: 200px;
  font-size: .85rem;
}
.img-placeholder .ph-icon { color: var(--gold); display: flex; }
.img-placeholder .ph-icon svg { width: 34px; height: 34px; }
.img-placeholder .ph-label {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: var(--text); font-size: .8rem;
}
.img-placeholder .ph-note { font-size: .75rem; max-width: 32ch; }
.hero .img-placeholder { min-height: 260px; }

/* -------------------------------------------------- reviews */
.review {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-left: 4px solid var(--gold); border-radius: var(--radius);
  box-shadow: var(--surface-shadow); padding: 1.5rem;
}
.review blockquote { margin: 0 0 1rem; font-size: 1.05rem; }
.review cite { font-style: normal; font-weight: 700; color: var(--text); }
.review .stars { color: var(--gold); letter-spacing: .1em; margin-bottom: .6rem; }
.review .source { color: var(--muted); font-size: .85rem; }

/* -------------------------------------------------- why / feature list */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.why-list li { display: flex; gap: .9rem; align-items: flex-start; }
.why-list .why-icon {
  display: flex; align-items: center; justify-content: center;   /* guard #6 */
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: var(--radius);
  background: rgba(201,154,46,.14); color: var(--gold);
}
.why-list .why-icon svg { width: 22px; height: 22px; }
[data-theme="dark"] .why-list .why-icon { color: var(--gold-lift); }
.why-list h3 { margin: 0 0 .2rem; }
.why-list p { margin: 0; color: var(--muted); }

/* -------------------------------------------------- info / hours / map */
.info-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td {
  text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}
.hours-table th { font-family: var(--font-body); font-weight: 500; color: var(--text); }
.hours-table td { color: var(--muted); text-align: right; }

.map-embed {
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--surface-shadow); line-height: 0;
}
.map-embed iframe { width: 100%; height: 320px; border: 0; display: block; }

.nap { font-style: normal; line-height: 1.8; }
.nap strong { color: var(--text); }
.nap a { color: var(--gold-text); text-decoration: none; font-weight: 700; }
.nap a:hover { color: var(--gold); }

/* -------------------------------------------------- forms */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.form-note {
  background: var(--band); border: 1px solid var(--surface-border);
  border-left: 4px solid var(--red); border-radius: var(--radius);
  padding: 1rem 1.2rem; color: var(--text); font-size: .95rem;
}
.form-note a { color: var(--red-text); font-weight: 700; text-decoration: none; }
.form-note a:hover { text-decoration: underline; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 700; font-size: .9rem; }
.field .req { color: var(--gold-text); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: .7rem .85rem; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,154,46,.25); }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* -------------------------------------------------- footer */
.site-footer {
  background: var(--brand-black); color: var(--on-brand);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
}
.footer-grid {
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 2rem;
}
.site-footer h4 {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold); margin: 0 0 .8rem; font-size: 1rem;
}
.site-footer p, .site-footer address { color: rgba(244,244,243,.82); font-style: normal; line-height: 1.8; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
/* guard #1: dark footer/nav links re-set to --on-brand explicitly */
.site-footer a:not([class]) { color: var(--on-brand); text-decoration: none; }
.site-footer a:not([class]):hover { color: var(--gold); }
.footer-award {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--gold);
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; margin-bottom: .6rem;
}
.footer-bottom {
  border-top: 1px solid rgba(244,244,243,.12); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between;
  font-size: .82rem; color: rgba(244,244,243,.6);
}
.footer-popia { max-width: 60ch; }

/* -------------------------------------------------- utilities */
.stack > * + * { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }
.lead { font-size: 1.1rem; color: var(--muted); }
.two-col { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 800px) { .two-col { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.eyebrow-note { font-size: .85rem; color: var(--muted); margin-top: 1.5rem; font-style: italic; }
