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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  /* Подсветку тапа заменяем своим :active ниже — иначе они накладываются. */
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--accent); }

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

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

h1,
h2 {
  margin: 0;
  font-family: var(--f-display);
  letter-spacing: -.01em;
  text-wrap: balance;
}

h1 {
  font-weight: 700;
  font-size: clamp(32px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -.02em;
  max-width: 920px;
}

h1 em { font-style: normal; color: var(--accent); }

h2 {
  font-weight: 600;
  font-size: clamp(22px, 3vw, 28px);
}

.num { font-variant-numeric: tabular-nums; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: none;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
}

.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--fg); }

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

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 719px) {
  .btn {
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
  }

  h1 { font-size: 27px; }

  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }

  /* Липкая шапка не должна накрывать заголовок при переходе по #cars. */
  section[id] { scroll-margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}
