/* K & J Auto Body Shop, version B ("Matte"): the same energy as version A, stripped down.
   Black, white and one red, used sparingly; giant type, hairlines, single lines, no textures. */

:root {
  color-scheme: dark;
  --bg: #060607;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .22);
  --text: #f4f4f5;
  --muted: #8d9299;
  --red: #e3192f;            /* TODO(client) Q9: switch to the logo/sign color once we have it */
  --red-hi: #ff4155;
  --header-h: 68px;
  --sec-pad: clamp(64px, 8vw, 120px);
  --font-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* clip on <html> too, so the car's floor line can't widen the page on phones */
html { overflow-x: hidden; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.55 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; border-radius: 4px; }

.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; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: #fff; color: #000; font-weight: 700; }
.skip:focus { top: 12px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.ic {
  width: 1.2em; height: 1.2em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: var(--h); padding: 0 24px;
  border: 1.5px solid transparent; border-radius: 999px;
  font: 800 1.1rem/1 var(--font-display); letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 1.1em; height: 1.1em; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hi); }
.btn-line { color: var(--text); background: transparent; border-color: var(--line-2); }
.btn-line:hover { border-color: #fff; }

/* ---------- Sections and titles ---------- */
section { position: relative; padding: var(--sec-pad) 0; border-top: 1px solid var(--line); }
.b-head {
  margin: 0 0 clamp(28px, 4vw, 52px);
  font: 900 clamp(2.3rem, 5vw, 4.4rem)/.9 var(--font-display); letter-spacing: .005em; text-transform: uppercase;
}
.b-estimate .b-head { margin-bottom: 20px; font-size: clamp(2.3rem, 4.2vw, 3.6rem); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 60; transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled, .site-header.menu-open {
  background: rgba(6, 6, 7, .86); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.header-in { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; flex-direction: column; margin-right: auto; line-height: 1; text-decoration: none; }
.brand-mark { font: 900 2rem/.9 var(--font-display); letter-spacing: .01em; }
.brand-mark .amp { margin: 0 .04em; color: var(--red); }
.brand-sub { margin-top: 3px; font: 700 .66rem/1 var(--font-display); letter-spacing: .26em; text-transform: uppercase; opacity: .7; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  position: relative; padding: 8px 0;
  font: 600 .8rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; opacity: .7; transition: opacity .2s;
}
.nav a:hover { opacity: 1; }
.header-call { font: 800 1.15rem/1 var(--font-display); letter-spacing: .06em; text-decoration: none; transition: color .2s; }
.header-call:hover { color: var(--red-hi); }
.menu-btn { display: none; }

/* A | B version switch */
.ab { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 999px; }
.ab a {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font: 900 .95rem/1 var(--font-display); color: #fff; text-decoration: none; opacity: .6;
  transition: background-color .2s, color .2s, opacity .2s;
}
.ab a:hover { opacity: 1; }
.ab a[aria-current="page"] { background: #fff; color: var(--bg); opacity: 1; }

@media (max-width: 1000px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; z-index: 59;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px clamp(16px, 4vw, 40px) 22px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease-out); }
  .nav a { padding: 18px 0; font: 900 1.6rem/1 var(--font-display); letter-spacing: .04em; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav a:last-child { border-bottom: 0; }
  .menu-btn {
    display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -8px;
    padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  }
  .menu-btn .ic { grid-area: 1 / 1; width: 26px; height: 26px; }
  .menu-btn .ic-close, .menu-btn[aria-expanded="true"] .ic-menu { display: none; }
  .menu-btn[aria-expanded="true"] .ic-close { display: block; }
}
/* Phones get the Call button in the bottom bar instead */
@media (max-width: 760px) { .header-call { display: none; } }
@media (max-width: 560px) {
  :root { --header-h: 60px; }
  .header-in { gap: 14px; }
  .brand-mark { font-size: 1.75rem; }
}

/* ---------- Hero: giant type, then the car draws itself ---------- */
.b-hero { overflow: hidden; border-top: 0; padding: calc(var(--header-h) + clamp(48px, 9vh, 104px)) 0 0; }
/* The car's floor line closes the hero, so the next section needs no line of its own */
.b-hero + section { border-top: 0; }
.b-title {
  margin: 0 0 clamp(20px, 3vh, 32px);
  font: 900 clamp(3.2rem, min(9.8vw, 12.5vh), 9.4rem)/.86 var(--font-display);
  letter-spacing: .002em; text-transform: uppercase;
}
.b-line { display: block; overflow: hidden; padding: .04em 0; margin: -.04em 0; }
.b-line > span { display: inline-block; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.b-line + .b-line > span { animation-delay: .1s; }
.b-title em { font-style: normal; color: var(--red); }
.b-hero-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 40px;
  animation: fade-up .8s var(--ease-out) .35s both;
}
.b-sub { margin: 0; max-width: 50ch; font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted); }
.b-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.b-call { font-weight: 600; color: var(--muted); text-decoration: none; transition: color .2s; }
.b-call:hover { color: var(--text); }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

.b-car-wrap { position: relative; margin: clamp(32px, 6vh, 72px) auto 0; padding: 0 clamp(8px, 2vw, 24px); }
.b-car {
  margin-inline: auto; overflow: visible;
  width: clamp(min(100%, 520px), calc((100svh - 470px) * 3.3), 1180px); max-width: 100%; height: auto;
}
.b-floor { stroke: var(--line-2); stroke-width: 1.5; }
.b-draw path, .b-draw circle {
  fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: draw 1.5s cubic-bezier(.65, .05, .3, 1) .25s both;
}
.b-draw .soft { stroke-opacity: .5; }
.b-draw .d2 { animation-delay: .55s; }
.b-stripe {
  fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: draw 1s cubic-bezier(.7, 0, .2, 1) 1.5s both;
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (max-width: 760px) {
  .b-title { font-size: clamp(2.8rem, 14vw, 5.2rem); }
  .b-ctas { width: 100%; justify-content: center; }
  .b-ctas .btn { flex: 1 1 100%; }
  .b-draw path, .b-draw circle { stroke-width: 3.6; }
  .b-stripe { stroke-width: 6; }
}

/* ---------- Reveal on scroll (children of [data-reveal] rise in, one after another) ---------- */
.js [data-reveal] > * { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s var(--ease-out); }
.js [data-reveal].in > * { opacity: 1; transform: none; }
.js [data-reveal].in > *:nth-child(2) { transition-delay: .05s; }
.js [data-reveal].in > *:nth-child(3) { transition-delay: .1s; }
.js [data-reveal].in > *:nth-child(4) { transition-delay: .15s; }
.js [data-reveal].in > *:nth-child(5) { transition-delay: .2s; }
.js [data-reveal].in > *:nth-child(6) { transition-delay: .25s; }
.js [data-reveal].in > *:nth-child(7) { transition-delay: .3s; }
.js [data-reveal].in > *:nth-child(8) { transition-delay: .35s; }
.js [data-reveal].in > *:nth-child(9) { transition-delay: .4s; }

/* ---------- Services: one row each; the name's link covers the whole row ---------- */
.b-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.b-list li {
  position: relative; display: grid; align-items: baseline;
  grid-template-columns: 3.5rem minmax(0, 18rem) minmax(0, 1fr) 1.4rem; gap: 6px clamp(16px, 3vw, 40px);
  padding: 24px 0; border-top: 1px solid var(--line);
}
.b-num { font: 800 .95rem/1 var(--font-display); letter-spacing: .12em; color: var(--muted); }
.b-list h3 { font: 800 1.65rem/1 var(--font-display); text-transform: uppercase; }
.b-list h3 a { text-decoration: none; }
.b-list h3 a::after { content: ''; position: absolute; inset: 0; }
.b-list h3 a:focus-visible { outline: none; }
.b-list h3 a:focus-visible::after { outline: 2px solid var(--red-hi); outline-offset: -2px; }
.b-list p { margin: 0; font-size: .98rem; color: var(--muted); }
.b-list .ic { align-self: center; width: 1.4rem; height: 1.4rem; color: var(--muted); transition: transform .2s var(--ease-out), color .2s; }
.b-list li:hover .ic, .b-list li:focus-within .ic { color: var(--red-hi); transform: translateX(4px); }
@media (max-width: 700px) {
  .b-list li { grid-template-columns: 2.4rem minmax(0, 1fr) 1.4rem; padding: 18px 0; }
  .b-list h3 { font-size: 1.5rem; }
  .b-list p { grid-column: 2; grid-row: 2; }
  .b-list .ic { grid-column: 3; grid-row: 1; }
}

/* ---------- Why ---------- */
.b-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.b-points li { padding-top: 18px; border-top: 1px solid var(--line-2); }
.b-points h3 { margin: 0 0 8px; font: 800 1.45rem/1 var(--font-display); text-transform: uppercase; }
.b-points p { margin: 0; font-size: .98rem; color: var(--muted); }
@media (max-width: 900px) { .b-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .b-points { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Estimate ---------- */
.est-in { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.est-lede { max-width: 42ch; margin-bottom: 22px; color: var(--muted); }
.est-direct { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.est-direct a {
  font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px; transition: text-decoration-color .2s;
}
.est-direct a:hover { text-decoration-color: currentColor; }
.areas { margin: 0 0 22px; padding: 0; border: 0; }
.areas legend { margin-bottom: 12px; padding: 0; font: 800 1.2rem/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.areas legend small { margin-left: 6px; font: 500 .85rem var(--font-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.area-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.area {
  padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text);
  font: 600 .9rem/1 var(--font-body); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.area:hover { border-color: #fff; }
.area[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--bg); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field small { font-weight: 400; letter-spacing: 0; text-transform: none; }
.field input, .field textarea {
  width: 100%; padding: 10px 0; border: 0; border-bottom: 1.5px solid var(--line-2); border-radius: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; transition: border-color .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #5f646b; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: #fff; }
.field [aria-invalid="true"] { border-bottom-color: var(--red-hi); }
.field textarea { resize: vertical; min-height: 56px; }
.field-file input { padding: 8px 0; font-size: .9rem; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.form-status { min-height: 1.4em; margin: 10px 0 0; font-weight: 600; color: var(--red-hi); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.est-done { padding: 22px 0; text-align: center; }
.est-done:focus { outline: none; }
.done-ic { width: 56px; height: 56px; margin: 0 auto 14px; padding: 12px; border-radius: 50%; background: var(--red); color: #fff; stroke-width: 2.6; }
.est-done h3 { margin-bottom: 10px; font: 900 2rem/1 var(--font-display); text-transform: uppercase; }
.est-done p { color: var(--muted); }
.est-done a { color: var(--text); font-weight: 600; }
@media (max-width: 900px) { .est-in { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* ---------- Visit ---------- */
.b-visit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.b-visit-grid h3 { margin: 0 0 14px; font: 600 .76rem/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 6px 0; text-align: left; font-weight: 500; }
.hours td { text-align: right; font-weight: 700; }
.hours tr.closed td { color: var(--muted); font-weight: 500; }
.hours tr.is-today th { font-weight: 700; }
.hours tr.is-today th::after {
  content: 'Today'; margin-left: 10px; vertical-align: 2px;
  font: 600 .68rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.small-note { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.contact-list { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.contact-list a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.social { display: flex; gap: 20px; margin: 0; font-size: .95rem; }
.social a { color: var(--muted); text-decoration: none; transition: color .2s; }
.social a:hover { color: var(--text); }
.b-address { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .b-visit-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.footer-brand { margin-right: 0; color: #fff; }
.footer-meta { margin: 0; font-size: .9rem; }
.footer-meta a { color: var(--text); text-decoration: none; }
.footer-meta a:hover { text-decoration: underline; }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }
@media (max-width: 760px) {
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6, 6, 7, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .action-bar a {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 9px;
    font: 700 .8rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase;
    color: #fff; text-decoration: none;
  }
  .action-bar a:first-child { background: var(--red); }
  .action-bar .ic { width: 22px; height: 22px; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}

/* ---------- Reduced motion: everything shows in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
}
