/* ============ Токены, сброс, типографика ============ */
:root {
  --bg: #0D1117;
  --bg-elev: #161B22;
  --line: #21262D;
  --text: #E6EDF3;
  --muted: #8B949E;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, .12);
  --ok: #2EA043;
  --warn: #D29922;
  --bad: #DA3633;

  --font: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --h1: 48px;
  --h2: 32px;
  --base: 16px;
  --small: 14px;

  --header-h: 76px;
  --radius: 8px;
  --t: 200ms;
  --t-slow: 300ms;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; }
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
button, select, textarea, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ============ Типографика блоков ============ */
.h2 {
  font-size: var(--h2);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
}
.h2::before {
  content: '// ';
  color: var(--accent);
  font-weight: 500;
}

.section__lead {
  color: var(--muted);
  margin-top: 12px;
  max-width: 72ch;
}

.note {
  font-size: var(--small);
  color: var(--muted);
}
.note--hint { margin-top: 14px; }

/* ============ Иконки ============ */
.icon {
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon--sm { width: 18px; height: 18px; }
.icon--md { width: 28px; height: 28px; stroke: var(--accent); }
.icon--lg { width: 36px; height: 36px; stroke: var(--accent); }
.icon--accent { stroke: var(--accent); }
.sprite { position: absolute; }

/* ============ Утилиты ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  padding: 8px 14px;
  border-radius: var(--radius);
}
.skip-link:focus { left: 12px; }

/* Появление блоков при скролле (один раз) */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
  :root { --h1: 32px; --h2: 24px; --header-h: 64px; }
}