/* Spencer Motors: MOT Test & Repair Centre */

:root {
  --ink: #0e1726;
  --ink-2: #172235;
  --ink-3: #24324a;
  --paper: #f7f5f0;
  --tint: #eeeae1;
  --line: #ddd8cc;
  --text: #1a1f2b;
  --muted: #586174;
  --on-dark: #e8ecf3;
  --on-dark-muted: #a9b3c4;
  --yellow: #ffcc00;
  --yellow-deep: #e6b800;
  --green: #22a35a;
  --red: #e0533d;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(14 23 38 / 6%), 0 8px 24px rgb(14 23 38 / 8%);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 850; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 750; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 780px; }

.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: 1rem; top: -3rem; z-index: 100;
  background: var(--yellow); color: #111; padding: .6rem 1rem; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.25rem;
  border: 2px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary { background: var(--yellow); color: #111; }
.btn-primary:hover { background: var(--yellow-deep); }

.btn-ghost { background: rgb(255 255 255 / 8%); color: #fff; border-color: rgb(255 255 255 / 22%); }
.btn-ghost:hover { background: rgb(255 255 255 / 14%); border-color: rgb(255 255 255 / 40%); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* UK number-plate style: yellow, black border, heavy type */
.plate, .btn-plate {
  background: var(--yellow); color: #111;
  border: 2px solid #111; border-radius: 6px;
  font-weight: 800; letter-spacing: .06em;
}
.plate { display: inline-block; padding: .05em .45em; line-height: 1.35; }
.plate-sm { font-size: .85em; }
.btn-plate { min-height: 44px; padding: .5rem .95rem; font-variant-numeric: tabular-nums; }
.btn-plate:hover { background: var(--yellow-deep); }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(14 23 38 / 94%);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  color: #fff;
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: var(--yellow); color: #111; border: 2px solid #111;
  border-radius: 9px; font-weight: 900; letter-spacing: -.02em; font-size: 1.05rem;
  box-shadow: 0 0 0 2px var(--yellow);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-sub { font-size: .78rem; color: var(--on-dark-muted); letter-spacing: .02em; }

.nav { display: flex; gap: 1.6rem; }
.nav a { color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--yellow); }

@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 520px) {
  .brand-sub { display: none; }
  .header-call { font-size: .9rem; padding-inline: .7rem; }
  .header-call .icon { display: none; }
}

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

.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 85% 10%, rgb(255 204 0 / 10%), transparent 60%),
    linear-gradient(rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgb(255 255 255 / 3.5%) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--ink);
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 3.5rem; align-items: center;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 9vw, 7rem);
}
.eyebrow {
  margin: 0 0 1rem; font-size: .8rem; font-weight: 750;
  letter-spacing: .14em; text-transform: uppercase; color: var(--yellow);
}
.eyebrow-dark { color: var(--muted); }
.eyebrow-dark::before {
  content: ""; display: inline-block; width: 1.6em; height: 3px; margin-right: .6em;
  vertical-align: middle; background: var(--yellow); border-radius: 2px;
}
.lede { font-size: 1.18rem; color: var(--on-dark); max-width: 36em; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; }

.today-card {
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 18px; padding: 1.75rem;
  box-shadow: 0 24px 60px rgb(0 0 0 / 30%);
}
.today-list { margin: 1.25rem 0 0; display: grid; gap: 1.1rem; }
.today-list div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid rgb(255 255 255 / 10%); }
.today-list dt { color: var(--on-dark-muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding-top: .15rem; }
.today-list dd { margin: 0; font-weight: 600; }
.today-list a { color: #fff; text-decoration-color: var(--yellow); text-underline-offset: 3px; font-size: 1.2rem; font-weight: 800; }

.status {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0;
  padding: .45rem .9rem; border-radius: 999px;
  background: rgb(255 255 255 / 8%); font-weight: 700; font-size: .95rem;
}
.status .dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--yellow); flex: none; }
.status.is-open .dot { background: var(--green); box-shadow: 0 0 0 4px rgb(34 163 90 / 25%); }
.status.is-closed .dot { background: var(--red); box-shadow: 0 0 0 4px rgb(224 83 61 / 22%); }
.status-light { background: #fff; border: 1px solid var(--line); margin-top: .5rem; }

.hazard {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, var(--ink) 18px 36px);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 520px) {
  .today-card { padding: 1.25rem; }
  .status { font-size: .86rem; border-radius: 12px; }
  .today-list div { grid-template-columns: 5rem 1fr; }
}

/* ---------- Strip ---------- */

.strip { background: #fff; border-bottom: 1px solid var(--line); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: .15rem; border-left: 1px solid var(--line); }
.strip-item:first-child { border-left: 0; padding-left: 0; }
.strip-item strong { font-size: 1.02rem; }
.strip-item span { color: var(--muted); font-size: .92rem; }
.strip-item a { text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .strip-item { padding: 1.25rem 1rem; }
  .strip-item:nth-child(odd) { border-left: 0; padding-left: 0; }
  .strip-item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

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

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--tint); }
.section-dark { background: var(--ink); color: #fff; }
.section-head { max-width: 640px; margin-bottom: 2.75rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem 1.75rem; box-shadow: var(--shadow);
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: var(--yellow); border-radius: var(--radius) var(--radius) 0 0;
}
.card p { color: var(--muted); flex: 1; }
.card-icon {
  width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 1.25rem;
  background: var(--ink); border-radius: 12px;
}
.card-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--yellow); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-link { font-weight: 700; text-decoration: none; color: var(--ink); }
.card-link span { display: inline-block; transition: transform .15s ease; }
.card-link:hover span { transform: translateX(4px); }
.card-link:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.steps li { padding: 1.75rem; border: 1px solid rgb(255 255 255 / 12%); border-radius: var(--radius); background: var(--ink-2); }
.steps p { color: var(--on-dark-muted); margin: 0; }
.steps a { color: #fff; font-weight: 700; text-decoration-color: var(--yellow); text-underline-offset: 3px; white-space: nowrap; }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1.1rem;
  background: var(--yellow); color: #111; border-radius: 50%; font-weight: 850;
}

@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Hours ---------- */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.two-col p { color: var(--muted); max-width: 34em; }

.hours {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.hours th, .hours td { padding: .95rem 1.5rem; text-align: left; border-top: 1px solid var(--line); }
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }
.hours th { font-weight: 650; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.hours tr.is-today { background: #fff7d1; }
.hours tr.is-today th::after {
  content: "Today"; margin-left: .6rem; padding: .1rem .5rem; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; vertical-align: .1em;
}
.hours tr.is-today td { color: var(--text); font-weight: 650; }

/* ---------- Find us ---------- */

.two-col-map { align-items: stretch; }
.address { font-style: normal; font-size: 1.15rem; line-height: 1.7; margin-bottom: 1.25rem; font-weight: 600; }
.address .plate { margin-top: .35rem; font-size: 1.1rem; }

.map {
  min-height: 380px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background:
    linear-gradient(rgb(14 23 38 / 6%) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgb(14 23 38 / 6%) 1px, transparent 1px) 0 0 / 32px 32px,
    #fff;
}
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
.map-placeholder {
  height: 100%; min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; padding: 2rem; text-align: center;
}
.map-placeholder svg { width: 48px; height: 48px; fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; }
.map-placeholder p { margin: 0; font-weight: 700; color: var(--text); }
.map-placeholder small { color: var(--muted); }

@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: .75rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 3.25rem 1.15rem 1.4rem;
  font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.4rem; top: 50%; width: 10px; height: 10px;
  border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details[open] { border-color: var(--ink); }
.faq details p { padding: 0 1.4rem 1.25rem; margin: 0; color: var(--muted); }
.faq a { color: var(--ink); font-weight: 650; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }

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

.site-footer { background: var(--ink); color: var(--on-dark-muted); padding-top: 3rem; }
.site-footer .brand-name { color: #fff; margin-bottom: .2rem; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; font-weight: 700; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.footer-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding-bottom: 2.5rem; }
.footer-legal { border-top: 1px solid rgb(255 255 255 / 10%); padding-block: 1.25rem; font-size: .88rem; }

@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ---------- Mobile call bar ---------- */

.mobile-bar { display: none; }
@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr auto; gap: .6rem;
    position: fixed; inset: auto 0 0; z-index: 60;
    padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom));
    background: rgb(14 23 38 / 96%); backdrop-filter: blur(8px);
    border-top: 1px solid rgb(255 255 255 / 10%);
  }
  .hero-ctas .btn { flex: 1 1 auto; }
}

/* ---------- 404 ---------- */

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; color: #fff; background: var(--ink); padding: 4rem 0; }
.notfound .plate { font-size: clamp(2.5rem, 8vw, 4.5rem); margin-bottom: 1.5rem; }
.notfound p { color: var(--on-dark); }
.notfound .hero-ctas { justify-content: center; }
