/* ============================================================
   Софтэксперт v4. Базовые стили и разделы.
   Все размеры шрифта в rem: версия для слабовидящих меняет корневой
   кегль, и вместе с ним масштабируется весь текст сайта.
   Светлая тема по умолчанию, темная по [data-theme="dark"].
   Темно-синие панели (процесс, SLA, призывы) имеют собственные токены
   и не зависят от темы.
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --ink: #0f1a2e;
  --ink-2: #1e2b45;
  --muted: #545e70;          /* 6.3:1 на --bg */
  --dim: #5f6779;            /* 5.2:1 на --bg, для плейсхолдеров и подписей */
  --line: rgba(15, 26, 46, .10);
  --line-2: rgba(15, 26, 46, .20);
  --primary: #1f4fd8;
  --primary-2: #163da8;
  --primary-soft: #e7edfb;
  --primary-tint: rgba(31, 79, 216, .10);
  --primary-glow: rgba(31, 79, 216, .28);
  --on-primary: #ffffff;
  --success: #137a4d;        /* 5.2:1 на белом */
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(15, 26, 46, .04), 0 20px 50px -24px rgba(15, 26, 46, .22);
  --shadow-lg: 0 2px 4px rgba(15, 26, 46, .05), 0 40px 80px -30px rgba(15, 26, 46, .32);
  --glass: rgba(255, 255, 255, .78);

  /* Темно-синие панели: одинаковы в обеих темах */
  --navy: #0f1a2e;
  --on-navy: #eef2f9;
  --on-navy-muted: rgba(238, 242, 249, .74);
  --navy-accent: #8fb0ff;
  --navy-line: rgba(255, 255, 255, .14);

  --display: "Golos Text", "IBM Plex Sans", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "Golos Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Шкала кеглей */
  --fs-12: .75rem;
  --fs-13: .8125rem;
  --fs-14: .875rem;
  --fs-15: .9375rem;
  --fs-16: 1rem;
  --fs-17: 1.0625rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;
  --fs-26: 1.625rem;
  --fs-h2: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  --fs-h1: clamp(2.25rem, 1.2rem + 3.4vw, 4rem);

  /* Радиусы: три шага и таблетка */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --pill: 999px;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(56px, 9vw, 128px);

  /* Шкала отступов: поля карточек, зазоры сеток, промежутки колонок */
  --pad-sm: 20px;                          /* мелкие плашки: гарантии, SLA, колонки услуг */
  --pad: clamp(20px, 2.2vw, 28px);         /* карточки: плитки, кейсы, этапы */
  --pad-lg: clamp(24px, 3vw, 40px);        /* крупные панели: аудитории, форма, призыв */
  --gap: 16px;                             /* зазор между карточками в сетке */
  --gap-col: clamp(32px, 5vw, 64px);       /* промежуток между колонками раздела */
  --head-gap: clamp(32px, 4.5vw, 56px);    /* от заголовка раздела до содержимого */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1224;
  --bg-2: #0d162b;
  --surface: #111c33;
  --surface-2: #15213b;
  --ink: #eef2f9;
  --ink-2: #d5dcea;
  --muted: #a3aec2;
  --dim: #8b96ab;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .20);
  --primary: #5b8dff;
  --primary-2: #8fb0ff;
  --primary-soft: #16244a;
  --primary-tint: rgba(91, 141, 255, .14);
  --primary-glow: rgba(91, 141, 255, .35);
  --on-primary: #06112b;
  --success: #4cc38a;
  --danger: #ff8a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 20px 50px -24px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 40px 80px -30px rgba(0, 0, 0, .8);
  --glass: rgba(10, 18, 36, .78);
  --navy: #060d1c;
}

/* ---------- Версия для слабовидящих (ГОСТ Р 52872-2019) ---------- */
html[data-a11y-size="2"] { font-size: 125%; }
html[data-a11y-size="3"] { font-size: 150%; }
html[data-a11y-scheme="bw"] { --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #000; --muted: #000; --dim: #000; --line: #000; --line-2: #000; --primary: #000; --primary-2: #000; --primary-soft: #fff; --primary-tint: rgba(0,0,0,.06); --on-primary: #fff; --success: #000; --navy: #000; --on-navy: #fff; --on-navy-muted: #fff; --navy-accent: #fff; --hero-bg: #fff; --hero-hl: #000; --glass: #fff; --shadow: none; --shadow-lg: none; }
html[data-a11y-scheme="wb"] { color-scheme: dark; --bg: #000; --bg-2: #000; --surface: #000; --surface-2: #000; --ink: #fff; --ink-2: #fff; --muted: #fff; --dim: #fff; --line: #fff; --line-2: #fff; --primary: #fff; --primary-2: #fff; --primary-soft: #000; --primary-tint: rgba(255,255,255,.1); --on-primary: #000; --success: #fff; --navy: #000; --on-navy: #fff; --on-navy-muted: #fff; --navy-accent: #fff; --hero-bg: #000; --hero-hl: #fff; --glass: #000; --shadow: none; --shadow-lg: none; }
html[data-a11y-scheme="blue"] { --bg: #9dd1ff; --bg-2: #9dd1ff; --surface: #c4e3ff; --surface-2: #c4e3ff; --ink: #063462; --ink-2: #063462; --muted: #063462; --dim: #063462; --line: #063462; --line-2: #063462; --primary: #063462; --primary-2: #063462; --primary-soft: #9dd1ff; --primary-tint: rgba(6,52,98,.1); --on-primary: #9dd1ff; --success: #063462; --navy: #063462; --on-navy: #9dd1ff; --on-navy-muted: #9dd1ff; --navy-accent: #fff; --hero-bg: #9dd1ff; --hero-hl: #063462; --glass: #9dd1ff; --shadow: none; --shadow-lg: none; }
html.a11y *, html.a11y *::before, html.a11y *::after { animation: none !important; transition: none !important; }
html.a11y a:not(.btn-pill):not(.btn-ghost-pill) { text-decoration: underline; text-underline-offset: 3px; }
html[data-a11y-img="off"] img, html[data-a11y-img="off"] video, html[data-a11y-img="off"] canvas,
html[data-a11y-img="off"] .tile-visual, html[data-a11y-img="off"] .case-visual, html[data-a11y-img="off"] .fx-panel,
html[data-a11y-img="off"] .dcards-wrap, html[data-a11y-img="off"] .hex-bg { visibility: hidden; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: var(--fs-17); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, dl, dd, dt, h1, h2, h3, h4, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }
::selection { background: var(--primary); color: var(--on-primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--primary); color: var(--on-primary); border-radius: var(--pill); }
.skip-link:focus { top: 16px; }

/* ---------- Типографика ---------- */
.h1, .h2, .h3, .hero-title { text-wrap: balance; }
.h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; font-size: var(--fs-h1); }
.h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; font-size: var(--fs-h2); }
.h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; font-size: var(--fs-22); }
.dim { color: var(--muted); font-weight: 500; }
.accent { color: var(--primary); }
.eyebrow { margin-bottom: 14px; color: var(--primary); font-size: var(--fs-15); font-weight: 600; }
.lead { font-size: var(--fs-18); color: var(--muted); max-width: 36em; line-height: 1.6; }
.section-head { margin-bottom: var(--head-gap); max-width: 860px; }
.section-head .h2 { margin-bottom: 16px; }
.split-head { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--gap-col); }
.split-head .h2 { margin-bottom: 0; }
.split-head .lead { max-width: 34em; }

/* ---------- Ссылки, теги ---------- */
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--primary); font-family: var(--display); font-size: var(--fs-16); flex: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Единый тег: нейтральный и акцентный */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: var(--fs-13); font-weight: 500; line-height: 1.3; white-space: nowrap; }
.tag-accent { border-color: transparent; background: var(--primary-soft); color: var(--primary); }

/* ---------- Разделы ---------- */
.section { padding: var(--section) 0; position: relative; }
.section-alt { background: var(--bg-2); }

/* Появление при прокрутке: без JS контент виден сразу */
html.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Bento услуг ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.tile { position: relative; grid-column: span 4; border-radius: var(--r-lg); overflow: hidden; background-color: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; transition: border-color .4s, box-shadow .4s; }
.tile:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.tile-lg { grid-column: span 8; }
.tile-rev { flex-direction: row; }
.tile-lg:not(.tile-rev) { flex-direction: row; }
.tile-accent { grid-column: span 12; background-color: var(--navy); color: var(--on-navy); border-color: transparent; }
.tile-accent:hover { border-color: var(--navy-accent); }
.tile-accent p { color: var(--on-navy-muted); }
.tile-accent .link-arrow { color: var(--navy-accent); }
.tile-accent .tile-icon { background: rgba(143, 176, 255, .16); color: var(--navy-accent); }
.tile-body { position: relative; z-index: 1; padding: var(--pad); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; flex: 1 1 0; min-width: 0; }
.tile-body .link-arrow { margin-top: auto; padding-top: 6px; }
.tile-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.tile-icon svg { width: 22px; height: 22px; }
.tile h3 { font-family: var(--display); font-weight: 600; font-size: var(--fs-20); letter-spacing: -.01em; line-height: 1.25; }
.tile p { font-size: var(--fs-15); color: var(--muted); line-height: 1.6; }
.tile-visual { position: relative; z-index: 1; flex: 0 0 46%; display: flex; align-items: center; justify-content: center; padding: var(--pad) var(--pad) var(--pad) 0; }

/* Маршрут обращения (иллюстрация интеграций) */
.route { width: 100%; border-radius: var(--r); background: var(--navy); color: var(--on-navy); padding: 20px 22px; box-shadow: var(--shadow); }
.route figcaption { font-size: var(--fs-13); color: var(--on-navy-muted); margin-bottom: 14px; }
.route ol { display: grid; gap: 0; counter-reset: r; }
.route li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 7px 0 7px 22px; font-size: var(--fs-14); }
.route li::before { content: ""; position: absolute; left: 3px; top: 13px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--navy-accent); background: var(--navy); }
.route li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 24px; bottom: -6px; width: 1px; background: var(--navy-line); }
.route li.is-now::before { background: var(--navy-accent); box-shadow: 0 0 0 4px rgba(143, 176, 255, .2); }
.route b { font-family: var(--mono); font-weight: 500; color: var(--navy-accent); }
.route span { color: var(--on-navy-muted); }

/* Макет официального портала */
.portal { width: 100%; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; box-shadow: var(--shadow); font-size: var(--fs-13); }
.portal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.portal-logo { width: 22px; height: 22px; background: var(--primary); clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.portal-eye { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink); }
.portal-eye svg { width: 14px; height: 14px; }
.portal-body { padding: 18px 16px; display: grid; gap: 8px; }
.portal-body b { font-family: var(--display); font-size: var(--fs-16); color: var(--ink); }
.portal-body span { color: var(--muted); line-height: 1.45; }
.portal-row { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.portal-row i, .portal-row em { font-style: normal; padding: 7px 12px; border-radius: var(--r-sm); font-weight: 600; }
.portal-row i { background: var(--primary); color: var(--on-primary); }
.portal-row em { border: 1px solid var(--line-2); color: var(--ink); }

/* SLA */
.tile-visual-sla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; flex: 0 0 54%; padding: var(--pad) var(--pad) var(--pad) 0; }
.sla-stat { padding: var(--pad-sm); border-radius: var(--r); background: rgba(255, 255, 255, .06); border: 1px solid var(--navy-line); display: grid; align-content: start; gap: 8px; }
.sla-stat b { white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: var(--fs-26); letter-spacing: -.02em; line-height: 1; color: var(--navy-accent); }
.sla-stat span { font-size: var(--fs-14); color: var(--on-navy-muted); line-height: 1.4; }

/* ---------- Панели аудиторий ---------- */
.panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.panel { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background-color: var(--surface); box-shadow: var(--shadow); padding: var(--pad-lg); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; transition: border-color .4s, box-shadow .4s; }
.panel:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; width: 100%; }
.panel-head .tag { flex: none; }
.panel h3 { font-family: var(--display); font-weight: 600; font-size: var(--fs-22); letter-spacing: -.01em; line-height: 1.25; }
.panel p { color: var(--muted); font-size: var(--fs-16); }
.panel .link-arrow { margin-top: auto; }
.checks { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); width: 100%; }
.checks li { position: relative; padding-left: 28px; font-size: var(--fs-15); }
.checks li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary-soft); }
.checks li::after { content: ""; position: absolute; left: 7px; top: 9px; width: 6px; height: 3px; border-left: 1.75px solid var(--primary); border-bottom: 1.75px solid var(--primary); transform: rotate(-45deg); }

/* ---------- Гарантии ---------- */
.trust-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-col); align-items: center; }
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 24px; }
.trust-item { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background-color: var(--surface); padding: var(--pad-sm); display: grid; align-content: start; gap: 8px; box-shadow: var(--shadow); }
.trust-item svg { width: 26px; height: 26px; color: var(--primary); margin-bottom: 4px; }
.trust-item b { font-family: var(--display); font-weight: 600; font-size: var(--fs-17); }
.trust-item span { font-size: var(--fs-14); color: var(--muted); line-height: 1.5; }
.trust-cta .play svg { width: 16px; height: 16px; fill: none; margin: 0; }
.dcards-wrap { display: grid; place-items: center; min-width: 0; }

/* ---------- Процесс (горизонтальная прокрутка на десктопе) ---------- */
.process { position: relative; background: var(--navy); color: var(--on-navy); }
.process-pin { display: flex; flex-direction: column; justify-content: center; padding: var(--section) 0; overflow: hidden; }
.process.is-pinned .process-pin { position: sticky; top: 0; height: 100vh; padding: 88px 0 48px; }
.process-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: var(--head-gap); }
.process-head .eyebrow { width: 100%; margin-bottom: 0; color: var(--navy-accent); }
.process-head .dim { color: var(--on-navy-muted); }
.process-progress { font-size: var(--fs-14); font-variant-numeric: tabular-nums; color: var(--on-navy-muted); }
.process-progress b { color: var(--navy-accent); font-weight: 600; }
.process-track { display: flex; gap: var(--gap); padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-right: var(--gutter); will-change: transform; }
.step { position: relative; overflow: hidden; flex: 0 0 min(500px, 80vw); min-height: 320px; border-radius: var(--r-lg); border: 1px solid var(--navy-line); background-color: rgba(255, 255, 255, .05); padding: var(--pad); display: flex; flex-direction: column; gap: 20px; }
.step-num { font-family: var(--display); font-size: 3rem; font-weight: 300; letter-spacing: -.02em; line-height: 1; color: rgba(238, 242, 249, .45); }
.step h3 { font-family: var(--display); font-weight: 600; font-size: var(--fs-22); letter-spacing: -.01em; margin-bottom: 10px; }
.step p { color: var(--on-navy-muted); font-size: var(--fs-16); }
.step-meta { margin-top: auto; color: var(--navy-accent); font-size: var(--fs-14); font-weight: 600; }

/* ---------- Кейсы (карточки) ---------- */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.case { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background-color: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: border-color .4s, box-shadow .4s; }
.case:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.case-visual { padding: var(--pad) var(--pad) 0; min-height: 190px; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(180deg, var(--bg-2), var(--surface)); border-bottom: 1px solid var(--line); }
.ui { width: 100%; max-width: 460px; border-radius: var(--r) var(--r) 0 0; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; padding: 14px; box-shadow: var(--shadow); font-size: var(--fs-12); transform: translateY(8px); transition: transform .6s var(--ease); }
.case:hover .ui { transform: none; }
.ui-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ui-top b { font-family: var(--display); font-size: var(--fs-14); font-weight: 600; }
.ui-top span { color: var(--muted); }
.ui-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.ui-kpis div { background: var(--bg-2); border-radius: var(--r-sm); padding: 8px; }
.ui-kpis small { display: block; font-size: var(--fs-12); color: var(--muted); }
.ui-kpis b { font-family: var(--display); font-size: var(--fs-15); font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-kpis b.ok, .ui-table em.ok { color: var(--success); }
.ui-table { width: 100%; border-collapse: collapse; }
.ui-table td { padding: 6px 4px; border-top: 1px solid var(--line); color: var(--ink-2); }
.ui-table td:first-child { font-family: var(--mono); font-size: var(--fs-12); color: var(--muted); }
.ui-table em { font-style: normal; font-weight: 600; color: var(--primary); }
.ui-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ui-table td:last-child { text-align: right; }
.case-body { padding: var(--pad); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; flex: 1; }
.case h3 { font-family: var(--display); font-weight: 600; font-size: var(--fs-18); letter-spacing: -.01em; line-height: 1.3; }
.case p { font-size: var(--fs-15); color: var(--muted); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 16px; margin-top: auto; border-top: 1px solid var(--line); width: 100%; }
.metrics b { display: block; font-family: var(--display); font-weight: 700; font-size: var(--fs-26); letter-spacing: -.02em; line-height: 1; margin-bottom: 6px; color: var(--primary); font-variant-numeric: tabular-nums; }
.metrics span { font-size: var(--fs-13); color: var(--muted); }

/* ---------- Вопросы ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-col); align-items: start; }
.faq { display: grid; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 56px 22px 0; position: relative; font-family: var(--display); font-size: var(--fs-18); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 400; color: var(--muted); transition: transform .35s var(--ease), background .3s, color .3s, border-color .3s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.faq p { color: var(--muted); padding: 0 64px 22px 0; font-size: var(--fs-16); }

/* ---------- Контакты и форма ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-col); align-items: start; }
.contact-copy .h2 { margin-bottom: 20px; }
.contact-copy .lead { margin-bottom: 36px; }
.contact-list { display: grid; gap: 14px; }
.contact-list div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); align-items: baseline; }
.contact-list dt { font-size: var(--fs-14); color: var(--muted); }
.contact-list dd { font-size: var(--fs-16); font-weight: 600; }
.contact-list dd a:hover { color: var(--primary); text-decoration: underline; }
.form { position: relative; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); padding: var(--pad-lg); display: grid; gap: 18px; overflow: hidden; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { font-size: var(--fs-14); color: var(--ink-2); font-weight: 500; }
.field label i, .form-note i { font-style: normal; color: var(--danger); }
.field input, .field textarea, .field select { width: 100%; font: inherit; font-size: var(--fs-16); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 13px 16px; transition: border-color .25s, background .25s; -webkit-appearance: none; appearance: none; }
.field input[type="file"] { padding: 8px 10px; font-size: var(--fs-14); color: var(--muted); cursor: pointer; }
.field input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: var(--pill); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.field input[type="file"]::file-selector-button:hover { border-color: var(--primary); color: var(--primary); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); background: var(--surface); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: var(--fs-14); color: var(--danger); font-weight: 500; }
.field-hint { font-size: var(--fs-13); color: var(--muted); }
.field textarea { resize: vertical; min-height: 120px; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field select option { background: var(--surface); color: var(--ink); }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: var(--fs-14); color: var(--ink-2); line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.consent a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.consent-error { grid-column: 2; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-note { font-size: var(--fs-13); color: var(--muted); }
.form-error { padding: 12px 14px; border-radius: var(--r-sm); background: rgba(180, 35, 24, .1); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: var(--fs-14); font-weight: 500; }
.form-success { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px; background: var(--surface); }
.form-success[hidden], .form-error[hidden] { display: none; }
.form-success b { font-family: var(--display); font-weight: 700; font-size: var(--fs-26); color: var(--primary); }
.form-success span { color: var(--muted); }
.form button.btn-pill { border: 0; cursor: pointer; font-family: inherit; }

/* ---------- Призыв ---------- */
.cta { background: var(--navy); color: var(--on-navy); border-radius: var(--r-lg); padding: var(--pad-lg); display: flex; justify-content: space-between; align-items: center; gap: 32px; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 480px; height: 480px; right: -160px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(91, 141, 255, .35), transparent 60%); filter: blur(20px); }
.cta > * { position: relative; }
.cta .h2 { margin-bottom: 10px; }
.cta p { color: var(--on-navy-muted); max-width: 36em; }
.cta .btn-pill { background: #fff; color: #0f1a2e; flex: none; }
.cta .btn-pill:hover { background: #dfe7ff; }

/* ---------- Первый экран внутренних страниц ---------- */
.page-hero { position: relative; padding-bottom: clamp(40px, 6vw, 64px); overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
/* Фирменный мотив: шестиугольная сетка, та же фигура, что в логотипе */
.hex-bg { position: absolute; inset: 0; pointer-events: none; background: var(--primary); opacity: .10;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v31L28 63 1 47.5v-31z M28 63v34 M1 16.5 0 16' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 56px 97px repeat, radial-gradient(60% 90% at 78% 30%, #000 20%, transparent 75%);
  -webkit-mask-composite: source-in;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v31L28 63 1 47.5v-31z M28 63v34 M1 16.5 0 16' fill='none' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 0 0 / 56px 97px repeat, radial-gradient(60% 90% at 78% 30%, #000 20%, transparent 75%);
  mask-composite: intersect; }
[data-theme="dark"] .hex-bg { opacity: .18; }
.page-hero .wrap { position: relative; z-index: 1; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: var(--fs-14); color: var(--muted); margin-bottom: 24px; }
.crumbs a:hover { color: var(--primary); text-decoration: underline; }
.crumbs span::before { content: "/"; margin-right: 8px; color: var(--dim); }
.page-hero .h1 { max-width: 900px; margin-bottom: 20px; }
.page-hero .lead { max-width: 42em; }

/* ---------- Страница услуг ---------- */
.services-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--gap-col); align-items: start; }
.subnav { position: sticky; top: 100px; display: grid; gap: 4px; }
.subnav a { padding: 10px 14px; font-size: var(--fs-15); color: var(--muted); font-weight: 500; border-left: 2px solid var(--line); transition: color .25s, background .25s, border-color .25s; }
.subnav a:hover, .subnav a.is-active { color: var(--primary); background: var(--primary-tint); border-left-color: var(--primary); }
.service { padding: var(--head-gap) 0; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.service:first-child { border-top: 0; padding-top: 0; }
.service-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 24px; }
.service-icon { width: 64px; height: 64px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }
.service-icon svg { width: 28px; height: 28px; }
.service-num { font-size: var(--fs-14); font-weight: 600; color: var(--primary); }
.service-head .h2 { font-size: clamp(1.5rem, 1rem + 1.4vw, 2.125rem); margin: 4px 0 10px; }
.service-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 24px 0; }
.service-col { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background-color: var(--surface); padding: var(--pad-sm); box-shadow: var(--shadow); }
.service-col h3 { font-family: var(--display); font-size: var(--fs-16); font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.service-col li { position: relative; padding-left: 18px; font-size: var(--fs-15); margin-bottom: 8px; line-height: 1.5; }
.service-col li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.service-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.service-foot .tag-list { flex: 1; }

/* ---------- Страница кейсов ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--head-gap); }
.filters button { min-height: 44px; padding: 10px 18px; border-radius: var(--pill); border: 1px solid var(--line-2); background: var(--surface); font-size: var(--fs-15); font-weight: 500; color: var(--muted); transition: border-color .3s, color .3s, background .3s; }
.filters button:hover { border-color: var(--primary); color: var(--primary); }
.filters button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.case-list { display: grid; gap: var(--gap); }
.case-row { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border: 1px solid var(--line); border-radius: var(--r-lg); background-color: var(--surface); box-shadow: var(--shadow); overflow: hidden; transition: border-color .4s, box-shadow .4s; }
.case-row:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.case-row[hidden] { display: none; }
.case-row .case-visual { min-height: 260px; align-items: center; padding: var(--pad-lg); border-bottom: 0; border-right: 1px solid var(--line); }
.case-row .ui { transform: none; border-radius: var(--r); border-bottom: 1px solid var(--line); }
.case-row .case-body { padding: var(--pad-lg); gap: 16px; }
.case-row h2 { font-family: var(--display); font-weight: 600; font-size: var(--fs-22); letter-spacing: -.01em; line-height: 1.25; }
.case-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); width: 100%; }
.case-cols h3 { font-family: var(--display); font-size: var(--fs-15); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.case-cols p { font-size: var(--fs-14); color: var(--ink-2); }
.case-row .metrics { grid-template-columns: repeat(3, 1fr); }

/* ---------- Политика ---------- */
.doc { max-width: 820px; }
.doc h2 { font-family: var(--display); font-size: var(--fs-22); font-weight: 600; margin: 36px 0 12px; }
.doc p, .doc li { font-size: var(--fs-16); color: var(--ink-2); line-height: 1.65; margin-bottom: 10px; }
.doc ul { padding-left: 1.2em; list-style: disc; }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(56px, 6vw, 80px) 0 32px; background: var(--surface); }
.footer-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-col); margin-bottom: 40px; }
.footer-brand p { color: var(--muted); font-size: var(--fs-15); max-width: 26em; margin-top: 18px; }
.footer-req { display: grid; gap: 4px; margin-top: 18px; font-style: normal; font-size: var(--fs-14); color: var(--muted); line-height: 1.5; max-width: 30em; }
.footer-req span:first-child { color: var(--ink); font-weight: 600; }
.footer-req a { color: var(--primary); text-decoration: underline; }
.contact-list dd.addr { font-weight: 500; line-height: 1.5; }
.contact-list dd.addr a { display: inline-block; margin-top: 4px; color: var(--primary); text-decoration: underline; font-weight: 600; }
.footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer-nav h4 { margin-bottom: 12px; font-size: var(--fs-14); font-weight: 600; color: var(--muted); }
.footer-nav a { display: block; font-size: var(--fs-15); padding: 6px 0; color: var(--ink); transition: color .25s; }
.footer-nav a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; background: linear-gradient(var(--line), var(--line)) content-box top / 100% 1px no-repeat; font-size: var(--fs-14); color: var(--muted); }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Панель версии для слабовидящих ---------- */
.a11y-panel { position: fixed; top: calc(var(--header-h, 76px) + 8px); right: var(--gutter); z-index: 60; width: min(360px, calc(100vw - 2 * var(--gutter))); padding: var(--pad-sm); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.a11y-panel[hidden] { display: none; }
.a11y-panel .a11y-heading { font-family: var(--display); font-size: var(--fs-18); font-weight: 600; }
.a11y-group { display: grid; gap: 8px; }
.a11y-group > span { font-size: var(--fs-14); color: var(--muted); font-weight: 500; }
.a11y-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.a11y-opts button { min-width: 44px; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: var(--fs-15); }
.a11y-opts button[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); }
.a11y-opts .sch-bw { background: #fff; color: #000; }
.a11y-opts .sch-wb { background: #000; color: #fff; }
.a11y-opts .sch-blue { background: #9dd1ff; color: #063462; }
.a11y-panel .a11y-off { justify-self: start; color: var(--primary); font-weight: 600; font-size: var(--fs-15); text-decoration: underline; min-height: 44px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1280px) {
  .services-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .service-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile-lg, .tile-accent { grid-column: span 1; flex-direction: column; }
  .tile-lg, .tile-accent { grid-column: 1 / -1; }
  .tile-lg:not(.tile-rev), .tile-rev { flex-direction: column; }
  .tile-visual, .tile-visual-sla { flex: none; padding: 0 var(--pad) var(--pad); }
  .cases { grid-template-columns: minmax(0, 1fr); }
  .case-visual .ui { max-width: 460px; }
  .trust-layout { grid-template-columns: minmax(0, 1fr); }
  .services-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .subnav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .subnav a { border-left: 0; border-radius: var(--pill); border: 1px solid var(--line-2); min-height: 44px; display: inline-flex; align-items: center; }
  .case-row { grid-template-columns: minmax(0, 1fr); }
  .case-row .case-visual { border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; padding-bottom: var(--pad); }
}
@media (max-width: 900px) {
  .split-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .faq-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; }
  .case-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile-visual-sla { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; }
  .trust { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-nav a { padding: 10px 0; }
  .contact-list div { grid-template-columns: 1fr; gap: 4px; }
  .faq summary { font-size: var(--fs-16); }
  .faq p { padding-right: 0; }
  .service-body { grid-template-columns: minmax(0, 1fr); }
  .case-row .metrics { grid-template-columns: 1fr 1fr; }
  .route li { grid-template-columns: 80px 1fr; }
}

/* Дочерние элементы сеток не растягивают колонку шире экрана */
.bento > *, .cases > *, .panels > *, .trust > *, .service-body > *, .case-cols > *, .footer-nav > * { min-width: 0; }
html.a11y .tag { white-space: normal; }
@media (max-width: 640px) {
  html[data-a11y-size="3"] .footer-nav, html[data-a11y-size="3"] .metrics, html[data-a11y-size="3"] .case-row .metrics { grid-template-columns: 1fr; }
  html[data-a11y-size="3"] .tile-visual, html[data-a11y-size="3"] .case-visual { display: none; }
}
html.a11y :is(h1, h2, h3, h4, p, a, li, dd, dt, span, b, summary) { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .service-head { grid-template-columns: minmax(0, 1fr); } }

/* Сенсорные экраны: у касаний нет наведения, поэтому эффекты наведения не "залипают" после тапа */
@media (hover: none) {
  .tile:hover, .panel:hover, .case:hover, .case-row:hover { border-color: var(--line); box-shadow: var(--shadow); }
  .tile-accent:hover { border-color: transparent; }
  .case:hover .ui { transform: translateY(8px); }
  .btn-pill:hover svg, .link-arrow:hover svg { transform: none; }
}
a, button, summary, .dcard { -webkit-tap-highlight-color: rgba(31, 79, 216, .12); }
.nw { white-space: nowrap; }
/* Поле-ловушка для ботов: людям не видно и недоступно с клавиатуры */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
