/* ===================================================================
   STERNHAUS MOTORS — Site Styles
   Brand: scarlet (#C1121F) + black
   Type system: Red Hat Text throughout, self-hosted as WOFF2.
     Bold (700)      -> headlines: hero title, section titles (h1, h2)
     SemiBold (600)  -> sub-headings: card/component titles (h3), the
                        gallery dialog title, prices, trust-strip stats,
                        footer/contact labels
     Medium (500)    -> interactive UI text: buttons, nav links
     Regular (400)   -> body copy
     Light (300)     -> fine print (footer legal line)
     Italic          -> used once, deliberately: the hero eyebrow kicker
   Fonts are WOFF2 files in /fonts.
   =================================================================== */

@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("fonts/RedHatText-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --black: #0B0B0C;
  --charcoal: #151517;
  --charcoal-2: #1D1D20;
  --scarlet: #C1121F;
  --scarlet-deep: #8C0D17;
  --white: #F5F3EF;
  --grey-dim: #6B6B6E;
  --line: rgba(245, 243, 239, 0.1);

  /* one family, weight does the work of the old two-font system */
  --display: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --sans: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --grey: #ABABAB;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

/* Main headings: page and section titles */
h1, h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; margin: 0; }
/* Sub-headings: card-level titles */
h3 { font-family: var(--sans); font-weight: 600; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

:focus-visible {
  outline: 2px solid var(--scarlet);
  outline-offset: 3px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 13px 26px;
  font-size: 15px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--scarlet);
  color: var(--white);
}
.btn-primary:hover { background: var(--scarlet-deep); }
.btn-outline {
  border-color: var(--line);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--scarlet); }
.btn-ghost {
  color: var(--white);
  border-color: transparent;
  padding: 10px 18px;
  font-size: 14px;
}
.btn-ghost:hover { color: var(--scarlet); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 12, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* The logo sits in a fixed box and is scaled to fit it, so any logo shape keeps a
   sensible size (a fixed height made squarer logos come out tiny). The original
   wide wordmark renders exactly as before: it is limited by the box width. */
.logo-img {
  display: block;
  width: 240px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}
.footer-logo {
  display: block;
  width: 224px;
  height: 46px;
  object-fit: contain;
  object-position: left center;
}
.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-size: 14.5px;
  color: var(--grey);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--white); }
.header-actions { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  width: 18px;
  margin: 0 auto;
  background: var(--white);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 82vh, 760px);
  padding: 90px 0;
  background: var(--black);
}
/* the photo fills the right side and dissolves into black on the left,
   so the copy sits on the gradient end */
.hero-bg {
  position: absolute;
  top: 0;
  right: -5%;
  z-index: -2;
  width: 72%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 38%, #000 72%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 38%, #000 72%);
  animation: hero-in 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* scarlet glow top-left + fade into the trust strip below */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(0deg, var(--black) 0%, transparent 24%),
    radial-gradient(ellipse 900px 500px at 12% 0%, rgba(193, 18, 31, 0.18), transparent 60%);
}
.hero-inner { position: relative; width: 100%; }
.hero-copy { max-width: 500px; }
.eyebrow {
  font-size: 14px;
  color: var(--scarlet);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  color: var(--white);
}
.hero-lead {
  font-size: 18px;
  color: #b9b7b2;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
  max-width: 460px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ DIAGNOSTICS (mini-hero treatment, echoes .hero above) ============ */
.diag-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 58vh, 560px);
  padding: 80px 0;
}
/* same dissolve technique as .hero-bg, but fades into this section's own
   charcoal background (--charcoal) instead of pure black */
.diag-bg {
  position: absolute;
  top: 0;
  right: -5%;
  z-index: -1;
  width: 62%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 38%, #000 72%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.55) 38%, #000 72%);
}
/* .diag-inner is the standard .wrap (left-aligned to the same edge as every other
   section, like .hero-inner); only the copy inside is narrowed to a readable measure */
.diag-inner { position: relative; width: 100%; }
.diag-copy { max-width: 520px; }
.diag-copy h2 { margin-bottom: 18px; }
.diag-copy p { color: var(--grey); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5); }
.diag-callout {
  margin-top: 16px;
  margin-bottom: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--scarlet);
  font-size: 15px;
}

/* load-in sequence */
.hero-copy > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero-copy > :nth-child(1) { animation-delay: 0.10s; }
.hero-copy > :nth-child(2) { animation-delay: 0.22s; }
.hero-copy > :nth-child(3) { animation-delay: 0.38s; }
.hero-copy > :nth-child(4) { animation-delay: 0.54s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
}
@keyframes hero-in {
  from { opacity: 0; transform: scale(1.06); }
}

/* ============ TRUST STRIP ============ */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.trust-item {
  padding: 30px 24px;
  border-left: 1px solid var(--line);
}
.trust-item:first-child { border-left: none; }
.trust-value {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 26px;
  color: var(--scarlet);
  margin-bottom: 6px;
}
.trust-label {
  font-size: 13.5px;
  color: var(--grey);
  line-height: 1.5;
}

/* ============ SECTIONS ============ */
.section { padding: 96px 0; }
.section-alt { background: var(--charcoal); }
.section-head { max-width: 560px; margin-bottom: 48px; }
.section-head h2 { font-size: 34px; margin-bottom: 12px; letter-spacing: 0.01em; }
.section-sub { color: var(--grey); font-size: 16px; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.two-col h2 { font-size: 30px; margin-bottom: 16px; }
.two-col p { color: var(--grey); margin-bottom: 24px; }

/* ============ INVENTORY ============ */
.inventory-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.inventory-top .section-head { margin-bottom: 0; }

.carousel-controls { display: none; gap: 10px; }
.has-overflow .carousel-controls { display: flex; }
.carousel-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.carousel-btn:hover:not(:disabled) { border-color: var(--scarlet); color: var(--scarlet); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }

/* swipeable row */
.inventory-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* room for the hover lift + glow, which overflow would otherwise clip */
  padding: 12px 0 30px;
  margin-bottom: -18px;
}
.inventory-track::-webkit-scrollbar { display: none; }
.inventory-track:focus-visible { outline-offset: -2px; }
.inventory-track .car-card {
  flex: 0 0 calc((100% - 48px) / 3);
  scroll-snap-align: start;
}

.carousel-foot { display: none; align-items: center; gap: 20px; margin-top: 8px; }
.has-overflow .carousel-foot { display: flex; }
.swipe-hint { display: none; font-size: 13.5px; color: var(--grey-dim); white-space: nowrap; }
.track-progress {
  position: relative;
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.track-progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  background: var(--scarlet);
  border-radius: 2px;
}
@media (hover: none), (max-width: 900px) {
  .has-overflow .swipe-hint { display: block; }
}
.car-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.car-card:hover { border-color: rgba(193, 18, 31, 0.4); }
.car-card { cursor: pointer; }
.car-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: linear-gradient(135deg, var(--charcoal-2), var(--black));
}
.car-media:focus-visible { outline-offset: -3px; }
.car-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.car-card:hover .car-media img { transform: scale(1.04); }
.car-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  color: var(--grey-dim);
}
.car-grade {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--scarlet);
  color: var(--scarlet);
  border-radius: 3px;
}
.car-media .car-grade {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(11, 11, 12, 0.72);
  backdrop-filter: blur(4px);
}
.car-count {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 3px;
  color: var(--white);
  background: rgba(11, 11, 12, 0.72);
  backdrop-filter: blur(4px);
}
.car-body { padding: 20px; }
.car-body h3 {
  font-size: 21px;
  margin-bottom: 6px;
}
.car-body h3 span {
  color: var(--grey-dim);
  font-size: 14px;
  font-family: var(--sans);
}
.car-specs { font-size: 13.5px; color: var(--grey); margin-bottom: 10px; }
.car-note { font-size: 14px; color: var(--grey); margin-bottom: 18px; line-height: 1.5; }
.car-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.car-price { font-family: var(--sans); font-weight: 600; font-size: 20px; color: var(--white); }
.car-link { font-size: 14px; color: var(--scarlet); }
.car-link:hover { color: var(--white); }

.btn-sm { padding: 10px 16px; font-size: 14px; }
.card-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.card-docs .btn { display: block; text-align: center; padding: 10px 8px; font-size: 13.5px; }
.btn[hidden] { display: none; }
.btn.is-disabled { opacity: 0.45; pointer-events: none; cursor: default; }

.inventory-note {
  margin-top: 32px;
  font-size: 14px;
  color: var(--grey-dim);
}

/* ============ STANDARD ============ */
.standard-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
}
.standard-copy h2 { font-size: 32px; margin-bottom: 20px; }
.standard-copy p { color: var(--grey); margin-bottom: 18px; }
.standard-list ul {
  border-top: 1px solid var(--line);
}
.standard-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}

/* ============ PARTS TAGS ============ */
.parts-tags {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.parts-tags span {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 14.5px;
  color: var(--grey);
}

/* ============ CONTACT ============ */
.contact-section { text-align: left; }
.contact-inner h2 { font-size: 34px; margin-bottom: 10px; }
.contact-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.contact-label {
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-dim);
  margin-bottom: 8px;
}
.contact-block a { color: var(--white); font-size: 15.5px; }
.contact-block a { border-bottom: 1px solid transparent; transition: color 0.15s ease, border-color 0.15s ease; }
.contact-block a:hover { color: var(--scarlet); border-color: var(--scarlet); }
.contact-block .contact-actions { margin-top: 6px; font-size: 13.5px; color: var(--grey-dim); }
.contact-block .contact-actions a { color: var(--scarlet); font-size: 14px; }
.contact-block .contact-actions a:hover { color: var(--white); border-color: var(--white); }
.contact-block p { color: var(--white); font-size: 15px; line-height: 1.6; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 56px;
  background: var(--black);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  flex-wrap: wrap;
}
.footer-brand p {
  color: var(--grey);
  font-size: 14px;
  margin-top: 10px;
  max-width: 260px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
}
.footer-heading {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-dim);
  margin-bottom: 14px;
}
.footer-links a {
  display: block;
  color: var(--grey);
  font-size: 14.5px;
  padding: 5px 0;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 300;
  color: var(--grey-dim);
}

/* ============ GALLERY ============ */
html.gallery-open { overflow: hidden; }
dialog.gallery {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--white);
  background: rgba(8, 8, 9, 0.985);
}
dialog.gallery[open] {
  display: flex;
  flex-direction: column;
  animation: gal-in 0.28s ease both;
}
dialog.gallery::backdrop { background: #000; }
@keyframes gal-in { from { opacity: 0; } }

.gal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.gal-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* Component-level heading (car name in the gallery), so it takes the
   sub-heading weight rather than the page-heading Black weight it would
   otherwise inherit from the h1, h2 rule. */
.gal-title h2 { font-family: var(--sans); font-weight: 600; font-size: 24px; line-height: 1.2; }
.gal-close, .gal-arrow {
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(11, 11, 12, 0.7);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.gal-close { width: 44px; height: 44px; flex: none; }
.gal-close:hover, .gal-arrow:hover { border-color: var(--scarlet); color: var(--scarlet); }

.gal-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: pan-y;
  user-select: none;
}
.gal-img {
  position: absolute;
  inset: 16px 80px;
  width: calc(100% - 160px);
  height: calc(100% - 32px);
  object-fit: contain;
  transition: opacity 0.25s ease;
}
.gal-img { -webkit-user-drag: none; }
.gal-img.is-loading { opacity: 0.25; }
.gal-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}
.gal-prev { left: 16px; }
.gal-next { right: 16px; }
.gal-count {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 3px;
  background: rgba(11, 11, 12, 0.75);
  color: var(--grey);
}
.gal-empty {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  color: var(--grey);
}
.gal-empty p:first-child { font-family: var(--sans); font-weight: 600; font-size: 22px; color: var(--white); }
.gallery.is-empty .gal-empty { display: flex; }
.gallery.is-empty .gal-img,
.gallery.is-empty .gal-arrow,
.gallery.is-empty .gal-count,
.gallery.is-empty .gal-thumbs { display: none; }

.gal-thumbs {
  display: flex;
  justify-content: safe center;
  gap: 10px;
  padding: 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gal-thumbs::-webkit-scrollbar { display: none; }
.gal-thumbs button {
  flex: 0 0 96px;
  aspect-ratio: 3 / 2;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 3px;
  background: var(--charcoal);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.gal-thumbs button:hover { opacity: 0.9; }
.gal-thumbs button.is-active { opacity: 1; border-color: var(--scarlet); }
.gal-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}
.gal-price { font-family: var(--sans); font-weight: 600; font-size: 22px; }
.gal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ MOTION ============ */
/* scroll reveal: hidden only when JS is running, revealed by script.js */
.js [data-reveal]:not(.is-visible) { opacity: 0; }
.js [data-reveal].is-visible {
  animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: var(--d, 0ms);
}

.car-card { transition: border-color 0.15s ease, transform 0.25s ease, box-shadow 0.25s ease; }
.car-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px -22px rgba(193, 18, 31, 0.45);
}
.car-link { display: inline-block; transition: color 0.15s ease, transform 0.2s ease; }
.car-link:hover { transform: translateX(4px); }
.btn { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.2s ease; }
.btn:hover { transform: translateY(-2px); }

.site-header { transition: background 0.25s ease, box-shadow 0.25s ease; }
.site-header.scrolled {
  background: rgba(11, 11, 12, 0.96);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}
section[id] { scroll-margin-top: 76px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { display: block; min-height: 0; padding: 0 0 72px; }
  .hero-bg {
    right: auto;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-position: 60% center;
    -webkit-mask-image: linear-gradient(180deg, #000 38%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 38%, transparent 100%);
  }
  .hero-inner { padding-top: 58vw; }
  .diag-hero { display: block; min-height: 0; padding: 0 0 64px; }
  .diag-bg {
    position: relative;
    right: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  }
  .diag-inner { padding-top: 32px; }
  .diag-copy { max-width: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(3) { border-left: none; }
  .inventory-track .car-card { flex-basis: calc((100% - 24px) / 2.15); }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .standard-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .section-head h2 { font-size: 27px; }
  .logo-img { width: 180px; height: 40px; }
  .hero { padding-bottom: 56px; }
  .gal-top { padding: 10px 16px; }
  .gal-title { flex-wrap: wrap; gap: 8px; }
  .gal-title h2 { font-size: 18px; }
  .gal-img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .gal-arrow { display: none; }
  .gal-thumbs { padding: 10px 16px; }
  .gal-thumbs button { flex-basis: 76px; }
  .gal-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .gal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .gal-actions .btn { padding: 12px 10px; text-align: center; font-size: 14px; }
  .gal-actions .btn-primary { grid-column: 1 / -1; order: -1; }
  .gal-actions .btn[hidden] + .btn:not(.btn-primary) { grid-column: 1 / -1; }
  .carousel-controls { display: none !important; }
  .inventory-top { margin-bottom: 32px; }
  /* bleed to the screen edge so the next car peeks in, which signals "swipe" */
  .inventory-track {
    gap: 16px;
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 28px;
    padding-right: 28px;
    scroll-padding-left: 28px;
  }
  .inventory-track .car-card { flex-basis: 80%; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-left: none; border-top: 1px solid var(--line); }
  .trust-item:first-child { border-top: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-links { gap: 32px; }
  .footer-bottom { flex-direction: column; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--charcoal);
    padding: 20px 28px;
    border-bottom: 1px solid var(--line);
    gap: 18px;
  }
}

@media (max-width: 440px) {
  .header-actions .btn-ghost { display: none; }
}


/* ============ PARTS CARDS ============ */
/* "New" parts get a solid scarlet badge; "Used" keeps the outlined one */
.car-media .car-grade.is-new,
.gal-title .car-grade.is-new { background: var(--scarlet); color: var(--white); }
.parts-tags.is-row { flex-direction: row; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.parts-tags.is-row span { padding: 9px 16px; font-size: 13.5px; }
.parts-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.parts-cta p { color: var(--grey); }

/* gallery: details line under the name */
.gal-head { min-width: 0; }
.gal-specs { margin-top: 6px; font-size: 13px; color: var(--grey); }
.gal-specs:empty { display: none; }


/* =====================================================================
   TYPOGRAPHY REFINEMENTS — sizing and spacing for Red Hat Text
   ===================================================================== */
/* Note: hero h1 sizing lives in one place above — no duplicate override here. */
.section-head h2, .contact-inner h2, .diag-copy h2 { font-size: 32px; line-height: 1.15; letter-spacing: 0.01em; }
.two-col h2 { font-size: 30px; line-height: 1.15; letter-spacing: 0.01em; }
.standard-copy h2 { font-size: 26px; line-height: 1.25; letter-spacing: 0.01em; }

/* the one deliberate italic in the system: the hero kicker */
.eyebrow { font-style: italic; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }

/* body copy sizes */
.hero-lead { font-size: 19px; }
.section-sub { font-size: 17px; }
.trust-label { font-size: 14.5px; }
.car-specs, .car-note, .car-link { font-size: 15px; }
.car-disclosed { font-size: 14px; }
.btn-sm, .card-docs .btn { font-size: 14.5px; }
.car-grade, .car-status { font-size: 13px; letter-spacing: 0.04em; }
.car-count { font-size: 13px; }
.two-col p, .standard-copy p { font-size: 17px; }
.contact-block p, .contact-block a { font-size: 16px; }
.footer-links a, .footer-brand p { font-size: 15px; }
.gal-specs { font-size: 14px; }

.arr { width: 1em; height: 1em; margin-left: 4px; vertical-align: -0.14em; }

@media (max-width: 600px) {
  .section-head h2, .contact-inner h2, .diag-copy h2 { font-size: 26px; }
  .two-col h2 { font-size: 26px; }
  .standard-copy h2 { font-size: 22px; }
  .gal-title h2 { font-size: 20px; }
}


/* empty state when no stock/parts are listed */
.stock-empty { flex: 1 0 100%; padding: 28px 0; color: var(--grey); }
.stock-empty a { color: var(--white); border-bottom: 1px solid var(--scarlet); }

/* parts: full stock list button */
.parts-cta-copy { display: grid; gap: 4px; max-width: 520px; }
.parts-cta .parts-list-note { font-size: 13.5px; color: var(--grey-dim); }
.parts-cta .parts-list-note:empty { display: none; }
.parts-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .parts-cta-actions { width: 100%; }
  .parts-cta-actions .btn { flex: 1 1 100%; text-align: center; }
}

/* homepage promo video: sits exactly where the hero photo does, fades in once playing */
.hero-video { animation: none; opacity: 0; transition: opacity 0.8s ease; }
.hero-video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }

/* ============ CONTACT BUTTONS (call / WhatsApp / email) ============ */
.reach { margin-top: 22px; }
.reach[hidden] { display: none; }
.reach-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.reach-btn { display: inline-flex; align-items: center; gap: 8px; }
.reach-btn svg { width: 16px; height: 16px; flex: none; }
.reach-details { margin-top: 12px; font-size: 13.5px; color: var(--grey-dim); overflow-wrap: anywhere; }
.parts-cta-actions { align-items: center; }
.parts-cta-actions .reach { margin-top: 0; }
.diag-copy .reach { margin-top: 4px; }
.diag-copy .reach-details { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5); }
/* inside the Contact section, keep the buttons looking like buttons (not underlined links) */
.contact-block .reach { margin-top: 14px; }
.contact-block a.reach-btn { font-size: 14px; border: 1px solid var(--line); }
.contact-block a.btn-primary { background: var(--scarlet); border-color: var(--scarlet); color: var(--white); }
.contact-block a.btn-primary:hover { background: var(--scarlet-deep); border-color: var(--scarlet-deep); color: var(--white); }
.contact-block a.btn-outline:hover { border-color: var(--scarlet); color: var(--white); }
@media (max-width: 600px) {
  .reach-btns { display: grid; grid-template-columns: 1fr 1fr; }
  .reach-btns .btn-primary { grid-column: 1 / -1; justify-content: center; }
  .reach-btns .btn-outline { justify-content: center; }
  .parts-cta-actions .reach { width: 100%; }
}

/* Parts section: the stock-list button is the main action, so the contact buttons stay quiet */
.parts-cta .reach .btn-primary { background: transparent; border-color: var(--line); }
.parts-cta .reach .btn-primary:hover { background: transparent; border-color: var(--scarlet); }
