/* ============================================================
   01 — BASE / RESET / ТЕКСТУРЫ
   ============================================================ */

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

* { margin: 0; }

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- Лёгкая зернистость --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Crect width='128' height='128' fill='%23fff'/%3E%3Ccircle cx='12' cy='18' r='1' fill='%23000'/%3E%3Ccircle cx='44' cy='6' r='1' fill='%23000'/%3E%3Ccircle cx='78' cy='32' r='1' fill='%23000'/%3E%3Ccircle cx='102' cy='58' r='1' fill='%23000'/%3E%3Ccircle cx='28' cy='72' r='1' fill='%23000'/%3E%3Ccircle cx='64' cy='96' r='1' fill='%23000'/%3E%3Ccircle cx='96' cy='110' r='1' fill='%23000'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* --- Виньетка краёв экрана --- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

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

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

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

input,
textarea {
  font: inherit;
  color: inherit;
}

ul { list-style: none; padding: 0; }

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--hazard);
  outline-offset: 3px;
}

/* --- Заголовки --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

/* --- Скрытые служебные --- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-link */
.skip-link {
  position: fixed;
  top: -120px;
  left: 12px;
  z-index: 10000;
  background: var(--red);
  color: #fff;
  padding: 0.8rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }
