/* Hampson's Garage: tokens and the shared parts (header, roller-shutter menu, buttons, action bar, footer).
   A light page with a charcoal header and footer, locked (no switch; the system's dark mode changes nothing).
   One accent, signal yellow: used as a fill (buttons, the number plate, icon tiles), never as text on white.
   One radius system: 6px for anything you press or type in, 10px for surfaces. */

@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-display: swap; font-weight: 700; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-display: swap; font-weight: 800; src: url("../fonts/barlow-semi-condensed-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-display: swap; font-weight: 400; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-display: swap; font-weight: 500; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-display: swap; font-weight: 600; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
/* Metric-matched fallbacks (tools/fallbacks.mjs), so nothing moves when the fonts arrive. */
@font-face { font-family: "Barlow Semi Condensed Fallback"; src: local("Arial"); size-adjust: 73.3%; ascent-override: 136.4%; descent-override: 27.3%; line-gap-override: 0%; }
@font-face { font-family: "Barlow Fallback"; src: local("Arial"); size-adjust: 95.6%; ascent-override: 104.6%; descent-override: 20.9%; line-gap-override: 0%; }

:root {
  --paper: #f4f5f6;
  --surface: #fcfcfd;
  --line: #dcdfe3;
  --ink: #16191d;
  --ink-2: #4b525c;
  --charcoal: #1b1f24;
  --charcoal-2: #262b32;
  --on-dark: #f3f4f5;
  --on-dark-2: #b7bdc6;
  --yellow: #f5c400;        /* signal yellow, the one accent */
  --yellow-deep: #ddb000;
  --on-yellow: #16191d;
  --plate: #f7cb15;         /* a UK rear plate */
  --plate-band: #123d91;    /* the "UK" band */
  --on-band: #fcfcfd;
  --error: #b3261e;
  --focus: var(--ink);

  --display: "Barlow Semi Condensed", "Barlow Semi Condensed Fallback", Arial, sans-serif;
  --text: "Barlow", "Barlow Fallback", Arial, sans-serif;
  --r-ui: 6px;
  --r-card: 10px;
  --pad: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgb(22 25 29 / 0.06), 0 10px 28px rgb(22 25 29 / 0.08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body { margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.site-header, .site-footer, .shutter { --focus: var(--yellow); }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }
.skip-link { position: absolute; z-index: 30; inset-inline-start: 12px; top: -60px; padding: 10px 16px; border-radius: var(--r-ui); background: var(--yellow); color: var(--on-yellow); font-weight: 600; text-decoration: none; transition: transform 0.2s var(--ease); }
.skip-link:focus { transform: translateY(72px); }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.link { color: inherit; text-decoration: underline; text-decoration-color: var(--yellow-deep); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.link:hover { text-decoration-color: currentColor; }

/* Placeholders the garage fills in: square brackets in a dashed frame. */
.tbc { display: inline-block; padding: 0 6px; border: 1.5px dashed var(--ink-2); border-radius: 4px; color: var(--ink); font-weight: 600; font-size: 0.9em; line-height: 1.45; white-space: nowrap; }
.site-footer .tbc, .shutter .tbc { border-color: var(--on-dark-2); color: var(--on-dark); }

/* Stars: yellow with a dark outline, so they read on white as well as on charcoal. */
.stars { display: inline-flex; gap: 2px; color: var(--yellow); }
.stars .icon { width: 1.2em; height: 1.2em; stroke: var(--ink); stroke-width: 10; paint-order: stroke; overflow: visible; }

/* ------------------------------------------------------------------ Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 20px; border: 2px solid transparent; border-radius: var(--r-ui); font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.01em; line-height: 1.1; text-decoration: none; white-space: nowrap; transition: transform 0.15s var(--ease); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--yellow { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.btn--yellow:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); }
.btn--dark { background: var(--charcoal); color: var(--on-dark); border-color: var(--charcoal); }
.btn--dark:hover { background: var(--ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--on-dark); }
.btn--ghost { border-color: var(--on-dark-2); color: var(--on-dark); background: transparent; }
.btn--ghost:hover { border-color: var(--on-dark); background: var(--charcoal-2); }
.btn--big { min-height: 56px; padding-inline: 24px; font-size: 1.25rem; }
.btn .icon { width: 1.15em; height: 1.15em; }

/* ------------------------------------------------------------------ Header (charcoal) */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--header-h); background: var(--charcoal); color: var(--on-dark); border-bottom: 3px solid var(--yellow); }
.site-header__inner { display: flex; align-items: center; gap: 28px; height: 100%; }
.logo { display: block; flex: none; }
.logo__img { width: auto; height: 40px; }
.nav__list { display: flex; gap: 2px; }
.nav__link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; border-radius: var(--r-ui); font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.01em; text-decoration: none; }
.nav__link:hover { background: var(--charcoal-2); }
.nav__link[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--yellow); border-radius: var(--r-ui) var(--r-ui) 0 0; }
.site-header__end { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.btn--call, .site-header__book { min-height: 44px; padding-inline: 16px; font-size: 1.0625rem; }
.menu-btn { display: none; width: 44px; height: 44px; place-items: center; border: 2px solid var(--on-dark-2); border-radius: var(--r-ui); background: transparent; color: var(--on-dark); }
.menu-btn .icon { width: 22px; height: 22px; }

@media (max-width: 67.99rem) {
  .js .nav { display: none; }
  .js .menu-btn { display: inline-grid; }
  .site-header__book { display: none; }
  html:not(.js) .site-header { height: auto; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; row-gap: 0; padding-block: 12px; }
  html:not(.js) .nav { order: 3; width: 100%; }
  html:not(.js) .nav__list { flex-wrap: wrap; }
}
@media (max-width: 47.99rem) {
  :root { --header-h: 64px; }
  .logo__img { height: 34px; }
  .site-header__inner { gap: 12px; }
  .btn--call { width: 44px; padding: 0; }
  .btn--call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ------------------------------------------------------------------ Roller-shutter menu (under 68rem) */
/* A charcoal panel with fine horizontal slats that rolls down from under the header, like the shutter on a
   workshop door. The dialog box itself stays put and clips; only the panel inside moves (transform). */
.shutter { position: fixed; inset: var(--header-h) 0 auto 0; width: 100%; max-width: none; max-height: calc(100dvh - var(--header-h)); margin: 0; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--on-dark); }
.shutter::backdrop { top: 72px; background: rgb(22 25 29 / 0.5); }
@media (max-width: 47.99rem) { .shutter::backdrop { top: 64px; } }
.shutter__panel { position: relative; max-height: calc(100dvh - var(--header-h)); overflow: auto; padding-block: 12px 20px; background-color: var(--charcoal); background-image: repeating-linear-gradient(to bottom, transparent 0 21px, rgb(255 255 255 / 0.045) 21px 22px, rgb(0 0 0 / 0.25) 22px 23px); border-bottom: 6px solid var(--yellow); box-shadow: 0 20px 40px rgb(0 0 0 / 0.35); }
.shutter[open] .shutter__panel { animation: roll-down 0.42s var(--ease); }
.shutter.is-closing .shutter__panel { animation: roll-up 0.26s ease-in forwards; }
.shutter.is-closing::backdrop { opacity: 0; transition: opacity 0.26s; }
@keyframes roll-down { from { transform: translateY(-100%); } }
@keyframes roll-up { to { transform: translateY(-100%); } }
.shutter__inner { display: grid; gap: 16px; }
.shutter__link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-bottom: 1px solid rgb(255 255 255 / 0.12); font-family: var(--display); font-weight: 800; font-size: 1.75rem; letter-spacing: 0.01em; text-transform: uppercase; text-decoration: none; }
.shutter__link .icon { color: var(--yellow); }
.shutter__link[aria-current="true"] { color: var(--yellow); }
.shutter__actions { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.shutter__actions .btn { min-height: 52px; }
.shutter__hours { display: flex; gap: 10px; color: var(--on-dark-2); font-size: 0.9375rem; }
.shutter__hours .icon { color: var(--yellow); margin-top: 3px; }
.shutter__close { justify-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-inline: 16px; border: 0; border-radius: var(--r-ui); background: transparent; color: var(--on-dark-2); font-weight: 600; }
.shutter__close:hover { color: var(--on-dark); background: var(--charcoal-2); }

/* ------------------------------------------------------------------ Action bar (phones and tablets) */
.action-bar { display: none; }
@media (max-width: 61.99rem) {
  .action-bar { position: fixed; z-index: 15; inset: auto 0 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgb(22 25 29 / 0.08); transition: transform 0.3s var(--ease); }
  .action-bar .btn { min-height: 50px; }
  .js .action-bar:not(.is-shown) { transform: translateY(110%); }
  body { padding-bottom: 76px; }
}

/* ------------------------------------------------------------------ Pins (map) */
.pin { position: absolute; left: var(--x); top: var(--y); width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px var(--ink), 0 6px 14px rgb(22 25 29 / 0.35); }
.pin::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--ink); }
.pin--centre { --x: 50%; --y: 50%; }
.pin__label { position: absolute; inset-inline-start: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 3px 10px; border-radius: 4px; background: var(--ink); color: var(--on-dark); font-family: var(--display); font-weight: 700; font-size: 1rem; white-space: nowrap; }

/* ------------------------------------------------------------------ Footer (charcoal) */
.site-footer { margin-top: clamp(56px, 8vw, 104px); padding-block: 56px 28px; background: var(--charcoal); color: var(--on-dark); border-top: 6px solid var(--yellow); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; align-items: start; }
.site-footer__logo { width: auto; height: 44px; }
.site-footer__line { max-width: 34ch; margin-top: 14px; color: var(--on-dark-2); }
.site-footer__facts { display: grid; gap: 18px; }
.site-footer__facts dt { font-family: var(--display); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-2); }
.site-footer__facts dd { margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
.site-footer .link { text-decoration-color: var(--yellow); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 44px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.14); font-size: 0.875rem; color: var(--on-dark-2); }
@media (max-width: 61.99rem) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 47.99rem) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .site-footer__legal { display: grid; }
}

/* ------------------------------------------------------------------ Page transitions (404 to home) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: vt-out 0.16s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in 0.3s var(--ease) both; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
