/*
 * base.css - layout and components shared by every brand. One file, no frameworks.
 *
 * Colours and fonts are NOT set here: they come from CSS variables in
 * assets/css/theme.css (one per brand). Change a brand's look there, not here.
 *
 * Variables each theme sets:
 *   --top-bg, --top-text, --top-muted   top bar (logo, phone, hours)
 *   --nav-bg, --nav-text                menu bar
 *   --dark, --dark-2                    page headers without a photo, call-to-action band, footer
 *   --accent, --accent-hover            buttons, active menu underline, small details
 *   --accent-pale                       link hover on dark backgrounds
 *   --btn-text                          text on accent buttons
 *   --link                              links on white (must pass contrast checks)
 *   --tick-mark                         the tick drawn inside the accent circle
 *   --tint, --line                      soft section background, light borders
 *   --text, --muted                     body text, secondary text
 *   --on-dark, --dim-on-dark            text on dark backgrounds
 *   --border-on-dark                    thin dividers on dark backgrounds
 *   --font-display, --font-body
 */

:root { --radius: 6px; --max: 1180px; --ok: #2f7d5b; --err: #b3392f; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: #fff; line-height: 1.65; font-size: 1.0625rem; }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap   { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
/* Narrow text columns start on the same left edge as everything else (not centred) */
.narrow { width: min(100% - 2.5rem, 800px); margin-left: max(1.25rem, calc((100% - var(--max)) / 2)); margin-right: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--btn-text); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--dark); }
.navbar, .nav-toggle, .btn, .footer-h, .accordion summary, .related-h, .trust-strip strong, .tb-phone { font-family: var(--font-display); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: 0 0 .75rem; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin: 2.25rem 0 .9rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.lead { font-size: 1.15rem; max-width: 44rem; }
.small { font-size: .9rem; }
.muted { color: var(--muted); }
.muted-light { color: var(--dim-on-dark); }
.section-intro { max-width: 46rem; margin-top: -.25rem; color: var(--muted); }
/* A short line above a headline, e.g. "Day-to-day driver cover" */
.eyebrow { color: var(--eyebrow, var(--accent-pale)); font-weight: 600; font-size: 1rem; margin: 0 0 .5rem; }

/* ---- Top bar (tier 1): logo, phone, hours, main button ---------------- */
.topbar { background: var(--top-bg); color: var(--top-text); border-bottom: 1px solid var(--line-top, transparent); }
/* padding gives the logo clear space above and below (about 18px each side on desktop) */
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 92px; padding: 1.1rem 0; }
.brand { text-decoration: none; display: inline-flex; align-items: center; margin-right: auto; }
.brand img { display: block; height: 58px; width: auto; }
.topbar-contact { display: grid; justify-items: end; line-height: 1.35; text-align: right; }
.tb-phone { display: inline-flex; align-items: center; gap: .4rem; color: var(--top-text); text-decoration: none; font-weight: 700; font-size: 1.5rem; }
.tb-phone:hover { color: var(--top-text); text-decoration: underline; }
.tb-icon { width: 1.1rem; height: 1.1rem; color: var(--accent); }
.tb-hours, .tb-email { font-size: .88rem; color: var(--top-muted); }
.tb-email { text-decoration: none; }
.tb-email:hover { text-decoration: underline; color: var(--top-text); }
.tb-call-mobile, .nav-toggle { display: none; }

/* ---- Menu bar (tier 2) ----------------------------------------------- */
.navbar { background: var(--nav-bg); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
/* negative margin lines the first menu word up with the logo, while every tab keeps even padding */
.nav-list { list-style: none; display: flex; flex-wrap: wrap; margin: 0 0 0 -1rem; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a { display: block; color: var(--nav-text); text-decoration: none; font-weight: 600; font-size: 1rem; padding: .85rem 1rem; border-bottom: 3px solid transparent; }
.nav-list > li > a:hover, .nav-list > li.is-active > a, .nav-list > li > a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--nav-text); background: rgba(255,255,255,.06); }
.nav-list > li.nav-contact { margin-left: auto; margin-right: -1rem; }
.has-sub > a::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.2em) rotate(45deg); opacity: .7; }
/* drop-down: hidden until hover or keyboard focus (no JavaScript) */
.sub { list-style: none; margin: 0; padding: .4rem 0; position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--accent); box-shadow: 0 12px 28px rgba(0,0,0,.18); display: none; z-index: 60; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { display: block; padding: .55rem 1rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.sub a:hover, .sub a[aria-current="page"] { background: var(--tint); color: var(--dark); }

/* ---- Buttons --------------------------------------------------------- */
.btn { display: inline-block; font: inherit; font-family: var(--font-display); font-weight: 700; text-decoration: none; padding: .8rem 1.5rem; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-sm { padding: .5rem 1rem; font-size: .95rem; }
.btn-primary { background: var(--accent); color: var(--btn-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--btn-text); }
.btn-ghost { background: #fff; color: var(--dark); border-color: #b9c0c7; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

/* ---- Page headers ------------------------------------------------------
   Plain brand-colour band, or (class has-photo) a full-width photo with the
   headline over it. The photo is darkened from the left so text stays readable. */
.hero, .page-hero { position: relative; background: var(--dark); color: #fff; overflow: hidden; isolation: isolate; }
.hero { padding: 5rem 0 5.5rem; }
.page-hero { padding: 2.75rem 0 3rem; }
.hero h1, .page-hero h1 { color: #fff; max-width: 22ch; }
.hero .lead, .page-hero .lead { color: var(--on-dark); }
.hero-text { position: relative; max-width: 46rem; }
/* Home header: text on the left, "Speak to us" card on the right (wide screens only) */
.hero-layout { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 980px) { .hero-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 3.5rem; } }
.hero-card { position: relative; background: #fff; color: var(--text); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1.6rem 1.6rem 1.4rem; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.hero-card h2 { font-size: 1.25rem; margin: 0 0 .5rem; color: var(--dark); }
.hc-phone { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; color: var(--dark); text-decoration: none; line-height: 1.2; }
.hc-phone:hover { color: var(--link); }
.hc-hours { color: var(--muted); font-size: .95rem; margin: .4rem 0 1rem; }
.hc-links { list-style: none; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .45rem; }
.hc-links a { font-weight: 600; }
.hero-card .btn { width: 100%; text-align: center; margin-bottom: .25rem; }
@media (max-width: 979px) { .hero-card { display: none; } }   /* phones already have call and booking buttons */
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, center); z-index: -2; }
.has-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,14,20,.82) 0%, rgba(10,14,20,.6) 45%, rgba(10,14,20,.15) 100%); }
.has-photo.hero { padding: 7rem 0 7.5rem; }
.has-photo.page-hero { padding: 5rem 0 5.5rem; }
.has-photo .lead { color: #eef1f4; }
.crumbs { margin: 0 0 .6rem; font-size: .9rem; color: var(--dim-on-dark); }
.crumbs a { color: var(--on-dark); }

/* ---- Trust strip: short true facts under the home header -------------- */
.trust-strip { background: var(--tint); border-bottom: 1px solid var(--line); }
.trust-strip ul { list-style: none; margin: 0; padding: 1.25rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem 2rem; }
.trust-strip li { display: grid; align-content: start; border-left: 3px solid var(--accent); padding-left: .9rem; }
.trust-strip strong { font-size: 1.3rem; color: var(--dark); line-height: 1.2; }
.trust-strip span { color: var(--muted); font-size: .95rem; }

/* ---- Sections -------------------------------------------------------- */
.section { padding: 3.5rem 0; }
.section.tint { background: var(--tint); }
.section h2:first-child, .section .wrap > h2:first-child, .narrow > h2:first-child { margin-top: 0; }
.cards { display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .cards.two { grid-template-columns: repeat(2, 1fr); } .cards.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
/* card text stretches so every "Find out more" link sits on the same line across a row */
.card-body { padding: 1.4rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-top: 0; }
.card-body p { margin: 0 0 1rem; }
.card-body .text-link { margin-top: auto; }
.card-title-link { color: var(--dark); text-decoration: none; }
.card-title-link::after { content: ""; position: absolute; inset: 0; }   /* whole card is clickable */
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.card:hover .card-title-link { text-decoration: underline; }
.card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: var(--focus, center); }
.text-link { font-weight: 700; }

/* Two columns: main text + a side panel (key facts) */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1.7fr 1fr; align-items: start; } }
.panel { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.panel h2, .panel h3 { margin-top: 0; font-size: 1.15rem; }
.panel ul { margin: 0; padding-left: 1.1rem; }

/* Tick lists */
.ticks { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--accent); }
.ticks li::after  { content: ""; position: absolute; left: .38rem; top: .55rem; width: .3rem; height: .55rem; border: solid var(--tick-mark); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (min-width: 760px) { .ticks.two-col { grid-template-columns: 1fr 1fr; gap: .8rem 2.5rem; } }
.steps { padding-left: 1.4rem; display: grid; gap: .6rem; }
.steps li::marker { color: var(--link); font-weight: 700; }
.prose p, .prose li { max-width: 72ch; }
.prose h2 { margin-top: 2.5rem; }

/* Lists of towns and areas: plain columns */
.chips { list-style: none; padding: 0; margin: 1rem 0; columns: 3 11rem; column-gap: 2rem; }
.chips li { padding: .2rem 0; break-inside: avoid; }
.chips li::before { content: "\203A"; color: var(--link); font-weight: 700; margin-right: .45rem; }

/* Related links */
.related { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.5rem; }
.related-h { font-size: 1.1rem; color: var(--dark); margin: 0 0 .6rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.related a { font-weight: 600; }

/* Customer quotes (only shown when real quotes exist) */
.quote-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.quote { margin: 0; background: var(--tint); border-left: 4px solid var(--accent); padding: 1.5rem; border-radius: var(--radius); }
.quote blockquote { margin: 0 0 .75rem; font-size: 1.05rem; }
.quote blockquote p { margin: 0; }
.quote figcaption { color: var(--muted); font-size: .95rem; }

/* Guide articles */
.article-meta { color: var(--dim-on-dark); font-size: .92rem; margin: .5rem 0 0; }
.toc { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 2rem; }
.toc strong { display: block; margin-bottom: .4rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.callout { border-left: 3px solid var(--accent); background: var(--tint); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.sources { font-size: .92rem; color: var(--muted); }
.sources li { margin: .25rem 0; }

.cta-band { background: var(--dark-2); color: #fff; padding: 3rem 0; }
.cta-band .wrap { text-align: center; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-text { color: var(--on-dark); max-width: 40rem; margin: 0 auto; }

/* ---- Accordion (native <details>, no JavaScript) --------------------- */
.accordion { display: grid; gap: .6rem; margin: 1.25rem 0; }
.accordion details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.accordion details[open] { border-color: var(--accent); }
.accordion summary { cursor: pointer; font-weight: 700; padding: .95rem 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--dark); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--link); }
.accordion details[open] summary::after { content: "\2212"; }
.accordion-body { padding: 0 1.2rem 1rem; }
.accordion-body p { margin: 0; }

/* ---- Forms ----------------------------------------------------------- */
.contact-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
.form { display: grid; gap: .35rem; }
.form label { font-weight: 600; margin-top: .75rem; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea {
  width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid #b9c0c7; border-radius: var(--radius); background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.form .check input { margin-top: .4rem; accent-color: var(--dark); }
.form .btn { justify-self: start; margin-top: 1rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }   /* honeypot, invisible to people */
.contact-card { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; align-self: start; }
.contact-card h2 { margin-top: 0; font-size: 1.3rem; }
.notice { border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.notice.ok  { background: #e8f4ee; border: 1px solid var(--ok); }
.notice.err { background: #fbeceb; border: 1px solid var(--err); }
.notice ul { margin: .5rem 0 0; padding-left: 1.2rem; }

/* ---- Tables (scroll sideways on phones instead of squashing) ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .97rem; }
.table th, .table td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--tint); }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 3rem 0 1.5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent-pale); }
.footer-brand img { display: block; height: 56px; width: auto; }
.footer-brand .plain { margin-top: 1rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* wide screens: a wider first column so the logo is not squeezed, then equal link columns */
@media (min-width: 980px) { .footer-grid { grid-auto-flow: column; grid-template-columns: minmax(280px, 1.5fr); grid-auto-columns: 1fr; } }
.footer-h { color: #fff; font-size: 1.05rem; margin: 0 0 .8rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent); display: inline-block; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-sister { margin-top: 2rem; font-size: .95rem; }
.footer-sister p { margin: 0; }
.footer-legal { border-top: 1px solid var(--border-on-dark); margin-top: 1.5rem; padding-top: 1.25rem; font-size: .88rem; color: var(--dim-on-dark); }
.footer-legal p { margin: .3rem 0; }

/* ---- Cookie banner --------------------------------------------------- */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200; background: #fff; color: var(--text); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.25); padding: 1rem 1.25rem; max-width: 640px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 280px; font-size: .95rem; }
.cookie-actions { display: flex; gap: .6rem; }

/* ---- Tablets and phones ---------------------------------------------- */
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1.6fr 1fr; } }
@media (max-width: 1060px) {
  .topbar-contact .tb-email { display: none; }
  .nav-list { margin-left: -.7rem; }
  .nav-list > li > a { padding: .85rem .7rem; font-size: .95rem; }
  .nav-list > li.nav-contact { margin-right: -.7rem; }
}
@media (max-width: 900px) {
  .topbar-inner { min-height: 72px; gap: .75rem; padding: .8rem 0; }
  .brand img { height: 46px; }
  .topbar-contact, .topbar-cta { display: none; }
  .tb-call-mobile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent); color: var(--btn-text); }
  .tb-call-mobile svg { width: 22px; height: 22px; }
  .nav-toggle { display: inline-block; background: none; border: 1px solid currentColor; color: var(--top-text); padding: .55rem .9rem; border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
  /* the menu bar folds away on phones and opens with the Menu button */
  .navbar { position: static; display: none; }
  .navbar.open { display: block; }
  .nav-list { flex-direction: column; padding: .5rem 0 1rem; margin-left: 0; }
  .nav-list > li > a { padding: .7rem 0; border-bottom: 1px solid var(--border-on-dark); }
  .nav-list > li > a:hover, .nav-list > li.is-active > a, .nav-list > li > a[aria-current="page"] { border-bottom-color: var(--border-on-dark); background: none; color: var(--accent-pale); }
  .nav-list > li.nav-contact { margin-left: 0; margin-right: 0; }
  .sub { display: block; position: static; border: 0; box-shadow: none; background: none; padding: .2rem 0 .4rem 1rem; min-width: 0; }
  .sub a { color: var(--on-dark); padding: .35rem 0; font-size: .95rem; }
  .sub a:hover, .sub a[aria-current="page"] { background: none; color: var(--accent-pale); }
  .has-sub > a::after { display: none; }
  .hero, .has-photo.hero { padding: 3.5rem 0 4rem; }
  .has-photo.page-hero { padding: 3.5rem 0 4rem; }
  .has-photo::before { background: linear-gradient(180deg, rgba(10,14,20,.55) 0%, rgba(10,14,20,.8) 100%); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
