/* ============================================================
   КЛИПЗАВОД — Base / reset / typography
   ============================================================ */

/* ---------- Шрифт Wadik (кастомный, дисплейный — заголовки/логотип).
   Одноначертательный: маппим на весь диапазон весов. */
@font-face {
  font-family: "Wadik";
  src: url("../fonts/Wadik.woff2") format("woff2"),
       url("../fonts/Wadik.otf") format("opentype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Lenis управляет скроллом — отключаем нативный smooth, чтобы не конфликтовал */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* <picture> — обёртка без собственного смысла: её ставит czKadr, когда у кадра
   есть webp, а в вёрстке на её месте стоит просто <img>. Обёртка не должна
   менять раскладку, иначе CMS и вёрстка расходятся на ровном месте: высоту
   коробки она не наследует, и `height: 100%` у кадра внутри считать не от чего.
   Так на главной карусель 310×400 показывала полосу 310×174, а карточки
   каталога 400×450 — полосу 400×225, остальное серым. display: contents убирает
   коробку обёртки: кадр снова прямой ребёнок своего места. */
picture { display: contents; }

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

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

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

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

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

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

/* Тонкий кастомный скроллбар */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-black); }
::-webkit-scrollbar-thumb { background: var(--color-gray); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

/* ---------- Типографика ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--text-strong);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

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

p { line-height: var(--lh-base); }

strong { color: var(--text-strong); font-weight: 600; }

.accent { color: var(--accent); }

/* ---------- Утилиты доступности ---------- */
.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 {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: #fff;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

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

/* Атрибут hidden должен побеждать любые display из компонентов: скрытое поле
   брифа ("Другое") иначе занимает место в сетке формы. */
[hidden] { display: none !important; }

