/* Pacific & Main Auto Co. — design tokens & shared styles
   Palette: haze (marine-layer morning), asphalt ink, California-poppy accent,
   golden-hour brass. Type: Archivo display / Public Sans body / IBM Plex Mono data. */

:root {
  --haze:      #EFF2F4;
  --asphalt:   #1A222B;
  --ink-soft:  #45505B;
  --poppy:     #D95A1E;
  --poppy-dk:  #B94812;
  --brass:     #C8A85E;
  --concrete:  #D8DDE0;
  --card:      #FDFDFC;
  --ok:        #2E7D4F;

  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(26,34,43,.06), 0 12px 32px -16px rgba(26,34,43,.18);
  --shadow-lift: 0 2px 4px rgba(26,34,43,.08), 0 20px 44px -18px rgba(26,34,43,.28);
  --maxw: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--haze);
  color: var(--asphalt);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--poppy); outline-offset: 2px; border-radius: 2px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.04; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 900; letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; font-weight: 700; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--poppy);
  font-weight: 600;
}

.muted { color: var(--ink-soft); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(239,242,244,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--concrete);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo {
  font-family: var(--font-display); font-weight: 900; font-size: 1.02rem;
  letter-spacing: .06em; text-decoration: none; white-space: nowrap;
}
.logo .amp { color: var(--poppy); }
.logo small {
  display: block; font-family: var(--font-mono); font-weight: 400;
  font-size: .58rem; letter-spacing: .3em; color: var(--ink-soft);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: .92rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--asphalt); border-bottom-color: var(--poppy); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1.5px solid var(--concrete);
  border-radius: 7px; font-size: 1.15rem; line-height: 1; padding: 7px 11px; cursor: pointer; color: var(--asphalt);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: 12px 22px; border-radius: 8px; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary { background: var(--poppy); color: #fff; }
.btn-primary:hover { background: var(--poppy-dk); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--asphalt); color: var(--asphalt); background: transparent; }
.btn-ghost:hover { background: var(--asphalt); color: var(--haze); }
.btn-small { padding: 8px 14px; font-size: .85rem; }

/* ---------- window sticker (signature element) ---------- */
.sticker {
  font-family: var(--font-mono); font-size: .8rem;
  background: var(--card); border: 1px solid var(--concrete); border-radius: 6px;
  box-shadow: var(--shadow);
}
.sticker-row {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 7px 12px; border-bottom: 1px dashed var(--concrete);
}
.sticker-row:last-child { border-bottom: 0; }
.sticker-row .k { color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; padding-top: 2px; }
.sticker-row .v { font-weight: 600; text-align: right; }
.sticker-head {
  padding: 8px 12px; border-bottom: 2px solid var(--asphalt);
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 8vw, 96px) 0 clamp(36px, 6vw, 72px); position: relative; overflow: hidden; }
.hero::before {
  /* golden-hour cut: low-sun band across the header */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 46%, rgba(200,168,94,.16) 46%, rgba(217,90,30,.10) 72%, transparent 72%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: clamp(24px, 5vw, 64px); align-items: end; position: relative; }
.hero h1 { margin: 14px 0 18px; }
.hero h1 .accent { color: var(--poppy); }
.hero p.lead { font-size: 1.15rem; max-width: 34em; margin: 0 0 26px; color: var(--ink-soft); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-sticker { max-width: 330px; justify-self: end; width: 100%; }

/* ---------- sections ---------- */
.section { padding: clamp(40px, 7vw, 84px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head p { margin: 6px 0 0; }
.band { background: var(--card); border-top: 1px solid var(--concrete); border-bottom: 1px solid var(--concrete); }
.band-dark { background: var(--asphalt); color: var(--haze); }
.band-dark .muted { color: #9FAAB4; }

/* ---------- car cards ---------- */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.car-card {
  background: var(--card); border: 1px solid var(--concrete); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease;
}
.car-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.car-card figure { margin: 0; aspect-ratio: 400 / 168; background: var(--concrete); }
.car-card figure svg, .car-card figure img { width: 100%; height: 100%; display: block; object-fit: cover; }
.car-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.car-title { font-family: var(--font-display); font-weight: 800; font-size: 1.04rem; letter-spacing: -.005em; }
.car-title .yr { color: var(--ink-soft); font-weight: 700; }
.car-specline {
  font-family: var(--font-mono); font-size: .74rem; color: var(--ink-soft);
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.car-specline .dot { color: var(--brass); }
.car-price-row { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; border-top: 1px dashed var(--concrete); padding-top: 10px; }
.car-price { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; }
.car-cta { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--poppy); font-weight: 600; }

/* ---------- filters (inventory) ---------- */
.filters {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid var(--concrete); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 26px;
}
.filters label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.filters select {
  font-family: var(--font-body); font-size: .92rem; font-weight: 600; color: var(--asphalt);
  padding: 9px 12px; border: 1.5px solid var(--concrete); border-radius: 7px; background: var(--haze); min-width: 150px;
}
.filters .count { margin-left: auto; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-soft); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--concrete); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: .8rem; color: var(--poppy); font-weight: 700;
  display: block; margin-bottom: 10px;
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.review { border-left: 3px solid var(--brass); padding: 4px 0 4px 18px; }
.review p { margin: 0 0 10px; font-size: 1.02rem; }
.review cite { font-family: var(--font-mono); font-style: normal; font-size: .76rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--concrete); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--poppy); font-weight: 600; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); max-width: 60em; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--asphalt);
  padding: 11px 13px; border: 1.5px solid var(--concrete); border-radius: 7px; background: var(--card);
}
.field textarea { min-height: 90px; resize: vertical; }
.form-note { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); }
.form-ok {
  display: none; background: #E7F3EC; border: 1px solid #BBDCC8; color: var(--ok);
  border-radius: 8px; padding: 14px 16px; font-weight: 600;
}
form.sent .form-ok { display: block; }
form.sent .form-grid, form.sent button[type="submit"] { display: none; }

/* ---------- vehicle page ---------- */
.vehicle-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
.vehicle-hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--concrete); background: var(--card); }
.vehicle-hero svg, .vehicle-hero img { width: 100%; display: block; }
.chiplist { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0 0; list-style: none; }
.chiplist li {
  font-family: var(--font-mono); font-size: .74rem; padding: 6px 11px;
  background: var(--card); border: 1px solid var(--concrete); border-radius: 999px;
}
.crumbs { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-soft); padding: 18px 0 0; }
.crumbs a { color: inherit; }

/* ---------- footer ---------- */
footer { background: var(--asphalt); color: #B9C2CB; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 0 24px; }
footer h4 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #94A1AD; margin: 0 0 12px; }
footer a { color: #DDE3E8; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid #2C3641; padding: 18px 0 26px; font-family: var(--font-mono); font-size: .72rem; color: #7E8994; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.demo-tag { color: var(--brass); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-sticker { justify-self: stretch; max-width: none; }
  .vehicle-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 0;
    background: var(--card); border-bottom: 1px solid var(--concrete); box-shadow: var(--shadow-lift);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 13px clamp(16px, 4vw, 32px); border-bottom: 0; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- audit fixes ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--asphalt); color: #fff; font-weight: 700;
  padding: 12px 18px; border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus-visible { left: 0; }

.page-title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.01em; }

.field-error { margin: 6px 0 0; font-size: .84rem; font-weight: 600; color: #B3372C; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #B3372C; }

.vehicle-hero { aspect-ratio: 400 / 168; }
.vehicle-hero img { width: 100%; height: 100%; object-fit: cover; }
