/* ==========================================================================
   FRN MOTORSPORTS — core stylesheet
   Design tokens -> primitives -> layout -> components -> responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surface palette — cool, deep, showroom */
  --carbon:      #08090b;   /* page base */
  --graphite:    #121418;   /* raised surface */
  --steel:       #1e2126;   /* cards, inputs */
  --steel-hi:    #262a31;   /* hover surface */
  --line:        #2c3037;   /* hairline */
  --line-soft:   #1b1e23;

  /* Ink */
  --chalk:       #f2f1ee;   /* primary text */
  --mist:        #a2a8b0;   /* secondary text */
  --dim:         #6f757d;   /* tertiary / meta */

  /* Brass */
  --brass:       #c8a253;
  --brass-lit:   #e8ce8a;
  --brass-deep:  #8c6a2a;
  --brass-tint:  rgba(200, 162, 83, 0.12);

  /* Chrome — the logo's second metal */
  --chrome:      #c6ccd4;
  --chrome-lit:  #eef1f4;
  --chrome-deep: #7b828b;
  --brass-plate: linear-gradient(100deg,
                  #8c6a2a 0%, #c8a253 22%, #f0dca4 48%, #c8a253 74%, #8c6a2a 100%);

  /* Status */
  --sold:        #b4443c;
  --reserved:    #c8a253;
  --ok:          #4f9d6b;

  /* Type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  /* Scale — 1.25 major third, clamped for fluid sizing */
  --t-hero:  clamp(2.5rem, 1.4rem + 4.6vw, 5.25rem);
  --t-h1:    clamp(2rem, 1.3rem + 2.8vw, 3.5rem);
  --t-h2:    clamp(1.65rem, 1.2rem + 1.9vw, 2.5rem);
  --t-h3:    clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
  --t-body:  1rem;
  --t-sm:    0.875rem;
  --t-xs:    0.78rem;

  /* Space */
  --gap:     1.5rem;
  --section: clamp(4rem, 2.5rem + 6vw, 7.5rem);
  --shell:   1280px;
  --pad:     clamp(1.25rem, 0.5rem + 3vw, 3rem);

  --radius:  2px;
  --radius-lg: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--carbon);
  color: var(--chalk);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* Class-based display rules outrank the browser default for [hidden], which
   silently breaks the wizard's Back/Submit buttons. Restore it. */
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--brass-lit);
  outline-offset: 3px;
}

::selection { background: var(--brass); color: var(--carbon); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--brass); color: var(--carbon);
  padding: 0.7rem 1.1rem; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 2rem + 3vw, 4.5rem); }
.section--graphite { background: var(--graphite); }
.section--edge { border-top: 1px solid var(--line-soft); }

.prose { max-width: 62ch; }
.prose p { color: var(--mist); }
.prose strong { color: var(--chalk); font-weight: 600; }

.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--mist); line-height: 1.55; }

/* Section heading: brass rule + title + optional link, no eyebrow labels */
.s-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  position: relative;
  margin-bottom: clamp(2rem, 1.5rem + 1.5vw, 3rem);
}
.s-head::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 88px; height: 2px; background: var(--brass-plate);
}
.s-head__title { font-size: var(--t-h2); max-width: 22ch; }
.s-head__note { color: var(--mist); font-size: var(--t-sm); max-width: 46ch; }

.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.split {
  display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  grid-template-columns: 1.05fr 1fr; align-items: center;
}
/* Grid items default to min-width:auto, so a long heading can force its track
   wider than the page and push the layout off-screen on phones. */
.split > * { min-width: 0; }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--display);
  font-weight: 700; font-stretch: 112%;
  font-size: 0.82rem; letter-spacing: 0.09em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease);
}
.btn--gold { background: var(--brass); color: #12100a; }
.btn--gold:hover { background: var(--brass-lit); }
.btn--ghost { border-color: var(--line); color: var(--chalk); background: transparent; }
.btn--ghost:hover { border-color: var(--chrome-deep); color: var(--chrome-lit); }
.btn--solid { background: var(--steel); color: var(--chalk); border-color: var(--line); }
.btn--solid:hover { background: var(--steel-hi); }
.btn--wide { width: 100%; }
.btn--lg { padding: 1.15rem 2.2rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Text link with brass underline that grows on hover */
.tlink {
  display: inline-block; color: var(--brass-lit);
  font-weight: 600; font-size: var(--t-sm);
  border-bottom: 1px solid var(--brass-deep);
  padding-bottom: 2px;
  transition: border-color 0.18s var(--ease);
}
.tlink:hover { border-color: var(--brass-lit); }

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 90;
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.masthead__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: 74px;
}

.wordmark { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.wordmark__glyph {
  width: auto; height: 46px; flex-shrink: 0;
}
.wordmark__text {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: 1.05rem; letter-spacing: 0.06em; line-height: 1;
  text-transform: uppercase;
}
.wordmark__text span { display: block; }
.wordmark__text i { color: var(--brass); font-style: normal; }
.wordmark--stacked img { height: 156px; width: auto; }
.wordmark__sub {
  font-family: var(--body); font-weight: 500; font-stretch: normal;
  font-size: 0.56rem; letter-spacing: 0.32em; color: var(--brass);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: clamp(0.85rem, 0.2rem + 0.9vw, 1.5rem); }
.nav__link {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--mist); padding: 0.4rem 0; position: relative;
  transition: color 0.18s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--chalk); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--brass);
}

.masthead__cta { display: flex; align-items: center; gap: 0.75rem; }
.masthead__phone { font-size: var(--t-sm); font-weight: 600; color: var(--mist); white-space: nowrap; }
.masthead__phone:hover { color: var(--brass-lit); }

.burger {
  display: none; width: 46px; height: 46px;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
  align-items: center; justify-content: center;
}
.burger span {
  display: block; width: 20px; height: 2px; background: var(--chalk);
  position: relative; transition: background 0.15s var(--ease);
}
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px;
  background: var(--chalk); transition: transform 0.22s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 74px 0 0 0; z-index: 89;
  background: var(--carbon);
  padding: 1.5rem var(--pad) 7rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  visibility: hidden;
}
.drawer[data-open="true"] { transform: translateX(0); visibility: visible; }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.05rem 0; border-bottom: 1px solid var(--line-soft);
  font-family: var(--display); font-weight: 700; font-stretch: 112%;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.drawer__link:hover { color: var(--brass-lit); }
.drawer__foot { margin-top: 2rem; display: grid; gap: 0.75rem; }
.drawer__meta { color: var(--dim); font-size: var(--t-sm); margin-top: 1.5rem; }

/* Sticky mobile action bar */
.actionbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 95;
  background: rgba(18, 20, 24, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 0.55rem 0.5rem calc(0.55rem + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr); gap: 0.4rem;
}
.actionbar__item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0.5rem 0.25rem; border-radius: var(--radius);
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--mist);
}
.actionbar__item svg { width: 20px; height: 20px; }
.actionbar__item--gold { background: var(--brass); color: #12100a; }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--carbon); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,9,11,0.72) 0%, rgba(8,9,11,0.35) 42%, rgba(8,9,11,0.97) 100%),
    linear-gradient(90deg, rgba(8,9,11,0.92) 0%, rgba(8,9,11,0.55) 45%, rgba(8,9,11,0.1) 78%);
}
.hero__inner {
  position: relative;
  min-height: clamp(520px, 76vh, 760px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-block: clamp(5rem, 4rem + 6vw, 8rem) clamp(3rem, 2rem + 4vw, 5rem);
}
.hero__title {
  font-size: var(--t-hero);
  font-stretch: 125%; font-weight: 800;
  letter-spacing: 0.005em; max-width: 15ch;
}
.hero__sub {
  margin-top: 1.25rem; max-width: 44ch;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem); color: var(--mist);
}
.hero__actions { margin-top: 2rem; }
.hero__finance {
  margin-top: 1.75rem; display: inline-flex; align-items: center; gap: 0.65rem;
  font-size: var(--t-sm); color: var(--mist);
  border-left: 2px solid var(--brass); padding-left: 0.85rem;
}
.hero__finance b { color: var(--chalk); font-weight: 600; }

/* One orchestrated load reveal — hero only */
.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.7s var(--ease) forwards; }
.reveal--1 { animation-delay: 0.05s; }
.reveal--2 { animation-delay: 0.16s; }
.reveal--3 { animation-delay: 0.27s; }
.reveal--4 { animation-delay: 0.36s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Page header for interior pages */
.pagehead { position: relative; border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.pagehead__inner { padding-block: clamp(3.5rem, 2.5rem + 5vw, 6rem); position: relative; }
.pagehead h1 { font-size: var(--t-h1); max-width: 18ch; }
.pagehead .lede { margin-top: 1.25rem; max-width: 52ch; }
.pagehead__actions { margin-top: 2rem; }

.crumbs { font-size: var(--t-xs); color: var(--dim); margin-bottom: 1.5rem; letter-spacing: 0.05em; }
.crumbs a:hover { color: var(--brass-lit); }

/* --------------------------------------------------------------------------
   7. Search panel — "showroom counter" slab
   -------------------------------------------------------------------------- */
.searchbar {
  position: relative; z-index: 5;
  background: var(--graphite);
  border: 1px solid var(--line);
  border-top: 2px solid transparent;
  border-image: var(--brass-plate) 1;
  border-image-slice: 1;
  padding: 1.5rem;
  margin-top: -3.5rem;
}
.searchbar__grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
}
.searchbar__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.1rem; padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--t-sm); color: var(--dim);
}

/* --------------------------------------------------------------------------
   8. Form controls
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__label {
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim);
}
.field__hint { font-size: var(--t-xs); color: var(--dim); }
.field__error { font-size: var(--t-xs); color: #e0837c; display: none; }
.field[data-invalid="true"] .field__error { display: block; }
.field[data-invalid="true"] .input,
.field[data-invalid="true"] .select select { border-color: #b4443c; }

.input, .select select, textarea.input {
  width: 100%; background: var(--steel); color: var(--chalk);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.85rem 0.9rem; font-size: 0.95rem;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.input::placeholder { color: var(--dim); }
.input:hover, .select select:hover { border-color: #3a3f47; }
.input:focus, .select select:focus { border-color: var(--brass); outline: none; background: var(--steel-hi); }
textarea.input { min-height: 130px; resize: vertical; line-height: 1.55; }

.select { position: relative; }
.select select { appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 0.95rem; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
  transform: rotate(45deg); pointer-events: none;
}
.select select option { background: var(--steel); }

/* Choice chips (radio / checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: block; padding: 0.65rem 1.05rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--steel); font-size: 0.9rem; cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.chip input:hover + span { border-color: #3a3f47; }
.chip input:checked + span { border-color: var(--brass); color: var(--brass-lit); background: var(--brass-tint); }
.chip input:focus-visible + span { outline: 2px solid var(--brass-lit); outline-offset: 2px; }

.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, 1fr); }
.form-grid .span-2 { grid-column: 1 / -1; }

.formcard {
  background: var(--graphite); border: 1px solid var(--line);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--radius-lg);
}
.consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: var(--t-sm); color: var(--mist); }
.consent input { margin-top: 0.25rem; accent-color: var(--brass); width: 18px; height: 18px; flex-shrink: 0; }

.form-status {
  display: none; margin-top: 1rem; padding: 1rem 1.1rem;
  border: 1px solid var(--line); border-left: 3px solid var(--ok);
  background: var(--steel); font-size: var(--t-sm);
}
.form-status[data-state="sent"] { display: block; }
.form-status[data-state="error"] { display: block; border-left-color: #b4443c; }

/* --------------------------------------------------------------------------
   9. Vehicle cards + spec plate (signature element)
   -------------------------------------------------------------------------- */
.vgrid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); }

.vcard {
  display: flex; flex-direction: column;
  background: var(--graphite); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.vcard:hover { border-color: #3d424a; }
.vcard__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--steel); }
.vcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.vcard:hover .vcard__media img { transform: scale(1.04); }
.vcard__flags { position: absolute; top: 0.75rem; left: 0.75rem; display: flex; gap: 0.4rem; }
.vcard__count {
  position: absolute; bottom: 0.75rem; right: 0.75rem;
  background: rgba(8,9,11,0.8); border: 1px solid var(--line);
  padding: 0.28rem 0.55rem; font-size: var(--t-xs); color: var(--mist);
}
.vcard__body { padding: 1.1rem 1.1rem 0; }
.vcard__title { font-size: 1.05rem; font-stretch: 112%; line-height: 1.15; min-height: 2.3em; }
.vcard__title a:hover { color: var(--brass-lit); }
.vcard__price {
  margin-top: 0.6rem; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
}
.vcard__amount {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: 1.4rem; font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.vcard__drive { font-size: var(--t-xs); color: var(--dim); }
.vcard__finance {
  margin-top: 0.35rem; font-size: var(--t-sm); color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.vcard__place { margin-top: 0.75rem; font-size: var(--t-sm); color: var(--mist); display: flex; align-items: center; gap: 0.4rem; }
.vcard__place svg { width: 14px; height: 14px; color: var(--dim); }
.vcard__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.5rem; padding: 1.1rem; margin-top: auto; }
.vcard__actions .btn { min-width: 0; padding-inline: 0.7rem; font-size: 0.76rem; letter-spacing: 0.05em; }
.vcard--sold .vcard__media img { filter: grayscale(1) brightness(0.62); }

/* Spec plate — hairline-divided data cells, brass rule above */
.plate {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  border-top: 1px solid var(--line); margin-top: 1rem;
}
.plate__cell {
  padding: 0.7rem 0.6rem 0.7rem 0;
  border-right: 1px solid var(--line-soft);
}
.plate__cell:last-child { border-right: 0; }
.plate__cell:not(:first-child) { padding-left: 0.6rem; }
.plate__k {
  display: block; font-size: 0.62rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 3px;
}
.plate__v {
  display: block; font-family: var(--display); font-weight: 600; font-stretch: 105%;
  font-size: 0.9rem; font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.plate--wide { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: unset; }
.plate--wide .plate__cell { padding: 0.9rem 0.9rem 0.9rem 0; border-bottom: 1px solid var(--line-soft); }

/* Status flags */
.flag {
  display: inline-flex; align-items: center;
  font-family: var(--display); font-weight: 700; font-stretch: 112%;
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.35rem 0.6rem; border-radius: var(--radius);
  background: rgba(8,9,11,0.85); border: 1px solid var(--line); color: var(--chalk);
}
.flag--sold { background: var(--sold); border-color: var(--sold); color: #fff; }
.flag--reserved { background: var(--brass); border-color: var(--brass); color: #12100a; }
.flag--featured { border-color: var(--brass); color: var(--brass-lit); }

/* Results toolbar */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
}
.toolbar__count { font-size: var(--t-sm); color: var(--mist); }
.toolbar__count b { color: var(--chalk); font-variant-numeric: tabular-nums; }
.toolbar__right { display: flex; gap: 0.6rem; align-items: center; }

.empty {
  border: 1px dashed var(--line); padding: 3rem 1.5rem; text-align: center;
  color: var(--mist); border-radius: var(--radius-lg);
}
.empty h3 { font-size: var(--t-h3); margin-bottom: 0.6rem; }

/* Filter rail / drawer */
.results { display: grid; grid-template-columns: 280px 1fr; gap: clamp(1.5rem, 1rem + 2vw, 2.5rem); align-items: start; }
.filters {
  background: var(--graphite); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.25rem;
  position: sticky; top: 96px;
}
.filters__group { padding-block: 1rem; border-bottom: 1px solid var(--line-soft); }
.filters__group:first-of-type { padding-top: 0; }
.filters__group:last-of-type { border-bottom: 0; }
.filters__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.filters__title { font-size: 1rem; }
.filters__reset { background: none; border: 0; color: var(--brass-lit); font-size: var(--t-sm); cursor: pointer; padding: 0; }
.filters__reset:hover { text-decoration: underline; }
.filter-toggle { display: none; }

/* --------------------------------------------------------------------------
   10. Vehicle detail
   -------------------------------------------------------------------------- */
.detail { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(1.5rem, 1rem + 2.5vw, 3rem); align-items: start; }
/* Let both columns shrink to their track size instead of expanding to fit wide
   content (the gallery's intrinsic size, long text), which caused overflow. */
.detail > * { min-width: 0; }

/* --------------------------------------------------------------------------
   Customer reviews carousel
   Built in rather than embedded, so it inherits the site's palette instead of
   dropping a white third-party panel into a near-black page.
   -------------------------------------------------------------------------- */
.revs {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: start;
}
.revs__summary { text-align: center; }
.revs__verdict {
  font-family: var(--display); font-weight: 800;
  font-size: var(--t-h3); text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0;
}
.revs__stars { margin: 0.6rem 0; font-size: 1.35rem; letter-spacing: 0.1em; }
.revs__star { color: var(--line); }
.revs__star.is-on { color: var(--brass); }
.revs__stars--sm { font-size: 0.95rem; margin: 0.75rem 0 0.9rem; }
.revs__count { color: var(--mist); font-size: var(--t-sm); margin: 0 0 1.25rem; }
.revs__count strong { color: var(--chalk); font-size: 1.05rem; }

.revs__main { position: relative; min-width: 0; }
.revs__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* No scroll-behavior here on purpose. frn.js passes `behavior` on every
     scrollTo/scrollBy (and honours prefers-reduced-motion itself); declaring
     smooth in CSS as well made the arrows and dots silently do nothing. */
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.revs__track::-webkit-scrollbar { display: none; }
.revs__track:focus-visible { outline: 2px solid var(--brass-lit); outline-offset: 4px; }

.revs__card {
  scroll-snap-align: start;
  background: var(--steel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  min-width: 0;
}
.revs__who { display: flex; align-items: center; gap: 0.75rem; }
.revs__who b { display: block; font-size: var(--t-sm); }
.revs__avatar {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brass); color: #12100a;
  font-family: var(--display); font-weight: 800;
}
.revs__meta { display: block; color: var(--dim); font-size: var(--t-xs); }
.revs__src {
  margin-left: auto; align-self: flex-start;
  color: var(--dim); font-size: var(--t-xs); white-space: nowrap;
}
.revs__text {
  color: var(--mist); font-size: var(--t-sm); line-height: 1.7;
  margin: 0; white-space: pre-line;
}

.revs__nav {
  position: absolute; top: 38%; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--graphite); color: var(--chalk);
  border: 1px solid var(--line); font-size: 1.2rem; line-height: 1;
  transition: background-color .18s var(--ease), opacity .18s var(--ease);
}
.revs__nav:hover:not(:disabled) { background: var(--steel-hi); }
.revs__nav:disabled { opacity: 0.3; cursor: default; }
.revs__nav--prev { left: -19px; }
.revs__nav--next { right: -19px; }

.revs__dots { display: flex; justify-content: center; gap: 0.45rem; margin-top: 1.1rem; }
.revs__dot {
  width: 8px; height: 8px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--line); border: 0;
  transition: background-color .18s var(--ease);
}
.revs__dot.is-on { background: var(--brass); }

@media (max-width: 860px) {
  .revs { grid-template-columns: 1fr; }
  .revs__summary { text-align: left; }
  .revs__summary .btn { width: auto; }
  /* The arrows would hang off the page edge at this width; the track still
     swipes, and the dots stay for tapping. */
  .revs__nav { display: none; }
}

/* Description language switch on the vehicle page. The site itself stays in
   English — this only swaps that one vehicle's description. */
.ovhead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.lang-switch__btn {
  background: transparent; border: 0; cursor: pointer;
  padding: 0.45rem 0.9rem;
  font-family: var(--display);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mist); white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.lang-switch__btn + .lang-switch__btn { border-left: 1px solid var(--line); }
.lang-switch__btn:hover { color: var(--chalk); }
.lang-switch__btn.is-active { background: var(--brass); color: #12100a; }

/* Honour the line breaks staff type into the description, in either language. */
#detail-summary { white-space: pre-line; }
/* Full-width vehicle write-up (Overview/Specs + Features) below the gallery. */
.vdetail-info { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
.vdetail-info > * { min-width: 0; }

.gallery__main {
  position: relative; aspect-ratio: 3 / 2; max-height: 60vh; background: var(--steel);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: rgba(8,9,11,0.72); border: 1px solid var(--line);
  color: var(--chalk); cursor: pointer; border-radius: var(--radius);
}
.gallery__nav:hover { background: var(--brass); color: #12100a; border-color: var(--brass); }
.gallery__nav--prev { left: 0.75rem; }
.gallery__nav--next { right: 0.75rem; }
.gallery__expand {
  position: absolute; right: 0.75rem; bottom: 0.75rem;
  background: rgba(8,9,11,0.72); border: 1px solid var(--line); color: var(--chalk);
  padding: 0.5rem 0.8rem; font-size: var(--t-xs); cursor: pointer; border-radius: var(--radius);
}
.gallery__expand:hover { border-color: var(--brass); color: var(--brass-lit); }
.gallery__strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 108px;
  gap: 0.5rem; margin-top: 0.65rem; overflow-x: auto; padding-bottom: 0.35rem;
  scrollbar-width: thin;
}
.gallery__thumb {
  aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: var(--steel); padding: 0;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"] { border-color: var(--brass); }

.lightbox {
  position: fixed; inset: 0; z-index: 120; background: rgba(4,5,6,0.96);
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.lightbox[data-open="true"] { display: flex; }
.lightbox img { max-height: 88vh; max-width: 100%; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem; width: 46px; height: 46px;
  background: var(--steel); border: 1px solid var(--line); color: var(--chalk);
  cursor: pointer; border-radius: var(--radius); font-size: 1.2rem;
}

.dpanel {
  background: var(--graphite); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem;
}
.dpanel--sticky { position: sticky; top: 96px; }
.dpanel__price {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.dpanel__drive { font-size: var(--t-sm); color: var(--dim); margin-top: 0.4rem; }

.finance-box {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--steel); padding: 1.25rem; margin-top: 1.25rem;
  border-top: 2px solid var(--brass);
}
.finance-box__from { font-size: var(--t-sm); color: var(--mist); }
.finance-box__amt {
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: 1.9rem; font-variant-numeric: tabular-nums; color: var(--brass-lit);
  line-height: 1.1; margin: 0.25rem 0 0.5rem;
}
.finance-box__amt small { font-size: 0.85rem; font-weight: 600; color: var(--mist); }

.disclaimer { font-size: var(--t-xs); color: var(--dim); line-height: 1.55; }
.disclaimer a { color: var(--mist); text-decoration: underline; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td {
  text-align: left; padding: 0.8rem 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.94rem;
}
.spec-table th { color: var(--dim); font-weight: 500; width: 45%; }
.spec-table td { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   11. Content blocks
   -------------------------------------------------------------------------- */
.pillar {
  border-top: 1px solid var(--line); padding-top: 1.25rem;
  position: relative;
}
.pillar::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 42px; height: 2px;
  background: var(--brass);
}
.pillar h3 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.pillar p { color: var(--mist); font-size: 0.94rem; }

.svc {
  background: var(--graphite); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 0.2s var(--ease);
}
.svc:hover { border-color: #3d424a; }
.svc__icon, .svc > svg { width: 30px; height: 30px; color: var(--brass); flex-shrink: 0; }
.svc h3 { font-size: 1.1rem; }
.svc p { color: var(--mist); font-size: 0.94rem; flex-grow: 1; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.checks li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--mist); font-size: 0.96rem; }
.checks li::before {
  content: ""; flex-shrink: 0; width: 7px; height: 7px; margin-top: 0.55rem;
  background: var(--brass); transform: rotate(45deg);
}

/* Numbered sequence — used only where content genuinely is a sequence */
.steps { counter-reset: step; display: grid; gap: 0; }
.steps__item {
  counter-increment: step;
  display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line-soft);
}
.steps__item::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display); font-weight: 700; font-stretch: 112%;
  font-size: 1.05rem; color: var(--brass); font-variant-numeric: tabular-nums;
}
.steps__item h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.steps__item p { color: var(--mist); font-size: 0.94rem; }

/* Multi-step form */
.wizard { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.wizard__head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.wizard__meter { height: 3px; background: var(--steel); margin-top: 0.9rem; overflow: hidden; }
.wizard__meter i { display: block; height: 100%; background: var(--brass); transition: width 0.3s var(--ease); }
.wizard__step { display: none; padding: clamp(1.25rem, 1rem + 1.5vw, 2rem) 1.5rem; }
.wizard__step[data-active="true"] { display: block; }
.wizard__legend { font-size: var(--t-h3); margin-bottom: 0.4rem; }
.wizard__aside { color: var(--mist); font-size: var(--t-sm); margin-bottom: 1.5rem; }
.wizard__nav {
  display: flex; justify-content: space-between; gap: 0.75rem;
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--line);
}
.wizard__count { font-size: var(--t-xs); color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }

/* Stats plate */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats__cell { padding: 1.5rem 1.25rem 1.5rem 0; border-right: 1px solid var(--line-soft); }
.stats__cell:last-child { border-right: 0; }
.stats__cell:not(:first-child) { padding-left: 1.25rem; }
.stats__n {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); color: var(--brass);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stats__l { display: block; margin-top: 0.5rem; color: var(--mist); font-size: 0.9rem; }

/* Reviews */
.review {
  background: var(--graphite); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.stars { color: var(--brass); letter-spacing: 0.18em; font-size: 0.9rem; }
.review__body { color: var(--mist); font-size: 0.96rem; }
.review__who { font-size: var(--t-sm); color: var(--dim); margin-top: auto; }
.review__who b { color: var(--chalk); display: block; font-weight: 600; }

/* Split media block */
.media-block {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--steel);
}
.media-block img { width: 100%; height: 100%; object-fit: cover; }

/* Final CTA band */
.finale { background: var(--graphite); border-top: 1px solid var(--line); text-align: center; }
.finale h2 { font-size: var(--t-h1); max-width: 20ch; margin-inline: auto; }
.finale .lede { margin: 1.25rem auto 0; max-width: 52ch; }
.finale .btn-row { justify-content: center; margin-top: 2.25rem; }

/* Contact tiles */
.ctile {
  border: 1px solid var(--line); background: var(--graphite);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.ctile h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.ctile p { color: var(--mist); font-size: 0.94rem; }
.ctile a { color: var(--brass-lit); }
.ctile a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.footer { background: var(--carbon); border-top: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem; }
.footer__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer__blurb { color: var(--mist); font-size: 0.94rem; margin-top: 1.25rem; max-width: 34ch; }
.footer__h {
  font-family: var(--display); font-size: 0.78rem; font-stretch: 112%;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--chalk);
  margin-bottom: 1rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer__list a { color: var(--mist); font-size: 0.92rem; }
.footer__list a:hover { color: var(--brass-lit); }
.footer__bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  color: var(--dim); font-size: var(--t-xs);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer__legal a:hover { color: var(--mist); }
.social { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--mist);
}
.social a:hover { border-color: var(--brass); color: var(--brass-lit); }
.social svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   13. Legal / long-form pages
   -------------------------------------------------------------------------- */
.legal { max-width: 68ch; }
.legal h2 { font-size: var(--t-h3); margin: 2.5rem 0 0.9rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--mist); font-size: 0.96rem; }
.legal ul { padding-left: 1.1rem; display: grid; gap: 0.5rem; margin: 0 0 1rem; }

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .masthead__phone { display: none; }
}

@media (max-width: 1100px) {
  .searchbar__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .results { grid-template-columns: 1fr; }
  .filters { position: static; }
  .detail { grid-template-columns: 1fr; }
  .vdetail-info { grid-template-columns: 1fr; gap: 2.5rem; }
  .dpanel--sticky { position: static; }
}

/* Small laptops and iPad landscape: the logo, full nav and the CTA button
   together are wider than the viewport, which pushed the button off the right
   edge. Tighten the spacing rather than dropping anything from the header. */
@media (min-width: 961px) and (max-width: 1140px) {
  .masthead .shell { padding-inline: 1.25rem; }
  .masthead__bar { gap: 1rem; }
  .nav { gap: 0.8rem; }
  .nav__link { font-size: 0.75rem; }
  .masthead__cta .btn { padding-inline: 1rem; font-size: 0.74rem; letter-spacing: 0.06em; }
}

@media (max-width: 960px) {
  .nav, .masthead__phone { display: none; }
  .burger { display: flex; }
  .masthead__cta .btn { display: none; }
  /* The logo doesn't shrink, so on a narrow phone the 1.5rem bar gap pushed
     the burger past the right edge and made every page scroll sideways. */
  .masthead__bar { gap: 0.75rem; }
  .wordmark { min-width: 0; flex-shrink: 1; }
  .wordmark__text { min-width: 0; overflow: hidden; }
  .vgrid { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split--flip > *:first-child { order: 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats__cell:nth-child(2) { border-right: 0; }
  .stats__cell:nth-child(1), .stats__cell:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .stats__cell:nth-child(3) { padding-left: 0; }
  .stats__cell:nth-child(3), .stats__cell:nth-child(4) { padding-top: 1.5rem; }
}

/* Very narrow phones (iPhone SE and similar): scale the lockup down so the
   logo and the menu button both fit instead of forcing the page sideways. */
@media (max-width: 400px) {
  .shell { padding-inline: 14px; }
  .wordmark { gap: 0.45rem; }
  .wordmark__glyph { height: 38px; }
  .wordmark__text { font-size: 0.8rem; letter-spacing: 0.03em; }
  .wordmark__sub { font-size: 0.48rem; letter-spacing: 0.22em; }
  /* Buttons are nowrap with wide padding, so a long CTA label was wider than
     the column it sits in. Tighten it and let it wrap as a last resort. */
  .btn { padding-inline: 1rem; letter-spacing: 0.06em; white-space: normal; }
}

@media (max-width: 760px) {
  body { padding-bottom: 74px; }
  .actionbar { display: grid; }
  .searchbar { margin-top: 0; border: 0; border-top: 1px solid var(--line); padding-inline: 0; }
  .searchbar__grid { grid-template-columns: 1fr 1fr; }
  .searchbar .field--full { grid-column: 1 / -1; }
  .hero__inner { min-height: 78vh; }
  .form-grid { grid-template-columns: 1fr; }
  .plate--wide { grid-template-columns: repeat(2, 1fr); }
  .filters { display: none; }
  .filters[data-open="true"] { display: block; }
  .filter-toggle { display: inline-flex; }
  .footer__top { grid-template-columns: 1fr; }
  .drawer { inset-top: 74px; }
}

@media (max-width: 560px) {
  .vgrid, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .vcard__actions { grid-template-columns: 1fr; }
  .plate { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: unset; }
  .plate__cell { border-bottom: 1px solid var(--line-soft); }
  .plate__cell:nth-child(2n) { border-right: 0; padding-left: 0.6rem; }
  .plate--wide { grid-template-columns: repeat(2, 1fr); }
  .btn-row .btn { width: 100%; }
  .steps__item { grid-template-columns: 40px 1fr; gap: 0.85rem; }
}

/* --------------------------------------------------------------------------
   15. Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .masthead, .actionbar, .drawer, .footer, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
