/* Reset, типографика, утилиты. Значения — только из tokens.css. */

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

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

ul, ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input, textarea, select {
  font: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--f-head);
  line-height: var(--lh-head);
  font-weight: 600;
  margin: 0;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0; }

/* Фокус — не убирать outline нигде на сайте */
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Утилиты */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-3);
}

.measure {
  max-width: var(--measure);
}

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s-2);
  z-index: 100;
  background: var(--c-action);
  color: var(--c-on-action);
  padding: var(--s-1) var(--s-2);
  border-radius: var(--radius-sm);
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: var(--s-2);
}

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

.text-small {
  font-size: var(--fs-small);
}

.text-center {
  text-align: center;
}

/* Появление секций при скролле */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-base), transform var(--t-base);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
