/* ==========================================================================
   base.css — reset, типографика, контейнер, служебные классы.
   Подключать после tokens.css.
   ========================================================================== */

/* ---------- Reset ------------------------------------------------------- */

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

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

body,
h1, h2, h3, h4,
p, figure, blockquote,
ul, ol, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Страховка от горизонтальной прокрутки. Только на html: если повесить
   overflow на body, он становится скролл-контейнером и ломает
   position: sticky у шапки. */
html { overflow-x: hidden; }

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

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

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

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

h1, h2, h3, h4 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

/* Переносы: русские заголовки длинные, на узких экранах рвём аккуратно. */
h1, h2, h3, .ttl { overflow-wrap: break-word; }


/* ---------- Фокус ------------------------------------------------------- */



/* На тёмных плитках оранжевая обводка сливается — подсвечиваем белым. */
.card--dark :focus-visible,
.card--orange :focus-visible { outline-color: var(--c-white); }


/* ---------- Контейнер и страница ---------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-page);
}

.page { padding-block: var(--pad-page) 70px; }

@media (max-width: 767px) {
  .page { padding-block: var(--pad-page) 44px; }
}


/* ---------- Заголовок секции -------------------------------------------- */

.sec-head {
  margin-block: var(--space-section) var(--space-head);
}

.sec-head h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-tight);
}

/* Секция-якорь не должна уезжать под липкую шапку при переходе по /#tariffs.
   Значение = высота шапки + воздух. */
[id] { scroll-margin-top: 106px; }

@media (max-width: 767px) {
  [id] { scroll-margin-top: 92px; }
}


/* ---------- Типографические примитивы плитки ---------------------------- */

.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-eyebrow);
  line-height: 1.35;
  text-transform: uppercase;
  opacity: var(--o-eyebrow);
}

.ttl {
  display: block;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.ttl-xl { font-size: var(--fs-h1); }
.ttl-lg { font-size: var(--fs-title-lg); }
.ttl-md { font-size: var(--fs-title-md); }
.ttl-sm { font-size: var(--fs-title-sm); }

/* Многострочные заголовки плиток дышат свободнее, чем hero. */
.ttl-md, .ttl-sm { line-height: var(--lh-title); }

.meta {
  display: block;
  margin-top: 8px;
  font-size: var(--fs-meta);
  line-height: var(--lh-body);
  opacity: var(--o-muted);
}


/* ---------- Служебное --------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Ссылка «к содержанию»: скрыта, пока не получит фокус с клавиатуры. */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-field) 0;
  background: var(--c-ink);
  color: var(--c-white);
  font-size: var(--fs-tab);
  transform: translateY(-110%);
}

.skip-link:focus { transform: translateY(0); }

.no-scroll { overflow: hidden; }

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