/* ============================================================
   База: сброс, типографика, общие элементы
   ============================================================ */

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

* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-ui);
  font-size: var(--fs-15);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease);
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

ul, ol { list-style: none; }

::selection {
  background: var(--text);
  color: var(--bg);
}

/* Фокус — чёткий, доступный, в монохроме */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Скроллбар в тоне темы */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }

/* --- Контейнеры и сетка --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.section--tight { padding-top: var(--space-5); padding-bottom: var(--space-5); }

/* --- Заголовки секций (редакционные) --- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.kicker {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-2);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-24);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-link {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: color var(--t-fast) var(--ease);
}

.section-link:hover { color: var(--text); }

/* --- Кнопки: монохром, инверсия вместо цвета --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.btn--solid {
  background: var(--text);
  color: var(--inverse);
}

.btn--solid:hover { transform: translateY(-1px); }

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover { border-color: var(--text); }

.btn--small { padding: 9px 15px; font-size: var(--fs-13); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Скрытые/декоративные --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Тонкая разделительная линия — для списков/рядов */
.hairline { border-top: 1px solid var(--border); }