/* ===== Токены ===== */
/* Акцент — синий из утверждённого логотипа (эскиз №01); контраст с белым 5,75:1. */
:root {
  --bg: #ffffff;
  --surface: #f3f5f7;
  --ink: #141a22;
  --muted: #566170;
  --line: #dde2e8;
  --accent: #1352fd;
  --accent-hover: #0e3fcc;
  --accent-ink: #ffffff;
  --accent-soft: #e2e9ff; /* вторичный текст на акцентном фоне, контраст 4,75:1 */
  --on-ink: #c9d0d8;
  --on-ink-muted: #9aa4b0;
  --line-ink: #2c3541;
  --ph: #d9dde2;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 6px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(48px, 7vw, 88px);
  --measure: 38rem; /* длина строки основного текста: около 70 знаков */
  --header-brand: 92px; /* строка шапки с логотипом — уезжает при прокрутке */
  --header-bar: 52px; /* строка шапки с меню — остаётся закреплённой */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-tap-highlight-color: rgba(19, 82, 253, 0.14);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 { margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -0.022em; }
h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -0.018em; margin-bottom: 0.7em; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
p, ul, ol { margin: 0 0 1em; }
p, li, dd { text-wrap: pretty; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

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

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius); }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--alt { background: var(--surface); }
.section--compact { padding: clamp(36px, 5vw, 56px) 0; }
.section--head { padding-bottom: clamp(16px, 3vw, 32px); }
/* Первый блок внутренней страницы: заголовок ближе к шапке. */
main > .section:first-child { padding-top: clamp(32px, 5vw, 64px); }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--muted); max-width: 36em; }

.icon { flex: none; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1.5px solid transparent; border-radius: var(--radius);
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: #fff; }
.btn--inverse { background: transparent; color: #fff; border-color: #fff; }
.btn--inverse:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row + .btn-row, .prose .btn-row, .rail .btn-row { margin-top: 8px; }
/* Телефон: кнопки в столбик одной ширины. */
@media (max-width: 560px) {
  .btn-row { flex-direction: column; align-items: stretch; }
}

/* ===== Изображения ===== */
.media { width: 100%; border-radius: var(--radius); object-fit: cover; }
.media--ph { background: var(--ph); }

/* ===== Карточки ===== */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.card > :last-child { margin-bottom: 0; }

.card--link { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; transition: border-color .18s ease; }
.card--link:hover { color: var(--ink); border-color: var(--accent); }
.card--link:active { background: var(--surface); }
.card--link h3 { margin-bottom: 0.4em; }
.card--link p { color: var(--muted); font-size: 16px; margin-bottom: 20px; }
.card--link .icon { margin-top: auto; color: var(--accent); transition: transform .25s var(--ease-out); }
.card--link:hover .icon { transform: translateX(5px); }
/* Превью направления: на компьютере над текстом, на телефоне слева. */
.card__thumb { display: block; margin-bottom: 16px; }
.card__thumb .media { aspect-ratio: 16 / 9; height: auto; }
/* Телефон: превью слева, стрелка справа от текста, карточка ниже. */
@media (max-width: 560px) {
  .card--link { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; column-gap: 14px; align-items: center; padding: 14px 16px; }
  .card__thumb { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
  .card__thumb .media { aspect-ratio: 1; }
  .card--link h3, .card--link p { grid-column: 2; }
  .card--link p { margin-bottom: 0; }
  .card--link .icon { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
}

/* ===== Шапка ===== */
/* Компьютер: строка с логотипом и телефоном уезжает при прокрутке (отрицательный top),
   закреплённой остаётся только строка с меню и кнопкой заявки. */
.site-header {
  position: sticky; top: calc(-1 * var(--header-brand)); z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header::before {
  content: ""; position: absolute; inset: var(--header-brand) 0 auto;
  border-top: 1px solid var(--line); pointer-events: none;
}
.site-header__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: var(--header-brand) var(--header-bar);
  grid-template-areas: "logo phone" "nav cta";
  align-items: center; column-gap: 24px;
}
.logo { grid-area: logo; justify-self: start; display: flex; flex-direction: column; gap: 7px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__img { display: block; align-self: flex-start; height: 44px; width: auto; }
.logo__tagline { font-size: 13px; color: var(--muted); line-height: 1.3; }

.site-nav, .site-header__actions { display: contents; }
.site-nav > nav { grid-area: nav; min-width: 0; }
.nav { display: flex; gap: 0 4px; list-style: none; margin: 0 0 0 -10px; padding: 0; }
.nav a {
  display: flex; align-items: center; height: var(--header-bar); padding: 0 10px; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color .15s ease;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.phone-link {
  grid-area: phone; justify-self: end; display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: color .15s ease;
}
.phone-link:hover { color: var(--accent); }
.site-header .btn { grid-area: cta; justify-self: end; min-height: 38px; padding: 7px 16px; font-size: 15px; white-space: nowrap; }

.call-btn, .nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.call-btn:active, .nav-toggle:active { background: var(--surface); }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline-flex; }

/* Телефон и планшет: логотип, кнопка звонка и кнопка меню; меню раскрывается под ними. */
@media (max-width: 940px) {
  .site-header { top: 0; }
  .site-header::before { content: none; }
  html:not(.js) .site-header { position: static; }
  .site-header__row {
    grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto;
    grid-template-areas: "logo call toggle" "menu menu menu"; column-gap: 8px;
  }
  .logo { padding: 10px 0; gap: 5px; }
  .logo__img { height: 34px; }
  .logo__tagline { font-size: 12px; }
  .js .nav-toggle { display: inline-flex; grid-area: toggle; }
  .call-btn { display: inline-flex; grid-area: call; }
  .site-nav {
    grid-area: menu; display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 0 0 20px;
    max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain;
  }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .nav { flex-direction: column; margin: 0; border-top: 1px solid var(--line); }
  .nav a { height: auto; min-height: 48px; padding: 12px 4px; font-size: 17px; border-bottom: 1px solid var(--line); white-space: normal; }
  .nav a[aria-current="page"] { box-shadow: none; font-weight: 600; }
  .site-header__actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .phone-link { grid-area: auto; justify-self: auto; min-height: 44px; padding: 0 4px; font-size: 18px; }
  .site-header .btn { grid-area: auto; justify-self: auto; min-height: 48px; }
}

/* ===== Подвал ===== */
.site-footer { background: var(--ink); color: var(--on-ink); font-size: 15px; padding: clamp(40px, 5vw, 56px) 0 28px; }
.site-footer ::selection { background: #fff; color: var(--ink); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px clamp(24px, 4vw, 56px); }
.site-footer__logo { display: block; height: 36px; width: auto; margin-bottom: 20px; }
.site-footer__name { color: #fff; font-weight: 600; }
.site-footer__company p { margin-bottom: 6px; max-width: 34rem; }
.site-footer__contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; align-content: start; }
.site-footer__contacts a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.site-footer__legal { border-top: 1px solid var(--line-ink); margin-top: 32px; padding-top: 20px; font-size: 13.5px; color: var(--on-ink-muted); }
.site-footer__legal p { margin-bottom: 6px; max-width: 36rem; }
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .site-footer__contacts { gap: 0; }
  .site-footer__contacts a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ===== Страницы ===== */
[id] { scroll-margin-top: calc(var(--header-bar) + 24px); }
@media (max-width: 940px) { [id] { scroll-margin-top: 108px; } }

/* Текстовые блоки: заголовок раздела слева, содержание справа — всё по одной левой линии. */
.prose { max-width: var(--measure); }
.rail { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(24px, 4vw, 56px); }
.rail > h1 { grid-column: 1 / -1; }
/* Заголовок занимает левую колонку на всю высоту блока и не растягивает первую строку справа. */
.rail > h2 { grid-column: 1; grid-row-end: span 12; align-self: start; font-size: clamp(22px, 2.2vw, 28px); margin-bottom: 0; }
.rail > :not(h1, h2) { grid-column: 2; max-width: var(--measure); }
.rail > :is(dl, table, .btn-row) { max-width: none; }
.rail > :last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .rail { display: block; }
  .rail > h2 { margin-bottom: 0.6em; }
}

:is(.rail, .prose, .catalog-item) ul:not([class]) { padding-left: 1.15em; list-style: square; }
:is(.rail, .prose, .catalog-item) ul:not([class]) > li + li { margin-top: 0.35em; }
li::marker { color: var(--accent); }

.doc > h1 { margin-bottom: clamp(24px, 3vw, 40px); }
.doc > .rail { border-top: 1px solid var(--line); padding: clamp(24px, 3vw, 36px) 0; }
.doc > .rail:last-child { padding-bottom: 0; }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.split--top { align-items: start; }
.split > div > :last-child { margin-bottom: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Полоса: текст слева, действие справа. */
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px clamp(24px, 4vw, 56px); }
.band > :first-child { flex: 1 1 26rem; max-width: var(--measure); }
.band > :first-child > :last-child { margin-bottom: 0; }
.band h2 { margin-bottom: 0.4em; }
@media (max-width: 560px) { .band > .btn-row { width: 100%; } }
.cta-text { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 0; }

/* Первый экран главной: заголовок во всю ширину, под ним текст с кнопками и изображение. */
.hero { padding: clamp(28px, 4.5vw, 56px) 0 clamp(40px, 5vw, 64px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas: "title title" "lead media" "actions media" "note media";
  column-gap: clamp(24px, 4vw, 56px); align-items: start;
}
.hero__text { display: contents; }
.hero h1 { grid-area: title; font-size: clamp(26px, 1rem + 2.6vw, 46px); max-width: 21em; margin-bottom: clamp(20px, 2.6vw, 36px); }
.hero .lead { grid-area: lead; font-size: clamp(17px, 1.4vw, 19px); max-width: none; margin-bottom: 28px; }
.hero .btn-row { grid-area: actions; }
.hero__note { grid-area: note; color: var(--muted); font-size: 15px; margin: 20px 0 0; }
.hero__media { grid-area: media; }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "title" "lead" "actions" "media" "note"; }
  .hero .lead { margin-bottom: 24px; }
  .hero__media { margin-top: 20px; }
}

/* Призыв на фирменном синем — единственный залитый акцентом блок на странице. */
.section--accent { background: var(--accent); color: var(--accent-soft); }
.section--accent ::selection { background: #fff; color: var(--accent); }
.section--accent h2 { color: #fff; }
.section--accent .lead { color: var(--accent-soft); }
.section--accent :focus-visible { outline-color: #fff; }
.section--accent .btn--primary { background: #fff; color: var(--ink); }
.section--accent .btn--primary:hover { background: var(--accent-soft); color: var(--ink); }

/* Шаги: крупная цифра под жирной линейкой — последовательность читается слева направо. */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.prose + .steps { margin-top: 32px; }
.step { border-top: 2px solid var(--ink); padding-top: 18px; }
.step > :last-child { margin-bottom: 0; }
.step__num {
  display: block; margin-bottom: 20px;
  font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -0.03em;
  color: var(--accent); font-variant-numeric: tabular-nums lining-nums;
}
.step h3 { margin-bottom: 0.4em; }
.step p { color: var(--muted); font-size: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 28px; }
  .step { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; border-top-width: 1px; padding: 18px 0 22px; }
  .step:last-child { padding-bottom: 0; }
  .step__num { grid-row: 1 / span 2; font-size: 32px; margin: 0; }
  .step h3, .step p { grid-column: 2; }
}

/* Преимущества и принципы: маркер — блок из логотипа. */
.benefits { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.benefit { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 16px; padding: 22px 0 26px; border-top: 1px solid var(--line); }
.benefit::before { content: ""; width: 22px; height: 10px; margin-top: 8px; background: var(--accent); }
.benefit h3 { margin-bottom: 0.3em; }
.benefit p { margin: 0; color: var(--muted); max-width: 34em; }
.section--alt .benefit { border-top-color: #d3d9e0; }
@media (max-width: 760px) {
  .benefits { grid-template-columns: minmax(0, 1fr); }
  .benefit:last-child { padding-bottom: 0; }
}

.catalog-item {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 48px); align-items: start;
  padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--line);
}
.catalog-item h2 { font-size: clamp(22px, 2.2vw, 28px); }
.catalog-item ul { margin-bottom: 1.4em; }
@media (max-width: 760px) { .catalog-item { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .catalog-item .btn { display: flex; } }

/* Контакты и реквизиты: строки с линейками, как в карточке предприятия. */
.kv { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
.kv dt, .kv dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); padding-right: 24px; }
.kv dd a { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { padding: 12px 0 0; border-bottom: 0; font-size: 15px; }
  .kv dd { padding: 0 0 12px; }
  .kv dd a { display: inline-flex; align-items: center; min-height: 44px; }
}

.req-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; border-top: 1px solid var(--line); }
.req-table th, .req-table td { text-align: left; vertical-align: top; padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line); }
.req-table td { padding-right: 0; }
.req-table th { width: 220px; color: var(--muted); font-weight: 400; }
@media (max-width: 600px) {
  .req-table th, .req-table td { display: block; width: auto; padding: 0; border: 0; }
  .req-table th { padding-top: 12px; font-size: 15px; }
  .req-table td { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
}

/* В двухколоночном блоке первая строка стоит на одной линии с заголовком раздела. */
@media (min-width: 861px) {
  .rail > .kv, .rail > .req-table { border-top: 0; }
  .rail > .kv > :nth-child(-n+2), .rail > .req-table tr:first-child > * { padding-top: 0; }
}

.downloads { list-style: none; padding: 0; }
.downloads a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
