/* Основа: сброс, типографика, сетка, кнопки, плашки, появление. Компоненты блоков в css/blocks/. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-md)/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nums { font-variant-numeric: tabular-nums; }
.ico { width: 1em; height: 1em; flex: none; }
.ico .d { transition: opacity .3s var(--ease-std); }

/* Сетка */
.wrap { max-width: calc(var(--wrap) + var(--gx) * 2); margin: 0 auto; padding-inline: var(--gx); }
.sec { padding-block: var(--sec); }
.band { margin-inline: var(--band-gap); border-radius: var(--r-lg); background: var(--panel); }
.band > .wrap { padding-block: var(--sec); }
.band--dark { background: var(--navy); color: var(--on-navy); }
.band + .band, .band + .sec, .sec + .band { margin-top: var(--band-gap); }

/* Заголовки секций без надзаголовков: заголовок с одной акцентной фразой и короткий подзаголовок */
.head { display: grid; justify-items: start; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.head--center { margin-inline: auto; text-align: center; justify-items: center; }
.head--center .lead { max-width: 720px; }  /* подзаголовок по центру в две строки, а не столбиком в три (Максим 25.10) */
.head--row { max-width: none; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 40px; }
.h2 { font-size: var(--t-h2); }
.lead { font-size: var(--t-lg); line-height: 1.55; color: var(--mute); max-width: 620px; }
.band--dark .lead { color: var(--on-navy-mute); }
.mark { color: var(--brand-ink); }
/* Акцент градиентом, как в шаблоне: от тёмно-синего к синему, контраст крупного текста не ниже 3:1 */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .mark { background: linear-gradient(95deg, var(--brand-ink) 10%, #2F8AD8 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.band--dark .mark { background: none; color: #8CC4F5; }

/* Кнопки: три вида (главная, контурная, текстовая), две высоты */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h-btn); padding: 0 28px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: var(--t-md); font-weight: 600; line-height: 1; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: background-color .2s var(--ease-std), border-color .2s var(--ease-std), color .2s var(--ease-std), transform .18s var(--ease), box-shadow .3s var(--ease);
}
.btn .ico { width: 20px; height: 20px; transition: transform .3s var(--ease); }
.btn--main { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -12px rgba(27, 116, 194, .75); }
.btn--line { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--white { background: #fff; color: var(--ink); }
.btn--sm { height: var(--h-btn-sm); padding: 0 20px; font-size: var(--t-sm); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
/* Блик по главной кнопке при наведении: одно движение слева направо */
.btn--main::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .btn--main:not(:disabled):hover { background: var(--brand-d); box-shadow: 0 14px 30px -12px rgba(27, 116, 194, .85); }
  .btn--main:not(:disabled):hover::after { transform: translateX(120%); }
  .btn--line:hover { border-color: var(--ink); }
  .btn--white:hover { background: var(--ice); }
  .btn:not(:disabled):hover .ico--go { transform: translateX(4px); }
}
.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--brand-ink); font-weight: 600; transition: color .2s var(--ease-std);
}
.link .ico { width: 18px; height: 18px; transition: transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .link:hover { color: var(--brand-d); }
  .link:hover .ico { transform: translateX(4px); }
}

/* Иконка в плитке: один стиль на весь сайт */
.chipicon {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px;
  background: var(--ice); color: var(--brand);
}
.chipicon .ico { width: 26px; height: 26px; }

/* Место под фото: видно, что сюда встанет снимок */
.ph {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: linear-gradient(160deg, #E3EDF8 0%, #EEF3F8 55%, #DCE8F5 100%);
}
.band .ph { background: linear-gradient(160deg, #DCE8F5 0%, #E6EDF5 55%, #D3E2F2 100%); }
.ph::after {
  content: attr(data-label); position: absolute; left: 14px; top: 14px; padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .85); color: var(--mute); font-size: var(--t-xs); font-weight: 600;
}

/* Появление при прокрутке: один раз, мягко снизу */
.rv { opacity: 0; transform: translateY(24px); }
.rv.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease) calc(var(--i, 0) * 70ms), transform .8s var(--ease) calc(var(--i, 0) * 70ms); }
.no-js .rv, .rv-fallback .rv { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}

@media (max-width: 760px) {
  .btn { white-space: normal; height: auto; min-height: var(--h-btn); padding: 12px 18px; gap: 8px; font-size: 15px; line-height: 1.25; text-align: center; }
  .btn .ico--go { display: none; }
  .btn--sm { min-height: var(--h-btn-sm); padding: 8px 16px; }
  .head { margin-bottom: 32px; }
  .head--row { grid-template-columns: minmax(0, 1fr); }
  .lead { font-size: var(--t-md); }
  .band { border-radius: 24px; }
}

/* Режим снимка страницы (?static): все сцены сразу в конечном состоянии */
html.is-static *, html.is-static *::before, html.is-static *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
/* Бесконечные анимации (лента отзывов и т. п.) с длительностью 1 мс крутились бы с бешеной скоростью: в снимке они стоят */
html.is-static *, html.is-static *::before, html.is-static *::after { animation-iteration-count: 1 !important; }
html.is-static .revs-track { animation: none !important; }

/* ===== Витрина (правка Максима 25.10): переносы, появление заголовков, магнитные кнопки ===== */
/* Переносы: заголовки ровными строками, в абзацах без одиноких слов в конце (вместе с типографом на сервере) */
h1, h2, h3, .h2, .lead, .hero-sub { text-wrap: balance; }
p, li, blockquote, figcaption, small, dd { text-wrap: pretty; }

/* Магнитные кнопки возвращаются с пружиной */
.btn--main.btn--lg, [data-magnet] { transition: translate .45s var(--ease), background-color .2s var(--ease-std), box-shadow .3s var(--ease-std); }
/* Снимок страницы целиком (?static): класс ставит сервер, всё видно сразу, без появления и размытия */
.is-static .rv { opacity: 1; transform: none; }

/* Слово через дефис и диапазон «1–3» не рвутся по строкам (типограф на сервере оборачивает их в .nw) */
.nw { white-space: nowrap; }
