/* ==========================================================================
   DRIVE ID — Public vehicle page (mobile-first)
   Guide D2 / §6: this is screen #1. A stranger, on 4G, with eight seconds.
   Nothing owner-only is in this stylesheet or its page — no dashboard, no
   analytics, no editing chrome. Those live behind auth and load separately.
   ========================================================================== */

.scan-shell { max-width: 620px; margin-inline: auto; }

/* --- Hero ------------------------------------------------------------------
   Above the fold on a phone: photo, name, identity line, key specs, actions. */
.car-hero .photo {
  aspect-ratio: 4 / 3;
  border-radius: 0;
  border-left: 0; border-right: 0; border-top: 0;
}
@media (min-width: 620px) {
  .car-hero .photo { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); border: 1px solid var(--border); }
  .scan-shell { padding-top: var(--sp-5); }
}

.car-id { padding: var(--sp-5); }
.car-id h1 {
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-2);
}
.car-id .identity {
  color: var(--text-muted);
  font-size: var(--step--1);
  margin-bottom: var(--sp-4);
}
.car-id .identity strong { color: var(--text); font-weight: 600; }

.car-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }

/* --- Headline specs --------------------------------------------------------
   Four numbers, big. This is what a stranger actually wants to know. */
.headline-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-block: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}
@media (min-width: 520px) { .headline-specs { grid-template-columns: repeat(4, 1fr); } }
.headline-specs div { background: var(--bg); padding: var(--sp-4); text-align: center; }
.headline-specs dt {
  font-size: var(--step--1); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--sp-1);
}
.headline-specs dd {
  margin: 0; font-size: var(--step-1); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}

/* --- Actions --------------------------------------------------------------- */
.car-actions { display: grid; gap: var(--sp-3); padding: 0 var(--sp-5) var(--sp-5); }
@media (min-width: 460px) { .car-actions { grid-template-columns: 1fr 1fr; } }

/* --- Social links ---------------------------------------------------------- */
.social {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  padding: 0 var(--sp-5) var(--sp-6);
}
.social a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px; padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); text-decoration: none;
  font-size: var(--step--1); font-weight: 600;
}
.social a:hover { background: var(--surface-2); }

/* --- Sections below the fold ----------------------------------------------- */
.car-section { padding: var(--sp-6) var(--sp-5); border-top: 1px solid var(--border); }
.car-section h2 {
  font-size: var(--step-1);
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4);
}
.car-section h2 a { font-size: var(--step--1); color: var(--text-muted); font-weight: 500; }

.story p { color: var(--text-muted); }
.story p:first-of-type { color: var(--text); }

/* --- Timeline (spec §5.4 component 4) -------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 var(--sp-5) var(--sp-6);
  border-left: 1px solid var(--border);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--fill-primary);
}
.timeline li.past::before { background: var(--border-strong); }
.timeline .when {
  display: block; font-size: var(--step--1); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--sp-1);
}
.timeline .what { font-weight: 600; }

/* --- Gallery strip --------------------------------------------------------- */
.gallery {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: 72%;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-2);
}
@media (min-width: 620px) { .gallery { grid-auto-columns: 46%; } }
.gallery .photo { aspect-ratio: 4 / 3; scroll-snap-align: start; }

/* --- Owner card ------------------------------------------------------------ */
.owner { display: flex; align-items: center; gap: var(--sp-4); }
.owner .avatar {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.owner .who { font-weight: 600; }
.owner .since { font-size: var(--step--1); color: var(--text-muted); }

/* --- Privacy note ---------------------------------------------------------- */
.privacy-note {
  font-size: var(--step--1); color: var(--text-muted);
  padding: var(--sp-5); border-top: 1px solid var(--border);
}

/* --- Footer CTA ------------------------------------------------------------ */
.car-footer {
  padding: var(--sp-7) var(--sp-5) var(--sp-8);
  border-top: 1px solid var(--border);
  text-align: center;
}
.car-footer h2 { font-size: var(--step-1); }
.car-footer p { color: var(--text-muted); max-width: 40ch; margin-inline: auto; }
