/* Шрифты, сброс, типографика и общая сетка. */
@font-face {
  font-family: Montserrat;
  src: url(/fonts/montserrat-variable.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/jetbrains-mono-400.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
p { line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 5px; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wrap {
  width: min(var(--page-width), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Заголовки разделов: жирная первая строка и тонкое продолжение. */
.display {
  font-size: clamp(38px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
}
.thin { font-weight: 300; }

/* Моноширинная подпись: метки, метаданные, служебные строки. */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
