/* Quernsby Motor Works: workshop navy, number-plate yellow, concrete.
   Barlow Condensed for headings (road-sign vernacular), Barlow for reading. */

:root {
  --navy: #13294B;
  --navy-deep: #0D1D36;
  --plate: #FFD21F;
  --plate-deep: #F0BF00;
  --band: #1F4FA3;
  --concrete: #ECEEEA;
  --white: #FFFFFF;
  --steel: #4C5664;
  --line: #CFD4DA;
  --go: #17703D;
  --stop: #B42318;
  --stop-light: #FFB4A8;

  --body: "Barlow", "Segoe UI", Arial, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-bottom: 4.75rem;      /* room for the mobile dock */
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
svg { display: block; max-width: 100%; }

a { color: var(--navy); text-underline-offset: .18em; }

:focus-visible {
  outline: 3px solid var(--band);
  outline-offset: 3px;
}
.section--navy :focus-visible,
.header :focus-visible,
.footer :focus-visible,
.dock :focus-visible { outline-color: var(--plate); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  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 {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 30;
  padding: .75rem 1rem; background: var(--plate); color: var(--navy); font-weight: 600;
}
.skip:focus { top: .5rem; }

/* ---------- Concept ribbon ---------- */

.ribbon { background: var(--concrete); border-bottom: 1px solid var(--line); font-size: .9375rem; }
.ribbon__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; min-height: 2.75rem; }
.ribbon a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

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

.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy);
  color: var(--white);
}
.header__inner { display: flex; align-items: center; gap: .75rem; min-height: 4rem; }

.logo { display: flex; align-items: center; gap: .625rem; min-height: 44px; color: var(--white); text-decoration: none; margin-right: auto; }
.logo__mark { width: 2.5rem; height: auto; flex: none; }
.logo__name { font-family: var(--display); font-weight: 700; font-size: 1.3125rem; line-height: 1; letter-spacing: .01em; }
.logo__name span { display: block; font-weight: 600; font-size: .95rem; letter-spacing: .04em; color: var(--plate); }

.header__nav { display: none; }
.header__nav ul { display: flex; }
.header__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: .75rem;
  color: var(--white); font-weight: 500; text-decoration: none;
}
.header__nav a:hover { text-decoration: underline; text-decoration-color: var(--plate); text-decoration-thickness: 2px; }

.header__phone {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-width: 44px; min-height: 44px; padding-inline: .5rem;
  color: var(--white); font-weight: 600; text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 6px;
}
.header__phone svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--plate); stroke-width: 1.8; stroke-linejoin: round; }
.header__phone-text { display: none; }
.header .header__book { display: none; }

@media (min-width: 40rem) {
  .header__phone-text { display: inline; }
  .header__phone { padding-inline: .875rem; }
}
@media (min-width: 64rem) {
  .header__nav { display: block; }
  .header .header__book { display: inline-flex; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .625rem 1.375rem;
  border: 2px solid transparent; border-radius: 6px;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn--plate { background: var(--plate); color: var(--navy); border-color: var(--plate); }
.btn--plate:hover { background: var(--plate-deep); border-color: var(--plate-deep); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-deep); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--outline-light { border-color: rgba(255, 255, 255, .7); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--navy); }
.btn--wide { width: 100%; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); }
.hero__grid { display: grid; gap: 2.25rem; align-items: start; }

.status {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .3rem .75rem .3rem .6rem;
  border: 1.5px solid var(--line); border-radius: 99px;
  font-weight: 600; font-size: .9375rem; line-height: 1.3;
  color: var(--steel);
}
.status__dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--steel); flex: none; }
.status.is-open { color: var(--go); border-color: rgba(23, 112, 61, .35); }
.status.is-open .status__dot { background: var(--go); }
.status.is-closed { color: var(--stop); border-color: rgba(180, 35, 24, .3); }
.status.is-closed .status__dot { background: var(--stop); }

.hero h1 {
  margin-top: 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.4rem + 5.4vw, 5rem);
  line-height: .98;
  letter-spacing: -.005em;
  max-width: 14ch;
  text-wrap: balance;
}
.lede { margin-top: 1.25rem; max-width: 36rem; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--steel); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Quick start: the number plate */

.quick {
  display: grid; gap: .75rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--concrete);
  border-radius: 10px;
}
.quick__title { font-family: var(--display); font-weight: 700; font-size: 1.625rem; line-height: 1.1; }

.plate {
  position: relative;
  display: flex;
  height: 4.5rem;
  background: var(--plate);
  border: 3px solid var(--navy);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45);
}
.plate:focus-within { outline: 3px solid var(--band); outline-offset: 3px; }
.plate__band {
  flex: none; display: flex; align-items: flex-end; justify-content: center;
  width: 2.5rem; padding-bottom: .5rem;
  background: var(--band); color: var(--white);
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .04em;
}
.plate__input {
  flex: 1; min-width: 0; width: 100%;
  border: 0; background: transparent; color: #111A2B;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 1.5rem + 2.6vw, 2.75rem);
  letter-spacing: .08em; text-align: center; text-transform: uppercase;
}
.plate__input:focus { outline: none; }
.plate__input::placeholder { color: #6B5D00; opacity: 1; letter-spacing: .06em; }
.plate--small { height: 3.5rem; border-width: 2.5px; }
.plate--small .plate__band { width: 2.125rem; font-size: .875rem; padding-bottom: .375rem; }
.plate--small .plate__input { font-size: 1.75rem; }

.quick__go { width: 100%; }

.facts {
  display: grid; gap: .875rem;
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--navy);
}
.facts li { display: flex; align-items: center; gap: .75rem; font-weight: 500; }
.facts svg { width: 1.75rem; height: 1.75rem; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 52rem) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; }
  .quick { margin-top: 2.75rem; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--space); }
.section--concrete { background: var(--concrete); }
.section--navy { background: var(--navy); color: var(--white); }

.section h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.02; text-wrap: balance;
}
.section__head { max-width: 40rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section__head p { margin-top: .875rem; }

.notice {
  display: inline-block;
  margin-top: .875rem;
  padding: .45rem .75rem;
  border-left: 4px solid var(--plate-deep);
  background: #FFF6CC;
  color: var(--navy);
  font-size: .9375rem;
  font-weight: 500;
}

/* ---------- Prices ---------- */

.prices { border-top: 2px solid var(--navy); }
.prices li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.25rem;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--line);
}
.prices h3 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.prices li p:not(.price) { margin-top: .25rem; color: var(--steel); max-width: 34rem; }
.price {
  flex: none;
  font-family: var(--display); font-weight: 700; font-size: 1.875rem; line-height: 1;
  white-space: nowrap;
}
.price span { font-family: var(--body); font-weight: 500; font-size: .9375rem; color: var(--steel); }

@media (min-width: 52rem) {
  .prices { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
}

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

.book { display: grid; gap: 2rem; }
.book__intro p:not(.notice) { margin-top: .875rem; font-size: 1.125rem; max-width: 30rem; }
.book__panel {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 0 var(--line);
}

.form { display: grid; gap: 1.375rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; gap: 1.375rem; }
.field > label, .field legend { font-weight: 600; }
.field legend { margin-bottom: .5rem; }
.optional { font-weight: 400; color: var(--steel); }

.form input[type="text"]:not(.plate__input),
.form input[type="tel"],
.form input[type="email"],
.form input[type="date"] {
  width: 100%;
  min-height: 48px;
  padding: .5rem .875rem;
  border: 2px solid #8A93A0;
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
}
.form input::placeholder { color: #5E6773; opacity: 1; }
.form input:focus-visible { border-color: var(--band); }
.form [aria-invalid="true"] { border-color: var(--stop) !important; }
.plate:has([aria-invalid="true"]) { border-color: var(--stop); }

.hint { font-size: .9375rem; color: var(--steel); }
.error {
  display: flex; gap: .4rem; align-items: baseline;
  color: var(--stop); font-weight: 600; font-size: .9375rem;
}
.error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--stop); color: var(--white); font-size: .75rem; transform: translateY(.1em); }
.error[hidden] { display: none; }

.choices { display: grid; gap: .625rem; }
.choice {
  position: relative;
  display: flex; gap: .75rem; align-items: flex-start;
  min-height: 48px; padding: .75rem .875rem;
  border: 2px solid var(--line); border-radius: 6px;
  cursor: pointer; font-weight: 500;
}
.choice input { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; flex: none; accent-color: var(--navy); }
.choice small { display: block; font-size: .9375rem; font-weight: 400; color: var(--steel); }
.choice:has(input:checked) { border-color: var(--navy); background: #F3F5F9; }
.choice:has(input:focus-visible) { outline: 3px solid var(--band); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }

@media (min-width: 40rem) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .choices { grid-template-columns: 1fr 1fr; }
  .choices--checks { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 60rem) {
  .book { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
  .book__intro { position: sticky; top: 6rem; }
}

/* Confirmation: a job ticket */

.ticket {
  position: relative;
  display: grid; gap: 1rem;
  padding-top: 1.5rem;
  border-top: 3px dashed var(--navy);
}
.ticket h3 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.05; }
.ticket h3:focus { outline: none; }
.ticket__list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ticket__list div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding-block: .6rem; border-bottom: 1px solid var(--line); }
.ticket__list dt { color: var(--steel); font-weight: 500; }
.ticket__list dd { font-weight: 600; }
.ticket .notice { margin-top: 0; justify-self: start; }
.ticket .btn { justify-self: start; }
[hidden] { display: none !important; }

/* ---------- Reminder (navy band) ---------- */

.reminder { display: grid; gap: 2rem; }
.reminder > div:first-child p { margin-top: .875rem; font-size: 1.125rem; color: #DCE3EE; max-width: 28rem; }
.form--dark label, .form--dark legend { color: var(--white); }
.form--dark .hint, .reminder__done .hint { color: #C9D2DF; }
.form--dark .error { color: var(--stop-light); }
.form--dark .error::before { background: var(--stop-light); color: var(--navy); }
.form--dark .btn { justify-self: start; }
.form--dark input[type="email"], .form--dark input[type="date"] { border-color: var(--white); }
.form--dark .plate { border-color: var(--white); }
.form--dark .plate:focus-within, .form--dark input:focus-visible { outline-color: var(--plate); }

.consent { display: flex; gap: .75rem; align-items: flex-start; font-weight: 500; cursor: pointer; }
.consent input { width: 1.375rem; height: 1.375rem; margin: .1rem 0 0; flex: none; accent-color: var(--plate); }

.reminder__done { display: grid; gap: 1rem; padding-top: 1.5rem; border-top: 3px dashed var(--plate); }
.reminder__done h3 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1.05; }
.reminder__done h3:focus { outline: none; }
.reminder__done .btn { justify-self: start; }

@media (min-width: 60rem) {
  .reminder { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; }
}

/* ---------- Reviews: an empty slot for the garage's own Google reviews ---------- */

.reviews-slot {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--concrete);
}
.reviews-slot__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  margin-bottom: 1rem;
}
.reviews-slot__label { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--navy); }
.reviews-slot__tag {
  padding: .15rem .6rem; border: 1px solid var(--steel); border-radius: 99px;
  font-size: .875rem; font-weight: 500; color: var(--steel);
}
.reviews { display: grid; gap: 1rem; }
.review {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.25rem;
  border-radius: 10px;
  background: var(--white);
}
.sk { display: block; height: .75rem; border-radius: 99px; background: #DCE0E5; }
.sk--head { width: 45%; height: 1rem; margin-bottom: .25rem; }
.sk--short { width: 60%; }
.reviews-slot__note { margin-top: 1rem; color: var(--steel); font-size: .9375rem; max-width: 40rem; }

@media (min-width: 52rem) {
  .reviews { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Hours and map ---------- */

.find { display: grid; gap: 2.5rem; }
.hours { width: 100%; margin-top: 1.75rem; border-collapse: collapse; }
.hours th, .hours td { padding: .75rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.hours th { font-weight: 500; }
.hours td { text-align: right; font-weight: 600; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours tr.is-today th::after {
  content: "Today";
  margin-left: .5rem;
  padding: .1rem .45rem;
  border-radius: 4px;
  background: var(--navy); color: var(--white);
  font-size: .8125rem; font-weight: 600;
}

.address { margin-top: 1.75rem; font-style: normal; line-height: 1.75; }
.address a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.directions { margin-top: 1.25rem; color: var(--steel); max-width: 34rem; }

.map { display: grid; gap: .625rem; }
.map svg { width: 100%; height: auto; border-radius: 10px; border: 2px solid var(--navy); }
.map figcaption { font-size: .9375rem; color: var(--steel); }

@media (min-width: 60rem) {
  .find { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
}

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

.footer { padding-block: 3rem; background: var(--navy-deep); color: #DCE3EE; font-size: .9375rem; }
.footer a { color: var(--white); display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.footer__grid { display: grid; gap: 1.75rem; }
.footer__name { font-family: var(--display); font-weight: 700; font-size: 1.375rem; color: var(--white); }
.footer__concept strong { color: var(--white); }
@media (min-width: 52rem) {
  .footer__grid { grid-template-columns: 1fr 1fr 2fr; gap: 3rem; }
}

/* ---------- Mobile dock ---------- */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: .625rem;
  padding: .625rem var(--gutter) calc(.625rem + env(safe-area-inset-bottom));
  background: var(--navy);
  box-shadow: 0 -8px 20px rgba(13, 29, 54, .25);
}
@media (min-width: 64rem) {
  .dock { display: none; }
  body { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
