/* Classic Car Club of Nigeria
   Tokens carried over from the original design (dark surface, gold, green). */

:root {
  --bg: #131314;
  --bg-deep: #0e0e0f;
  --bg-raised: #1c1b1c;
  --bg-raised-2: #242324;
  --text: #e5e2e3;
  --text-muted: #d0c5af;
  --text-faint: #a39a86;
  --line: #4d4635;
  --line-soft: rgba(77, 70, 53, 0.55);
  --gold: #f2ca50;
  --gold-deep: #d4af37;
  --on-gold: #2b2100;
  --green: #b2cdbd;
  --green-deep: #344c40;
  --error: #ffb4ab;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 76px;
  --radius: 4px;
  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --header-h: 92px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.menu-open { overflow: hidden; }

main { flex: 1; padding-top: var(--header-h); }

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

a { color: var(--gold); text-underline-offset: 0.2em; }
a:hover { color: #ffe088; }

::selection { background: var(--gold); color: var(--on-gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--gold);
  color: var(--on-gold);
  padding: 0.6rem 1rem;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: 1.375rem; }

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

.lede {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40em;
  font-weight: 300;
}

.prose { max-width: 38em; }
.prose p { color: var(--text-muted); }
.prose h2 { margin: 2.5rem 0 0.75rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.prose h2:first-child { margin-top: 0; }

.source {
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-top: 0.75rem;
}
.source a { color: var(--text-faint); }
.source a:hover { color: var(--gold); }

.quote {
  margin: 2rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--gold-deep);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.35;
  color: var(--text);
}
.quote footer {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-top: 0.6rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--gold); color: var(--on-gold); }
.btn-primary:hover { background: #ffe088; color: var(--on-gold); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(212, 175, 55, 0.5); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

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

.text-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 202, 80, 0.4);
  padding-bottom: 2px;
}
.text-link:hover { border-bottom-color: var(--gold); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(14, 14, 15, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: 50%;
}

.brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.25s ease;
}
.brand:hover img { transform: rotate(-8deg); }

@media (min-width: 768px) {
  .brand img { width: 80px; height: 80px; }
}

/* Desktop nav: tablet landscape (1024px+) and wider screens. */
.nav-desktop { display: none; }

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.2vw, 2.25rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s;
}

.nav-desktop a:hover { color: var(--gold); }
.nav-desktop a:hover::after,
.nav-desktop a[aria-current="page"]::after { width: 100%; }
.nav-desktop a[aria-current="page"] { color: var(--gold); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-width: 48px;
  min-height: 48px;
  padding: 0 0.75rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius);
  font: 600 0.8125rem/1 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (min-width: 1024px) and (orientation: landscape), (min-width: 1280px) {
  .nav-desktop { display: block; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* Mobile menu: tablet portrait and smaller. */
.nav-mobile {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  background: var(--bg-deep);
  overflow-y: auto;
  padding: 1.5rem var(--gutter) 3rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.2s;
}

.nav-mobile.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s, transform 0.2s;
}

.nav-mobile ul { list-style: none; margin: 0; padding: 0; }

.nav-mobile li + li { border-top: 1px solid var(--line-soft); }

.nav-mobile ul a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.1rem);
  color: var(--text);
  text-decoration: none;
}
.nav-mobile ul a[aria-current="page"] { color: var(--gold); }
.nav-mobile ul a[aria-current="page"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.nav-mobile .nav-mobile-social {
  margin-top: 2rem;
  font-size: 1rem;
}
.nav-mobile-social a { color: var(--text-muted); text-decoration: none; }
.nav-mobile-social a:hover { color: var(--gold); }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-deep { background: var(--bg-deep); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2.25rem;
}
.section-head h2 { max-width: 18em; }

.page-head {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(52, 76, 64, 0.35), transparent 60%),
    var(--bg-deep);
}
.page-head h1 { margin-bottom: 1rem; }

.split {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
}

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

.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* The photo fills the whole hero. */
.hero-media { position: absolute; inset: 0; }
.hero-media picture,
.hero-media img { display: block; width: 100%; height: 100%; }
.hero-media img {
  object-fit: cover;
  object-position: 58% 72%; /* keeps the cars' wheels in frame on wide screens */
  transform-origin: 62% 70%;
}

/* Shading only where the text sits, so the cars stay bright. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 11, 0.55) 0%, rgba(10, 10, 11, 0.25) 35%, rgba(10, 10, 11, 0) 60%),
    linear-gradient(0deg, rgba(14, 14, 15, 0.95) 0%, rgba(14, 14, 15, 0.4) 16%, rgba(14, 14, 15, 0) 34%),
    linear-gradient(180deg, rgba(14, 14, 15, 0.6) 0%, rgba(14, 14, 15, 0) 20%);
}

/* While the car writes, the photo is dimmed; once the car has gone, it comes forward. */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 10, 11, 0.55);
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}
.js .hero:not(.intro-done) .hero-media::before { opacity: 1; }
.hero.intro-done .hero-media img { animation: hero-settle 7s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
@keyframes hero-settle { from { transform: scale(1.05); } }

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
/* A soft shadow behind the text block, wherever the column lands on wide screens. */
.hero-content::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(var(--gutter) - 12rem);
  width: min(58rem, 92vw);
  bottom: -4rem;
  height: 44rem;
  background: radial-gradient(closest-side, rgba(10, 10, 11, 0.78), rgba(10, 10, 11, 0.5) 55%, rgba(10, 10, 11, 0) 100%);
  pointer-events: none;
}
.hero .lede { max-width: 28em; }

.hero-kicker {
  font-size: 0.9375rem;
  color: var(--green);
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  font-size: clamp(2.8rem, 1.2rem + 7.6vw, 7rem);
  font-weight: 500;
  font-style: italic;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
/* Each span is one line, so the car can drive along its baseline. */
.hero h1 span { display: block; width: fit-content; white-space: nowrap; }
.hero h1 .bl { display: inline-block; width: 0; height: 0; vertical-align: baseline; }

.hero .lede { color: var(--text); opacity: 0.92; max-width: 30em; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }

/* Phones and portrait tablets: text at the top, cars visible below it. */
@media (orientation: portrait), (max-width: 699px) {
  .hero { justify-content: flex-start; }
  .hero-content { padding-bottom: 2rem; }
  .hero-media img { object-position: 67% 50%; transform-origin: 60% 75%; }
  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(10, 10, 11, 0.92) 0%, rgba(10, 10, 11, 0.82) 36%, rgba(10, 10, 11, 0.42) 54%, rgba(10, 10, 11, 0) 68%),
      linear-gradient(0deg, rgba(14, 14, 15, 0.85) 0%, rgba(14, 14, 15, 0) 14%);
  }
  .hero-content::before { display: none; }
}
@media (max-width: 699px) {
  .hero-media img { object-position: 56% 50%; }
}

/* ---------- Facts row (home) ---------- */

.facts {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.facts li { border-top: 1px solid var(--line); padding-top: 1rem; }
.facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.1;
}
.facts span { color: var(--text-muted); font-size: 0.9375rem; }

/* ---------- Activity list (home, events) ---------- */

.activity-list { list-style: none; margin: 0; padding: 0; }

.activity {
  display: grid;
  gap: 0.5rem 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line-soft);
}
.activity:last-child { border-bottom: 1px solid var(--line-soft); }

@media (min-width: 768px) {
  .activity { grid-template-columns: 13rem 1fr; }
}

.activity-when {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green);
}
.activity h3 { margin-bottom: 0.4rem; }
.activity p { color: var(--text-muted); max-width: 40em; }

/* ---------- Timeline (10 years) ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  max-width: 52rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.45rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-deep) 60%, var(--green-deep));
}

.timeline li {
  position: relative;
  padding: 0 0 2.75rem 2.75rem;
}
.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}
.timeline li.is-key::before { background: var(--gold); }

.timeline time {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1.2;
}
.timeline h3 { margin: 0.35rem 0 0.5rem; }
.timeline p { color: var(--text-muted); max-width: 38em; }

@media (min-width: 900px) {
  .timeline li { display: grid; grid-template-columns: 11rem 1fr; gap: 2rem; }
  .timeline time { padding-top: 0; }
  .timeline h3 { margin-top: 0.2rem; }
}

/* ---------- Car list ---------- */

.car-list { list-style: none; margin: 0; padding: 0; }
.car {
  display: grid;
  gap: 0.35rem 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-soft);
}
.car:last-child { border-bottom: 1px solid var(--line-soft); }
@media (min-width: 768px) {
  .car { grid-template-columns: minmax(12rem, 5fr) 7fr; }
}
.car h3 { font-size: 1.3rem; }
.car p { color: var(--text-muted); }

/* ---------- Press list ---------- */

.press-list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.press-list li { padding: 1.1rem 0; border-top: 1px solid var(--line-soft); }
.press-list li:last-child { border-bottom: 1px solid var(--line-soft); }
.press-list a { font-weight: 600; text-decoration: none; }
.press-list a:hover { text-decoration: underline; }
.press-list span { display: block; font-size: 0.875rem; color: var(--text-faint); margin-top: 0.2rem; }

/* ---------- Instagram grid ---------- */

.ig-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 700px) { .ig-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; } }
@media (min-width: 1024px) { .ig-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ig-grid[data-variant="strip"] > li:nth-child(n+7) { display: none; }
@media (min-width: 1024px) {
  .ig-grid[data-variant="strip"] > li:nth-child(n+7) { display: block; }
}

.ig-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-raised);
  cursor: pointer;
  color: var(--text);
  text-align: left;
}
.ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.ig-tile:hover img { transform: scale(1.04); }

.ig-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(14, 14, 15, 0.7);
}
.ig-badge svg { width: 16px; height: 16px; }
.ig-badge[hidden] { display: none; }

.ig-tile-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 0.75rem 0.75rem;
  background: linear-gradient(to top, rgba(14, 14, 15, 0.92), transparent);
  font-size: 0.8125rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s;
}
.ig-tile:hover .ig-tile-caption,
.ig-tile:focus-visible .ig-tile-caption { opacity: 1; }
@media (hover: none) { .ig-tile-caption { display: none; } }

.ig-skeleton {
  aspect-ratio: 1 / 1;
  background: linear-gradient(100deg, var(--bg-raised) 40%, var(--bg-raised-2) 50%, var(--bg-raised) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 2px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.ig-tile.is-new { animation: arrive 0.6s ease; }
@keyframes arrive { from { opacity: 0; transform: scale(0.96); } }

.ig-status {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin: 0;
}
.ig-status[data-state="error"] { color: var(--error); }

.ig-empty {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
}
.ig-empty p { max-width: 32em; margin-left: auto; margin-right: auto; }

/* ---------- Lightbox ---------- */

.lightbox {
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  background: var(--bg-raised);
  color: var(--text);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 8, 9, 0.88); }

.lightbox-inner {
  display: grid;
  max-height: inherit;
}
@media (min-width: 800px) {
  .lightbox-inner { grid-template-columns: 3fr 2fr; }
}

.lightbox-media {
  position: relative;
  background: #000;
  display: grid;
  place-items: center;
  min-height: 240px;
  max-height: 60vh;
}
@media (min-width: 800px) { .lightbox-media { max-height: calc(100vh - 2rem); aspect-ratio: 1 / 1; } }
.lightbox-media img,
.lightbox-media video {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: contain;
}

.lightbox-step {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 14, 15, 0.75);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lightbox-step svg { width: 20px; height: 20px; }
.lightbox-step[data-dir="-1"] { left: 0.75rem; }
.lightbox-step[data-dir="1"] { right: 0.75rem; }
.lightbox-step[hidden] { display: none; }

.lightbox-count {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8125rem;
  background: rgba(14, 14, 15, 0.75);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.lightbox-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lightbox-body time { font-size: 0.875rem; color: var(--green); }
.lightbox-caption { white-space: pre-line; color: var(--text-muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.lightbox-body .btn { align-self: flex-start; margin-top: auto; }

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 14, 15, 0.8);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lightbox-close svg { width: 20px; height: 20px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: 4rem; } }

.contact-card {
  padding: 1.5rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.contact-card + .contact-card { margin-top: 1rem; }
.contact-card h2 { font-size: 1.375rem; margin-bottom: 0.5rem; }
.contact-card p { color: var(--text-muted); }

.form {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  background: var(--bg-raised);
}
.form h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.form > p { color: var(--text-muted); }

.field { margin-top: 1.25rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.field label .opt { font-weight: 400; color: var(--text-faint); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  background: var(--bg-deep);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(242, 202, 80, 0.2); }
.field input::placeholder, .field textarea::placeholder { color: #6f6858; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 0.8125rem; color: var(--text-faint); margin-top: 1rem; }

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}
.form-status:empty { display: none; }
.form-status[data-state="ok"] { background: rgba(52, 76, 64, 0.5); color: var(--green); }
.form-status[data-state="error"] { background: rgba(147, 0, 10, 0.25); color: var(--error); }

/* ---------- CTA band ---------- */

.cta-band {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band .btn-row { margin-top: 0; }
.cta-band h2 { margin-bottom: 0.75rem; }

/* ---------- 404 ---------- */

.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem var(--gutter);
}
.not-found svg { width: 128px; height: 128px; margin: 0 auto 1.5rem; }
.not-found p { color: var(--text-muted); max-width: 30em; margin: 1rem auto 0; }
.not-found .btn-row { justify-content: center; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line-soft);
  padding: 2rem 0;
  font-size: 0.9375rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { margin: 0; color: var(--text-faint); font-size: 0.875rem; }

.icon-inline { width: 1.1em; height: 1.1em; vertical-align: -0.15em; margin-right: 0.35em; }

/* ---------- Home intro: the car drives along the headline and writes it ----------
   assets/js/intro.js moves the car and reveals each line behind its rear bumper.
   Without JavaScript (or with reduced motion) the headline simply shows. */

.hero-car-wrap {
  position: absolute;
  left: 0;
  top: 0;
  width: 200px;
  pointer-events: none;
  visibility: hidden;
  will-change: transform;
  z-index: 2;
}
.hero-car-wrap.is-placed { visibility: visible; }

.hero-car { display: block; width: 100%; height: auto; overflow: visible; }

.car-shell { fill: rgba(14, 14, 15, 0.82); stroke: var(--gold); stroke-width: max(2.5, calc(var(--u, 1) * 1.6)); stroke-linejoin: round; }
.car-glass { fill: rgba(178, 205, 189, 0.08); stroke: var(--gold-deep); stroke-width: max(1.5, calc(var(--u, 1) * 1)); stroke-linejoin: round; }
.car-line { fill: none; stroke: var(--gold-deep); stroke-width: max(1.5, calc(var(--u, 1) * 1)); stroke-linecap: round; }
.car-chrome { fill: none; stroke: var(--text); stroke-width: max(5, calc(var(--u, 1) * 2.2)); stroke-linecap: round; opacity: 0.85; }
.car-tail { fill: #e0625a; }
.car-lamp { fill: #fff4cf; stroke: var(--gold); stroke-width: 1.5; }
.car-glow { opacity: 0.4; }
.car-tyre { fill: #0b0b0c; stroke: var(--gold); stroke-width: max(2, calc(var(--u, 1) * 1.3)); }
.car-whitewall { fill: none; stroke: var(--text); stroke-width: max(5, calc(var(--u, 1) * 2)); opacity: 0.75; }
.car-hub { fill: #1c1b1c; stroke: var(--gold); stroke-width: max(2, calc(var(--u, 1) * 1)); }
.car-spokes line { stroke: var(--gold-deep); stroke-width: max(2, calc(var(--u, 1) * 1)); }
.car-cap { fill: var(--gold); }

.car-wheel { transform-box: fill-box; transform-origin: center; }
.car-body { transform-box: fill-box; transform-origin: 50% 100%; }
.car-puff { fill: rgba(229, 226, 227, 0.35); opacity: 0; transform-box: fill-box; transform-origin: center; }

.hero-car-wrap.is-driving .car-puff { animation: puff 0.7s ease-out infinite; }
.hero-car-wrap.is-driving .car-puff:nth-child(2) { animation-delay: 0.23s; }
.hero-car-wrap.is-driving .car-puff:nth-child(3) { animation-delay: 0.46s; }
.hero-car-wrap.is-driving .car-glow { opacity: 0.6; }

/* Before the car has written it, the headline is hidden; the rest waits for the car. */
.js .hero:not(.intro-written) h1 span { clip-path: inset(-30% 100% -40% -12%); }
.js .hero:not(.intro-written) .lede,
.js .hero:not(.intro-written) .btn-row { opacity: 0; transform: translateY(14px); }
.hero .lede,
.hero .btn-row { transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hero .btn-row { transition-delay: 0.15s; }
.hero-kicker { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }

/* Safety net: if the script never runs, show everything after a few seconds. */
.js .hero:not(.intro-written) h1 span { animation: intro-failsafe-clip 0s 7s forwards; }
.js .hero:not(.intro-written) .lede,
.js .hero:not(.intro-written) .btn-row { animation: intro-failsafe-fade 0s 7s forwards; }
.js .hero:not(.intro-done) .hero-media::before { animation: intro-failsafe-fade-out 0s 7s forwards; }
@keyframes intro-failsafe-fade-out { to { opacity: 0; } }
@keyframes intro-failsafe-clip { to { clip-path: none; } }
@keyframes intro-failsafe-fade { to { opacity: 1; transform: none; } }

@keyframes settle {
  0% { transform: none; }
  35% { transform: translateY(2px) rotate(0.8deg); }
  70% { transform: translateY(-1px) rotate(-0.3deg); }
  100% { transform: none; }
}
@keyframes puff {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  30% { opacity: 0.6; }
  100% { opacity: 0; transform: translate(-40px, -10px) scale(2.2); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Our cars ---------- */

.car-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.car-search {
  position: relative;
  flex: 1 1 22rem;
  max-width: 40rem;
}
.car-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.car-search input {
  width: 100%;
  min-height: 54px;
  padding: 0.8rem 1rem 0.8rem 2.9rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1.0625rem;
}
.car-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 202, 80, 0.2); }
.car-search input::placeholder { color: #7a7362; }

.car-suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg-raised);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  max-height: 22rem;
  overflow-y: auto;
}
.car-suggest[hidden] { display: none; }
.car-suggest li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: 3px;
  cursor: pointer;
}
.car-suggest li[aria-selected="true"],
.car-suggest li:hover { background: var(--bg-raised-2); }
.car-suggest li[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--gold); }
.car-suggest .s-label { color: var(--text); }
.car-suggest .s-type { font-size: 0.8125rem; color: var(--text-faint); white-space: nowrap; }
.car-suggest mark { background: none; color: var(--gold); font-weight: 700; }

.car-sort { display: flex; flex-direction: column; gap: 0.35rem; }
.car-sort label { font-size: 0.875rem; font-weight: 600; }
.car-sort select {
  min-height: 54px;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.car-count { margin: 1rem 0 0; font-size: 0.9375rem; color: var(--text-faint); min-height: 1.5em; }

.car-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
  align-items: start;
}

.car-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.car-card:hover, .car-card:focus-within { border-color: rgba(212, 175, 55, 0.55); }
.car-card[hidden] { display: none; }
.car-card.is-match { animation: pulse-border 1.6s ease; }
@keyframes pulse-border { 0%, 60% { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 202, 80, 0.25); } }

.car-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg-deep); }
.car-photo img { width: 100%; height: 100%; object-fit: cover; }
.car-photo-count {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(14, 14, 15, 0.78);
}

.car-body-text { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.35rem; }
.car-year { font-size: 0.9375rem; font-weight: 700; color: var(--gold); margin: 0; }
.car-card h3 { font-size: 1.35rem; }
.car-open {
  all: unset;
  cursor: pointer;
  color: var(--text);
}
.car-open::after { content: ""; position: absolute; inset: 0; }
.car-open:focus-visible { outline: none; }
.car-open:focus-visible::after { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 6px; }
.car-nickname { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--green); margin: 0; }
.car-owner { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
.car-history {
  font-size: 0.9375rem;
  color: var(--text-faint);
  margin: 0.35rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.car-skeleton { min-height: 20rem; border-radius: 6px; background: linear-gradient(100deg, var(--bg-raised) 40%, var(--bg-raised-2) 50%, var(--bg-raised) 60%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

.car-message {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
  color: var(--text-muted);
}
.car-message .btn-row { justify-content: center; margin-top: 1.25rem; }

/* Car detail dialog */
.car-dialog {
  width: min(1040px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  background: var(--bg-raised);
  color: var(--text);
}
.car-dialog::backdrop { background: rgba(8, 8, 9, 0.88); }
.car-dialog-inner { display: grid; }
@media (min-width: 860px) { .car-dialog-inner { grid-template-columns: 3fr 2fr; } }
.car-dialog-inner.no-photos { grid-template-columns: 1fr; }

.car-gallery { background: #000; display: flex; flex-direction: column; }
.car-gallery-main { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.car-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.car-thumbs { display: flex; gap: 0.4rem; padding: 0.5rem; overflow-x: auto; list-style: none; margin: 0; }
.car-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 3px; background: none; cursor: pointer; flex: none; }
.car-thumbs button[aria-current="true"] { border-color: var(--gold); }
.car-thumbs img { width: 72px; height: 54px; object-fit: cover; display: block; }

.car-detail { padding: 1.5rem; overflow-y: auto; max-height: calc(100dvh - 2rem); }
.car-detail h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); padding-right: 2.5rem; }
.car-detail .car-nickname { margin-top: 0.4rem; }
.car-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.25rem; margin: 1.25rem 0; font-size: 0.9375rem; }
.car-facts dt { color: var(--text-faint); }
.car-facts dd { margin: 0; color: var(--text); }
.car-detail-history { white-space: pre-line; color: var(--text-muted); overflow-wrap: anywhere; }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .hero:not(.intro-written) h1 span { clip-path: none; }
  .js .hero:not(.intro-written) .lede,
  .js .hero:not(.intro-written) .btn-row { opacity: 1; transform: none; }
  .js .hero:not(.intro-done) .hero-media::before { opacity: 0; }
  .hero.intro-done .hero-media img { animation: none !important; }
  .hero-kicker, .car-body, .car-puff { animation: none !important; }
  .car-puff { display: none; }
  .car-glow { animation: none !important; opacity: 0.4; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
