:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #14120f;
  --muted: #6c675f;
  --line: #e7e3dc;
  --accent: #b4381f;
  --accent-dark: #8f2b17;
  --radius: 16px;
  --serif: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;   /* headings, prices, brand */
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;    /* body text */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
p { margin: 0 0 1em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.muted-light { color: rgba(255, 255, 255, .6); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font: 600 .95rem var(--sans);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 18px; font-size: .88rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f0ece4; }

.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.brand { display: flex; align-items: center; line-height: 0; text-decoration: none; }
.logo { height: 64px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav ul a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.nav ul a:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }
.nav ul a.active { color: var(--ink); background: rgba(0, 0, 0, .07); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 24px 24px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-open .nav { display: flex; }
  .nav ul { flex-direction: column; }
  .nav ul a { padding: 12px 14px; }
  .header-call { text-align: center; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: #14120f; }
.hero::before { /* photo on the right, fading into the dark on the left */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 68%;
  background: var(--hero, radial-gradient(1200px 500px at 80% 0%, #4a2a20 0%, #14120f 70%)) 55% 72% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%); mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,18,15,.5) 0%, rgba(20,18,15,0) 30%, rgba(20,18,15,0) 58%, rgba(20,18,15,.92) 100%); }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(540px, 56vw, 700px); padding-top: clamp(70px, 10vw, 120px); padding-bottom: 44px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.6rem); max-width: none; white-space: nowrap; margin-bottom: 22px; }
.hero .stats { margin-top: 48px; }
@media (max-width: 860px) { .header-inner { height: 72px; } .logo { height: 54px; } }
@media (max-width: 700px) {
  .hero::before { width: 100%; height: 300px; bottom: auto; background-position: 60% 80%;
    -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%); }
  .hero::after { display: none; }
  .hero-inner { min-height: 0; padding-top: 324px; padding-bottom: 36px; justify-content: flex-start; }
  .hero h1 { font-size: 8.4vw; }
  .hero .stats { margin-top: 40px; }
}
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 46ch; color: rgba(255, 255, 255, .78); margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #e8a08f; margin-bottom: 16px; }
.eyebrow.dark { color: var(--accent); }

.stats { display: flex; gap: clamp(28px, 6vw, 72px); margin: 72px 0 0; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .18); flex-wrap: wrap; }
.stats dt { font: 600 clamp(1.8rem, 4vw, 2.8rem) var(--serif); line-height: 1; }
.stats dd { margin: 6px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .6); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: #f1eee7; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.prose { font-size: 1.08rem; max-width: 68ch; }
.prose p { margin-bottom: 1.2em; }

.cta { background: var(--ink); color: #fff; text-align: center; }
.cta-inner { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.cta h2 { margin-bottom: 14px; }
.cta p { color: rgba(255, 255, 255, .7); max-width: 52ch; margin: 0 auto 28px; }

.page-head { padding: clamp(48px, 8vw, 88px) 0 32px; }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 56ch; margin-top: 16px; }
.list-section { padding-bottom: 40px; }

/* ---------- inventory grid ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.search {
  flex: 1 1 280px; max-width: 420px;
  padding: 13px 20px; border: 1.5px solid var(--line); border-radius: 999px;
  font: 400 .98rem var(--sans); background: var(--surface); color: var(--ink);
}
.search:focus { outline: none; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 30px; }
.empty { padding: 48px 0; color: var(--muted); font-size: 1.05rem; }
.empty a { color: var(--accent); }

.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(20, 18, 15, .12); }

.thumb { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #e8e4dc; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card.is-sold:hover { transform: none; box-shadow: none; }
.card.is-sold:hover .thumb img { transform: none; }

.no-photo { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; color: var(--muted); font-size: .92rem; }

.badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.badge-dark { background: var(--ink); }
.badge-static { position: static; display: inline-block; align-self: center; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 20px; }
.card-body h3 { font-size: 1.35rem; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips span { font-size: .78rem; font-weight: 500; color: var(--ink); background: #f1eee7; padding: 3px 10px; border-radius: 999px; }
.desc {
  color: var(--ink); font-size: .96rem; margin-bottom: 18px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.price { font: 600 1.2rem var(--serif); }
.more { font-size: .88rem; font-weight: 600; color: var(--accent); }

/* ---------- car page ---------- */
.car-page { padding-bottom: 40px; }
.crumbs { padding: 28px 0 14px; }
.crumbs a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.crumbs a:hover { color: var(--ink); }
.car-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.car-head h1 { font-size: clamp(2rem, 5vw, 3.4rem); }

.car-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 900px) { .car-layout { grid-template-columns: 1fr; } }

.main-photo { aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: #e8e4dc; cursor: zoom-in; }
.main-photo img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; aspect-ratio: 3 / 2; opacity: .65; transition: opacity .2s; }
.thumbs button:hover { opacity: 1; }
.thumbs button.active { border-color: var(--accent); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.car-desc { margin-top: 36px; }

.panel { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
@media (max-width: 900px) { .panel { position: static; } }
.price-big { font: 600 2.4rem var(--serif); margin-bottom: 14px; }
.specs { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: .96rem; }
.specs th, .specs td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs th { color: var(--muted); font-weight: 400; width: 42%; }
.specs td { font-weight: 500; }
.panel-actions { display: flex; flex-direction: column; gap: 10px; }

.more-cars { margin-top: 88px; }
.more-cars h2 { margin-bottom: 28px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 9, 8, .98); display: flex; align-items: center; justify-content: center; }
.lightbox { touch-action: pinch-zoom; overscroll-behavior: contain; }
.lb-stage { position: absolute; inset: 0; }
.lb-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; will-change: transform; backface-visibility: hidden; }
.lightbox img { position: absolute; inset: 0; margin: auto; width: 92vw; height: 88vh; object-fit: contain; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- about / contact ---------- */
.about-split { grid-template-columns: 1.25fr 1fr; }
@media (max-width: 820px) { .about-split { grid-template-columns: 1fr; } }
.about-split { align-items: start; }
.about-split .prose { font-size: 1.18rem; }
.about-split .prose p:first-child { text-box-trim: trim-start; text-box-edge: cap alphabetic; }   /* top of the first line's capitals sits level with the top of the photo, whatever the font */
@supports not (text-box-trim: trim-start) { .about-split .prose p:first-child { margin-top: -.45em; } }
.about-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(20, 18, 15, .06); }
.about-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 25%; }
.about-card-body { padding: 24px 28px 28px; }
.about-card-body h2 { font-size: 1.6rem; margin: 0 0 10px; }
.about-card-body p { color: var(--muted); margin: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-big { display: block; font: 600 1.35rem var(--serif); text-decoration: none; margin-bottom: 10px; overflow-wrap: anywhere; }
a.contact-big:hover { color: var(--accent); }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours li:last-child { border-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #fff; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-brand { font: 600 1.5rem var(--serif); margin-bottom: 8px; }
.footer-title { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 14px; }
.footer-title.dark { color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; color: rgba(255, 255, 255, .8); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { padding-top: 22px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: rgba(255, 255, 255, .5); }
.lb-count { position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); text-align: center; color: rgba(255, 255, 255, .75); font-size: .9rem; pointer-events: none; }
@media (hover: none) and (pointer: coarse) { .lb-prev, .lb-next { display: none; } }
