/* Сайт САВП: главная (/), производителю (/producer), дистрибьютору (/distributor), рознице (/retail),
   страницы документов (privacy.html, consent.html). Обычный CSS без сборки.
   Тема одна на всю страницу: светлая или тёмная (data-theme на <html>, ставит theme.js).
   Скругления: кнопки и поля — 10px, карточки и снимки — 18px, телефоны — 34px.
   Акцент один — синий из логотипа; цвета сторон (производитель, дистрибьютор, розница) — только
   на схеме и в метках сторон. */

/* ---------- Шрифт: Golos Text (OFL, файлы в site/fonts) ---------- */
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/site/fonts/golos-text-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/site/fonts/golos-text-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url(/site/fonts/golos-text-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Цвета ---------- */
:root {
  --bg: #f6f7f9;
  --surface: #fdfdfe;
  --surface-2: #eef1f5;
  --text: #121722;
  --muted: #586173;
  --line: #e1e5ec;
  --accent: #2f62f0;
  --accent-hover: #2453d6;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --on-accent: #fdfdfe;
  --ok: #138a4b;
  --danger: #c4372f;
  --warn: #b26b00;
  /* Стороны — на схеме и в метках */
  --producer: #2f62f0;
  --distributor: #0e9f8a;
  --retail: #d97a06;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 18px 40px -18px rgba(30, 45, 80, 0.22);
  --shadow-lg: 0 30px 70px -30px rgba(25, 40, 80, 0.4);
  --radius: 18px;
  --radius-sm: 10px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0c0e13;
  --surface: #13161d;
  --surface-2: #191d26;
  --text: #edf0f5;
  --muted: #9aa3b3;
  --line: #252a36;
  --accent: #5b8cff;
  --accent-hover: #7aa2ff;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --on-accent: #0c0e13;
  --ok: #3fbf7f;
  --danger: #ef6a62;
  --warn: #e3a440;
  --producer: #5b8cff;
  --distributor: #2bc4ad;
  --retail: #f0a23a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.022em; font-weight: 700; }
h1 { font-size: clamp(36px, 4.6vw, 60px); }
h2 { font-size: clamp(28px, 3.2vw, 42px); }
h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.muted { color: var(--muted); }
.mdi { line-height: 1; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; }
.btn .mdi { font-size: 19px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: transparent; color: inherit; font-size: 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow .mdi { font-size: 19px; transition: transform 0.2s ease; }
.link-arrow:hover .mdi { transform: translateX(3px); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.header.scrolled, .header.solid { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -0.01em; }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; color: #fdfdfe;
  background: linear-gradient(135deg, #3b6cf6, #6d5ce8);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.nav { display: flex; gap: 2px; margin-left: 10px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .btn { height: 42px; padding: 0 18px; font-size: 15px; }
.menu-btn { display: none; }

/* ---------- Разделы ---------- */
.section { padding: 112px 0; }
.section-tight { padding: 72px 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head p { margin-top: 16px; font-size: 19px; color: var(--muted); max-width: 62ch; }
.kicker { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--accent); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.tag-producer { color: var(--producer); background: color-mix(in srgb, var(--producer) 10%, transparent); border-color: transparent; }
.tag-distributor { color: var(--distributor); background: color-mix(in srgb, var(--distributor) 11%, transparent); border-color: transparent; }
.tag-retail { color: var(--retail); background: color-mix(in srgb, var(--retail) 12%, transparent); border-color: transparent; }

/* ---------- Первый экран: текст слева, видео справа ---------- */
.hero { padding: 56px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(36px, 4vw, 56px); }
.hero .kicker + h1 { margin-top: 4px; }
.lead { margin-top: 22px; font-size: 20px; color: var(--muted); max-width: 32em; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Видео: плеер с обложкой; нет файла — остаётся обложка (site.js, setupVideo) */
.video {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  background: #0c0e13; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}
.video video, .video .video-poster { width: 100%; height: 100%; object-fit: cover; }
.video .video-poster { position: absolute; inset: 0; }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  border: 0; cursor: pointer; color: #0c0e13; background: rgba(253, 253, 254, 0.94);
  display: inline-flex; align-items: center; justify-content: center; font-size: 42px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); transition: transform 0.2s ease;
}
.video-play:hover { transform: scale(1.06); }
.video-play .mdi { margin-left: 5px; }
.video-time {
  position: absolute; left: 16px; bottom: 14px; padding: 4px 10px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #fdfdfe; background: rgba(12, 14, 19, 0.7);
}
.video.playing .video-play, .video.playing .video-poster, .video.playing .video-time { display: none; }
.video.missing .video-play, .video.missing .video-time { display: none; }
.video figcaption { position: absolute; right: 16px; bottom: 14px; font-size: 13px; color: rgba(253, 253, 254, 0.8); }

/* ---------- Схема: производитель ⇄ дистрибьютор ⇄ розница ---------- */
.scheme {
  display: grid; grid-template-columns: 1fr 1.05fr 1fr 1.05fr 1fr; align-items: stretch;
  gap: 0; padding: 36px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line);
}
.node {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.node:hover { color: var(--text); border-color: var(--node-color); transform: translateY(-2px); }
.node-icon {
  width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--node-color); background: color-mix(in srgb, var(--node-color) 13%, transparent);
}
.node h3 { font-size: 22px; }
.node p { font-size: 15px; color: var(--muted); }
.node .link-arrow { margin-top: auto; color: var(--node-color); font-size: 15px; }
.node-producer { --node-color: var(--producer); }
.node-distributor { --node-color: var(--distributor); }
.node-retail { --node-color: var(--retail); }
.node-apps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.node-apps span { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
/* Связи между сторонами: стрелки с подписями, по ним «бегут» данные */
.link { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0 14px; }
.flow[data-color="producer"] { --flow-color: var(--producer); }
.flow[data-color="distributor"] { --flow-color: var(--distributor); }
.flow[data-color="retail"] { --flow-color: var(--retail); }
.flow {
  display: grid; gap: 6px; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer;
}
.flow-line {
  position: relative; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden;
}
.flow-line::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: repeating-linear-gradient(90deg, var(--flow-color) 0 14px, transparent 14px 26px);
  opacity: 0.85; animation: flow-run 1.4s linear infinite;
}
.flow.back .flow-line::after { animation-direction: reverse; }
.flow-line::before {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; z-index: 1;
  border-top: 3px solid var(--flow-color); border-right: 3px solid var(--flow-color); background: transparent;
}
.flow:not(.back) .flow-line { overflow: visible; }
.flow:not(.back) .flow-line::before { right: 0; transform: rotate(45deg); }
.flow.back .flow-line { overflow: visible; }
.flow.back .flow-line::before { left: 0; transform: rotate(-135deg); }
@keyframes flow-run { from { background-position: 0 0; } to { background-position: 26px 0; } }
.flow-label { font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.flow:hover .flow-label, .flow[aria-pressed="true"] .flow-label { color: var(--text); }
.flow[aria-pressed="true"] .flow-line { background: color-mix(in srgb, var(--flow-color) 25%, var(--line)); }
.scheme-note {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 18px 22px;
  border-radius: 14px; background: var(--surface-2); min-height: 74px;
}
.scheme-note .mdi { font-size: 26px; color: var(--accent); }
.scheme-note p { font-size: 16px; }
.scheme-hub {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px;
  margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 15px;
}
.scheme-hub b { color: var(--text); }
.scheme-hub .mdi { color: var(--accent); font-size: 20px; margin-right: 6px; vertical-align: -3px; }

/* ---------- Плитки разного размера ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile {
  grid-column: span 2; display: flex; flex-direction: column; gap: 10px; padding: 28px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden;
}
.tile.w3 { grid-column: span 3; }
.tile.w4 { grid-column: span 4; }
.tile.w6 { grid-column: span 6; }
.tile h3 { font-size: 21px; }
.tile p { color: var(--muted); font-size: 16px; }
.tile .mdi.tile-icon {
  width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--accent); background: var(--accent-soft); margin-bottom: 6px;
}
.tile-accent { background: linear-gradient(140deg, #2f62f0, #4a4fd6); color: #fdfdfe; border-color: transparent; }
.tile-accent p { color: rgba(253, 253, 254, 0.82); }
.tile-accent .mdi.tile-icon { color: #fdfdfe; background: rgba(253, 253, 254, 0.16); }
.tile-shot { padding-bottom: 0; }
.tile-shot img {
  margin-top: auto; border-radius: 12px 12px 0 0; border: 1px solid var(--line); border-bottom: 0;
  height: 280px; width: 100%; object-fit: cover; object-position: left top;
}
.tile-shot p { margin-bottom: 14px; }
.tile-phone { flex-direction: row; align-items: flex-end; gap: 24px; padding-bottom: 0; }
.tile-phone > div { padding-bottom: 28px; align-self: center; }
.tile-phone img { width: 170px; flex: none; border-radius: 22px 22px 0 0; border: 6px solid #0c0e13; border-bottom: 0; }

/* ---------- Вкладки со снимком (общие возможности, доставка) ---------- */
.showcase { display: grid; grid-template-columns: 0.85fr 1.6fr; gap: 36px; align-items: start; }
.showcase-list { display: grid; gap: 6px; }
.showcase-tab {
  position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; text-align: left;
  padding: 16px 18px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text);
  font: inherit; cursor: pointer; overflow: hidden; transition: background 0.2s ease, border-color 0.2s ease;
}
.showcase-tab:hover { background: var(--surface); }
.showcase-tab[aria-selected="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.showcase-tab > .mdi {
  width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 21px; color: var(--muted); background: var(--surface-2);
}
.showcase-tab[aria-selected="true"] > .mdi { color: var(--accent); background: var(--accent-soft); }
.showcase-tab b { display: block; font-size: 17px; font-weight: 650; }
.showcase-tab small { display: none; margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.showcase-tab[aria-selected="true"] small { display: block; }
.progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.progress.running { animation: progress var(--tab-delay, 7s) linear forwards; }
@keyframes progress { to { width: 100%; } }
.showcase-view { position: sticky; top: 96px; }
.showcase-panels { display: grid; }
.showcase-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.45s ease; }
.showcase-panel.active { opacity: 1; visibility: visible; }
.screen {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0c0e13; box-shadow: var(--shadow-lg);
}
.screen img { width: 100%; }
.phone-panel { display: flex; justify-content: center; gap: 22px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.phone-panel img { width: 240px; }

/* Телефон: снимок экрана приложения в рамке */
.phone {
  width: 260px; flex: none; padding: 8px; border-radius: 38px; background: #0c0e13;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(253, 253, 254, 0.08);
}
.phone img { border-radius: 30px; width: 100%; }
.phone.sm { width: 210px; border-radius: 32px; padding: 7px; }
.phone.sm img { border-radius: 25px; }

/* ---------- Лента экранов приложений (листается вбок) ---------- */
.apps-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 260px; gap: 28px; overflow-x: auto;
  padding: 8px 32px 28px; margin: 0 -32px; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.app-shot { scroll-snap-align: start; margin: 0; }
.app-shot figcaption { margin-top: 16px; }
.app-shot figcaption b { display: block; font-size: 17px; }
.app-shot figcaption span { display: block; margin-top: 2px; color: var(--muted); font-size: 15px; }

/* ---------- Текст и снимок рядом ---------- */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.split.reverse { grid-template-columns: 1.25fr 1fr; }
.split.reverse > :first-child { order: 2; }
.split h2 { margin-bottom: 18px; }
.split .text > p { color: var(--muted); font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before {
  content: "\F012C"; font-family: "Material Design Icons"; position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%; font-size: 14px; line-height: 22px; text-align: center;
  color: var(--accent); background: var(--accent-soft);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.3;
}
.chip .mdi { font-size: 20px; }
.chip small { display: block; color: var(--muted); font-size: 13px; }
.chip .ok { color: var(--ok); }
.chip .warn { color: var(--warn); }
.chip .info { color: var(--accent); }

/* ---------- Цепочка «от заказа до полки» (страница производителя) ---------- */
.chain { display: grid; grid-template-columns: 1fr 1.35fr; gap: 56px; align-items: start; }
.chain-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.chain-steps::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.chain-step {
  position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 18px; width: 100%; padding: 14px 16px 14px 0;
  border: 0; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer;
}
.chain-dot {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 21px; color: var(--muted); background: var(--surface); border: 2px solid var(--line); transition: all 0.25s ease;
}
.chain-step[aria-selected="true"] .chain-dot { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.chain-step b { display: block; font-size: 18px; padding-top: 9px; }
.chain-step .who { margin-left: 8px; vertical-align: 2px; }
.chain-step small { display: block; margin-top: 6px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.chain-step:not([aria-selected="true"]) small { display: none; }
.chain-view { position: sticky; top: 96px; }

/* ---------- Два режима (дистрибьютор: сам или с производителями) ---------- */
.segmented {
  display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
}
.segment {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 0;
  background: transparent; color: var(--muted); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.segment[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.mode-panels { display: grid; margin-top: 32px; }
.mode-panel {
  grid-area: 1 / 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  visibility: hidden; opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease;
}
.mode-panel.active { visibility: visible; opacity: 1; transform: none; }
.mode-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode-item { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.mode-item .mdi { font-size: 22px; color: var(--accent); }
.mode-item b { display: block; margin-top: 8px; font-size: 16px; }
.mode-item span:last-child { display: block; margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

/* ---------- Шаги подключения ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 0 24px 0 0; counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); margin-bottom: 18px;
}
.steps li::after { content: ""; position: absolute; top: 20px; left: 52px; right: 24px; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps b { display: block; font-size: 18px; }
.steps span { display: block; margin-top: 6px; color: var(--muted); font-size: 15.5px; }

/* ---------- Факты о безопасности ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 48px; }
.fact { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.fact .mdi { font-size: 28px; color: var(--accent); }
.fact b { display: block; font-size: 17px; }
.fact span:last-child { display: block; margin-top: 4px; color: var(--muted); font-size: 15.5px; }

/* ---------- Заявка ---------- */
.cta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; padding: 56px;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.cta h2 { margin: 14px 0 16px; }
.cta-text > p { color: var(--muted); font-size: 18px; }
.contact { display: flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 18px; }
.contact .mdi { color: var(--accent); font-size: 22px; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: 14.5px; font-weight: 600; }
.form input, .form textarea, .form select {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; width: 100%;
}
.form input::placeholder, .form textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form textarea { resize: vertical; }
.form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border: 0; padding: 0; margin: 0; }
.form-roles legend { font-size: 14.5px; font-weight: 600; margin-bottom: 7px; padding: 0; }
.form-roles label { display: block; cursor: pointer; }
.form-roles input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.form-roles span {
  display: block; padding: 11px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); text-align: center;
  font-weight: 600; font-size: 15px; color: var(--muted); background: var(--bg);
}
.form-roles input:checked + span { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.form-roles input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.form .consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); }
.form-message { min-height: 1.5em; font-weight: 600; }
.form-message.ok { color: var(--ok); }
.form-message.error { color: var(--danger); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer .logo { font-size: 18px; }
.footer .logo-mark { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col b { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-note { margin-top: 14px; }

/* ---------- Страницы документов (privacy.html, consent.html) ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 840px; }
.doc-back { margin: 0 0 24px; font-size: 15px; }
.doc-back a { display: inline-flex; align-items: center; gap: 6px; }
.doc-draft {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 32px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, var(--surface));
}
.doc-draft .mdi { color: var(--warn); font-size: 22px; line-height: 1.2; }
.doc h1 { font-size: clamp(30px, 4vw, 42px); }
.doc-meta { margin: 12px 0 0; color: var(--muted); }
.doc h2 { font-size: 22px; margin: 40px 0 12px; }
.doc p, .doc li { overflow-wrap: anywhere; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.todo { padding: 0 4px; border-radius: 4px; color: inherit; background: color-mix(in srgb, var(--warn) 25%, transparent); }

/* ---------- Появление при прокрутке (site.js ставит класс visible) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .flow-line::after { animation: none; }
  .showcase-panel, .mode-panel { transition: none; }
}

/* ---------- Планшет ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow);
  }
  .nav.open a { padding: 12px; font-size: 16px; color: var(--text); }
  .hero-grid, .split, .split.reverse, .chain, .showcase, .mode-panel, .cta { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse > :first-child { order: 0; }
  .showcase-view, .chain-view { position: static; order: -1; }
  .scheme { grid-template-columns: 1fr; padding: 24px; }
  .link { flex-direction: row; justify-content: center; gap: 28px; padding: 18px 0; }
  .flow { justify-items: center; text-align: center; max-width: 220px; }
  .flow-line { width: 3px; height: 54px; }
  .flow-line::after { background: repeating-linear-gradient(180deg, var(--flow-color) 0 14px, transparent 14px 26px); animation-name: flow-run-v; }
  .flow:not(.back) .flow-line::before { right: auto; top: auto; bottom: 0; left: 50%; margin: 0 0 0 -4.5px; transform: rotate(135deg); }
  .flow.back .flow-line::before { left: 50%; top: 0; margin: 0 0 0 -4.5px; transform: rotate(-45deg); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.w3 { grid-column: span 1; }
  .tile.w4, .tile.w6 { grid-column: span 2; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .steps li:nth-child(2)::after { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@keyframes flow-run-v { from { background-position: 0 0; } to { background-position: 0 26px; } }

/* ---------- Телефон ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header-row { gap: 10px; height: 60px; }
  .nav.open { top: 60px; }
  .header-actions .btn { padding: 0 14px; }
  .hero { padding: 32px 0 64px; }
  .lead { font-size: 17px; }
  .hero-buttons .btn { flex: 1 1 100%; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 17px; }
  .scheme { padding: 16px; border-radius: 20px; }
  .link { gap: 14px; }
  .flow-label { font-size: 12.5px; }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile.w3, .tile.w4, .tile.w6 { grid-column: auto; }
  .tile-phone { flex-direction: column; align-items: stretch; }
  .tile-phone > div { padding-bottom: 0; }
  .tile-phone img { align-self: center; }
  .apps-row { grid-auto-columns: 220px; padding: 8px 16px 24px; margin: 0 -16px; }
  .mode-list { grid-template-columns: 1fr; }
  .segmented { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .segment { justify-content: center; white-space: normal; text-align: center; padding: 10px 8px; font-size: 15px; }
  .steps, .facts { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .cta { padding: 28px 18px; border-radius: 22px; }
  .cta > * { min-width: 0; }
  .form-roles { grid-template-columns: 1fr; }
  .phone-panel { gap: 12px; padding: 16px; }
  .phone-panel .phone.sm { width: 46%; border-radius: 26px; padding: 5px; }
  .phone-panel .phone.sm img { border-radius: 21px; }
  .footer-grid { grid-template-columns: 1fr; }
  .doc { padding: 36px 0 56px; }
  .doc h2 { font-size: 20px; margin-top: 32px; }
}
