/* ============================================================
   Хочу-Мотор · Base: reset, типографика, контейнеры, утилиты
   Брейкпоинты (ТЗ §6.4): 430, 768, 1024, ≥1280
   ============================================================ */

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

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

body > main {
  width: 100%;
  flex: 1 0 auto;
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a.link { color: var(--accent-text); }
a.link:hover { color: var(--red-light); }

button {
  font-family: inherit;
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

input, select, textarea { font-family: inherit; color: var(--t1); }

:where(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.check input:focus-visible + .check__box {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; }

/* ---------- Контейнер ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* ---------- Типографика ---------- */
.h1 {
  font-family: var(--font-head);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.h2 {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }

/* Компактный заголовок служебных экранов: 404, пустая корзина,
   «ничего не найдено», offline. Размеры из макетов 27 и M4/M5/M19.
   Двойной класс — чтобы не перебивался брейкпоинтами .h2 ниже. */
.h2.h2--compact { font-size: 22px; }

/* Метка секции — Oswald, разрядка */
.sec-label {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--t2);
  text-transform: uppercase;
}

.sec-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--t1);
  text-transform: uppercase;
}

.price {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 600;
}

.oem {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--t3);
}

.muted { color: var(--t3); }
.body-text { font-size: 13.5px; color: var(--t2); line-height: 1.75; }

@media (max-width: 1279px) {
  .h1 { font-size: 38px; }
  .h2 { font-size: 26px; }
  .h3 { font-size: 19px; }
  .price { font-size: 22px; }
}

@media (max-width: 1023px) {
  .h1 { font-size: 34px; }
  .h2 { font-size: 24px; }
  .h3 { font-size: 18px; }
  .price { font-size: 20px; }
}

@media (max-width: 767px) {
  body { font-size: 13px; }
  .h1 { font-size: 28px; }
  .h2 { font-size: 21px; }
  .h2.h2--compact { font-size: 18px; }
  .h3 { font-size: 16px; }
  .price { font-size: 18px; }
  .sec-label { font-size: 12px; letter-spacing: .14em; }
}

/* ---------- Логотип ---------- */
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: none;
}

.logo__name {
  font-family: var(--font-logo);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(180deg, var(--logo-a), var(--logo-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.logo__tag {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .28em;
  color: var(--t2);
  text-transform: uppercase;
  white-space: nowrap;
}

.logo--sm .logo__name { font-size: 20px; }
.logo--sm .logo__tag { display: none; }

/* Client vector lockup: car, wordmark and descriptor share one aspect ratio. */
.logo--header { width: clamp(200px, 16vw, 240px); }
.logo__image { display: block; width: 100%; height: auto; }
.logo__image--light { display: none; }
[data-theme="light"] .logo__image--dark { display: none; }
[data-theme="light"] .logo__image--light { display: block; }

@media (max-width: 767px) {
  .m-home-head .logo--header { width: min(300px, calc(100% - 56px)); }
}

/* ---------- Утилиты ---------- */
.hide-mobile { display: revert; }
.only-mobile { display: none !important; }

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .only-mobile { display: revert !important; }
}

.hide-tablet-down { display: revert; }
@media (max-width: 1023px) {
  .hide-tablet-down { display: none !important; }
}

/* Плейсхолдер фото (до выгрузки реальных фото с Avito) */
.ph {
  background: repeating-linear-gradient(45deg, var(--ph-a) 0 7px, var(--ph-b) 7px 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--t6);
}

.ph__label {
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--t6);
}

/* Скрытие визуально, доступно скринридерам */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
