/* ==========================================================================
   VERITEX · base: сброс, типографические роли, раскладка, утилиты
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

/* ---------- фокус: кольцо --violet-glow, везде, только с клавиатуры ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--violet-glow);
  outline-offset: 3px;
}
.paper :focus-visible { outline-color: var(--violet); }   /* на светлой «бумаге» кольцо glow не читается (2.5:1) */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- типографические роли ---------- */
.t-display { font-size: var(--fs-display); line-height: 1.04; font-weight: 400; letter-spacing: -0.04em; }
.t-h1      { font-size: var(--fs-h1);      line-height: 1.06; font-weight: 400; letter-spacing: -0.04em; }
.t-h2      { font-size: var(--fs-h2);      line-height: 1.12; font-weight: 400; letter-spacing: -0.03em; }
.t-h3      { font-size: var(--fs-h3);      line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.t-body    { font-size: var(--fs-body);    line-height: 1.55; font-weight: 400; letter-spacing: 0; }
.t-small   { font-size: var(--fs-small);   line-height: 1.5;  font-weight: 400; letter-spacing: 0; }
.t-label   { font-size: var(--fs-label);   line-height: 1.3;  font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.t-mono    { font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.5; font-weight: 400; letter-spacing: 0; }

/* Данные — всегда моноширинные, цифры табличные */
.mono, .data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.accent { color: var(--violet-glow); }

/* ссылки внутри текста: подчёркивание обязательно (цвет сам по себе — 2.5:1 к тексту) */
.link, .prose a {
  color: var(--violet-glow);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.link:hover, .prose a:hover { text-decoration-thickness: 2px; }

/* неразрывный пробел в ценах делается в разметке/JS: «2&nbsp;900&nbsp;₽» */
.nowrap { white-space: nowrap; }

/* ---------- раскладка ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);   /* 1360 + поля 24 → контент 1360 на экране ≥ 1408 */
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- reduced motion: статика, без переходов ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
