:root {
  --bg: #0b0c0e;
  --surface: #121418;
  --card: #16191d;
  --card-2: #1c1f24;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f2f1ee;
  --muted: #9ba0a8;
  --accent: #ff6a1a;
  --accent-hover: #ff8040;
  --accent-soft: rgba(255, 106, 26, .14);
  --ok: #4fd18b;
  --radius: 20px;
  --display: "Unbounded", system-ui, sans-serif;
  --sans: "Onest", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(28px, 4.2vw, 46px); }
h3 { font-size: 18px; letter-spacing: -.01em; }
p { text-wrap: pretty; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

button, a, select, [role="button"] { touch-action: manipulation; }
button, .btn, .chip, .segmented button { user-select: none; -webkit-user-select: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 16px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 28px; min-height: 52px; border-radius: 14px; background: var(--accent); color: #140a04; font: 600 15px var(--sans); border: 1px solid var(--accent); cursor: pointer; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--small { padding: 10px 18px; min-height: 42px; font-size: 14px; border-radius: 12px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

/* Шапка */
.header { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top); transition: background-color 250ms ease, box-shadow 250ms ease; }
.header.is-scrolled { background: rgba(11, 12, 14, .82); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); box-shadow: 0 1px 0 var(--line); }
.header__inner { display: flex; align-items: center; gap: 32px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .08em; }
.logo b { font-weight: 500; color: var(--muted); margin-left: -4px; }
.logo__mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), #ffb37a); clip-path: polygon(0 100%, 35% 0, 65% 0, 100% 100%, 70% 100%, 50% 40%, 30% 100%); }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; color: var(--muted); }
.nav a { position: relative; padding: 4px 0; transition: color 200ms ease; }
.nav a.is-current { color: var(--text); }
.header__phone { font-weight: 600; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--text); transition: transform 250ms var(--ease-out); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.burger.is-open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger.is-open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Первый экран */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 64px; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; opacity: .55; animation: heroImg 1200ms var(--ease-out) both; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg) 0%, rgba(11, 12, 14, .85) 35%, rgba(11, 12, 14, .2) 70%, rgba(11, 12, 14, .5) 100%),
  linear-gradient(0deg, var(--bg) 0%, rgba(11, 12, 14, 0) 45%); }
@keyframes heroImg { from { opacity: 0; transform: scale(1.04); } }
/* На широком экране фото не растягиваем на весь экран, а ставим справа в родных пропорциях — машина видна целиком */
@media (min-width: 861px) {
  .hero__bg { inset: auto; right: -2%; top: 12%; width: 72%; aspect-ratio: 2.1 / 1; }
  .hero__bg img { opacity: .8; object-position: center; }
  .hero__bg::after { background:
    linear-gradient(90deg, var(--bg) 0%, rgba(11, 12, 14, .6) 25%, rgba(11, 12, 14, 0) 55%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 12, 14, 0) 30%),
    linear-gradient(180deg, var(--bg) 0%, rgba(11, 12, 14, 0) 22%),
    linear-gradient(270deg, var(--bg) 0%, rgba(11, 12, 14, 0) 12%); }
}
.hero__inner > * { animation: heroIn 700ms var(--ease-out) both; }
.hero__inner > :nth-child(2) { animation-delay: 60ms; }
.hero__inner > :nth-child(3) { animation-delay: 110ms; }
.hero__inner > :nth-child(4) { animation-delay: 170ms; }
.hero__inner > :nth-child(5) { animation-delay: 220ms; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } }
.hero h1 { font-size: clamp(36px, 6.2vw, 76px); margin-bottom: 22px; max-width: 900px; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 560px; margin-bottom: 36px; }

.search { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; padding: 6px; background: rgba(22, 25, 29, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 20px; max-width: 900px; margin-bottom: 44px; box-shadow: var(--shadow); }
.search__field { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 14px; transition: background-color 200ms ease; position: relative; cursor: pointer; }
.search__field + .search__field::before { content: ""; position: absolute; left: -3px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.search__field span { font-size: 12px; color: var(--muted); }
.search__field select { appearance: none; border: 0; background: transparent; color: var(--text); font: 600 16px var(--sans); padding: 0; cursor: pointer; outline: none; width: 100%; }
.search__field select option { background: var(--card); }
.search__field:focus-within { background: var(--card-2); }
.search__btn { min-width: 190px; font-variant-numeric: tabular-nums; }

.hero__stats { list-style: none; display: flex; gap: 48px; flex-wrap: wrap; }
.hero__stats strong { display: block; font-family: var(--display); font-size: 28px; font-weight: 600; }
.hero__stats span { font-size: 14px; color: var(--muted); }

/* Марки */
.brands { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.brands::-webkit-scrollbar { display: none; }
.brands__track { display: flex; justify-content: space-between; gap: 40px; max-width: 1240px; margin: 0 auto; padding: 26px 24px; font-family: var(--display); font-size: 15px; font-weight: 500; color: #6d727a; white-space: nowrap; }

/* Секции */
.section { padding: 110px 0; }
.section--surface { background: var(--surface); }
.section__head { margin-bottom: 44px; }
.section__head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section__note { font-size: 13px; color: var(--muted); max-width: 340px; }

/* Фильтры */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.segmented button { border: 0; background: transparent; color: var(--muted); font: 500 14px var(--sans); padding: 9px 16px; border-radius: 10px; cursor: pointer; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.segmented button:active { transform: scale(0.97); }
.segmented button.is-active { background: var(--text); color: var(--bg); }
.segmented--full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 14px var(--sans); padding: 10px 16px; border-radius: 100px; cursor: pointer; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.chip:active { transform: scale(0.97); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.filters__selects { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select, .form select, .calc select { appearance: none; -webkit-appearance: none; }
.select select { background: var(--card); border: 1px solid var(--line); color: var(--text); font: 500 16px var(--sans); padding: 10px 38px 10px 14px; border-radius: 12px; cursor: pointer; min-height: 44px; transition: border-color 200ms ease; }
.select select:focus { outline: none; border-color: var(--accent); }
select option { background: var(--card); color: var(--text); }
.catalog__count { font-size: 14px; color: var(--muted); margin-bottom: 20px; font-variant-numeric: tabular-nums; }

/* Карточки авто */
.cars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.car { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color 250ms ease, transform 250ms var(--ease-out); }
.car.is-entering { animation: cardIn 350ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.car__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--card-2); cursor: pointer; }
.car__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.car__media .badge { position: absolute; left: 12px; top: 12px; }
.fav { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(11, 12, 14, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.fav:active { transform: scale(0.9); }
.fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: fill 200ms ease, stroke 200ms ease; }
.fav[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: rgba(11, 12, 14, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--text); }
.badge--new { background: var(--accent); color: #140a04; }
.car__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.car__title { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.car__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.car__meta span { font-size: 13px; color: var(--muted); background: var(--card-2); padding: 4px 9px; border-radius: 7px; }
.car__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.car__price { font-family: var(--display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.car__monthly { display: block; font-size: 13px; color: var(--muted); font-family: var(--sans); font-weight: 400; }
.car__more { padding: 10px 16px; min-height: 42px; font-size: 14px; }

.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty p { color: var(--muted); max-width: 480px; margin: 0 auto 20px; }
.empty strong { color: var(--text); display: block; margin-bottom: 4px; }
.empty[hidden] { display: none; }

/* Кредит */
.credit { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.credit__info h2 { margin-bottom: 20px; }
.ticks { list-style: none; display: grid; gap: 12px; margin-top: 28px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
.ticks--compact { gap: 8px; margin-top: 0; font-size: 14px; }

.calc { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: grid; gap: 24px; box-shadow: var(--shadow); }
.calc__row { display: grid; gap: 10px; }
.calc__label { font-size: 13px; color: var(--muted); }
.calc__label-row { display: flex; justify-content: space-between; align-items: baseline; }
.calc__label-row output { font-weight: 600; font-variant-numeric: tabular-nums; }
.calc select, .form input, .form select { width: 100%; min-width: 0; min-height: 52px; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); font: 500 16px var(--sans); padding: 14px 16px; border-radius: 12px; outline: none; transition: border-color 200ms ease, box-shadow 200ms ease; }
.calc select, .form select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; cursor: pointer; }
.calc select:focus, .form input:focus, .form select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --fill: 28%; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--card-2) var(--fill)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--card-2) var(--fill)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transition: transform 160ms var(--ease-out); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

.calc__result { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: center; padding: 22px; background: var(--bg); border-radius: 16px; border: 1px solid var(--line); }
.calc__payment { display: block; font-family: var(--display); font-size: clamp(26px, 3vw, 34px); font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc__details { display: grid; gap: 8px; font-size: 14px; }
.calc__details div { display: flex; justify-content: space-between; gap: 10px; }
.calc__details dt { color: var(--muted); }
.calc__details dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.calc__note { font-size: 12px; color: var(--muted); text-align: center; margin-top: -10px; }

/* Trade-in */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; counter-reset: none; }
.step { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step__num { font-family: var(--display); font-size: 14px; color: var(--accent); display: block; margin-bottom: 40px; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* Гарантии */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 70px; }
.why__item svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.why__item h3 { margin-bottom: 10px; font-size: 17px; }
.why__item p { color: var(--muted); font-size: 15px; }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.review p { font-size: 16px; line-height: 1.6; }
.review footer { font-size: 14px; color: var(--muted); }
.review footer strong { color: var(--text); }

/* Заявка */
.request { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.request__info h2 { margin-bottom: 20px; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: grid; gap: 18px; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__field { display: grid; gap: 6px; }
.form__field[hidden] { display: none; }
.form__field label { font-size: 13px; color: var(--muted); }
.form input[type="date"] { color-scheme: dark; }
.form__field.has-error input { border-color: #ff5a5a; }
.form__error { color: #ff7a7a; font-size: 12px; }
.form__error:empty { display: none; }
.form__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.form__check input { width: 18px; height: 18px; min-height: 0; padding: 0; flex: none; margin-top: 2px; accent-color: var(--accent); }
.form__check.has-error { color: #ff7a7a; }
.segmented--wrap { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
.form__success { background: rgba(79, 209, 139, .1); border: 1px solid rgba(79, 209, 139, .3); color: var(--ok); padding: 16px 18px; border-radius: 12px; display: grid; font-size: 14px; transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
@starting-style { .form__success { opacity: 0; transform: translateY(6px); } }
.form__success span { color: var(--muted); }
.form__success[hidden] { display: none; }
select.is-prefilled { animation: flash 900ms ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 4px rgba(255, 106, 26, .4); border-color: var(--accent); } }

/* Контакты */
.contacts { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.contacts h2 { margin-bottom: 32px; }
.contacts__list { display: grid; gap: 18px; }
.contacts__list dt { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 4px; }
.contacts__list dd { font-size: 18px; }
.map { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); }
.map svg { width: 100%; height: 100%; display: block; }

.footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.footer .logo { color: var(--text); }
.footer__credits { flex-basis: 100%; font-size: 12px; opacity: .7; }

/* Модалка автомобиля */
.modal { margin: auto; padding: 0; border: 1px solid var(--line-2); border-radius: 24px; background: var(--card); color: var(--text); width: min(960px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1.15fr 1fr; opacity: 0; transform: scale(.97); transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
.modal:not([open]) { display: none; }
.modal[open] { opacity: 1; transform: none; }
@starting-style { .modal[open] { opacity: 0; transform: scale(.97); } }
.modal::backdrop { background: rgba(0, 0, 0, 0); transition: background-color 220ms ease, overlay 220ms allow-discrete, display 220ms allow-discrete; }
.modal[open]::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
@starting-style { .modal[open]::backdrop { background: rgba(0, 0, 0, 0); } }
.modal__media { background: var(--card-2); min-height: 100%; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 32px; display: grid; gap: 16px; align-content: start; }
.modal__body h3 { font-size: 24px; }
.modal__price strong { font-family: var(--display); font-size: 26px; font-weight: 600; display: block; }
.modal__price span { color: var(--muted); font-size: 14px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.specs div { background: var(--card); padding: 10px 14px; }
.specs dt { font-size: 12px; color: var(--muted); }
.specs dd { font-size: 14px; font-weight: 600; }
.modal__label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.modal__actions .btn { flex: 1; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(11, 12, 14, .7); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.modal__close:active { transform: scale(.94); }

.mobile-cta { display: none; }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Hover — только для мыши */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn--ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
  .nav a:hover { color: var(--text); }
  .search__field:hover { background: var(--card-2); }
  .segmented button:not(.is-active):hover { color: var(--text); }
  .chip:not(.is-active):hover { border-color: var(--text); }
  .select select:hover { border-color: var(--line-2); }
  .car:hover { border-color: var(--line-2); }
  .car:hover .car__media img { transform: scale(1.04); }
  .fav:hover { background: rgba(11, 12, 14, .85); }
  .modal__close:hover { background: var(--bg); }
}

/* Адаптив */
@media (max-width: 1080px) {
  .header__phone { display: none; }
  .cars { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .filters__selects { margin-left: 0; }
}

@media (max-width: 860px) {
  .nav { position: fixed; inset: calc(76px + env(safe-area-inset-top)) 0 auto; flex-direction: column; gap: 0; background: var(--bg); padding: 8px 24px 24px; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform 250ms var(--ease-out), opacity 200ms ease, visibility 0s 250ms; z-index: -1; color: var(--text); }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: transform 250ms var(--ease-out), opacity 200ms ease, visibility 0s; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .header__cta { margin-left: auto; }
  .burger { display: block; }
  .header { background: rgba(11, 12, 14, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .search { grid-template-columns: 1fr 1fr; }
  .search__field:nth-child(3)::before { display: none; }
  .search__field:nth-child(3) { grid-column: span 2; }
  .search__btn { grid-column: span 2; }
  .credit, .request, .contacts { grid-template-columns: 1fr; gap: 44px; }
  .steps, .reviews { grid-template-columns: 1fr; }
  .modal { grid-template-columns: 1fr; }
  .modal__media { aspect-ratio: 16 / 10; min-height: auto; }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .header__cta { display: none; }
  .burger { margin-left: auto; margin-right: -10px; }
  /* Фото сверху в родных пропорциях, текст — под ним */
  .hero { padding: calc(64px + 47vw + env(safe-area-inset-top)) 0 40px; min-height: 0; }
  .hero__bg { inset: auto; top: calc(64px + env(safe-area-inset-top)); left: -8%; right: -8%; aspect-ratio: 2.1 / 1; }
  .hero__bg img { opacity: .9; object-position: center; }
  .hero__bg::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 12, 14, 0) 45%), linear-gradient(180deg, var(--bg) 0%, rgba(11, 12, 14, 0) 18%); }
  .hero__lead { font-size: 16px; }
  .search { grid-template-columns: 1fr; }
  .search__field::before { display: none; }
  .search__field:nth-child(3), .search__btn { grid-column: auto; }
  .hero__stats { gap: 24px; }
  .hero__stats strong { font-size: 22px; }
  .brands__track { padding: 20px 16px; gap: 28px; }
  .filters { gap: 10px; }
  .segmented:not(.segmented--full) { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .segmented button { padding: 9px 8px; white-space: nowrap; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; overscroll-behavior-x: contain; width: calc(100% + 32px); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .filters__selects { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .filters__selects .select:last-child { grid-column: span 2; }
  .select select { width: 100%; }
  .cars { grid-template-columns: 1fr; gap: 16px; }
  .why { grid-template-columns: 1fr; }
  .calc, .form { padding: 22px 18px; border-radius: 20px; }
  .calc__result { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .segmented--wrap { grid-template-columns: 1fr 1fr; }
  .modal { width: 100%; max-width: 100%; max-height: 92svh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0; transform: translateY(24px); }
  .modal[open] { transform: none; }
  @starting-style { .modal[open] { opacity: 0; transform: translateY(24px); } }
  .modal__body { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .modal__actions { flex-direction: column; }

  .mobile-cta { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(11, 12, 14, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); transition: transform 300ms var(--ease-drawer); }
  .mobile-cta.is-hidden { transform: translateY(100%); }
  .mobile-cta__btn { flex: 1; }
  .mobile-cta__phone { width: 52px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 14px; transition: transform 160ms var(--ease-out); }
  .mobile-cta__phone:active { transform: scale(.94); }
  .footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms ease; }
  .hero__inner > *, .hero__bg img { animation: fadeOnly 300ms ease both; }
  .car.is-entering { animation: fadeOnly 200ms ease both; }
  .car__media img { transition: none; }
  .modal, .modal[open] { transform: none; }
}
@keyframes fadeOnly { from { opacity: 0; } }
