/* Court Auto — premium dark corporate site + scroll video */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #080808;
  --bg-elevated: #0e0e0e;
  --bg-card: #121212;
  --fg: #f3f3f3;
  --muted: rgba(243, 243, 243, 0.58);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #c8ccd2;
  --accent-soft: rgba(200, 204, 210, 0.14);
  --solid: #f3f3f3;
  --solid-fg: #0a0a0a;
  --radius: 14px;
  --header-h: 68px;
  --font: "Montserrat", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 72rem;
}

html {
  scroll-behavior: smooth;
}

/* Lenis smooth scroll */
html.has-smooth-scroll {
  scroll-behavior: auto;
}

html.has-smooth-scroll,
html.has-smooth-scroll body {
  height: auto;
}

html.has-smooth-scroll.lenis-smooth {
  scroll-behavior: auto !important;
}

html.has-smooth-scroll.lenis-stopped {
  overflow: clip;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

/* Keep header above ScrollTrigger pin / page layers */
body.nav-open .header {
  background: #080808;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: var(--line);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

.page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

/* ── Header ───────────────────────────────────────────────────── */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Above GSAP pin layers (often paint over default stacking) */
  z-index: 500;
  height: var(--header-h);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
  /* fixed children (mobile nav) must not be clipped */
  overflow: visible;
}

.header.is-scrolled {
  background: rgba(8, 8, 8, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.header__inner {
  height: 100%;
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.logo__text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.15rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--fg);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.header__ig {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header__ig:hover {
  color: var(--fg);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.burger {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 520;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
}

.burger span {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.25s var(--ease), opacity 0.2s ease, top 0.25s var(--ease);
}

.burger span:first-child {
  top: 0.85rem;
}

.burger span:last-child {
  top: 1.25rem;
}

.burger[aria-expanded="true"] span:first-child {
  top: 1.05rem;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  top: 1.05rem;
  transform: rotate(-45deg);
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn--sm {
  min-height: 2.25rem;
  padding: 0 1rem;
  font-size: 0.82rem;
}

.btn--solid {
  background: var(--solid);
  color: var(--solid-fg);
}

.btn--solid:hover {
  background: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--block {
  width: 100%;
}

.text-link {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.text-link:hover {
  border-bottom-color: var(--fg);
}

/* ── Scroll video ─────────────────────────────────────────────── */

.scroll-video {
  position: relative;
  /* Short track: intro until headlight CU, then hand off to page sections */
  height: 220vh;
}

.scroll-video__pin {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-video__canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  touch-action: none;
  user-select: none;
  /* Own layer — no filter (filter on canvas shakes overlaid text) */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.scroll-video__loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #000;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.scroll-video__loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scroll-video__loader-text {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-video__loader-pct {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.scroll-video__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.75rem);
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.35) 38%,
    rgba(0, 0, 0, 0.2) 55%,
    transparent 72%
  );
}

.scroll-video__hero-copy {
  pointer-events: auto;
  max-width: 40rem;
  margin-bottom: 1.25rem;
  /* Stable compositor layer — no transform animation during scrub */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.scroll-video__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.scroll-video__title {
  font-size: clamp(2.1rem, 5.2vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  max-width: 14ch;
  margin-bottom: 0.85rem;
}

.scroll-video__sub {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 1.35rem;
}

.scroll-video__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.scroll-video__progress {
  width: min(280px, 50vw);
  height: 1px;
  background: var(--line);
  overflow: hidden;
  transition: opacity 0.35s var(--ease);
}

.scroll-video__progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

/*
 * Exit blend: --exit 0→1 near end of pin.
 * Gradient only — no backdrop-filter / canvas filter / text translate
 * (those re-composite every scroll tick and make text shake).
 */
.scroll-video__exit {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: var(--exit, 0);
  transform: translateZ(0);
  will-change: opacity;
}

.scroll-video__exit-blur {
  /* Keep node for markup compatibility; blur disabled (perf + jitter) */
  display: none;
}

.scroll-video__exit-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 28%,
    rgba(8, 8, 8, calc(var(--exit, 0) * 0.4)) 52%,
    rgba(14, 14, 14, calc(var(--exit, 0) * 0.88)) 78%,
    var(--bg-elevated) 100%
  );
}

/* Fade hero UI with opacity only — no transform (transform = shake on mobile) */
.scroll-video__pin.is-exiting .scroll-video__hero-copy,
.scroll-video__pin.is-exiting .scroll-video__progress {
  opacity: calc(1 - var(--exit, 0));
}

.scroll-video__pin.is-exiting .scroll-video__canvas {
  filter: none;
}

/* Soft seam under the unpinned hero → content */
.section-seam {
  position: relative;
  z-index: 2;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.section-seam::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4.5rem;
  height: 4.5rem;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(14, 14, 14, 0.45) 55%,
    var(--bg-elevated) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(to bottom, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%);
}

/* ── Trust strip ──────────────────────────────────────────────── */

.trust {
  position: relative;
  border-bottom: 1px solid var(--line);
  border-top: none;
  background: var(--bg-elevated);
  padding: 1.75rem 0;
  /* Pull slightly under hero so no 1px flash between pin release and content */
  margin-top: -1px;
}

.trust::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.08) 80%,
    transparent 100%
  );
  opacity: 0.9;
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem 1.5rem;
}

.trust__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.trust__index {
  display: none;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 243, 243, 0.32);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.trust__item strong {
  font-size: 0.95rem;
  font-weight: 500;
}

.trust__item > span:not(.trust__index):not(.trust__cta) {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
  max-width: 22ch;
}

.trust__cta {
  display: none;
}

a.trust__item--link {
  text-decoration: none;
  color: inherit;
}

/* ── Sections common ──────────────────────────────────────────── */

.section {
  padding: clamp(4.5rem, 10vh, 7.5rem) 0;
}

.section__head {
  margin-bottom: clamp(2rem, 5vh, 3.25rem);
  max-width: 40rem;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section__title {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 0.85rem;
}

.section__lead {
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  font-weight: 300;
  color: var(--muted);
  max-width: 42ch;
}

.section__head--center .section__lead {
  margin-inline: auto;
}

.section__link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 2px;
}

/* ── Stock ────────────────────────────────────────────────────── */

.stock__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.car-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.35s var(--ease);
}

.car-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.car-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1a1a1a;
}

.car-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.car-card:hover .car-card__media img {
  transform: scale(1.04);
}

.car-card__badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.badge--muted {
  color: var(--muted);
}

.car-card__body {
  padding: 1rem 1.05rem 1.15rem;
}

.car-card__brand {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.car-card__model {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.car-card__meta {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 1rem;
}

.car-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.car-card__price {
  font-size: 0.95rem;
  font-weight: 500;
}

.car-card__cta {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.car-card__cta:hover {
  color: var(--fg);
}

/* ── Brands ───────────────────────────────────────────────────── */

.brands {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.brands__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.brands__list li {
  background: var(--bg);
  padding: 1.5rem 1rem 1.15rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 7.5rem;
}

.brands__list li:hover {
  color: var(--fg);
  background: var(--bg-card);
}

.brands__logo {
  display: block;
  width: auto;
  max-width: 7.5rem;
  height: 2.35rem;
  object-fit: contain;
  /* All brand marks pure white on dark UI */
  filter: brightness(0) invert(1);
  opacity: 0.88;
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}

/* Roundels / app marks (BMW, Xiaomi) a bit larger */
.brands__list li:nth-child(2) .brands__logo,
.brands__list li:nth-child(10) .brands__logo,
.brands__logo--xiaomi,
.brands__logo--bmw {
  height: 2.85rem;
  max-width: 2.85rem;
}

/* Pre-baked white marks — no invert filter (would ruin multi-tone logos) */
.brands__logo--mark {
  filter: none;
  opacity: 0.9;
}

.brands__list li:hover .brands__logo {
  opacity: 1;
  transform: scale(1.04);
}

.brands__list li:hover .brands__logo--mark {
  opacity: 1;
  filter: none;
}

.brands__name {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: inherit;
}

/* ── Why ──────────────────────────────────────────────────────── */

.why__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.why__card {
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  min-height: 11rem;
}

.why__card--accent {
  background: linear-gradient(160deg, rgba(200, 204, 210, 0.1), transparent 60%),
    var(--bg-card);
  border-color: var(--line-strong);
}

.why__card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 0.65rem;
}

.why__card p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 32ch;
}

/* ── Process ──────────────────────────────────────────────────── */

.process {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.process__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.process__item {
  background: var(--bg);
  padding: 1.6rem 1.35rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 16rem;
}

.process__num {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.process__item h3 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
}

.process__item p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
}

/* ── Services ─────────────────────────────────────────────────── */

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-card {
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  min-height: 12.5rem;
  display: flex;
  flex-direction: column;
}

.service-card--wide {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--bg-card);
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
}

.service-card p {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--muted);
  flex: 1;
  max-width: 40ch;
}

/* ── About ────────────────────────────────────────────────────── */

.about {
  border-top: 1px solid var(--line);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.about__copy .section__title {
  margin-bottom: 1.15rem;
}

.about__copy p {
  font-size: 1.02rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: 1rem;
}

.about__copy .btn {
  margin-top: 0.75rem;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--bg-card);
  padding: 1.5rem 1.25rem;
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.45rem;
}

.stat strong {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 300;
}

/* ── Social ───────────────────────────────────────────────────── */

.social {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.social__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.social__tile {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1a1a1a;
}

.social__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.social__tile:hover img {
  transform: scale(1.06);
}

/* ── Bottom atmosphere (lead → footer) ────────────────────────── */

.site-bottom {
  --bottom-bg: #14171c;
  --bottom-bg-deep: #0f1216;
  --bottom-card: rgba(22, 26, 32, 0.78);
  --bottom-line: rgba(255, 255, 255, 0.09);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, #101318 0%, var(--bottom-bg) 18%, #161a20 62%, var(--bottom-bg-deep) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  /* Soft lift from pure black page body */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Soft showroom light spots */
.site-bottom__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 12% 8%, rgba(170, 185, 205, 0.11), transparent 58%),
    radial-gradient(ellipse 55% 40% at 88% 22%, rgba(120, 140, 165, 0.09), transparent 55%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(90, 110, 140, 0.08), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(200, 204, 210, 0.04), transparent 40%);
}

/* Faint technical grid - automotive studio vibe */
.site-bottom__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 78%, transparent 100%);
}

/* Film grain */
.site-bottom__grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

.site-bottom > .section,
.site-bottom > .footer {
  position: relative;
  z-index: 1;
}

.site-bottom .section {
  background: transparent;
}

/* ── Lead form ────────────────────────────────────────────────── */

.lead {
  border-bottom: 1px solid var(--bottom-line, var(--line));
}

.lead__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.lead__bullets {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lead__bullets li {
  font-size: 0.92rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
}

.lead__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.form {
  background: var(--bottom-card, var(--bg-card));
  border: 1px solid var(--bottom-line, var(--line));
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.35rem, 3vw, 1.85rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__field label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form__field input,
.form__field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form__field input::placeholder,
.form__field textarea::placeholder {
  color: rgba(243, 243, 243, 0.28);
}

.form__field input:focus,
.form__field textarea:focus {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
}

.form__field textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.form__check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  cursor: pointer;
}

.form__check input {
  margin-top: 0.2rem;
  accent-color: #ddd;
}

.form__check a {
  color: var(--fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.form__note {
  font-size: 0.9rem;
  color: #b8d4b8;
  text-align: center;
}

/* ── Contacts ─────────────────────────────────────────────────── */

.contacts {
  background: transparent;
  border-bottom: 1px solid var(--bottom-line, var(--line));
}

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: stretch;
}

.contacts__list {
  list-style: none;
  margin: 1.75rem 0 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacts__list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.contacts__list span {
  font-size: 0.82rem;
  color: var(--muted);
}

.contacts__list a,
.contacts__list strong {
  font-size: 1rem;
  font-weight: 500;
}

.contacts__list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Yandex Maps embed */
.yandex-map {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  background: #12161c;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  min-height: 22rem;
  display: flex;
  flex-direction: column;
}

.yandex-map--tall {
  min-height: 24rem;
  height: 100%;
}

.yandex-map iframe {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 20rem;
  border: 0;
  filter: none;
}

.yandex-map__caption {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--muted);
  background: rgba(10, 12, 16, 0.92);
  border-top: 1px solid var(--line);
  line-height: 1.4;
}

.contacts__map.yandex-map {
  min-height: 22rem;
}

/* ── Privacy ──────────────────────────────────────────────────── */

.privacy {
  border-bottom: 1px solid var(--bottom-line, var(--line));
}

.privacy__text {
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.privacy__text p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
}

.privacy__text a {
  color: var(--fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* ── Footer ───────────────────────────────────────────────────── */

.footer {
  padding: 2.25rem 0 2.5rem;
  border-top: 1px solid var(--bottom-line, var(--line));
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.22) 100%);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.footer__nav a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--fg);
}

.footer__ig {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer__ig:hover {
  color: var(--fg);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.footer__bottom p {
  font-size: 0.78rem;
  color: rgba(243, 243, 243, 0.4);
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .stock__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .brands__list {
    grid-template-columns: repeat(4, 1fr);
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card--wide {
    grid-column: span 2;
  }

  .process__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .social__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 510;
    width: 100%;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background: #080808;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.5rem 1.25rem 2rem;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Avoid transform here — it can trap fixed positioning / clicks on iOS */
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__link {
    font-size: 1.15rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--fg);
    display: block;
    width: 100%;
  }

  .burger {
    display: block;
  }

  .header__cta {
    display: none;
  }

  .header__inner {
    position: relative;
    z-index: 520;
  }

  .trust__grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .trust__item {
    padding: 1rem 1rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 60%),
      rgba(255, 255, 255, 0.015);
    gap: 0.4rem;
  }

  .trust__index {
    display: block;
    margin-bottom: 0.15rem;
  }

  .trust__item strong {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .trust__item > span:not(.trust__index):not(.trust__cta) {
    max-width: none;
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .trust__cta {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(243, 243, 243, 0.55);
  }

  a.trust__item--link:active {
    border-color: rgba(255, 255, 255, 0.22);
  }

  .stock__grid {
    grid-template-columns: 1fr 1fr;
  }

  .why__grid {
    grid-template-columns: 1fr 1fr;
  }

  .about__grid,
  .lead__grid,
  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .contacts__map {
    min-height: 16rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, var(--container));
  }

  .scroll-video {
    /* Shorter scrub distance = less frame thrash on mobile */
    height: 160vh;
  }

  .scroll-video__title {
    max-width: none;
  }

  .scroll-video__exit-blur {
    display: none !important;
  }

  .scroll-video__pin.is-exiting .scroll-video__canvas {
    filter: none !important;
  }

  /* Trust: horizontal snap cards — premium phone treatment */
  .trust {
    padding: 1.1rem 0 1.35rem;
    overflow: hidden;
  }

  .trust .container.trust__grid,
  .trust__grid {
    display: flex;
    grid-template-columns: none;
    gap: 0.7rem;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .trust__grid::-webkit-scrollbar {
    display: none;
  }

  .trust__item {
    flex: 0 0 min(78vw, 16.5rem);
    scroll-snap-align: start;
    min-height: 8.25rem;
    padding: 1.05rem 1.05rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
      radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.07), transparent 55%),
      linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01) 55%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
  }

  .trust__item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0.9rem;
    bottom: 0.9rem;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(
      180deg,
      rgba(243, 243, 243, 0.55),
      rgba(243, 243, 243, 0.08)
    );
    opacity: 0.85;
  }

  .trust__item > * {
    padding-left: 0.55rem;
  }

  .trust__index {
    display: block;
    margin-bottom: 0.55rem;
    color: rgba(243, 243, 243, 0.38);
  }

  .trust__item strong {
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .trust__item > span:not(.trust__index):not(.trust__cta) {
    margin-top: auto;
    font-size: 0.82rem;
    line-height: 1.4;
    max-width: 24ch;
  }

  .trust__cta {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(243, 243, 243, 0.62);
  }

  a.trust__item--link {
    border-color: rgba(255, 255, 255, 0.14);
  }

  .stock__grid,
  .why__grid,
  .brands__list,
  .process__list,
  .services__grid,
  .social__grid {
    grid-template-columns: 1fr;
  }

  .brands__list {
    grid-template-columns: 1fr 1fr;
  }

  .service-card--wide {
    grid-column: span 1;
  }

  .process__item {
    min-height: 0;
  }

  .contacts__list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .car-card,
  .car-card__media img,
  .social__tile img,
  .btn {
    transition: none;
  }

  .scroll-video__exit-blur,
  .section-seam::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .scroll-video__pin.is-exiting .scroll-video__canvas {
    filter: none;
  }

  .form {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ── Cookie banner (RB Law 99-Z) ──────────────────────────────── */

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 34rem;
  margin-inline: auto;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 18, 22, 0.94);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease), opacity 0.35s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner__title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
}

.cookie-banner__text {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.95rem;
}

.cookie-banner__text a {
  color: var(--fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-banner__actions .btn {
  min-height: 2.35rem;
  font-size: 0.8rem;
  padding: 0 0.95rem;
}

/* ── Floating contact + feedback modal ────────────────────────── */

.fab-contact {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 180;
  width: 3.35rem;
  height: 3.35rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--solid);
  color: var(--solid-fg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.fab-contact:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.fab-contact:active {
  transform: scale(0.98);
}

.fab-contact svg {
  width: 1.35rem;
  height: 1.35rem;
}

/* Lift FAB when cookie banner is open */
body.has-cookie-banner .fab-contact {
  bottom: 9.5rem;
}

@media (min-width: 480px) {
  body.has-cookie-banner .fab-contact {
    bottom: 1.15rem;
  }
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-root.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-root__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 0;
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26.5rem);
  max-height: min(90dvh, 40rem);
  overflow: auto;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, #171b22 0%, #10141a 100%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
  padding: 1.35rem 1.25rem 1.4rem;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.modal-root.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.modal-panel__title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.modal-panel__sub {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  margin-top: 0.3rem;
  max-width: 28ch;
}

.modal-close {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.15rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.modal-messengers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.messenger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.messenger-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
}

.messenger-btn--ig {
  border-color: rgba(225, 48, 108, 0.35);
}

.messenger-btn--tg {
  border-color: rgba(38, 165, 228, 0.4);
}

.modal-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-divider::before,
.modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.modal-panel .form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.modal-panel .form__note {
  margin-top: 0.25rem;
}

body.modal-open {
  overflow: hidden;
}
