/* J & L Autobody
   Palette: primer grey, clearcoat white, graphite, masking-tape yellow, gloss blue.
   Type: Archivo, expanded for headlines, normal width for text. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --primer: #dcddd9;
  --paper: #f7f7f4;
  --ink: #1c2025;
  --ink-soft: #4b5159;
  --tape: #e9c440;
  --blue: #1b3fa6;
  --blue-deep: #142f7d;
  --line: rgba(28, 32, 37, 0.18);
  --error: #a3261a;
  --ok: #1d6b3c;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--primer);
  color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
address { font-style: normal; }

h1, h2, h3 { margin: 0; font-weight: 800; }
h1, h2 { font-stretch: 125%; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.3vw, 3.35rem); line-height: 1.06; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 700; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  font: inherit; font-weight: 700; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 4px; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-small { min-height: 44px; padding: 0 18px; font-size: 1rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-on-dark { border-color: var(--paper); color: var(--paper); }
.btn-on-dark:hover { background: var(--paper); color: var(--ink); }
.btn-tape { background: var(--tape); color: var(--ink); }
.btn-tape:hover { background: #f3d463; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--primer);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.wordmark {
  font-stretch: 125%; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.03em;
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.wordmark .amp { color: var(--blue); }
.wordmark-sub { font-stretch: 100%; font-weight: 600; font-size: 1rem; letter-spacing: 0; margin-left: 4px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 500; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-phone:hover { text-decoration: underline; }

/* ---------- taped photos: the signature ---------- */
.taped { position: relative; margin: 0; }
.taped img { width: 100%; object-fit: cover; box-shadow: 0 18px 40px -22px rgba(28, 32, 37, 0.7); }
.taped::before, .taped::after {
  content: ""; position: absolute; z-index: 2;
  width: 118px; height: 34px;
  background: var(--tape);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 7px);
  opacity: 0.93;
  box-shadow: 0 2px 5px rgba(28, 32, 37, 0.22);
  /* torn ends */
  clip-path: polygon(0 12%, 3% 0, 6% 14%, 9% 2%, 100% 0, 97% 22%, 100% 44%, 97% 66%, 100% 88%, 96% 100%, 0 100%, 3% 76%, 0 54%, 3% 32%);
}
.taped::before { top: -15px; left: -30px; transform: rotate(-38deg); }
.taped::after { bottom: -15px; right: -30px; transform: rotate(-38deg) scaleX(-1); }
.taped-left::before { left: auto; right: -30px; transform: rotate(38deg); }
.taped-left::after { right: auto; left: -30px; transform: rotate(38deg) scaleX(-1); }
.taped figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.open-status {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; font-weight: 600; font-size: 1rem;
}
.open-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-soft); }
.open-status.is-open::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(29, 107, 60, 0.18); }
.lede { margin-top: 24px; font-size: 1.1875rem; max-width: 34em; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.rating { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; text-decoration: none; }
.rating:hover span:last-child { text-decoration: underline; }
.stars { color: #b8860b; letter-spacing: 2px; font-size: 1.25rem; line-height: 1; }
.hero-photo { transform: rotate(1.6deg); }
.hero-photo img { aspect-ratio: 5 / 4; }

/* one clearcoat reflection across the photo on load */
.sweep { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sweep::before {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: sweep 1.5s 0.5s cubic-bezier(0.3, 0, 0.2, 1) both;
}
@keyframes sweep { to { left: 130%; } }

/* ---------- facts ---------- */
.facts { background: var(--ink); color: var(--paper); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-grid > div { padding: 30px 24px 30px 0; }
.facts-grid > div + div { padding-left: 24px; border-left: 1px solid rgba(247, 247, 244, 0.2); }
.facts strong { display: block; font-stretch: 112%; font-size: 1.1875rem; font-weight: 800; line-height: 1.25; }
.facts span { display: block; margin-top: 6px; font-size: 0.9688rem; color: #b9bdc1; line-height: 1.4; }

/* rotated photos and tape may poke past the gutter; never let them widen the page */
main { overflow-x: clip; }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-paper { background: var(--paper); }
.section-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p, .split-head p { margin-top: 16px; color: var(--ink-soft); font-size: 1.125rem; }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.services-photo { margin-top: 44px; transform: rotate(-1.4deg); }
.services-photo img { aspect-ratio: 4 / 3; }

.service-list { margin: 0; border-top: 2px solid var(--ink); }
.service-list > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 8px 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.service-list dt { font-weight: 700; font-size: 1.1875rem; line-height: 1.3; }
.service-list dd { margin: 0; color: var(--ink-soft); }

/* ---------- steps (a real sequence, so it is numbered) ---------- */
.steps { list-style: none; counter-reset: step; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 12px;
  font-stretch: 125%; font-weight: 900; font-size: 2.25rem; line-height: 1; color: var(--blue);
}
.steps p { margin: 8px 0 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(36px, 5vw, 60px) clamp(28px, 4vw, 52px); align-items: start; }
.gallery img { width: 100%; }
/* in the grid, tape sits on the two top corners so it never covers a caption or a neighbour */
.gallery .taped::after { bottom: auto; top: -15px; right: -30px; left: auto; transform: rotate(38deg); }
.gallery .taped::before { left: -30px; right: auto; transform: rotate(-38deg); }
.g-tall { grid-column: 1 / span 4; grid-row: 1 / span 2; transform: rotate(-1.2deg); }
.g-tall img { aspect-ratio: 3 / 4; }
.g-wide { grid-column: 5 / span 8; transform: rotate(0.8deg); }
.g-wide img { aspect-ratio: 16 / 7; }
.g-small { grid-column: span 4; }
.g-small img { aspect-ratio: 4 / 3; }
.g-small:nth-of-type(3) { transform: rotate(1deg); }
.g-small:nth-of-type(4) { transform: rotate(-0.8deg); }

/* ---------- reviews ---------- */
.reviews { background: var(--ink); color: var(--paper); }
.reviews-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.reviews-row > div:first-child { max-width: 40em; }
.reviews-stars { color: var(--tape); font-size: 2rem; letter-spacing: 6px; line-height: 1; margin-bottom: 18px; }
.reviews p:not(.reviews-stars) { margin: 16px 0 0; color: #c3c7ca; font-size: 1.125rem; }

/* ---------- visit ---------- */
.visit-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.address { margin-top: 20px; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
.visit-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 14px 0 30px; font-weight: 700; }
.visit-links a { color: var(--blue); text-underline-offset: 3px; }
.hours { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.hours th, .hours td { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 800; }
.hours tr.is-today th::after {
  content: "Today"; margin-left: 10px; padding: 2px 8px;
  background: var(--tape); font-size: 0.8125rem; font-weight: 700; border-radius: 2px; vertical-align: 1px;
}
.fineprint { margin-top: 18px; font-size: 0.9688rem; color: var(--ink-soft); }
.map { min-height: 380px; border: 1px solid var(--line); background: var(--primer); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }

/* ---------- closer and footer ---------- */
.closer { background: var(--tape); padding-block: clamp(44px, 6vw, 76px); }
.closer-row { display: flex; align-items: center; justify-content: space-between; gap: 28px 48px; flex-wrap: wrap; }
.closer .hero-actions { margin-top: 0; }
.closer .btn-ghost.btn-on-dark { border-color: var(--ink); color: var(--ink); }
.closer .btn-ghost.btn-on-dark:hover { background: var(--ink); color: var(--paper); }

.site-footer { background: var(--ink); color: #c3c7ca; padding-block: 40px; font-size: 0.9688rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 20px 56px; align-items: flex-start; }
.footer-row p { margin: 0; }
.footer-row strong { color: var(--paper); }
.footer-small { margin-left: auto !important; }

/* ---------- phone call bar ---------- */
.callbar { display: none; }

/* ---------- estimate page ---------- */
.page-head { padding-block: clamp(32px, 5vw, 64px) clamp(20px, 3vw, 36px); }
.page-head p { margin-top: 14px; max-width: 40em; color: var(--ink-soft); font-size: 1.125rem; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-bottom: clamp(56px, 8vw, 104px); }

.form-card { background: var(--paper); padding: clamp(20px, 4vw, 44px); border-top: 4px solid var(--ink); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset + fieldset { margin-top: 38px; padding-top: 34px; border-top: 1px solid var(--line); }
/* floated so the fieldset's top rule runs the full width above the legend */
legend { float: left; width: 100%; padding: 0; margin-bottom: 20px; font-stretch: 112%; font-weight: 800; font-size: 1.3125rem; }
legend + * { clear: both; }
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row.three { grid-template-columns: 0.6fr 1fr 1.2fr; }
.field { margin-bottom: 18px; }
.field label, .choice-label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 1rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.hint { display: block; margin-top: 6px; font-size: 0.9375rem; color: var(--ink-soft); }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"], input[type="password"], select, textarea {
  width: 100%; min-height: 50px; padding: 11px 14px;
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #8b9097; border-radius: 4px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); border-width: 2px; }
.error-text { display: block; margin-top: 6px; font-size: 0.9375rem; font-weight: 600; color: var(--error); }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label {
  display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 16px;
  background: #fff; border: 1.5px solid #8b9097; border-radius: 4px; font-weight: 500; cursor: pointer; margin: 0;
}
.choices input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.choices label:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.choices label:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }

.dropzone { padding: 22px; background: #fff; border: 2px dashed #8b9097; border-radius: 4px; text-align: center; }
.dropzone.is-over { border-color: var(--blue); background: #eef2fc; }
.dropzone p { margin: 0 0 12px; color: var(--ink-soft); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; margin-top: 16px; padding: 0; list-style: none; }
.thumbs li { position: relative; }
.thumbs img, .thumbs .thumb-file { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; background: var(--primer); }
.thumbs .thumb-file { display: grid; place-items: center; font-size: 0.8125rem; padding: 8px; text-align: center; word-break: break-all; }
.thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 1.125rem; line-height: 1; cursor: pointer;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-footer { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.form-footer p { margin: 0; font-size: 0.9688rem; color: var(--ink-soft); flex: 1 1 240px; }
.form-alert { margin: 0 0 24px; padding: 14px 18px; background: #fbeceb; border-left: 4px solid var(--error); font-weight: 600; }

.aside-card { background: var(--ink); color: var(--paper); padding: 30px 28px; position: sticky; top: 92px; }
.aside-card h2 { font-size: 1.375rem; }
.aside-card p { margin: 12px 0 0; color: #c3c7ca; }
.aside-card .aside-phone { display: block; margin-top: 16px; font-stretch: 112%; font-size: 1.625rem; font-weight: 800; color: var(--tape); text-decoration: none; }
.aside-card ul { margin: 22px 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid rgba(247, 247, 244, 0.2); font-size: 0.9688rem; }
.aside-card li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; color: #c3c7ca; }
.aside-card .open-status { margin: 18px 0 0; }

.done { background: var(--paper); padding: clamp(28px, 5vw, 56px); border-top: 4px solid var(--ok); }
.done p { margin: 16px 0 0; font-size: 1.125rem; max-width: 36em; }
.done .ref { display: inline-block; margin-top: 22px; padding: 8px 14px; background: var(--tape); font-weight: 800; font-size: 1.25rem; letter-spacing: 0.04em; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid > div { padding: 22px 20px 22px 0; }
  .facts-grid > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts-grid > div:nth-child(n + 3) { border-top: 1px solid rgba(247, 247, 244, 0.2); }
}

@media (max-width: 820px) {
  body { font-size: 1rem; }
  .hero-grid, .split, .visit-grid, .book-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { margin: 14px 10px 0; }
  .taped::before, .taped::after { width: 88px; height: 28px; }
  .taped::before { left: -20px; } .taped::after { right: -20px; }
  .taped-left::before { left: auto; right: -20px; } .taped-left::after { right: auto; left: -20px; }
  .gallery .taped::before { left: -20px; } .gallery .taped::after { right: -20px; left: auto; }
  .service-list > div { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); padding-inline: 10px; }
  .gallery > figure { grid-column: auto; grid-row: auto; }
  .g-tall img { aspect-ratio: 4 / 5; }
  .aside-card { position: static; }
  .field-row, .field-row.three { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .footer-small { margin-left: 0 !important; }

  .header-phone, .header-actions .btn { display: none; }
  .has-callbar { padding-bottom: 76px; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--ink);
  }
  .callbar .btn { min-height: 50px; padding: 0 10px; font-size: 1rem; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sweep::before { animation: none; display: none; }
  .btn { transition: none; }
}
