/* =========================================================
   БАЗА: сброс, типографика, зерно, общие утилиты
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

/* Видимый фокус для клавиатуры */
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Ссылка «перейти к содержимому» */
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 200;
  padding: 10px 18px; background: var(--accent); color: var(--ink);
  font-family: var(--f-mono); font-size: var(--fs-mono); text-transform: uppercase; letter-spacing: .08em;
  border-radius: var(--radius-pill);
}
.skip-link:focus { top: 12px; }

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

/* --- Типографика --- */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: -0.01em;
}
.display em, .display i { font-style: italic; text-transform: none; letter-spacing: 0; }

/* Крошечные моноширинные подписи: [ 001 ], [ графика ] */
.mono {
  font-family: var(--f-mono);
  font-size: var(--fs-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1.5;
}
.bracket::before { content: '[\00a0'; }
.bracket::after  { content: '\00a0]'; }
.muted { color: var(--muted); }
.star { color: var(--accent); }

/* --- Зерно плёнки поверх всего сайта --- */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 150;
  pointer-events: none;
  opacity: .055;
  background-image: url("../assets/img/grain.png");
  background-size: 160px 160px;
}

/* --- Контейнер и сетка 12 колонок --- */
.wrap { padding-inline: var(--gutter); }
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* Блокировка прокрутки (меню, окна) */
html.is-locked, html.is-locked body { overflow: hidden; }

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