/* ============================================================
   Конекса — сброс, типографика, контейнеры
   Сброс через :where() — нулевая специфичность, компоненты
   перебивают его без борьбы и без !important.
   ============================================================ */

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

:where(html) {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-5));
}
@media (prefers-reduced-motion: reduce) {
  :where(html) { scroll-behavior: auto; }
}

:where(body) {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:where(h1, h2, h3, h4, h5, h6) {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
:where(h1) { font-size: var(--fs-h1); }
:where(h2) { font-size: var(--fs-h2); }
:where(h3) { font-size: var(--fs-h3); line-height: 1.22; }
:where(h4) { font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -0.015em; }

:where(p, ul, ol, dl, figure, table, blockquote) { margin: 0; }
:where(p) { text-wrap: pretty; }

:where(a) {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
:where(a):hover { color: var(--blue-700); }

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

:where(ul, ol) { padding-left: 1.25em; }
:where(li) { margin-block: 0.25em; }

:where(button, input, select, textarea) { font: inherit; color: inherit; margin: 0; }
:where(table) { border-collapse: collapse; width: 100%; }
:where(strong, b) { font-weight: 600; }

:where(a, button, input, select, textarea, summary, label, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--blue); color: #fff; }

/* ---- Раскладка ------------------------------------------------ */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }

/* Тёмная плашка внутри секции: не во всю ширину экрана, а блоком
   со скруглением — как на референсах. */
.block-dark {
  background: var(--ink-900);
  color: var(--on-dark);
  border-radius: var(--r-block);
  padding: clamp(28px, 4vw, 64px);
}
.block-dark h2, .block-dark h3 { color: var(--on-dark); }

.block-mint { background: var(--mint); border-radius: var(--r-block); padding: clamp(28px, 4vw, 64px); }
.block-blue { background: var(--blue-50); border-radius: var(--r-block); padding: clamp(28px, 4vw, 64px); }

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

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  background: var(--ink-900);
  color: var(--on-dark);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-4); color: var(--on-dark); }

.num { font-variant-numeric: tabular-nums; }

/* ---- Типовые текстовые роли ----------------------------------- */

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}
.block-dark .eyebrow { color: var(--mint-200); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink-600);
  max-width: 60ch;
}
.block-dark .lead { color: var(--on-dark-dim); }

.note { font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-400); }
.block-dark .note { color: var(--on-dark-dim); }

/* Заголовок секции: по центру, как на обоих референсах */
.section-head {
  display: grid;
  gap: var(--s-4);
  justify-items: center;
  text-align: center;
  margin-bottom: clamp(28px, 3.5vw, 52px);
}
.section-head .lead { max-width: 56ch; }
.section-head--left { justify-items: start; text-align: left; }
