/* ============================================================
   base.css — reset, контейнер, типографика, утилиты
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* ---------- Контейнер ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); scroll-margin-top: calc(var(--header-h) + 12px); }
.section--tint    { background: var(--c-surface); }
.section--badge   { background: var(--c-badge-2); }

/* ---------- Типографика ---------- */
.h-hero {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.h-section {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--c-ink);
}
.h-3 {
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: var(--lh-head);
  color: var(--c-ink);
}
.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-head);
  color: var(--c-text);
}
.muted { color: var(--c-muted); }
.small { font-size: var(--fs-sm); }
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Чёрный маркер-заливка за словом в капсовом заголовке: <span class="mark">СЛОВО</span>
   Высота полосы задаётся стопами градиента (0 → 0.82em). Сплошной background-color
   красит весь em-бокс строки, а у Bebas под капителью большая «мёртвая» зона descent —
   отсюда неравномерная заливка сверху/снизу. Градиент подрезает бокс: 0.82em подобран
   так, что поля над и под капителью равны (ink сидит ~0.05em от верха бокса). Высота
   зашита в сам градиент, поэтому Яндекс.Браузер не может растянуть полосу на всю строку.
   line-height:1 дополнительно фиксирует высоту inline-бокса. */
.mark {
  color: var(--c-on-dark);
  background-image: linear-gradient(to bottom,
    var(--c-ink) 0,
    var(--c-ink) 0.82em,
    transparent 0.82em);
  background-repeat: no-repeat;
  padding: 0 0.18em;
  line-height: 1;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Заголовок секции: «слово + маркер-слово» с общим верхним eyebrow */
.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section-head .h-section + p { margin-top: var(--sp-4); }

/* На мобильном заголовки секций крупнее и на всю ширину */
@media (max-width: 640px) {
  .h-section { font-size: clamp(46px, 13.5vw, 58px); line-height: 1.02; }
  .section-head { max-width: none; }
}

/* ---------- Утилиты ---------- */
.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-5); }
.flow-2 { display: grid; gap: var(--sp-5); grid-template-columns: repeat(2, 1fr); }
.flow-3 { display: grid; gap: var(--sp-5); grid-template-columns: repeat(3, 1fr); }
.flow-4 { display: grid; gap: var(--sp-5); grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .flow-3, .flow-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .flow-2, .flow-3, .flow-4 { grid-template-columns: 1fr; }
}

.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;
}
[hidden] { display: none !important; }
