/* Pearl White & Black */
:root {
  --bg: #FFFFFF; --surface: #F7F7F7; --sunk: #EDEDED; --line: #E3E3E3; --line-2: #CFCFCF;
  --ink: #111111; --ink-2: #3A3A3A; --muted: #666666; --accent: #111111; --on-accent: #FFFFFF;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: #444; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: #000; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: block; line-height: 0; flex: none; }
.brand img { height: 76px; width: auto; }
.nav { display: flex; gap: 28px; font-size: 14px; }
.nav a { color: #EDEDED; text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: #fff; color: #fff; }
.site-header .btn { background: #fff; color: #000; border-color: #fff; }
.site-header .btn:hover { background: #E3E3E3; color: #000; }
.site-header :focus-visible { outline-color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid #555; width: 44px; height: 44px; border-radius: 2px; cursor: pointer; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 13px 24px; border-radius: 2px; font: 600 15px var(--sans); text-decoration: none; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); transition: background .15s, color .15s; }
.btn:hover { background: #2B2B2B; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); font-weight: 500; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; }

/* type */
.eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 6vw, 76px); line-height: 1; }
.h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 48px); line-height: 1.1; }
.lead { margin: 20px 0 32px; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 560px; }
.muted { color: var(--muted); }

/* placeholder media */
.ph { background: var(--sunk); display: flex; align-items: flex-end; padding: 16px; color: var(--muted); font: 500 12px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; position: relative; overflow: hidden; }
.ph svg { position: absolute; inset: 0; margin: auto; width: 46%; height: auto; opacity: .18; }
.media { position: relative; overflow: hidden; background: var(--sunk); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }

/* hero */
.hero { position: relative; min-height: 620px; display: flex; align-items: flex-end; padding: 56px; background: var(--sunk); overflow: hidden; }
.hero .media { position: absolute; inset: 0; }
.hero-copy { position: relative; max-width: 640px; }
.hero.has-img .hero-copy { background: rgba(255,255,255,.9); padding: 32px; }
.hero-note { position: absolute; top: 20px; right: 24px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
/* black brand band with the client's logo (shown until a car photo is uploaded) */
.hero.brand-hero { background: #000; color: #fff; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding-bottom: 88px; }
.brand-hero .hero-copy { order: 1; }
.brand-hero .hero-logo { order: 2; display: flex; justify-content: center; }
.brand-hero .hero-logo img { width: 100%; max-width: 560px; height: auto; }
.brand-hero .eyebrow { color: #C9C9C9; }
.brand-hero .lead { color: #D6D6D6; }
.brand-hero .btn { background: #fff; color: #000; border-color: #fff; }
.brand-hero .btn:hover { background: #E3E3E3; }
.brand-hero .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.brand-hero .btn-ghost:hover { background: #fff; color: #000; }
.brand-hero :focus-visible { outline-color: #fff; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* search bar */
.search { margin: -44px 56px 0; position: relative; background: var(--surface); border: 1px solid var(--line); padding: 20px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)) auto; gap: 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.field select, .field input, .field textarea { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 12px; font: 15px var(--sans); border-radius: 2px; letter-spacing: 0; text-transform: none; min-height: 46px; width: 100%; }
.field textarea { min-height: 110px; resize: vertical; }

/* sections */
.section { padding-top: 120px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.link-arrow { font-size: 14px; }

/* car cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--ink); color: var(--ink); }
.card:hover .media img { transform: scale(1.03); }
.card .media, .card .ph { height: 220px; }
.tag { position: absolute; top: 14px; left: 14px; background: #fff; color: var(--ink); border: 1px solid var(--ink); padding: 5px 10px; font-size: 11px; letter-spacing: .04em; z-index: 1; }
.tag.dim { color: var(--muted); border-color: var(--muted); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; }
.card .spec { margin: 0; font-size: 14px; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }
.price { font-size: 20px; font-weight: 600; }

.arr { border: 1px dashed var(--line-2); display: flex; flex-direction: column; }
.arr .media, .arr .ph { height: 180px; }
.eta { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; padding: 5px 10px; font-size: 11px; font-weight: 600; z-index: 1; }
.arr-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.arr h3 { margin: 0; font-size: 17px; font-weight: 600; }
.arr .btn { margin-top: auto; background: transparent; color: var(--ink); border-color: var(--ink); }
.arr .btn:hover { background: var(--ink); color: #fff; }

/* trust */
.trust > div { border-top: 1px solid var(--accent); padding-top: 20px; }
.trust h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.trust p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* reviews */
.rating-box { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); padding: 16px 22px; }
.rating-box .big { margin: 0; font-family: var(--serif); font-size: 44px; line-height: 1; }
.stars { margin: 0; color: var(--accent); letter-spacing: 3px; }
.review { margin: 0; background: var(--surface); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.review blockquote { margin: 0; font-family: var(--serif); font-size: 24px; line-height: 1.35; }
.review figcaption { display: flex; gap: 12px; align-items: center; margin-top: auto; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sunk); object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--muted); }
.review .who { margin: 0; font-size: 14px; font-weight: 600; }
.review .what { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* newsletter */
.signup { margin-top: 120px; padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.signup .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.signup form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input { background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 14px 16px; font: 15px var(--sans); width: 300px; max-width: 100%; min-height: 48px; }

/* footer */
.site-footer { padding: 56px 0 80px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .col { display: flex; flex-direction: column; gap: 10px; }
.site-footer .col > span { color: var(--ink); }
.foot-brand { margin: 0 0 12px; line-height: 0; }
.foot-brand img { width: 160px; height: auto; background: #000; }
.map { height: 110px; border: 0; width: 100%; filter: grayscale(1); }

.fab { position: fixed; right: 28px; bottom: 28px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; z-index: 30; box-shadow: 0 6px 20px rgba(0,0,0,.18); }

/* inventory page */
.page-head { padding-top: 56px; padding-bottom: 32px; }
.inv { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 40px; align-items: start; }
.filters { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 18px; background: var(--surface); border: 1px solid var(--line); padding: 22px; }
.inv-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.inv-bar .field { flex-direction: row; align-items: center; gap: 10px; }
.inv-bar select { width: auto; }
.empty { padding: 60px 24px; text-align: center; border: 1px dashed var(--line-2); color: var(--muted); }

/* car detail */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 28px; padding-bottom: 20px; }
.crumbs a { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.gallery-main { aspect-ratio: 16/10; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.thumbs button { padding: 0; border: 1px solid var(--line); background: var(--sunk); aspect-ratio: 4/3; cursor: pointer; overflow: hidden; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 32px; }
.specs div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-weight: 500; }
.side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.side-box { background: var(--surface); border: 1px solid var(--line); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.side-price { font-family: var(--serif); font-size: 44px; line-height: 1; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.notice { padding: 14px 16px; border: 1px solid var(--ink); background: #fff; font-size: 14px; }
.notice.err { border-color: #B3261E; color: #B3261E; }
.hp { position: absolute; left: -9999px; }

/* dialog */
dialog { border: 1px solid var(--line); padding: 0; max-width: 520px; width: calc(100% - 32px); color: var(--ink); }
dialog::backdrop { background: rgba(17,17,17,.5); }
.dlg { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.dlg-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; background: none; border: 0; font-size: 24px; cursor: pointer; }

/* responsive */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .search { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .search .btn { grid-column: 1 / -1; }
  .detail { grid-template-columns: 1fr; }
  .side { position: static; }
  .inv { grid-template-columns: 1fr; }
  .filters { position: static; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #000; flex-direction: column; gap: 0; padding: 8px 20px 20px; border-bottom: 1px solid #333; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid #222; }
  .brand img { height: 60px; }
  .hero.brand-hero { grid-template-columns: 1fr; gap: 8px; padding-bottom: 32px; }
  .brand-hero .hero-logo { order: 0; }
  .brand-hero .hero-logo img { max-width: 340px; }
  .header-cta { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero { min-height: 520px; padding: 28px 20px; }
  .hero-note { display: none; }
  .search { margin: 16px 0 0; grid-template-columns: 1fr; }
  .section { padding-top: 80px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .specs { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
