/* Cars of Deal: static site styles (ported from the old Tailwind tokens) */
:root {
  --ink: #0a0a0a;
  --paper: #f6f4ef;
  --red: #c8102e;
  --line-soft: rgba(10, 10, 10, 0.12);
  --muted: #6b6b6b;
  --muted-on-ink: #a5a5a5;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body {
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--red); color: var(--paper); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.caption {
  font-size: 12px; line-height: 16px; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 500; color: var(--muted);
}
.mono-tag { font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.02em; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; line-height: 0.95; margin: 0; }
.italic { font-style: italic; }

/* nav */
.nav { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.nav .wrap { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; line-height: 1; }
.logo img { width: 32px; height: 32px; }
.logo span { font-family: var(--display); font-size: 24px; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a.caption:hover, .nav-links a.caption[aria-current="page"] { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--ink); color: var(--ink);
  font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-lg { padding: 14px 22px; font-size: 13px; }
.btn-red { background: var(--red); border-color: var(--red); color: var(--paper); }
.btn-red:hover { background: var(--ink); border-color: var(--ink); }

/* hero */
.hero { position: relative; border-bottom: 1px solid var(--line-soft); }
.hero-media { position: relative; width: 100%; min-height: 60vh; max-height: 100vh; overflow: hidden; background: var(--ink); }
@media (min-width: 768px) { .hero-media { min-height: 78vh; } }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(10,10,10,.85), rgba(10,10,10,.4) 50%, transparent); }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; color: var(--paper); padding-bottom: 32px; }
@media (min-width: 768px) { .hero-text { padding-bottom: 64px; } }
.hero-text .mono-tag { color: rgba(246,244,239,.8); margin-bottom: 16px; }
.hero h1 { font-size: 56px; }
@media (min-width: 640px) { .hero h1 { font-size: 88px; } }
@media (min-width: 768px) { .hero h1 { font-size: 120px; } }
.hero p { margin: 16px 0 0; max-width: 36rem; font-size: 16px; line-height: 28px; color: rgba(246,244,239,.85); }
@media (min-width: 768px) { .hero p { font-size: 18px; line-height: 32px; } }

/* sections */
.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.bordered { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.grid-12 { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) {
  .grid-12 { grid-template-columns: 5fr 7fr; }
}
.prose p { font-size: 18px; line-height: 32px; margin: 0 0 24px; }
.prose p:last-child { margin-bottom: 0; }
.page-head { border-bottom: 1px solid var(--line-soft); padding: 64px 0 48px; }
@media (min-width: 768px) { .page-head { padding-top: 96px; } }
.page-head .mono-tag { color: var(--muted); margin-bottom: 24px; }
.page-head h1 { font-size: 56px; max-width: 56rem; }
@media (min-width: 640px) { .page-head h1 { font-size: 88px; } }
@media (min-width: 768px) { .page-head h1 { font-size: 112px; } }
.page-head p.lede { margin: 24px 0 0; max-width: 40rem; font-size: 18px; line-height: 30px; color: var(--muted); }
h2.display-sm { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: -0.01em; margin: 0; }
@media (min-width: 768px) { h2.display-sm { font-size: 48px; } }
.muted { color: var(--muted); }

/* follow block (replaces the old signup form) */
.follow .wrap { display: grid; gap: 24px; align-items: end; }
@media (min-width: 768px) { .follow .wrap { grid-template-columns: 1fr auto; } }
.follow h2 { margin-top: 8px; }
.follow p { margin: 12px 0 0; color: var(--muted); max-width: 36rem; line-height: 26px; }

/* events */
.event-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.event-list:empty { display: none; }
.event { display: grid; gap: 8px; padding: 28px 0; border-bottom: 1px solid var(--line-soft); }
@media (min-width: 768px) { .event { grid-template-columns: 200px 1fr auto; align-items: baseline; gap: 24px; } }
.event h3 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0; }
.empty { padding: 48px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

/* footer */
.footer { background: var(--ink); color: var(--paper); margin-top: 32px; }
.footer .cols { display: grid; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 768px) { .footer .cols { grid-template-columns: repeat(3, 1fr); } }
.footer .logo span { color: var(--paper); }
.footer .logo img { width: 40px; height: 40px; }
.footer p { font-size: 14px; line-height: 24px; margin: 16px 0 0; }
.footer .blurb { color: var(--muted-on-ink); max-width: 20rem; }
.footer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer li + li { margin-top: 8px; }
.footer a:hover { color: var(--red); }
.footer .caption { margin-bottom: 12px; }
.footer .legal { border-top: 1px solid rgba(246,244,239,.15); }
.footer .legal .wrap { padding-top: 16px; padding-bottom: 16px; font-size: 12px; color: var(--muted-on-ink); }

@media (max-width: 420px) { .nav-links { gap: 16px; } .logo span { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { .hero-media video { display: none; } .hero-media { background: var(--ink) url("/video/hero-poster.jpg") center/cover; } }

/* cars archive */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { font: inherit; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500;
  padding: 6px 12px; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.car-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.car-card { display: flex; flex-direction: column; min-width: 0; }
.car-frame { position: relative; aspect-ratio: 4 / 3; background: #ebe8e1; overflow: hidden; }
.car-card[hidden] { display: none; }
.car-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.car-card:hover img { opacity: .88; }
.car-meta { padding-top: 12px; }
.car-meta h3 { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.1; margin: 4px 0 6px; }
.car-detail { padding: 32px 0 64px; }
.car-detail .back { display: inline-block; margin-bottom: 24px; }
.car-detail .back:hover { color: var(--ink); }
.car-detail-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .car-detail-grid { grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; } }
.car-hero { width: 100%; height: auto; background: #e8e5de; }
.car-title { font-size: 48px; margin-top: 6px; }
@media (min-width: 768px) { .car-title { font-size: 64px; } }
.car-text { margin: 24px 0 32px; }
.car-text p { font-size: 17px; line-height: 29px; }
.car-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line-soft); font-size: 14px; }
.car-pager a:hover { color: var(--red); }
@media (max-width: 520px) { .hide-sm { display: none; } }

.car-spec { font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.25; color: var(--muted); margin: 0 0 8px; }
.car-spec-lg { font-size: 24px; margin-top: 8px; }
@media (min-width: 900px) { .car-hero { max-height: 82vh; width: auto; max-width: 100%; } }

/* aligned card text: fixed line counts */
.car-meta h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-meta .car-spec { font-size: 17px; line-height: 22px; height: 44px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px; }
.car-meta .mono-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* phones / small tablets: keep 3 across, compact text */
@media (max-width: 760px) {
  .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .car-meta { padding-top: 8px; }
  .car-meta .caption { font-size: 10px; line-height: 14px; }
  .car-meta h3 { font-size: 20px; line-height: 24px; margin: 2px 0 4px; }
  .car-meta .car-spec { font-size: 13px; line-height: 17px; height: 34px; margin: 0 0 6px; }
  .car-meta .mono-tag { font-size: 10px; }
  .chips { gap: 6px; margin-bottom: 20px; }
  .chip { font-size: 10px; padding: 5px 8px; }
}
.logo span { white-space: nowrap; }
@media (max-width: 420px) { .logo img { width: 26px; height: 26px; } .logo span { font-size: 19px; } .nav-links .btn { padding: 5px 8px; } }

/* make filter: logo strip with arrows */
.brandbar { display: flex; align-items: stretch; gap: 8px; margin-bottom: 32px; }
.brand-track { flex: 1; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.brand-track::-webkit-scrollbar { display: none; }
.brand { flex: none; width: 88px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 6px; background: transparent; border: 1px solid var(--line-soft); cursor: pointer; font: inherit; color: var(--muted); }
.brand:hover { border-color: var(--ink); color: var(--ink); }
.brand.is-on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.brand.is-on .brand-mark img { filter: brightness(0) invert(1); }
.brand-mark { height: 36px; width: 100%; display: flex; align-items: center; justify-content: center; }
.brand-mark img { max-height: 36px; max-width: 64px; object-fit: contain; }
.brand-word { font-family: var(--display); font-size: 14px; line-height: 1.05; text-align: center; color: inherit; }
.brand-all { font-size: 22px; }
.brand-name { font-size: 10px; line-height: 12px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.brand-name em { font-style: normal; opacity: .55; }
.brand-arrow { flex: none; width: 44px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
  font-size: 30px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 4px; }
.brand-arrow:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.brand-arrow:disabled { opacity: .2; cursor: default; }
@media (max-width: 760px) {
  .brand { width: 64px; padding: 8px 4px; }
  .brand-mark { height: 28px; } .brand-mark img { max-height: 28px; max-width: 50px; }
  .brand-name { font-size: 9px; }
  .brand-arrow { width: 32px; font-size: 24px; }
}

/* homepage cars preview */
.home-cars { border-bottom: 1px solid var(--line-soft); }
.home-cars-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
@media (max-width: 760px) { .home-cars-head { flex-direction: column; align-items: flex-start; } }

.home-cars-title { margin-bottom: 28px; }
#cars { scroll-margin-top: 56px; }

/* homepage cars heading uses the page-head scale */
.page-head h2.display { font-size: 56px; max-width: 56rem; }
@media (min-width: 640px) { .page-head h2.display { font-size: 88px; } }
@media (min-width: 768px) { .page-head h2.display { font-size: 112px; } }
.home-cars { border-bottom: 0; }
