/* Home page. Tokens and components come from app.css. */

/* Full-bleed dark hero. The search panel below is pulled up into its lower edge with a negative margin so
   it genuinely straddles the hero/page seam (not just "a card sitting underneath a dark block") — the
   classic premium-marketplace tell that says "serious product," not "form on a white page." */
.hero { background: linear-gradient(165deg, var(--navy-950) 0%, var(--navy-900) 46%, var(--navy-800) 100%); color: #fff; position: relative; overflow: hidden; padding-top: clamp(2.25rem, 4.5vw, 4rem); padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0); background-size: 28px 28px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%); pointer-events: none; }
@media (min-width: 60rem) { .hero::after { content: ""; position: absolute; top: -10%; right: -6%; width: 46%; height: 120%; background: linear-gradient(200deg, var(--navy-700), rgba(16, 43, 79, 0)); transform: skewX(-13deg); transform-origin: top; pointer-events: none; } }
.hero .container { position: relative; }
.hero__grid { display: grid; gap: var(--s-8); align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 var(--s-5); padding: 0.3rem 0.85rem; border-radius: var(--r-pill); background: rgba(245, 165, 36, 0.14); border: 1px solid rgba(245, 165, 36, 0.3); color: var(--amber-500); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hero__title { font-size: var(--fs-display); line-height: 1.02; max-width: 19ch; }
.hero__title, .hero h1 { color: #fff; }
.hero__lead { margin: var(--s-5) 0 0; max-width: 40ch; font-size: var(--fs-lg); color: rgba(255, 255, 255, 0.74); }
.hero__catlinks { display: flex; flex-wrap: wrap; gap: var(--s-6) var(--s-8); margin: var(--s-8) 0 0; padding-top: var(--s-6); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.hero__catlinks a { display: flex; flex-direction: column; gap: 0.3rem; color: rgba(255, 255, 255, 0.92); text-decoration: none; }
.hero__catlinks a:hover { color: #fff; }
.hero__catlinks a span:first-of-type { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-brand); font-weight: 800; font-size: 1.375rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero__catlinks .icon { width: 1rem; height: 1rem; color: var(--blue-300); }
.hero__catlinks .cat-label { font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.6); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.hero__spot { display: none; position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-3); text-decoration: none; color: #fff; aspect-ratio: 4 / 3; background: var(--navy-700); outline-offset: 4px; }
.hero__spot picture { display: block; height: 100%; }
.hero__spot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
@media (prefers-reduced-motion: no-preference) { .hero__spot:hover img { transform: scale(1.04); } }
.hero__spot-caption { position: absolute; inset: auto 0 0 0; display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); align-items: end; padding: var(--s-6) var(--s-5) var(--s-4); background: linear-gradient(to top, rgba(6, 18, 36, 0.9), rgba(6, 18, 36, 0) 75%); }
.hero__spot-caption .badge { grid-column: 1 / -1; justify-self: start; }
.hero__spot-title { font-weight: 650; font-size: var(--fs-md); line-height: 1.3; }
.hero__spot-price { font-family: var(--font-brand); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-12); }
  .hero__spot { display: block; }
}

/* Search panel — pulled up into the hero's bottom edge so it straddles the dark/light seam. */
.search-panel { position: relative; margin: calc(-1 * clamp(2.5rem, 5.5vw, 4rem)) 0 var(--s-5); background: #fff; color: var(--ink-900); border-radius: var(--r-lg); padding: var(--s-4); box-shadow: 0 30px 60px -20px rgba(6, 18, 36, 0.45), 0 2px 6px rgba(6, 18, 36, 0.08); border: 1px solid var(--line); }
.segmented { display: inline-flex; padding: 0.2rem; gap: 0.125rem; background: var(--surface); border-radius: var(--r-md); margin-bottom: var(--s-3); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 1rem; border-radius: var(--r-sm); font-weight: 600; font-size: var(--fs-sm); color: var(--ink-500); transition: background-color 0.15s var(--ease), color 0.15s var(--ease); }
.segmented input:checked + span { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-panel__grid { display: grid; gap: var(--s-3); grid-template-columns: 1fr 1fr; }
.search-panel__grid > .search-panel__submit { grid-column: 1 / -1; }
@media (max-width: 21.99rem) { .search-panel__grid { grid-template-columns: 1fr; } }
.sfield label { display: block; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-500); margin-bottom: 0.3rem; letter-spacing: 0.02em; }
.search-panel__submit { width: 100%; }
.search-panel__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6); margin: var(--s-4) 0 0; font-size: var(--fs-sm); }
.search-panel__foot[hidden] { display: none; } /* display: flex above has the same specificity as the UA [hidden] rule and would otherwise win, same gotcha as .tabs__panel[hidden] */
.search-panel__foot a { font-weight: 600; text-decoration: none; }
.search-panel__foot a:hover { text-decoration: underline; }
.search-panel__popular { display: inline-flex; flex-wrap: wrap; gap: 0.25rem var(--s-4); align-items: center; }
@media (min-width: 48rem) {
  .search-panel { padding: var(--s-4) var(--s-5); }
}
@media (min-width: 64rem) {
  .search-panel__grid { grid-template-columns: 1.1fr 1.1fr 0.9fr 1.2fr auto; align-items: end; }
  .search-panel__grid > .search-panel__submit { grid-column: auto; width: auto; min-width: 11rem; }
}

/* Featured spotlight: one lead story + a compact list beside it, instead of N identical cards in a row —
   the uniform-grid repetition is exactly the "generic SaaS" tell the redesign brief called out. Reuses
   .vcard/vehicle_card.php unmodified; only the surrounding layout and a couple of contextual size overrides
   differ, so every other .vcard usage (search, dashboard, similar listings) is untouched. */
.spotlight { display: grid; gap: var(--s-5); }
.spotlight__lead .vcard__media { aspect-ratio: 4 / 3; }
.spotlight__lead .price { font-size: 1.75rem; }
.spotlight__lead .vcard__title { font-size: 1.125rem; -webkit-line-clamp: 1; }
.spotlight__list { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.spotlight__list .vcard { flex-direction: row; align-items: stretch; box-shadow: none; background: transparent; }
.spotlight__list .vcard:hover { box-shadow: none; }
@media (prefers-reduced-motion: no-preference) { .spotlight__list .vcard:hover { transform: none; } .spotlight__list .vcard:hover .vcard__media img { transform: scale(1.06); } }
.spotlight__list .vcard__media { width: 7.5rem; aspect-ratio: 4 / 3; flex: none; border-radius: var(--r-md); }
.spotlight__list .vcard__media::after { display: none; }
.spotlight__list .vcard__badges,
.spotlight__list .vcard__count { display: none; }
.spotlight__list .vcard__save { width: 1.75rem; height: 1.75rem; top: var(--s-2); right: var(--s-2); }
.spotlight__list .vcard__body { padding: 0 0 0 var(--s-4); gap: 0.15rem; justify-content: center; }
.spotlight__list .price { font-size: 1.125rem; }
.spotlight__list .vcard__title { font-size: var(--fs-sm); font-weight: 600; -webkit-line-clamp: 1; }
.spotlight__list .specs { display: none; }
.spotlight__list .vcard__meta { border-top: 0; padding-top: 0; margin-top: 0.2rem; }
.spotlight__list > li + li { border-top: 1px solid var(--line); padding-top: var(--s-3); }
@media (min-width: 56rem) {
  .spotlight { grid-template-columns: 1.05fr 1fr; align-items: start; }
}

/* Trust strip — a single quiet inline row, not four card-boxes pretending to be a feature grid. */
.trust { padding: var(--s-6) 0 0; border-bottom: 1px solid var(--line); margin-bottom: var(--s-2); }
.trust__grid { display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-8); padding-bottom: var(--s-5); }
.trust__item { display: flex; gap: var(--s-3); align-items: center; flex: 1 1 14rem; }
.trust__icon { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: var(--r-sm); background: var(--blue-50); color: var(--blue-600); }
.trust__icon .icon { width: 1.1rem; height: 1.1rem; }
.trust__item h2 { font-size: var(--fs-sm); font-weight: 650; letter-spacing: -0.005em; margin-bottom: 0; }
.trust__item p { display: none; } /* the heading alone carries this inline row; the fuller copy was redundant at a glance */

/* Sections */

/* Body-type tiles — smaller, denser, no decorative blob (it served no purpose beyond decoration). */
.tiles { list-style: none; display: grid; gap: var(--s-3); grid-template-columns: repeat(3, 1fr); }
.tile:hover { border-color: var(--navy-900); color: var(--ink-900); }
.tile .tile__icon { flex: none; width: 1.75rem; height: 1.75rem; stroke-width: 1.6; color: var(--navy-700); }
.tile:hover .tile__icon { color: var(--amber-600); }
/* Motorbike/bicycle tiles reuse the single category icon (no dedicated per-style art yet — see
   docs/KNOWN_LIMITATIONS.md). Same box size as the car body-type glyphs now — no longer needs a special case. */
.tile .tile__icon--category { width: 1.75rem; height: 1.75rem; }
.tile__text { display: flex; flex-direction: column; min-width: 0; }
.tile__label { font-weight: 650; font-size: var(--fs-sm); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__count { font-size: var(--fs-xs); color: var(--ink-500); }
@media (min-width: 30rem) { .tiles { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 64rem) { .tiles { grid-template-columns: repeat(8, 1fr); } }

/* Popular makes — brand-mark carousel */
/* A horizontally-scrolling rail of real brand marks (see docs/MEDIA_STRATEGY.md §9 for sourcing/licensing),
   not the old plain-text index. Native scroll-snap carries all the real behaviour (works with JS off,
   trackpad/touch/wheel all just work); the prev/next buttons in app.js are a desktop-pointer convenience
   layered on top, hidden until JS confirms there's something to scroll to. */
.brand-rail { position: relative; margin-inline: calc(-1 * var(--gutter)); }
.brand-rail__track {
  display: flex; gap: var(--s-4); overflow-x: auto; list-style: none;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  padding: var(--s-1) var(--gutter) var(--s-4); scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.brand-rail__track::-webkit-scrollbar { display: none; }
.brand-card { flex: 0 0 auto; scroll-snap-align: start; }
.brand-card__link {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  width: 8.5rem; height: 100%; padding: var(--s-5) var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.brand-card__mark { display: flex; align-items: center; justify-content: center; height: 2.75rem; width: 100%; }
.brand-card__mark img { max-height: 100%; max-width: 100%; object-fit: contain; }
.brand-card__mark--text {
  height: 2.75rem; width: 2.75rem; border-radius: var(--r-pill); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-brand);
  font-weight: 760; font-size: var(--fs-md); color: var(--ink-500); letter-spacing: 0.02em;
}
.brand-card__name { font-size: var(--fs-sm); font-weight: 650; color: var(--ink-900); text-align: center; line-height: 1.2; }
.brand-card__count { font-size: var(--fs-xs); color: var(--ink-500); font-variant-numeric: tabular-nums; }
.brand-card__count--none { color: var(--ink-400); }
.brand-rail__track:focus-visible { outline-offset: -3px; }
.brand-card__link:hover, .brand-card__link:focus-visible {
  transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--blue-300);
}
@media (prefers-reduced-motion: reduce) { .brand-card__link { transition: none; } }

.brand-rail__nav {
  display: none; position: absolute; top: 50%; translate: 0 -50%; z-index: 1;
  height: 2.75rem; width: 2.75rem; border-radius: var(--r-pill); background: #fff;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); color: var(--ink-700);
  align-items: center; justify-content: center; cursor: pointer;
}
.brand-rail__nav:hover { color: var(--blue-700); border-color: var(--blue-300); }
.brand-rail__nav--prev { left: var(--s-2); }
.brand-rail__nav--next { right: var(--s-2); }
@media (min-width: 64rem) {
  .brand-rail__nav:not([hidden]) { display: flex; }
  .brand-rail__track { padding-inline: var(--s-10); }
}

/* Sell / dealer band */
.cta-band { background: var(--navy-900); color: #fff; padding: var(--section-y) 0; }
.cta-band h2 { color: #fff; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 760; letter-spacing: -0.03em; }
.cta-band__grid { display: grid; gap: var(--s-8); align-items: center; }
.cta-band__lead { margin: var(--s-3) 0 var(--s-6); color: rgba(255, 255, 255, 0.78); font-size: var(--fs-lg); max-width: 44ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
/* .steps / .steps__n base rules promoted to app.css — used on both home.php and sell/landing.php. */
@media (min-width: 60rem) { .cta-band__grid { grid-template-columns: 1fr 1fr; gap: var(--s-16); } }

/* Safety tips — a plain row per tip (icon + heading + copy inline), not four bordered feature-cards. */
.tips { list-style: none; display: grid; gap: var(--s-5) var(--s-8); grid-template-columns: 1fr; }
.tip { display: flex; gap: var(--s-4); align-items: flex-start; }
.tip__icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: var(--r-sm); background: var(--blue-50); color: var(--blue-600); }
.tip h3 { margin-bottom: 0.2rem; font-size: var(--fs-md); }
.tip p { margin: 0; font-size: var(--fs-sm); color: var(--ink-500); }
.tip p a { font-weight: 600; white-space: nowrap; }
@media (min-width: 40rem) { .tips { grid-template-columns: repeat(2, 1fr); } }

/* FAQ: an intro column beside three short groups of native <details> rows. No script. */
.faq { display: grid; gap: var(--s-8); }
.faq__intro h2 { max-width: 22ch; }
.faq__intro p { margin: var(--s-4) 0 0; color: var(--ink-500); max-width: 46ch; }
.faq__more { margin-top: var(--s-6); }
.faq__groups { display: grid; gap: var(--s-8); min-width: 0; }
.faq__group h3 { margin: 0 0 var(--s-3); font-size: var(--fs-sm); font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy-700); }
.faq__list { background: #fff; border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 3.25rem; padding: var(--s-3) var(--s-5); font-weight: 620; color: var(--ink-900); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface); }
.faq summary:focus-visible { outline-offset: -3px; }
.faq summary::after { content: ""; width: 0.55rem; height: 0.55rem; flex: none; border-right: 2px solid var(--navy-700); border-bottom: 2px solid var(--navy-700); transform: rotate(45deg); margin-top: -0.2rem; }
.faq details[open] > summary { color: var(--navy-800); }
.faq details[open] > summary::after { transform: rotate(-135deg); margin-top: 0.2rem; }
.faq__answer { padding: 0 var(--s-5) var(--s-5); }
.faq__answer p { margin: 0; color: var(--ink-700); line-height: 1.65; max-width: 68ch; }
.faq__answer a { font-weight: 560; }
@media (prefers-reduced-motion: no-preference) {
  .faq summary::after { transition: transform 0.2s var(--ease); }
  .faq details[open] > .faq__answer { animation: faq-open 0.2s var(--ease); }
}
@keyframes faq-open { from { opacity: 0; transform: translateY(-0.25rem); } to { opacity: 1; transform: none; } }
@media (min-width: 60rem) {
  .faq { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-12); align-items: start; }
  .faq__intro { position: sticky; top: var(--s-8); }
}
