/* base.css — reset, типографика, контейнеры, утилиты, motion-keyframes */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }
[hidden] { display: none !important; } /* чтобы display:flex/grid не перебивал атрибут hidden */

/* ── заголовки: display-serif ── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); color: var(--navy-ink); letter-spacing: -.01em; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 { color: var(--text); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { max-width: 70ch; }

/* ── контейнер / секции ── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(var(--s-7), 7vw, var(--s-9)); }
.section--tight { padding-block: var(--s-7); }
.section--alt { background: var(--paper-2); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy h2, .section--navy h3 { color: var(--on-navy); }

/* ── eyebrow / заголовок секции с золотой чертой ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-sans); font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: var(--s-3);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); display: inline-block; }
.section-head { margin-bottom: var(--s-6); max-width: 60ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }

/* Золотая черта под заголовками — единый официальный акцент (баланс синий↔золото) */
.section-head h2, .text-block h2, .image-text__text h2, .accent-panel h2 { position: relative; padding-bottom: var(--s-3); }
.section-head h2::after, .text-block h2::after, .image-text__text h2::after, .accent-panel h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 58px; height: 3px; background: var(--gold); border-radius: 2px;
}
.section-head--center h2::after { left: 50%; transform: translateX(-50%); }

/* ── утилиты ── */
.lead { font-size: var(--t-lead); color: var(--muted); line-height: var(--lh-snug); }
.muted { color: var(--muted); }
.center { text-align: center; }
.grid { display: grid; gap: var(--s-5); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.pending-badge {
  display: inline-block; font-family: var(--font-sans); font-size: var(--t-xs); font-weight: 700;
  color: var(--gold); background: var(--gold-12); border: 1px solid var(--gold-line);
  padding: 2px 8px; border-radius: var(--r-pill); letter-spacing: .04em;
}

/* ── motion ── */
@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; }
.reveal.in { animation: fade-up var(--dur) var(--ease-out) forwards; }
.stagger > * { opacity: 0; }
.stagger.in > * { animation: fade-up var(--dur) var(--ease-out) forwards; }
.stagger.in > *:nth-child(1) { animation-delay: .02s; }
.stagger.in > *:nth-child(2) { animation-delay: .09s; }
.stagger.in > *:nth-child(3) { animation-delay: .16s; }
.stagger.in > *:nth-child(4) { animation-delay: .23s; }
.stagger.in > *:nth-child(5) { animation-delay: .30s; }
.stagger.in > *:nth-child(6) { animation-delay: .37s; }

/* ── адаптив ── */
@media (max-width: 900px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  p { max-width: none; }
}
