/* ТК ЕВА — base / reset / typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  /* momentum smooth-scroll отдан Lenis (см. scripts/smooth-scroll.js);
     нативный scroll-behavior убран, иначе конфликтует с инерцией Lenis */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg,
picture {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
input,
textarea,
select {
  font: inherit;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  position: relative;
}
.section--tight {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}
.bg-1 {
  background: var(--bg-1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.section-head {
  max-width: 64ch;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}
.section-head h2 {
  font-size: var(--fs-h2);
  text-transform: uppercase;
  margin-top: var(--sp-3);
}
.section-head p {
  color: var(--ink-2);
  font-size: var(--fs-lead);
  margin-top: var(--sp-4);
  max-width: 58ch;
}
.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
}

.accent {
  color: var(--accent);
}
.muted {
  color: var(--ink-3);
}

/* grain overlay — fixed, pointer-events none (perf) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* skip link */
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-sm);
  z-index: var(--z-modal);
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

/* scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
/* Lenis активен → reveal ведёт GSAP; гасим CSS-transition, чтобы движение
   не интерполировалось дважды (CSS + GSAP) и не дёргалось */
html.lenis .reveal {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
