/* ============================================================
   OK GO — Base: reset, типографика, секции, утилиты
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--g0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--go);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--g2);
  color: var(--wh);
  font-size: 14px;
  font-weight: 600;
  transition: top .2s ease;
}

.skip-link:focus-visible { top: 0; }

/* ---------- Секции ---------- */

.section {
  padding: var(--py) var(--px);
}

.section--dark   { background: var(--g0); color: var(--wh); }
.section--deep   { background: var(--g2); color: var(--wh); }
.section--mid    { background: var(--g1); color: var(--wh); }
.section--light  { background: var(--sd2); color: var(--ink); }
.section--paper  { background: var(--paper); color: var(--ink); }

.container {
  max-width: var(--container);
  margin: 0 auto;
}

/* ---------- Типографика ---------- */

.h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: 1.04;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.25;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  font-weight: 400;
}

.section--dark .lead,
.section--deep .lead,
.section--mid .lead { color: var(--wh-faint); }
.section--light .lead,
.section--paper .lead { color: var(--ink-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section--dark .eyebrow,
.section--deep .eyebrow,
.section--mid .eyebrow { color: var(--go-text); }
.section--light .eyebrow,
.section--paper .eyebrow { color: var(--ink-faint); }

/* ---------- Reveal-анимация при скролле ---------- */

/* Скрытое начальное состояние применяется только когда JS точно работает
   (класс .js ставится скриптом head.js) — иначе контент виден всегда */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s var(--ease-out), transform .65s var(--ease-out);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d1 { transition-delay: .06s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .22s; }
.reveal.d4 { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
