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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "calt", "kern";
}

body {
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--c-ink);
  background: var(--c-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: var(--c-ink);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--c-ink-muted); }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--c-ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 7.5vw, 92px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
}
h2 {
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.05;
}
h3 {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.15;
}
h4 { font-size: 18px; font-weight: 600; letter-spacing: -0.012em; }
h5 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }

p {
  color: var(--c-ink-muted);
  text-wrap: pretty;
}

em, .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: var(--container-narrow); }
.container--tight { max-width: var(--container-tight); }

@media (min-width: 768px) {
  .container { padding: 0 40px; }
}
@media (min-width: 1280px) {
  .container { padding: 0 56px; }
}

.section {
  padding-block: clamp(80px, 11vw, 160px);
  position: relative;
}
.section--tight { padding-block: clamp(56px, 7vw, 96px); }
.section--xtight { padding-block: clamp(40px, 5vw, 64px); }
.section--dark {
  background: var(--c-graphite);
  color: #E8E5DE;
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #FFFFFF; }
.section--dark p { color: rgba(232, 229, 222, 0.62); }

.section--warm { background: var(--c-bg-warm); }
.section--paper { background: var(--c-bg-elevated); }

/* Тонкая декоративная линия-разделитель */
.section--bordered { border-top: 1px solid var(--c-line); }
.section--bordered-bottom { border-bottom: 1px solid var(--c-line); }

/* Eyebrow — мягкий, без линий */
.eyebrow {
  display: inline-block;
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--c-accent-soft);
}
.eyebrow--muted { color: var(--c-ink-muted); background: rgba(107, 99, 88, 0.08); }
.eyebrow--accent { color: var(--c-accent); background: var(--c-accent-soft); }
.eyebrow--light { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.1); }
.eyebrow--dark { color: #fff; background: var(--c-ink); }

/* Section index — скрыт по умолчанию (не magazine-style) */
.section-index { display: none; }

.muted { color: var(--c-ink-muted); }
.soft { color: var(--c-ink-soft); }

.grid { display: grid; gap: var(--space-5); }

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

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

:focus-visible {
  outline: 1.5px solid var(--c-ink);
  outline-offset: 4px;
  border-radius: 2px;
}

hr.rule {
  border: 0;
  height: 1px;
  background: var(--c-line);
  margin: 0;
}
hr.rule--strong { background: var(--c-line-strong); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
