/* ==========================================================================
   Tire Service Plus — design tokens, reset, shared layout & components
   ========================================================================== */

:root {
  --color-primary: #ffc72c;
  --color-primary-dark: #e0a800;
  --color-black: #111111;
  --color-dark: #1c1c1c;
  --color-silver: #c7cbcf;
  --color-silver-dark: #8a9096;
  --color-white: #ffffff;
  --color-bg: #f7f7f5;
  --color-border: #e4e2dc;
  --color-text: #1c1c1c;
  --color-text-muted: #5b5b5b;
  --color-muted-on-dark: #cfcfcf; /* --color-text-muted's counterpart for the always-dark brand elements (hero bands, cards) */

  /* Flippable "page chrome" tokens — distinct from the literal --color-white/
     --color-black above, which stay fixed for the always-dark brand elements
     (footer, hero bands, contact-info-card, mobile CTA bar, gold buttons). */
  --surface: var(--color-white);
  --heading-color: var(--color-black);
  --logo-outline: var(--color-black);
  --color-selected-bg: #fff9e8;

  --color-success: #2e7d32;
  --color-success-bg: #e9f6ea;
  --color-danger: #c62828;
  --color-danger-bg: #fbeaea;

  --color-slot-bg: var(--surface);
  --color-slot-border: var(--color-border);
  --color-slot-booked-bg: #e5e5e5;
  --color-slot-booked-text: #9a9a9a;

  --gradient-chrome: linear-gradient(180deg, #edeff1 0%, #b7bcc1 100%);
  --gradient-hero: linear-gradient(115deg, #111111 0%, #2b2b2b 45%, #6b5410 78%, #ffc72c 100%);

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 10px rgba(17, 17, 17, 0.06);
  --shadow-raised: 0 8px 24px rgba(17, 17, 17, 0.12);
  --container-width: 1120px;
}

[data-theme="dark"] {
  --color-bg: #111214;
  --color-border: #34353b;
  --color-text: #e8e8ea;
  --color-text-muted: #a0a0a6;

  --surface: #1c1d21;
  --heading-color: #f5f5f5;
  --logo-outline: var(--color-white);
  --color-selected-bg: #3a3316;

  --color-slot-booked-bg: #2a2b2f;
  --color-slot-booked-text: #6f6f75;

  --color-success: #4caf50;
  --color-success-bg: #173a1c;
  --color-danger: #ef5350;
  --color-danger-bg: #3a1717;
}

[data-theme="dark"] .eyebrow { color: var(--color-primary-dark); }
/* Header background flips dark in dark theme, same reasoning as .eyebrow
   above — see .logo-wordmark's own color comment. */
[data-theme="dark"] .logo-wordmark { color: var(--color-primary-dark); }
/* .section has no background of its own — it sits directly on the page
   background (--color-bg), which flips dark in dark theme, same reasoning
   as .eyebrow/.logo-wordmark above. */
[data-theme="dark"] .footnote-link { color: var(--color-primary-dark); }

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* Any element toggled via el.hidden=true must actually disappear, even when
   it also carries a class that sets its own `display` (e.g. .parts-check,
   .slot-grid) — an author rule of equal specificity would otherwise beat the
   browser's default [hidden]{display:none} UA rule. */
[hidden] { display: none !important; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--heading-color);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); text-transform: uppercase; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--color-text-muted); }

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

/* Off-screen until keyboard-focused, then jumps above the sticky header
   (z-index: 50, below) so a keyboard user can bypass the nav links without
   tabbing through them first. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-black);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--alt { background: var(--surface); }

/* The always-dark hero/card look, used on both <section> hero bands and the
   homepage's hours-of-operation <div class="card">  — copy-pasted 5x as an
   inline style="background:var(--color-black); color:var(--color-white);"
   before this class existed. Named for the surface, not the element, since
   it's applied to more than just sections. */
.on-dark { background: var(--color-black); color: var(--color-white); }
/* .card's own `background: var(--surface)` (below) has equal specificity and
   is declared later, so it silently wins over .on-dark's background on any
   `class="card on-dark"` element — leaving light hours-list text on a light
   card instead of the intended dark one. This two-class rule outranks both. */
.card.on-dark { background: var(--color-black); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a00; /* AA contrast (4.93:1) on light backgrounds — var(--color-primary-dark) alone is only 2.15:1 */
  margin-bottom: 10px;
}

/* On the dark hero bands, the brighter gold is already high-contrast (8.79:1) — keep it there. */
.section--tight .eyebrow { color: var(--color-primary-dark); }

/* ---------------- Logo lockup ---------------- */

.logo-lockup {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  /* AA contrast (4.93:1) on the light header background this is the
     default for — var(--color-primary) alone is ~1.6:1 there, same fix as
     .eyebrow above. The thin text-shadow outline below isn't accounted for
     by contrast-ratio tools and doesn't rescue this on its own. */
  color: #8a6a00;
  text-shadow:
    1px 1px 0 var(--logo-outline),
    -1px -1px 0 var(--logo-outline),
    1px -1px 0 var(--logo-outline),
    -1px 1px 0 var(--logo-outline);
  white-space: nowrap;
}

/* .hero-tread (index.html's big hero) is always dark regardless of site
   theme — its brand gradient never changes (see that rule's own comment) —
   so the logo there keeps the brightest gold instead of the AA-safe darker
   one above, which is only needed against the light header background. */
.hero-tread .logo-wordmark { color: var(--color-primary); }

.logo-subtext {
  margin-top: 4px;
  align-self: flex-start;
  background: var(--gradient-chrome);
  color: var(--color-black);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}

.logo-lockup--lg .logo-wordmark { font-size: 44px; }
.logo-lockup--lg .logo-subtext { font-size: 12px; padding: 4px 10px; margin-top: 8px; }

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

.site-header {
  background: var(--surface);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

.header-phone-icon { flex: 0 0 auto; }

.header-phone:hover .header-phone-text { text-decoration: underline; }

@media (max-width: 520px) {
  /* Icon-only on narrow viewports — the number itself stays in the DOM
     (screen readers still announce it as the link's accessible name), just
     visually hidden, rather than swapping to a Unicode phone glyph, which
     renders as a different, often dated-looking emoji per OS/browser font
     with no way to match the site's own visual language. */
  .header-phone-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

.pill-toggle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  min-width: 40px;
  background: var(--surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.pill-toggle:hover { border-color: var(--color-primary-dark); color: var(--color-primary-dark); }

/* select.pill-toggle (the language picker) only — the theme-toggle button
   sharing this class needs none of this. Native selects ignore `width` from
   the shared select{} rule below without this override (it would otherwise
   stretch to fill .header-actions), and get a custom caret since the
   default OS arrow looks oversized/inconsistent at this pill's small size;
   colored to match --color-text per theme the same way the date-input
   calendar icon is (a background-image can't pick up currentColor). */
select.pill-toggle {
  width: auto;
  padding-right: 26px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
}

[data-theme="dark"] select.pill-toggle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8e8ea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text);
  padding: 6px 2px;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover { color: var(--color-primary-dark); }

.site-nav a.is-active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.site-nav a.site-nav-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border-bottom: none;
  background: var(--color-primary);
  color: var(--color-black);
  box-shadow: var(--shadow-card);
  transition: background 0.12s ease;
}

.site-nav a.site-nav-cta:hover,
.site-nav a.site-nav-cta.is-active {
  background: var(--color-primary-dark);
  color: var(--color-black);
  border-bottom-color: transparent;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch; /* Chromium buttons default to flex-start, which collapses the bars to 0 width */
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--color-text);
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }
  .site-nav.is-open { max-height: 320px; }
  .site-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border);
    border-left: 3px solid transparent;
  }
  .site-nav a.is-active { border-left-color: var(--color-primary); border-bottom-color: var(--color-border); }
  .site-nav a.site-nav-cta { margin: 12px 20px; justify-content: center; }
  .header-inner { position: relative; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

/* A real 3D press rather than a flat squish — the button recedes into the
   page (translateZ negative) and tilts very slightly, like it's being
   pushed into a surface, then springs back on release via the transition
   above. perspective() lives on the transform itself (not a parent
   property) so it works the same regardless of what wraps a given button. */
.btn:active {
  transform: perspective(300px) translateZ(-6px) scale(0.97);
  box-shadow: none;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-black);
  box-shadow: var(--shadow-card);
}
.btn--primary:hover { background: var(--color-primary-dark); }

.btn--dark {
  background: var(--color-black);
  color: var(--color-white);
}
.btn--dark:hover { background: #000; }

.btn--outline {
  background: transparent;
  border-color: var(--heading-color);
  color: var(--heading-color);
}
.btn--outline:hover { background: var(--color-black); color: var(--color-white); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- Cards ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-card);
  /* js/card-tilt.js sets transform/box-shadow inline on mousemove for a
     subtle cursor-following 3D tilt, and clears both on mouseleave — this
     transition is what makes that release glide back to flat instead of
     snapping. Excluded in JS: cards inside .services-carousel (already have
     their own scroll-driven coverflow transform) and any card that is or
     lives inside a <form> (decorative motion shouldn't compete with
     precise interaction — see js/card-tilt.js's header comment). */
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* Reserves space for renderServiceCards()'s 12 cards, populated by JS after
   load (about.html only — id scoped rather than the shared .card-grid
   class above, which is also used for several static card grids already
   present at parse time with no shift risk) — same CLS rationale as
   .services-carousel below. Two tiers since this grid's column count (and
   so its row count/height) varies continuously with viewport width, unlike
   the fixed-item-count list above; measured at desktop and forced-single-
   column widths rather than guessed.
   Qualified as `.card-grid#servicesGrid`, not a bare `#servicesGrid` — the
   id is reused by index.html's `.services-carousel` track (a pre-existing
   collision, not introduced here), which a bare id selector would also
   match and override that element's own, much shorter min-height below
   with this one — exactly what happened before this comment was added. */
.card-grid#servicesGrid { min-height: 682px; }
@media (max-width: 640px) {
  .card-grid#servicesGrid { min-height: 2100px; }
}

/* Links straight into the booking wizard with the "Something Else" concern
   (id 'other') pre-checked, via the same ?concern= URL param
   js/main.js's renderServiceCards() links already use — see
   js/booking.js's preselectConcernFromUrl(). Underlined by default (not
   just on hover) since this is inline text within a sentence, where WCAG
   recommends more than color alone to mark it as a link. AA-safe dark gold
   on this section's light background, same fix as .eyebrow/.logo-wordmark. */
.footnote-link {
  color: #8a6a00;
  text-decoration: underline;
}
.footnote-link:hover { color: var(--color-primary-dark); }

.service-card .service-icon {
  width: 40px; height: 6px;
  background: var(--color-primary);
  border-radius: 3px;
  margin-bottom: 16px;
}

/* Service cards (homepage carousel and about.html's services grid alike)
   render as <a> (see js/main.js renderServiceCards) so they're real,
   keyboard-focusable links into the booking wizard — reset the default
   link styling so they still look like plain cards. */
a.service-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* ---------------- Services carousel (index.html only) ---------------- */

.services-carousel-wrap {
  /* Shared with .services-carousel's centering padding and .card's
     flex-basis below, so the two stay in lockstep — see .services-carousel's
     padding comment for why they must match exactly. */
  --carousel-card-width: 260px;
  display: flex;
  align-items: center;
  gap: 12px;
  /* home-carousel.js sets each card's z-index up to 100 so the centered
     card renders above its tilted neighbors — but every card also gets a
     `transform` (even the flat/centered one, e.g. `scale(1)`), and ANY
     non-none transform creates a new stacking context per spec, so those
     card z-indexes were competing directly with unrelated page chrome
     outside the carousel — the sticky header (z-index: 50) — rather than
     staying scoped to ordering cards against each other. isolation:
     isolate confines that competition to inside this wrapper: card
     z-indexes still order cards correctly relative to one another, but can
     never rise above anything outside it, no matter how high the value. */
  isolation: isolate;
}

.services-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* home-carousel.js's setupLoopClones sets scrollLeft explicitly (computed
     fresh from current card positions) every time it inserts/removes loop
     clones — the browser's own scroll-anchoring would otherwise *also*
     auto-adjust scrollLeft to preserve visual position around that same
     insertion, on its own schedule, stacking an extra shift on top of the
     one setupLoopClones already computed and applied. */
  overflow-anchor: none;
  gap: 20px;
  /* Top/bottom padding must clear both the coverflow tilt's scale-up of the
     centered card AND its translateZ (which moves it visually closer/larger)
     — overflow-x:auto forces the y-axis to clip as well per the CSS overflow
     spec, so too little padding here crops the centered card.
     Left/right padding isn't a flat value: it's exactly half the track's
     own width minus half a card's width, which is what lets the FIRST and
     LAST cards actually reach scroll-snap-align:center below — without
     this extra scrollable space at each end, the browser has nowhere to
     scroll past a flush-left/flush-right resting position, so the "current"
     edge card would sit off-center from home-carousel.js's coverflow tilt
     (which always tilts relative to the track's true center), rendering it
     tilted/cut-off instead of flat until you scrolled it manually past the
     snap point — this is what made mobile (one card per view, so this
     matters on every card, not just the edges) both start off-center and
     never snap to center on swipe. */
  padding: 24px calc(50% - (var(--carousel-card-width) / 2)) 24px;
  scrollbar-width: none;
  /* This starts empty in the HTML and is populated by home-carousel.js after
     load — with no reserved height, the ~277px of cards popping in shifts
     everything below it down, the single largest source of this page's
     layout shift (measured CLS 0.204). Matches the actual rendered height
     (245px card + 32px padding) so nothing moves once the cards render. */
  min-height: 277px;
}
.services-carousel::-webkit-scrollbar { display: none; }

.services-carousel .card {
  flex: 0 0 var(--carousel-card-width);
  scroll-snap-align: center;
  border: 1px solid var(--color-border);
  /* transform/opacity are driven per-frame by home-carousel.js's coverflow
     effect (rotateY/scale/translateZ based on distance from center) — the
     transition here is what makes those JS-set values glide between scroll
     ticks instead of snapping. No :hover transform anymore: an inline style
     (set every scroll frame) would always beat a CSS :hover rule's
     specificity, so a separate hover lift would fight the tilt rather than
     combine with it. */
  transition: transform 0.1s linear, opacity 0.1s linear, box-shadow 0.15s ease, border-color 0.15s ease;
  will-change: transform;
}

.services-carousel .card:hover {
  box-shadow: var(--shadow-raised);
  border-color: var(--color-primary-dark);
}

.carousel-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin-top: 14px;
  overflow: hidden;
}

.carousel-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  border-radius: inherit;
  transition: width 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
  /* home-carousel.js also checks this and skips applying the 3D tilt
     transform entirely — this covers the progress bar's own width
     transition, which JS doesn't touch. */
  .services-carousel .card { transition: box-shadow 0.15s ease, border-color 0.15s ease; }
  .carousel-progress-fill { transition: none; }
}

.carousel-nav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--surface);
  color: var(--heading-color);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-nav:hover { border-color: var(--color-primary-dark); color: var(--color-primary-dark); }

@media (max-width: 640px) {
  .carousel-nav { display: none; }
}

/* ---------------- Forms ---------------- */

label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

/* aria-hidden: the input's own `required` attribute already gets a
   screen reader's "required" announcement — this asterisk is a purely
   visual cue for sighted users, who otherwise have no way to tell which
   fields are mandatory before they submit and hit a validation error. */
.required-mark {
  color: var(--color-text-muted);
  margin-left: 2px;
}

.required-legend {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: -6px 0 16px;
}

.field { margin-bottom: 18px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  background: var(--surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
}

textarea { resize: vertical; min-height: 110px; }

/* Painted by JS validation (js/booking.js's validateStep, js/contact.js's
   submit handler) alongside the existing toast, so a blocked submit also
   points at exactly which field is the problem instead of only flashing a
   temporary message. .field.is-error covers fields that already have a
   visible border to recolor. */
.field.is-error select,
.field.is-error input,
.field.is-error textarea {
  border-color: var(--color-danger);
}
.inline-error {
  color: var(--color-danger);
  font-size: 13px;
  margin: 8px 0 0;
}

/* Checked checkboxes (concern cards, the hybrid-vehicle checkbox) default
   to the browser's own blue accent otherwise — the one native-control
   color on the whole site that wasn't already brand yellow. Same in both
   themes: the checkmark itself is always drawn white by the browser
   regardless of accent-color, so it reads fine against either shade. */
input[type="checkbox"] { accent-color: var(--color-primary); }

/* input[type=date]'s native calendar-picker icon is browser-drawn (not
   real text/SVG in the DOM), always a dark outline glyph regardless of
   theme — invisible against this dark-theme input's now-dark background
   (--surface flips dark; the icon doesn't). Only Chrome/Edge/Safari
   support restyling it via ::-webkit-calendar-picker-indicator; Firefox's
   own icon already adapts to its OS-level dark/light setting independent
   of this page's theme, so no equivalent override is needed or possible
   there. Light theme is left alone — the default dark icon already has
   fine contrast on this input's light background there. */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffc72c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

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

.site-footer {
  background: var(--color-black);
  color: var(--color-muted-on-dark);
  padding: 48px 0 28px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #333;
}

/* Homepage "Since 2007" section (text + the Hours of Operation card).
   Un-collapsed on mobile, this stayed a fixed 2-column grid, squeezing the
   hours card to ~1/3 of a narrow screen's width — .hours-list's `justify-
   content: space-between` rows then wrapped inconsistently (Wed/Thu/Fri's
   longer day names wrapped to a second line, Sun/Mon/etc. didn't), reading
   as misaligned text. Same fix pattern as .footer-grid below. */
.since2007-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
  .since2007-grid { grid-template-columns: 1fr; }
}

.site-footer h3 {
  color: var(--color-white);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.site-footer p, .site-footer a { color: #b8b8b8; font-size: 14px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--color-primary); }

/* Reserves space for renderHours()'s 7 days-of-week <li>s, populated by JS
   after load (measured rendered height across all three usages — footer,
   homepage hero, contact page) — same CLS rationale as .services-carousel
   below. A single value works everywhere since this list is always exactly
   7 items regardless of viewport width, unlike the grids further down. */
.hours-list { list-style: none; margin: 0; padding: 0; font-size: 14px; min-height: 208px; }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: #b8b8b8;
}
.hours-list li.is-today { color: var(--color-primary); font-weight: 600; }

.footer-nav { display: flex; flex-direction: column; gap: 8px; }

.footer-bottom {
  padding-top: 20px;
  font-size: 12px;
  color: #7c7c7c;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-legal { display: flex; gap: 16px; }
.footer-legal a { font-size: 12px; }

.map-embed {
  position: relative;
  padding-bottom: 50%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  background: var(--surface);
  margin-top: 16px;
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Google's embed renders its own UI chrome in full color regardless of the
   site's theme; in dark mode a plain iframe reads as a stray bright
   rectangle. Desaturating and inverting it makes the map read as an
   intentional part of the dark palette instead — the hue-rotate un-inverts
   labels/roads back to natural-looking colors rather than leaving
   everything color-negative. Matches this file's existing
   [data-theme="dark"] override pattern; light mode is untouched since the
   embed already matches the page there. */
[data-theme="dark"] .map-embed iframe { filter: grayscale(0.3) invert(0.9) hue-rotate(180deg); }

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p { margin-bottom: 0; }

.legal-disclaimer {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--color-text);
  font-size: 14px;
  margin-bottom: 32px;
}

.placeholder-note {
  font-style: italic;
  color: #8a8a8a;
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: min(92vw, 480px);
  background: var(--surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  border-left: 5px solid var(--color-black);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  box-shadow: var(--shadow-raised);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast--success { border-left-color: var(--color-success); }
.toast--error { border-left-color: var(--color-danger); }

/* ---------------- Misc ---------------- */

.hero-tread {
  /* Two background layers: the diagonal tread texture on top (fixed, full
     size) and the brand gradient underneath, oversized to 130% so there's
     room for js/hero-parallax.js to pan its position with the cursor
     without ever revealing an edge. Previously the gradient was set via an
     inline style="background:..." on the element in pages/index.html,
     which — being an inline style — always won over this class's
     background-image regardless of specificity, so the tread texture below
     was never actually visible; moving the gradient here too fixes that as
     a side effect of giving the parallax effect something to pan. */
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 2px, transparent 2px, transparent 14px),
    var(--gradient-hero);
  background-size: 100% 100%, 130% 130%;
  background-position: 0 0, 50% 50%;
  color: var(--color-white);
  transition: background-position 0.3s ease-out;
}

.stat-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.stat-row .stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: #8a6a00; /* AA contrast (4.93:1) on light backgrounds — var(--color-primary-dark) alone is only 2.15:1, same fix as .eyebrow above */
  display: block;
}

.stat-row .stat-label {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* js/scroll-reveal.js's 3D flip-in + count-up. Scoped under .js-stat-reveal
   (added to <html> only once that script actually runs) rather than
   applying unconditionally, so a stat number still renders as normal
   visible text if the script fails to load or IntersectionObserver isn't
   supported — the animated version is an enhancement, not a requirement to
   see the number at all. Targets .stat-number generally, not just
   .stat-row .stat-number, since about.html's stat cards use bare
   .stat-number spans outside a .stat-row. */
/* inline-block (not the .stat-row-scoped rule's block, higher specificity
   so it still wins for that layout) so a bare .stat-number outside
   .stat-row — about.html's stat cards — has a display value that reliably
   supports the 3D transform above; plain inline elements don't. */
.stat-number { display: inline-block; }

.js-stat-reveal .stat-number {
  opacity: 0;
  transform: perspective(600px) rotateX(-90deg);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.js-stat-reveal .stat-number.is-revealed {
  opacity: 1;
  transform: perspective(600px) rotateX(0deg);
}

.divider-chrome {
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-chrome);
  width: 64px;
  margin: 18px 0;
}

/* ---------------- Sticky mobile call/book bar ---------------- */

.mobile-cta-bar { display: none; }

@media (max-width: 760px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 -4px 16px rgba(17, 17, 17, 0.12);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-cta-btn {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
  }
  .mobile-cta-btn--call { background: var(--color-black); color: var(--color-white); }
  .mobile-cta-btn--book { background: var(--color-primary); color: var(--color-black); }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }
}
