/* Built by build.mjs from site.json. Edit site.json (or the template), then run: node build.mjs */
/* Shared base for every template. A template's styles.css sets the look (custom properties) and styles its own sections. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
p, ul, ol, dl, dd, figure, h1, h2, h3, h4, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
  .js [data-hero] { visibility: hidden; }
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* SplitText line masks: room for descenders while lines slide in. */
[data-split] > div, [data-hero-lines] > div { padding-bottom: 0.12em; margin-bottom: -0.12em; }

.wrap { max-width: var(--max); margin-inline: auto; }
.section { padding: clamp(4rem, 10vw, 8rem) var(--gutter); }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 8px;
  background: var(--fg); color: var(--bg);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Concept label: deliberately plain, so it reads as a note on top of the design, not part of it. */
.concept-bar {
  padding: 0.6rem var(--gutter);
  background: #161616; color: #F4F4F0;
  font: 500 0.8125rem/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
}
.concept-bar a { color: inherit; font-weight: 700; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 1.5rem;
  border: 0; border-radius: var(--radius-btn, 999px);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}
.btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-small { min-height: 42px; padding: 0 1.1rem; font-size: 0.9375rem; }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }

/* "Open now" badge, filled in by site.js */
.open-now { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.open-now::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--closed, #B42318); }
.open-now.is-open::before { background: var(--open, #1A7F37); box-shadow: 0 0 0 4px color-mix(in srgb, var(--open, #1A7F37) 22%, transparent); }

/* Hours */
.hours-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.hours-row dt { font-weight: 600; }
.hours-row dd { font-variant-numeric: tabular-nums; text-align: right; }
.hours-row.is-today { font-weight: 800; }
.hours-row.is-today dt::after { content: " (today)"; font-weight: 500; }

/* Map */
.map { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Forms */
.lead-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field > label, .checks legend { font-weight: 700; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--muted); }
/* Text boxes only: checkboxes and radios keep their own small size. */
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--input-border, var(--line)); border-radius: var(--radius-input, 8px);
  background: var(--input-bg, #FFFFFF); color: var(--input-fg, var(--fg));
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.check-options input { flex: none; width: 1.1rem; height: 1.1rem; }
.checks { margin: 0; padding: 0; border: 0; min-width: 0; }
.checks legend { padding: 0; margin-bottom: 0.6rem; }
.check-options { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.check-options label {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem;
  border: 1.5px solid var(--input-border, var(--line)); border-radius: 999px;
  background: var(--input-bg, #FFFFFF); color: var(--input-fg, var(--fg));
  font-weight: 500; cursor: pointer;
}
.check-options label:has(:checked) { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.check-options input { margin: 0; accent-color: var(--accent); }
.hp { display: none; }
.form-end { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form-status { font-weight: 700; }
.form-error { padding: 1rem 1.1rem; border-left: 3px solid var(--closed, #B42318); background: rgba(180, 35, 24, 0.08); }
@media (min-width: 640px) {
  .lead-form { grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
  .field-wide, .checks, .form-end, .form-error { grid-column: 1 / -1; }
}

/* Footer */
.site-footer { padding: clamp(3.5rem, 8vw, 6rem) var(--gutter) 2rem; background: var(--footer-bg); color: var(--footer-fg); }
.footer-grid { display: grid; gap: 2rem; }
.footer-name { margin-bottom: 0.75rem; font-family: var(--font-display); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; }
.footer-h { margin-bottom: 0.6rem; font: 700 0.9375rem/1.2 var(--font-body); opacity: 0.7; }
.site-footer p + p { margin-top: 0.25rem; }
.site-footer a { text-underline-offset: 0.2em; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  margin-top: 3rem; padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  font-size: 0.875rem; opacity: 0.8;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.3fr 1fr; }
}

/* Mobile Call / Book bar */
.sticky-bar { display: none; }
@media (max-width: 759px) {
  .sticky-bar {
    position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; padding: 7px;
    border-radius: 999px; background: var(--bar-bg); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.3s;
  }
  .sticky-bar a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; font-weight: 700; text-decoration: none; }
  .sticky-call { color: var(--bar-fg); box-shadow: inset 0 0 0 1.5px currentColor; }
  .sticky-book { background: var(--accent); color: var(--accent-fg); }
  .js .sticky-bar:not(.is-shown) { transform: translateY(150%); opacity: 0; pointer-events: none; }
  .site-footer { padding-bottom: 7rem; }
}

/* Mobile detailing template: night-showroom hero, paint-booth white pages, candy red, wide automotive type. */

:root {
  --bg: #F3F4F5;
  --fg: #15171A;
  --muted: #5B626B;
  --line: rgba(21, 23, 26, 0.14);
  --red: #C8102E;
  --steel: #8A939C;
  --night: #101215;
  --silver: #BCC4CB;
  --accent: var(--red);
  --accent-fg: #FFFFFF;
  --btn-bg: var(--red);
  --btn-fg: #FFFFFF;
  --btn-hover-bg: var(--fg);
  --btn-hover-fg: #FFFFFF;
  --focus: var(--fg);
  --radius-btn: 10px;
  --radius-input: 10px;
  --footer-bg: var(--night);
  --footer-fg: #E9ECEF;
  --bar-bg: var(--night);
  --bar-fg: #FFFFFF;
  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --gutter: clamp(20px, 4.5vw, 56px);
  --max: 1280px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

.section-title {
  font: 900 clamp(2.1rem, 5.2vw, 4.25rem)/0.95 var(--font-display);
  font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em;
}

/* Header (dark, part of the showroom) */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--header-h); padding: 0.5rem var(--gutter);
  background: rgba(16, 18, 21, 0.92); color: #F3F4F5;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header :focus-visible { outline-color: #FFFFFF; }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-word { font: 900 1.3rem/1 var(--font-display); font-stretch: 125%; text-transform: uppercase; }
.brand-sub { margin-top: 0.3rem; color: var(--steel); font-size: 0.75rem; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); font-weight: 600; }
.site-nav a:not(.btn) {
  padding-block: 0.3rem; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.site-nav a:not(.btn):hover { background-size: 100% 2px; }
.site-header .btn:hover { background: #FFFFFF; color: var(--fg); }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 7vw, 5rem); background: var(--night); color: #F3F4F5; }
.hero :focus-visible { outline-color: #FFFFFF; }
.hero-title {
  font: 900 clamp(2.1rem, 9.6vw, 7.5rem)/0.92 var(--font-display);
  font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.02em;
  color: var(--silver);
}
/* site.js adds .glint for a moment and sweeps --glint across, like light over fresh polish */
.hero-title.glint {
  --glint: -20%;
  background: linear-gradient(100deg, var(--silver) 0%, var(--silver) calc(var(--glint) - 10%), #FFFFFF calc(var(--glint) - 2%), #FFFFFF calc(var(--glint) + 2%), var(--silver) calc(var(--glint) + 10%), var(--silver) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-row { display: grid; gap: 1.5rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero-sub { max-width: 44ch; color: #AEB6BE; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .btn:hover { background: #FFFFFF; color: var(--fg); }
.hero .btn-ghost { color: #F3F4F5; }
.hero-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; margin-top: clamp(2rem, 4vw, 3rem); border-radius: clamp(14px, 2vw, 24px); }
.hero-media img { position: absolute; left: 0; top: -6%; width: 100%; height: 112%; object-fit: cover; }
.perks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 1.5rem; color: #AEB6BE; font-weight: 600; }
.perks li { display: inline-flex; align-items: center; gap: 0.6rem; }
.perks li::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--red); transform: rotate(45deg); }
@media (min-width: 600px) {
  .hero-media { aspect-ratio: 16 / 9; }
}
@media (min-width: 900px) {
  .hero-title { font-size: clamp(4rem, 8.1vw, 7.5rem); }
  .hero-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

/* Packages */
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head p { max-width: 44ch; color: var(--muted); font-size: 1.125rem; }
.package-grid { display: grid; gap: 1rem; }
.package {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 1.5rem; border-radius: 16px;
  background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease), box-shadow 0.45s;
}
.package::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-100%);
}
.package:hover { background: var(--night); color: #F3F4F5; box-shadow: none; }
.package:hover::after { transform: translateX(100%); transition: transform 0.9s var(--ease); }
.package-time { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.package h3 { margin-top: 0.5rem; font: 800 1.3rem/1.1 var(--font-display); font-stretch: 112%; text-transform: uppercase; }
.package-price { margin-top: 0.75rem; color: var(--red); font: 900 2.4rem/1 var(--font-display); font-stretch: 125%; }
.package-list { display: grid; gap: 0.5rem; margin: 1.25rem 0 1.5rem; color: var(--muted); font-size: 0.9375rem; }
.package-list li { position: relative; padding-left: 1.4rem; }
.package-list li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.3em;
  width: 0.4rem; height: 0.7rem; border: solid var(--red); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.package:hover .package-time, .package:hover .package-list { color: #AEB6BE; }
.package:hover .package-btn { background: #FFFFFF; color: var(--fg); }
.package-btn { align-self: flex-start; margin-top: auto; }
@media (min-width: 640px) {
  .package-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; column-gap: 3rem; }
}
@media (min-width: 1100px) {
  .package-grid { grid-template-columns: repeat(4, 1fr); }
}

/* How it works */
.how { background: #E8EAEC; }
.steps { display: grid; gap: 1.75rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.steps li { padding-top: 1.25rem; border-top: 3px solid var(--fg); }
.step-num { color: var(--red); font: 900 2.25rem/1 var(--font-display); font-stretch: 125%; }
.steps h3 { margin-top: 0.75rem; font: 800 1.15rem/1.15 var(--font-display); font-stretch: 112%; text-transform: uppercase; }
.steps p { margin-top: 0.5rem; color: var(--muted); }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Up close: a mosaic */
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: clamp(2rem, 4vw, 3rem); }
.tile { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 12px; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.tile:hover img { transform: scale(1.05); }
@media (min-width: 900px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(180px, 18vw, 240px); }
  .tile { aspect-ratio: auto; }
  .tile:first-child { grid-column: span 2; grid-row: span 2; }
  .tile:nth-child(6) { grid-column: 1 / -1; }
}

/* We come to you */
.area { background: #FFFFFF; }
.area-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.area-info > p { max-width: 40ch; margin-top: 1.25rem; color: var(--muted); font-size: 1.125rem; }
.area-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.area-list li { padding: 0.5rem 1rem; border-radius: 8px; background: var(--fg); color: #F3F4F5; font-size: 0.9375rem; font-weight: 600; }
.area-info .hours { max-width: 440px; margin-top: 1.25rem; }
.area-map .map { border-radius: 16px; filter: grayscale(1) contrast(1.05); }
@media (min-width: 900px) {
  .area-wrap { grid-template-columns: 1fr 1.1fr; align-items: start; }
}

/* Booking */
.book-wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.book-intro p { max-width: 36ch; margin-top: 1.25rem; color: var(--muted); font-size: 1.125rem; }
@media (min-width: 900px) {
  .book-wrap { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
}

.footer-name { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
