/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: hidden; }

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-m);
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 479px) {
  :root {
    --section-padding: 48px 0;
  }
}

.nowrap-desktop { white-space: normal; }
@media (min-width: 768px) {
  .nowrap-desktop { white-space: nowrap; }
}

/* Перенос строки только на мобильных */
br.br-mobile { display: none; }
@media (max-width: 639px) {
  br.br-mobile { display: block !important; }
}

/* ── Типографика ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-h1); font-weight: 800; }
h2 { font-size: var(--text-h2); font-weight: 800; }
h3 { font-size: var(--text-h3); font-weight: 700; }
h4 { font-size: var(--text-h4); font-weight: 700; }

p { color: var(--color-text-secondary); }

a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: var(--transition-base);
}
a:hover { color: var(--color-cyan); text-decoration: underline; }

ul, ol { list-style: none; }

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

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-body-m);
}

/* ── Focus-visible (доступность) ───────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Скроллбар (Chromium) ──────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-cyan-dark); }

/* ── Выделение текста ──────────────────────────────────────── */
::selection {
  background: var(--color-cyan-dim);
  color: var(--color-cyan);
}
