/* RK1 Chauffeurs — dark cinematic system (PROJECT.md §19)
   Ground #0f1114 · panels #1c1f26 · type bone #f4f2ee · no accent hue */

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0f1114;
  --panel: #1c1f26;
  --bone: #f4f2ee;
  --bone-dim: rgba(244, 242, 238, 0.68);
  --bone-faint: rgba(244, 242, 238, 0.42);
  --line: rgba(244, 242, 238, 0.16);
  --ink: #1c1f26;
  --ink-dim: rgba(28, 31, 38, 0.72);
  --ink-faint: rgba(28, 31, 38, 0.5);
  --ink-line: rgba(28, 31, 38, 0.25);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  background: var(--ground);
  color: var(--bone);
  font: 15.5px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px; /* room for the mobile dock */
}

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 30;
  background: var(--bone); color: var(--ink);
  padding: 10px 16px; border-radius: 8px; font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

a:focus-visible, summary:focus-visible, .field:focus-visible {
  outline: 2px solid var(--bone); outline-offset: 3px;
}
.panel-light a:focus-visible, .panel-light summary:focus-visible,
.panel-light .field:focus-visible { outline-color: var(--ink); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px;
  background: rgba(15, 17, 20, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.wordmark img { width: 43px; height: 28px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1.5px solid var(--bone-faint); border-radius: 22px;
  font: 14px var(--mono); color: var(--bone);
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.menu nav {
  position: absolute; right: 0; top: calc(100% + 8px);
  display: flex; flex-direction: column; min-width: 190px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
.menu nav a {
  color: var(--bone); text-decoration: none;
  padding: 11px 14px; border-radius: 9px; font-size: 15px;
}
.menu nav a:hover { background: rgba(244, 242, 238, 0.08); }

/* ---------- shared ---------- */

.kicker {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone-faint);
}
.panel-light .kicker { color: var(--ink-faint); }

.section {
  scroll-margin-top: 60px; /* clear the sticky header on anchor jumps */
  padding: 26px 16px 30px;
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 13px;
}
.section > * { max-width: 680px; }
@media (min-width: 768px) {
  .section { padding: 48px max(24px, calc((100vw - 880px) / 2)) 54px; }
}

h1, h2, .final-cta h2 {
  font-family: var(--serif); font-weight: 400; letter-spacing: 0.01em;
}
h1 { font-size: clamp(31px, 8.5vw, 46px); line-height: 1.04; text-wrap: pretty; color: var(--ink); }
h2 { font-size: clamp(26px, 6vw, 34px); line-height: 1.1; text-wrap: pretty; }
h3 { font-size: 16.5px; font-weight: 500; }

.body-copy, .lede { color: var(--bone-dim); text-wrap: pretty; }
.lede { font-size: 16.5px; }

.caption {
  font: 10px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-faint);
}
.panel-light .caption { color: var(--ink-faint); }

.panel { background: var(--panel); }
.panel-light { background: var(--bone); color: var(--ink); }
.panel-light h2 { color: var(--ink); }

/* pills */
.pill {
  display: flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 22px; border-radius: 26px;
  font: inherit; font-size: 15.5px; text-decoration: none; text-align: center;
  border: 0; cursor: pointer;
  transition: opacity 120ms ease;
}
.pill:active { opacity: 0.8; }
.pill-fill { background: var(--bone); color: var(--ink); font-weight: 500; }
.pill-outline { border: 1.5px solid rgba(244, 242, 238, 0.35); color: var(--bone-dim); }
.pill-sm { height: 38px; padding: 0 15px; font-size: 13.5px; }
.panel-light .pill-fill { background: var(--ink); color: var(--bone); }
.panel-light .pill-outline { border-color: var(--ink); color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.cta-row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 9px 20px; }
.quiet-links { display: flex; align-items: center; gap: 20px; }
.cta-row .pill-fill { height: 46px; padding: 0 24px; font-size: 15px; }
.link-quiet {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--bone-dim); font-size: 15px;
  text-decoration: underline; text-underline-offset: 5px;
  text-decoration-color: rgba(244, 242, 238, 0.35);
}
.link-quiet:hover { color: var(--bone); }
button.link-quiet { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 15px; }
.panel-light .link-quiet { color: var(--ink-dim); text-decoration-color: rgba(28, 31, 38, 0.35); }
.panel-light .link-quiet:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero img { width: 100%; height: min(78vh, 560px); object-fit: cover; }
.hero-card {
  position: absolute; left: 16px; right: 16px; bottom: 18px;
  background: rgba(244, 242, 238, 0.94);
  padding: 16px; display: flex; flex-direction: column; gap: 7px;
}
.hero-card .kicker { color: var(--ink-faint); }
@media (min-width: 768px) {
  .hero img { height: 62vh; min-height: 420px; }
  .hero-card { left: max(24px, calc((100vw - 880px) / 2)); right: auto; max-width: 520px; bottom: 36px; padding: 24px 26px; }
}

/* ---------- enquiry panel ---------- */

/* land with the first-fold CTAs still peeking above the panel */
#check-a-date { scroll-margin-top: 128px; }

.enq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.enq-progress {
  font: 600 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.enq-media { width: 100%; height: 172px; overflow: hidden; border-radius: 12px; }
.enq-media img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center 68%; /* the car sits low in the square crops */
  transition: opacity 250ms ease;
}
@media (min-width: 768px) { .enq-media { height: 230px; } }
.chip .ci { margin-right: 8px; flex: none; }
.enq-summary { font-size: 13.5px; color: var(--ink-faint); }
.enq-hint { font-size: 13px; color: var(--ink-faint); margin-top: -4px; }

.enq-dialog {
  /* bottom sheet, sitting just above the WhatsApp dock */
  border: 0; border-radius: 18px 18px 0 0; padding: 20px 16px 18px;
  margin: auto 0 calc(70px + env(safe-area-inset-bottom)) 0;
  width: 100vw; max-width: 100vw; max-height: 70vh;
  background: var(--bone); color: var(--ink);
}
.enq-dialog[open] { animation: sheet-up 240ms ease; }
@keyframes sheet-up {
  from { transform: translateY(28px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .enq-dialog[open] { animation: none; } }
@media (min-width: 768px) {
  .enq-dialog { margin: auto; width: min(92vw, 420px); max-width: 420px; border-radius: 14px; max-height: 85vh; }
}
.enq-dialog::backdrop { background: rgba(15, 17, 20, 0.65); }
.dialog-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 18px;
  border: 1.5px solid var(--ink-line); background: none; color: var(--ink);
  font: 18px/1 var(--sans); cursor: pointer;
}
.enq-dialog #enquiry { margin-top: 14px; }
.enq-back { align-self: flex-start; }

#enquiry { display: flex; flex-direction: column; gap: 16px; max-width: 680px; }
#enquiry fieldset, #enquiry .sub { border: 0; display: flex; flex-direction: column; gap: 9px; }
#enquiry legend {
  font-family: var(--serif); font-size: 22px; line-height: 1.2;
  padding: 0; margin-bottom: 9px;
}
#enquiry .sub legend { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-dim); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: flex; align-items: center; height: 44px; padding: 0 16px;
  border: 1.5px solid rgba(28, 31, 38, 0.4); border-radius: 22px;
  font-size: 13.5px; color: var(--ink-dim); cursor: pointer; white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.field {
  height: 50px; width: 100%; padding: 0 13px;
  border: 1.5px solid rgba(28, 31, 38, 0.45); border-radius: 0;
  background: #fff; color: var(--ink); font: 15px var(--sans);
}
.field::placeholder { color: var(--ink-faint); }
select.field { font: inherit; font-size: 15px; }
select.field:invalid, select.field option[value=""] { color: var(--ink-faint); }

.airport-other { display: none; }
.airport-fields:has(option[value="Outside London"]:checked) .airport-other {
  display: flex; flex-direction: column; gap: 9px;
}
.field-label { font-size: 13px; font-weight: 500; color: var(--ink-dim); }

/* conditional reveals — CSS only, no JS required */
.airport-fields, .date-field { display: none; flex-direction: column; gap: 9px; }
#enquiry:has(#occ-airport:checked) .airport-fields { display: flex; }
#enquiry:has(#timing-date:checked) .date-field { display: flex; margin-top: 2px; }

/* ---------- the car ---------- */

.car-carousel { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.car-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.car-frame img { width: 100%; height: 100%; object-fit: contain; transition: opacity 250ms ease; }
.car-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; gap: 6px; justify-content: center;
}
.car-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(244, 242, 238, 0.45); }
.car-dots span.on { background: var(--bone); }
.car-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.car-thumbs::-webkit-scrollbar { display: none; }
.thumb {
  width: 64px; height: 64px; flex: none; padding: 0;
  background: none; border: 1.5px solid transparent; border-radius: 0; cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--bone); }
@media (min-width: 768px) {
  .thumb { width: 84px; height: 84px; }
}

.spec-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  width: 100%; background: var(--line); border: 1px solid var(--line);
}
.spec-grid > div {
  background: var(--ground); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.spec-grid dt {
  font: 600 9.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bone-faint);
}
.spec-grid dd { font: 11px var(--mono); color: var(--bone-dim); }

/* ---------- occasions ---------- */

.occasion-grid {
  list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
  width: 100%; max-width: 880px;
}
.occasion-card { border: 1px solid var(--line); background: var(--ground); }
.occ-open {
  display: flex; flex-direction: column; height: 100%;
  color: inherit; text-decoration: none;
}
.occasion-card .occ-open > img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.occasion-copy { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 4px; }
.occasion-copy p { font-size: 13px; color: var(--bone-dim); }
.occasion-row { grid-column: 1 / -1; }
.occasion-row .occ-open { flex-direction: row; align-items: stretch; }
.occasion-row .occ-open > img { width: 38%; max-width: 300px; aspect-ratio: auto; }
.occasion-row .occasion-copy { justify-content: center; flex: 1; }
@media (min-width: 768px) {
  .occasion-grid { grid-template-columns: repeat(4, 1fr); }
  .occasion-row { grid-column: span 2; }
}

/* ---------- how it works ---------- */

.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: auto 1fr; column-gap: 13px;
}
.steps li::before {
  content: "0" counter(step); grid-row: 1 / span 2;
  font: 700 11px var(--mono); color: var(--bone-faint); padding-top: 4px;
}
.steps li h3, .steps li p { grid-column: 2; }
.steps li p { font-size: 14px; color: var(--bone-dim); margin-top: 3px; }

/* ---------- faq ---------- */

.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 0; font-size: 15px; min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--bone-faint); font-size: 17px; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 0 16px; color: var(--bone-dim); font-size: 14.5px; max-width: 560px; }

/* ---------- final CTA / footer / dock ---------- */

.final-cta { gap: 16px; padding-top: 34px; padding-bottom: 40px; }
.final-cta .pill { align-self: stretch; }
@media (min-width: 768px) { .final-cta .pill { align-self: flex-start; min-width: 300px; } }

.site-footer {
  padding: 26px 16px calc(30px + env(safe-area-inset-bottom));
  background: var(--panel);
  display: flex; flex-direction: column; gap: 12px;
}
.footer-mark { width: 106px; height: 78px; }
.footer-links a { color: var(--bone-dim); font: 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.footer-legal {
  font: 10px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-faint);
}
@media (min-width: 768px) {
  .site-footer { padding-left: max(24px, calc((100vw - 880px) / 2)); }
}

.desktop-nav { display: none; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 9px; align-items: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15, 17, 20, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.dock[data-idle] { opacity: 0; pointer-events: none; transform: translateY(10px); }
.dock .pill-fill { flex: 1; height: 48px; padding: 0 12px; }
.dock .pill-outline { height: 48px; }
.dock .pill-call { width: 48px; flex: none; padding: 0; }
@media (min-width: 768px) {
  .dock { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- desktop composition ≥1024px ---------- */

@media (min-width: 1024px) {
  .section {
    scroll-margin-top: 72px;
    padding: 68px max(48px, calc((100vw - 1080px) / 2)) 76px;
  }
  .section > * { max-width: 720px; }
  .car-carousel, .spec-grid, .occasion-grid { max-width: none; }

  /* header: inline nav replaces the hamburger */
  .site-header { padding: 14px max(48px, calc((100vw - 1080px) / 2)); }
  .desktop-nav { display: flex; align-items: center; gap: 2px; margin-right: 12px; }
  .desktop-nav a {
    color: var(--bone-dim); text-decoration: none;
    font-size: 14px; padding: 10px 12px; border-radius: 9px;
  }
  .desktop-nav a:hover { color: var(--bone); background: rgba(244, 242, 238, 0.08); }
  .menu { display: none; }

  /* hero: taller, larger card, bigger display type */
  .hero img { height: 76vh; min-height: 520px; }
  .hero-card {
    left: max(48px, calc((100vw - 1080px) / 2));
    max-width: 600px; bottom: 52px; padding: 30px 34px;
  }
  h1 { font-size: clamp(46px, 4.4vw, 60px); }

  /* enquiry: media beside the form */
  #check-a-date { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 52px; align-items: start; }
  .enq-head { grid-column: 1 / -1; }
  .enq-media { height: 440px; max-width: none; }
  #enquiry { max-width: none; }

  .spec-grid { grid-template-columns: repeat(3, 1fr); }

  .steps { flex-direction: row; gap: 44px; }
  .steps li { flex: 1; }

  .site-footer { padding-left: max(48px, calc((100vw - 1080px) / 2)); }
}
