/* Shared reset, body, typography, focus */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* У UA-правила [hidden] специфичность (0,1,0) — ровно как у .btn { display: inline-flex },
   и класс выигрывает по порядку. Без !important атрибут hidden молча не работает
   на любом элементе, которому класс задаёт display. */
[hidden] { display: none !important; }

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

body {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }

/* Без явного размера браузер отдаёт code «дефолт моноширинного» (~13px),
   и он плывёт в зависимости от того, задан ли font-size у body. Фиксируем. */
code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
}

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

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

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* iOS: prevent input zoom */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  font-size: 16px;
}

.headline-xl {
  font-size: 40px;
  font-weight: 600;
  line-height: 48px;
}
.headline-lg {
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
}
.headline-md {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

@media (max-width: 767px) {
  .headline-xl {
    font-size: 32px;
    line-height: 40px;
  }
  .headline-lg {
    font-size: 24px;
    line-height: 32px;
  }
}
