/* ==========================================================================
   YAVKA AGENCY — base: reset, типографика, сетка, утилиты
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--ff-text);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.menu-open,
body.modal-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--c-accent); color: var(--c-ink); }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  padding: 12px 16px; background: var(--c-accent); color: var(--c-ink);
  border-radius: var(--r-pill); font-weight: 600;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* --- Типографика --- */
h1, .h1 {
  font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-h1);
  line-height: 1; letter-spacing: -.025em; text-wrap: balance;
}
h2, .h2 {
  font-family: var(--ff-display); font-weight: 500; font-size: var(--fs-h2);
  line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; max-width: 22ch;
}
h3, .h3 {
  font-family: var(--ff-text); font-weight: 600; font-size: var(--fs-h3);
  line-height: 1.2; letter-spacing: -.01em;
}
h4, .h4 { font-weight: 600; font-size: var(--fs-h4); line-height: 1.3; }

.lead {
  font-size: var(--fs-lead); line-height: 1.45; color: var(--fg-2);
  max-width: 62ch; text-wrap: pretty;
}
.small { font-size: var(--fs-small); }
.muted { color: var(--fg-2); }
.accent { color: var(--accent); }

.meta {
  font-family: var(--ff-mono); font-size: var(--fs-meta); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono); font-size: var(--fs-meta); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }

.prose p + p { margin-top: 1em; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-top: .6em; }
.prose li + li { margin-top: .35em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose h2 {
  margin-top: 2.2em; margin-bottom: .6em; font-family: var(--ff-text);
  font-weight: 600; font-size: var(--fs-h3); letter-spacing: -.01em; max-width: none;
}
.prose h2:first-child { margin-top: 0; }

/* --- Сетка --- */
.container {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }

.section { padding-block: var(--section-y); background: var(--bg); color: var(--fg); }

.section-head { display: grid; gap: var(--s-5); margin-bottom: var(--section-head-gap); }
.section-head .eyebrow { margin-bottom: var(--s-4); }
.section-head .lead { margin-top: var(--s-4); }
.section-head__action { justify-self: start; }
@media (min-width: 768px) {
  .section-head { grid-template-columns: 1fr auto; align-items: end; }
  .section-head__action { justify-self: end; align-self: end; margin-bottom: 6px; }
}

.ico { width: 20px; height: 20px; flex: none; }

/* --- Появление по скроллу --- */
html.js .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* --- Строки hero --- */
html.js .line { display: block; overflow: hidden; padding-bottom: .18em; margin-bottom: -.18em; }
html.js .line__in { display: block; transform: translateY(108%); transition: transform .9s var(--ease-out); }
html.js .line:nth-child(2) .line__in { transition-delay: .1s; }
html.js .line:nth-child(3) .line__in { transition-delay: .2s; }
html.js body.is-ready .line__in { transform: none; }

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