*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--text-body);
  line-height: 1.62;
  font-weight: 400;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1); line-height: 1.08; }
h2 { font-size: var(--text-h2); line-height: 1.14; }
h3 { font-size: var(--text-h3); line-height: 1.25; letter-spacing: -0.01em; }

p { margin: 0 0 var(--s-2); }
p:last-child { margin-bottom: 0; }

a { color: var(--indicator); text-decoration: underline; text-underline-offset: 0.18em;
    text-decoration-thickness: 1px; transition: color var(--fast) var(--ease); }
a:hover { color: var(--indicator-deep); }

ul, ol { margin: 0 0 var(--s-2); padding-left: 1.15em; }
li { margin-bottom: 0.35em; }

img, svg { max-width: 100%; }

/* Телефон и почта в таблицах реквизитов — такая же тач-цель, как кнопка */
td a { display: inline-block; padding-block: 11px; }

:focus-visible {
  outline: 2px solid var(--indicator);
  outline-offset: 3px;
  border-radius: 2px;
}

.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;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--indicator); color: #fff; padding: 12px 20px;
  text-decoration: none; border-radius: 0 0 var(--radius-s) 0;
}
.skip:focus { left: 0; }

.wrap { width: min(100% - 40px, var(--page)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 40px, var(--column)); margin-inline: auto; }

.section { padding-block: var(--s-6); }
.section--tight { padding-block: var(--s-5); }
.section--steel { background: var(--steel); color: var(--ink-on-steel); }
.section--steel h1, .section--steel h2, .section--steel h3 { color: var(--ink-on-steel); }
.section--steel a { color: var(--indicator-lit); }
.section--paper-deep { background: var(--paper-deep); }

/* Над заголовком всегда больше воздуха, чем под ним */
.section > .wrap > h2,
.section > .wrap--narrow > h2 { margin-bottom: var(--s-3); }

.lead {
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 62ch;
}
.section--steel .lead { color: var(--ink-on-steel-soft); }

.muted { color: var(--ink-soft); }
.small { font-size: var(--text-sm); }
.xs { font-size: var(--text-xs); line-height: 1.5; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

@media (max-width: 640px) {
  .section { padding-block: var(--s-5); }
  .wrap, .wrap--narrow { width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
