/* Speedbitz: one stylesheet, mobile first. Navy + white, one accent (plate yellow). */

:root {
  --navy: #0b1f3a;
  --navy-2: #142b4f;
  --ink: #16202e;
  --muted: #566173;
  --line: #dce1e9;
  --bg: #f3f5f8;
  --white: #fff;
  --accent: #ffc20e;
  --accent-hover: #ffd34d;
  --on-dark: #c7d1e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 6px 18px rgba(11, 31, 58, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--navy); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 7vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p, ul, ol, dl { margin: 0 0 1em; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.75em; font-size: 1.35rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mt-lg { margin-top: 2rem; }
.visually-hidden {
  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: -9999px; top: 0;
  background: var(--accent); color: var(--navy); padding: .75rem 1rem; font-weight: 700; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "logo call" "nav nav";
  align-items: center;
  gap: .25rem 1rem;
  padding-block: .75rem .25rem;
}
.logo {
  grid-area: logo;
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--white); text-decoration: none;
  font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em;
}
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { grid-area: nav; display: flex; gap: 1.5rem; }
.nav a {
  color: var(--white); text-decoration: none; font-weight: 600;
  padding: .6rem 0; border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: rgba(255, 255, 255, .4); }
.nav a[aria-current] { border-bottom-color: var(--accent); }
.header-call {
  grid-area: call;
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--navy); background: var(--accent); text-decoration: none;
  font-weight: 700; font-size: .95rem; padding: .5rem .85rem; border-radius: 999px; white-space: nowrap;
}
.header-call:hover { background: var(--accent-hover); }
.header-call svg { width: 16px; height: 16px; }

@media (max-width: 23.5rem) {
  .logo { font-size: 1.15rem; }
  .logo svg { width: 26px; height: 26px; }
  .header-call { font-size: .85rem; padding: .45rem .7rem; }
  .header-call svg { display: none; }
}
@media (min-width: 48rem) {
  .header-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "logo nav call"; padding-block: .9rem; }
  .nav { justify-content: flex-end; margin-right: .75rem; }
  .nav a { padding: .35rem 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem; border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--navy); border-color: currentColor; }
.btn-outline:hover { background: rgba(11, 31, 58, .06); }
.on-dark .btn-outline { color: var(--white); }
.on-dark .btn-outline:hover { background: rgba(255, 255, 255, .1); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-block { width: 100%; }

/* ---------- Hero / page heads ---------- */
.hero, .page-head { background: var(--navy); color: var(--white); }
.hero {
  padding: 3rem 0 3.5rem;
  background-image: linear-gradient(160deg, var(--navy) 55%, var(--navy-2));
}
.hero h1, .page-head h1 { color: var(--white); }
.hero h1 { margin-bottom: .25em; }
.hero .sub { display: block; font-size: .55em; font-weight: 600; color: var(--accent); letter-spacing: 0; margin-top: .35em; }
.hero .lead { font-size: 1.15rem; color: var(--on-dark); max-width: 36rem; margin-bottom: 1.75rem; }
.hero .meta { color: var(--on-dark); font-size: .95rem; margin: 1.25rem 0 0; }
.page-head { padding: 2rem 0 2.25rem; }
.page-head h1 { margin: 0; }
.page-head p { color: var(--on-dark); margin: .6rem 0 0; max-width: 40rem; }
.breadcrumb { font-size: .9rem; padding-top: 1.25rem; color: var(--muted); }
.breadcrumb a { color: var(--navy); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .25rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

/* Trust points */
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.trust li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem .5rem; }
.trust h3 { margin-bottom: .35em; }
.trust p { color: var(--muted); }
.icon-badge {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: .85rem;
  background: var(--navy); color: var(--accent); display: grid; place-items: center;
}
.icon-badge svg { width: 24px; height: 24px; }
@media (min-width: 48rem) { .trust { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Car cards ---------- */
.car-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.car-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; height: 100%; box-shadow: var(--shadow);
}
.car-card .media { display: block; aspect-ratio: 4 / 3; background: #d9dde3; overflow: hidden; }
.car-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.car-card:hover .media img { transform: scale(1.03); }
.car-card .body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.car-card h3 { margin: 0; font-size: 1.2rem; }
.car-card h3 a { text-decoration: none; }
.car-card h3 a:hover { text-decoration: underline; }
.car-card .btn { margin-top: auto; }
.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.specs li { font-size: .875rem; background: var(--bg); border-radius: 6px; padding: .15rem .55rem; }
.price { font-size: 1.45rem; font-weight: 800; color: var(--navy); margin: 0; line-height: 1.2; }
.price small { font-size: .8rem; font-weight: 600; color: var(--muted); display: block; }
.empty { padding: 2rem; background: var(--bg); border-radius: var(--radius); }

/* UK number plate badge */
.plate {
  display: inline-block; font-weight: 800; letter-spacing: .08em; line-height: 1.3;
  background: var(--accent); color: #111; border: 1px solid rgba(0, 0, 0, .3); border-radius: 4px;
  padding: .1rem .5rem; font-size: .9rem; white-space: nowrap;
}

/* ---------- Car detail ---------- */
.car-top { display: grid; gap: 1.5rem; padding: 1rem 0 1rem; }
@media (min-width: 60rem) { .car-top { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; padding-top: 1.25rem; } }

.gallery-main { position: relative; aspect-ratio: 4 / 3; background: #d9dde3; border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(11, 31, 58, .75); color: var(--white); display: grid; place-items: center;
}
.gallery-btn:hover { background: var(--navy); }
.gallery-btn svg { width: 22px; height: 22px; }
.gallery-btn.prev { left: .6rem; }
.gallery-btn.next { right: .6rem; }
.gallery-count {
  position: absolute; right: .6rem; bottom: .6rem; background: rgba(11, 31, 58, .75); color: var(--white);
  font-size: .8rem; padding: .15rem .55rem; border-radius: 999px;
}
.thumbs { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.thumbs a { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; border: 3px solid transparent; }
.thumbs a[aria-current="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.summary { background: var(--bg); border-radius: var(--radius); padding: 1.35rem; }
.summary h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: .4rem; }
.summary .price { font-size: 1.9rem; margin: 1rem 0 .25rem; }
.summary .specs { margin-top: .9rem; }
.summary .specs li { background: var(--white); }
.summary .btn-row { margin-top: 1.25rem; }
.summary .btn-row .btn { flex: 1 1 12rem; }
.summary .note { font-size: .9rem; color: var(--muted); margin: 1rem 0 0; }

.car-body { display: grid; gap: 2rem; padding-bottom: 3rem; }
@media (min-width: 60rem) { .car-body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.car-body h2 { font-size: 1.4rem; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 42%; color: var(--muted); font-weight: 600; }
.mot-table thead th { background: var(--navy); color: var(--white); font-weight: 600; }
.mot-table thead th:first-child { border-top-left-radius: 8px; }
.mot-table thead th:last-child { border-top-right-radius: 8px; }
.mot-table td ul { margin: 0; padding-left: 1.1rem; }
.mot-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mot-table .none { color: var(--muted); }
.result { display: inline-block; font-weight: 700; font-size: .85rem; padding: .05rem .55rem; border-radius: 999px; border: 2px solid var(--navy); color: var(--navy); }
.result.fail { background: var(--navy); color: var(--white); }
.mot-intro { margin-bottom: 1rem; }
.mot-foot { font-size: .9rem; color: var(--muted); margin-top: 1rem; }

@media (max-width: 40rem) {
  .mot-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mot-table, .mot-table tbody, .mot-table tr, .mot-table td { display: block; }
  .mot-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: .75rem; padding: .5rem .85rem; }
  .mot-table td { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; border: 0; padding: .3rem 0; }
  .mot-table td::before { content: attr(data-label); font-weight: 600; color: var(--muted); }
  .mot-table .result { justify-self: start; }
}

/* ---------- About / steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem .5rem 4.25rem; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 1.25rem; top: 1.2rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--navy);
  font-weight: 800; display: grid; place-items: center;
}
.steps h3 { margin-bottom: .3em; }
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); } }

.details { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
.details dt { font-weight: 600; color: var(--muted); }
.details dd { margin: 0; }
@media (max-width: 30rem) { .details { grid-template-columns: 1fr; gap: 0; } .details dd { margin-bottom: .6rem; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.contact-card { background: var(--bg); border-radius: var(--radius); padding: 1.35rem; }
.contact-card h2 { font-size: 1.3rem; }
.contact-block { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .contact-block { grid-template-columns: 1fr 1fr; align-items: start; } }

.form label { display: block; font-weight: 600; margin: 1.1rem 0 .35rem; }
.form label span { font-weight: 400; color: var(--muted); }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form textarea {
  display: block; width: 100%; font: inherit; color: var(--ink);
  padding: .75rem .85rem; border: 1px solid #aeb8c7; border-radius: 8px; background: var(--white);
}
.form textarea { min-height: 8rem; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--navy); }
.form .btn { margin-top: 1.5rem; }
.form-note { font-size: .9rem; color: var(--muted); margin-top: 1rem; }
.car-note { background: #fff7db; border-left: 4px solid var(--accent); padding: .75rem 1rem; border-radius: 6px; margin: 0 0 .5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-dark); padding: 2.5rem 0 2rem; font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-title { color: var(--white); font-weight: 700; margin-bottom: .4rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .3rem; }
.legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; }
.legal p { margin: 0 0 .35rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
