/* ==========================================================================
   Базовые стили: сброс, типографика, контейнер, утилиты.
   Подключается после variables.css и fonts.css.
   ========================================================================== */

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

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-base);
  font-size: var(--fs-xs);
  line-height: var(--lh-text);
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul,
ol {
  list-style: none;
}

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

/* --- Типографика (роли) ---------------------------------------------------
   Размеры берутся из адаптивных переменных (см. variables.css).            */
.h1,
.h2,
.h3 {
  font-weight: 700;
  line-height: var(--lh-heading);
}

.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }

.text-l   { font-size: var(--fs-l); }
.text-m   { font-size: var(--fs-m); }
.text-s   { font-size: var(--fs-s); }
.text-xs  { font-size: var(--fs-xs); }
.text-xxs { font-size: var(--fs-xxs); }
.text-3xs { font-size: var(--fs-3xs); }

.text-bold    { font-weight: 700; }
.text-regular { font-weight: 400; }
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }

/* --- Контейнер ------------------------------------------------------------*/
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* --- Утилиты --------------------------------------------------------------*/
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.no-scroll {
  overflow: hidden;
}
