/* ============================================================
   base.css — reset, типографика, сетка. Заменяет Bootstrap.
   ============================================================ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; height: auto; }
a   { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; height: 1px; background: var(--line); margin: var(--s-5) 0; }

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: var(--s-1);
}

/* ---- заголовки ------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); letter-spacing: -.04em; line-height: .98; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-sm); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

b, strong { font-weight: 700; }
small { font-size: var(--fs-xs); }

/* ---- служебная типографика ------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--magenta);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  flex: none;
}
.eyebrow--center { justify-content: center; }

.lead    { font-size: var(--fs-h4); color: var(--gray); }
.muted   { color: var(--gray); }
.accent  { color: var(--magenta); }
.mono    { font-family: var(--font-mono); font-size: var(--fs-mono);
           letter-spacing: .14em; text-transform: uppercase; }

/* ---- контейнер ------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}
.shell--narrow { max-width: 860px; }

/* ---- секции ---------------------------------------------- */
.section     { padding-block: var(--section-y); position: relative; }
.section--sm { padding-block: var(--section-y-sm); }
.section--flush-top    { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section--mist { background: var(--mist); }
.section--ink  { background: var(--ink); color: var(--white); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink .muted, .section--ink .lead { color: rgba(255,255,255,.6); }

/* ---- сетка ----------------------------------------------- */
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* автосетка для каталогов: карточки не уже 260px */
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--split { grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 86px); align-items: center; }
.grid--tight { gap: var(--s-4); }

.stack   { display: flex; flex-direction: column; gap: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-5); }

/* ---- утилиты (минимум, только то, что реально нужно) ------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }  .mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
.mb-5 { margin-bottom: var(--s-5); } .mb-6 { margin-bottom: var(--s-6); }
.mb-7 { margin-bottom: var(--s-7); }
.mx-auto { margin-inline: auto; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- появление при скролле (замена WOW.js) ---------------- */
.rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.rise.is-in { opacity: 1; transform: none; }

/* ---- адаптив --------------------------------------------- */
@media (max-width: 980px) {
  .grid--split { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .between { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  :root { --fs-body: 16px; --shell-pad: 18px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

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