/* Montserrat (вариативный 100–900, SIL OFL — assets/fonts/OFL.txt), размещён на своём сервере,
   без Google Fonts. Источник: @fontsource-variable/montserrat@5.2.8.
   Казахские буквы (Ә Ғ Қ Ң Ө Ұ Ү Һ І) — в подмножестве cyrillic-ext. */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/montserrat-cyrillic-ext.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/montserrat-latin-ext.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: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/montserrat-latin.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;
}


/* Inter (вариативный 100–900, SIL OFL — assets/fonts/OFL-Inter.txt) — основной текст по брендбуку 2.0.
   Источник: @fontsource-variable/inter@5.2.8. Казахские буквы — в cyrillic-ext. */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-cyrillic-ext.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-cyrillic.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin-ext.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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("../fonts/inter-latin.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;
}

/* MERID Distributions — брендбук 2.0, гамма N2 (Logo M/MERID_Brand_Kit_v2/04_Colors/tokens.json).
   Две темы: тёмная (по умолчанию, как первый экран) и светлая — html[data-theme], ставит theme.js.
   Весь сайт лежит на одном живом фоне (bg.js); цвета компонентов — только через токены ниже.
   Aqua — только акцент, текст на Aqua — Deep teal. Заголовки Montserrat, текст Inter. */
:root {
  --deep-teal: #04303A;
  --teal: #00707A;
  --aqua: #00A99D;
  --slate: #4F6668;
  --frost: #E5F5F4;
  --abyss: #022229;
  --tint-1: #8ED6D0;
  --tint-2: #BFE3DF;
  --tint-3: #F7FBFA;
  --white: #FFFFFF;
  /* служебные цвета графики пакета (dark / light-версии C01, C46) */
  --g-line: #2A6470;
  --g-line-2: #5E8C93;
  --g-card: #0A3C47;
  --g-unit: #164551;
  --g-line-light: #7CC9C1;
  --g-unit-light: #DCEFEC;

  --font-head: "Montserrat", Arial, sans-serif;
  --font: "Inter", Arial, sans-serif;
  --radius: 12px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  /* ---- тёмная тема (по умолчанию) ---- */
  color-scheme: dark;
  --bg: var(--deep-teal);
  --head: var(--white);
  --text: rgba(255, 255, 255, .8);
  --muted: var(--tint-1);
  --line: var(--g-line);
  --line-2: var(--g-line-2);
  --surface: rgba(10, 60, 71, .88);
  --surface-2: var(--g-unit);
  --rule: var(--aqua);
  --eyebrow: var(--tint-1);
  --link: var(--tint-1);
  --spot: rgba(142, 214, 208, .1);
  --header-glass: rgba(4, 48, 58, .82);
  --header-line: var(--g-line);
  --nav: rgba(255, 255, 255, .85);
  --nav-hover: var(--white);
  --btn2-bg: var(--white);
  --btn2-text: var(--deep-teal);
  --btn2-hover: var(--tint-2);
  --input-bg: var(--g-unit);
  --input-text: var(--white);
  --input-line: var(--g-line-2);
  --danger: #FF8A65;
  /* знак M */
  --mark-fill: rgba(142, 214, 208, .06);
  --mark-fill-2: rgba(142, 214, 208, .12);
  --mark-stroke: rgba(142, 214, 208, .4);
  /* C01 и C46 — цвета dark-версий пакета */
  --gfx-line: var(--g-line);
  --gfx-node: var(--g-card);
  --gfx-node-line: var(--g-line-2);
  --gfx-core: var(--deep-teal);
  --gfx-label: var(--tint-1);
  --gfx-m1: var(--tint-1); --gfx-m2: var(--tint-2); --gfx-m3: var(--aqua); --gfx-m4: var(--tint-1);
  --rack-frame: var(--g-card);
  --rack-frame-line: var(--g-line-2);
  --rack-unit: var(--g-unit);
  --rack-dot: var(--g-line-2);
  --rack-text: var(--white);
}
/* ---- светлая тема ---- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--tint-3);
  --head: var(--deep-teal);
  --text: var(--slate);
  --muted: var(--slate);
  --line: var(--tint-2);
  --line-2: var(--g-line-light);
  --surface: rgba(255, 255, 255, .92);
  --surface-2: var(--frost);
  --rule: var(--teal);
  --eyebrow: var(--teal);
  --link: var(--teal);
  --spot: rgba(0, 112, 122, .08);
  --header-glass: rgba(255, 255, 255, .88);
  --header-line: var(--tint-2);
  --nav: var(--slate);
  --nav-hover: var(--deep-teal);
  --btn2-bg: var(--deep-teal);
  --btn2-text: var(--white);
  --btn2-hover: var(--teal);
  --input-bg: var(--white);
  --input-text: var(--deep-teal);
  --input-line: var(--g-line-light);
  --danger: #C2410C;
  --mark-fill: rgba(0, 112, 122, .05);
  --mark-fill-2: rgba(0, 112, 122, .1);
  --mark-stroke: rgba(0, 112, 122, .35);
  /* C01 и C46 — цвета light-версий пакета */
  --gfx-line: var(--tint-2);
  --gfx-node: var(--frost);
  --gfx-node-line: var(--g-line-light);
  --gfx-core: var(--white);
  --gfx-label: var(--slate);
  --gfx-m1: var(--teal); --gfx-m2: #0D8A90; --gfx-m3: var(--aqua); --gfx-m4: var(--teal);
  --rack-frame: var(--frost);
  --rack-frame-line: var(--g-line-light);
  --rack-unit: var(--g-unit-light);
  --rack-dot: var(--g-line-light);
  --rack-text: var(--deep-teal);
}
/* подвал тёмный в обеих темах */
.footer {
  --head: var(--white); --text: rgba(255, 255, 255, .75); --line: var(--g-line); --link: var(--tint-1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  /* без фона: иначе он ляжет поверх .backdrop (z-index: -1); фон задан на html */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--head); margin: 0 0 .6em; font-weight: 700; }
h1 { line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; line-height: 1.35; font-weight: 600; }
h4 { font-size: 1.05rem; line-height: 1.35; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--tint-2); color: var(--deep-teal); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.center { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 48px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--white); color: var(--deep-teal); padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* Пока main.js подставляет язык по умолчанию, страница скрыта (theme.js) */
.i18n-pending body { visibility: hidden; }

/* Смена языка: текст на мгновение гаснет (main.js) */
main, .nav, .footer { transition: opacity .18s ease; }
body.is-switching main, body.is-switching .nav, body.is-switching .footer { opacity: 0; }
/* Смена темы — плавно */
body, .header, .card, .pillar, .mvv__card, .value, .pilot, .form, .doc, .chips li, .field input, .field select, .field textarea {
  transition-property: background-color, border-color, color, opacity, transform, box-shadow;
  transition-duration: .4s;
}

/* ---------- Живой фон под всем сайтом ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); transition: background-color .4s; }
.backdrop__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.backdrop__canvas.is-ready { opacity: 1; }

/* ---------- Buttons (B09) ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 15px 28px; border-radius: 8px;
  font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background .25s, color .25s, border-color .25s, box-shadow .3s, transform .35s var(--ease);
}
.btn--sm { padding: 11px 18px; font-size: .875rem; }
.btn--block { width: 100%; }
/* Aqua — только кнопка главного действия; текст на Aqua — Deep teal (4.8:1) */
.btn--accent { background: var(--aqua); color: var(--deep-teal); }
.btn--accent:hover { background: #19B8AC; box-shadow: 0 10px 30px -12px rgba(0, 169, 157, .7); }
.btn--primary { background: var(--btn2-bg); color: var(--btn2-text); }
.btn--primary:hover { background: var(--btn2-hover); }
.btn--ghost { background: transparent; color: var(--head); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--spot); border-color: var(--head); }

/* Надзаголовок с короткой чертой (B22) */
.eyebrow {
  font: 600 .78rem/1.4 var(--font); letter-spacing: .16em; text-transform: uppercase;
  color: var(--eyebrow); margin-bottom: 18px;
}
.eyebrow--rule::after { content: ""; display: block; width: 28px; height: 2px; margin-top: 10px; background: var(--rule); transform-origin: 0 50%; transition: transform .8s var(--ease) .2s; }
/* V-шеврон перед лидом (B22 / B01) */
.vlead { position: relative; padding-left: 38px; }
.vlead::before {
  content: ""; position: absolute; left: 4px; top: .2em; width: 12px; height: 12px;
  border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); transform: rotate(45deg);
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 50;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: var(--header-glass); border-bottom-color: var(--header-line);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
}
.header__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.header__logo { flex-shrink: 0; }
.logo { height: 44px; width: auto; }
/* логотип по теме: Inverse onDark / Color */
.logo--dark { display: none; }
[data-theme="light"] .logo--light { display: none; }
[data-theme="light"] .logo--dark { display: block; }

.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: var(--rule); }

.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { position: relative; color: var(--nav); text-decoration: none; font-size: .9rem; font-weight: 500; white-space: nowrap; transition: color .2s; }
.nav a:hover { color: var(--nav-hover); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta-mobile { display: none; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; }
.lang__btn {
  border: 0; background: none; cursor: pointer; font: 600 .75rem/1 var(--font);
  color: var(--nav); padding: 7px 10px; border-radius: 6px; transition: background .25s, color .25s;
}
.lang__btn[aria-pressed="true"] { background: var(--btn2-bg); color: var(--btn2-text); }

/* Переключатель темы: в тёмной показываем солнце (перейти в светлую), в светлой — луну */
.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 8px; background: none; color: var(--nav);
  transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--nav-hover); border-color: var(--nav-hover); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__sun { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }

.burger { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 8px; }
.burger span { display: block; height: 2px; background: var(--head); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections: все на общем живом фоне ---------- */
.section { position: relative; padding: 120px 0; }
.section__head { max-width: 760px; margin-bottom: 56px; }
.section__lead { font-size: 1.125rem; line-height: 1.55; }

/* ---------- Hero (знак M + B22) ---------- */
.hero {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; color: var(--text);
  padding: calc(var(--header-h) + 72px) 0 96px;
}
/* Знак M: прозрачные грани с контуром; правая опора — Aqua, как в логотипе (единственная деталь Aqua) */
.hero__mark-wrap { position: absolute; right: -4%; top: 50%; width: min(56vw, 720px); transform: translateY(-50%); pointer-events: none; }
.hero__mark { width: 100%; height: auto; overflow: visible; }
.hero__mark polygon {
  fill: var(--mark-fill); stroke: var(--mark-stroke); stroke-width: .25;
  vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .4s, stroke .4s;
}
.hero__mark polygon:nth-child(2) { fill: var(--mark-fill-2); }
.hero__mark polygon:nth-child(4) { fill: rgba(0, 169, 157, .22); stroke: rgba(0, 169, 157, .6); }
.hero__inner { position: relative; }
/* текст — в левых 55% */
.hero__inner > * { max-width: 640px; }
.hero__title { font-size: clamp(2.1rem, 4.2vw, 3rem); letter-spacing: -.02em; margin-bottom: 24px; }
.hero__lead { font-size: 1.2rem; line-height: 1.5; margin-bottom: 40px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 72px; }
.hero .hero__facts { max-width: 980px; }
.hero__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.hero__facts li { padding: 20px 24px 0 0; }
.hero__facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.hero__facts strong { display: block; font-family: var(--font-head); color: var(--head); font-size: 1.2rem; font-weight: 700; }
.hero__facts span { font-size: .85rem; color: var(--muted); }

/* ---------- Карточки ---------- */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 50%);
  opacity: 0; transition: opacity .35s;
}
.spot:hover::before { opacity: 1; }

.cards { display: grid; gap: 24px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card { border-radius: var(--radius); padding: 32px 28px; background: var(--surface); border: 1px solid var(--line); }
@media (hover: hover) { .card:hover { border-color: var(--line-2); } }
.card p { margin: 0; font-size: .95rem; }
.card__icon { width: 48px; height: 48px; margin-bottom: 22px; }
/* иконки пакета: «Плашка» в тёмной теме, «Грань» в светлой (обе версии в разметке) */
.card__icon--light { display: none; }
[data-theme="light"] .card__icon--dark { display: none; }
[data-theme="light"] .card__icon--light { display: block; }
/* B02 «Срезанный угол» */
.card--cut { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); border-radius: 0; }
.card--cut::after {
  content: ""; position: absolute; top: 0; right: 0; width: 28px; height: 28px;
  background: linear-gradient(225deg, transparent 50%, var(--line) 50%); transition: background .3s;
}
@media (hover: hover) { .card--cut:hover::after { background: linear-gradient(225deg, transparent 50%, var(--aqua) 50%); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__text p { font-size: 1.05rem; }
.hub { margin: 0; }
.hub svg { width: 100%; height: auto; }
/* C01: атрибуты SVG — light-версия пакета; здесь цвета по теме */
.hub__links path:not(.hub__hot) { stroke: var(--gfx-line); }
.hub__nodes rect, .hub__nodes circle { fill: var(--gfx-node); stroke: var(--gfx-node-line); }
.hub__ring { fill: var(--gfx-core); }
.hub__core polygon:nth-child(1) { fill: var(--gfx-m1); }
.hub__core polygon:nth-child(2) { fill: var(--gfx-m2); }
.hub__core polygon:nth-child(3) { fill: var(--gfx-m3); }
.hub__core polygon:nth-child(4) { fill: var(--gfx-m4); }
.hub text { fill: var(--gfx-label); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 72px; }
.pillar { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (hover: hover) { .pillar:hover { border-color: var(--line-2); } }
.pillar__num { display: block; font: 700 1.6rem/1 var(--font-head); color: var(--muted); margin-bottom: 16px; }
.pillar p { margin: 0; font-size: .95rem; }

/* Миссия / цель / ценности (C29) */
.mvv { margin-top: 112px; }
.mvv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mvv__card { position: relative; padding: 36px 40px 36px 44px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.mvv__card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--teal); }
.mvv__card:first-child::after { background: var(--aqua); }
.mvv__n { font: 700 1.6rem/1 var(--font-head); color: var(--muted); }
.mvv__card .mvv__n { position: absolute; right: 32px; top: 32px; }
.mvv__label { display: block; font: 700 1.25rem/1.3 var(--font-head); color: var(--head); margin-bottom: 16px; padding-right: 56px; }
.mvv__text { margin: 0; color: var(--head); font-size: 1.15rem; line-height: 1.55; }
.mvv__text--sm { font-size: 1rem; color: var(--text); line-height: 1.6; }
.values__title { display: flex; align-items: baseline; gap: 14px; margin: 56px 0 24px; font-size: 1.25rem; }
.values { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
/* B29: V-маркеры */
.value { padding: 24px 22px; border-top: 2px solid var(--line); }
@media (hover: hover) { .value:hover { border-color: var(--rule); } }
.value h4 { position: relative; padding-left: 26px; margin-bottom: 10px; }
.value h4::before {
  content: ""; position: absolute; left: 2px; top: .1em; width: 9px; height: 9px;
  border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); transform: rotate(45deg);
}
.value p { margin: 0; font-size: .92rem; }

/* ---------- Решения (C46) ---------- */
.scene-sol__grid { display: block; }
.rack, .scene-sol__dots { display: none; }
.rack svg { width: 100%; height: auto; max-height: 72vh; }
.rack-frame { fill: var(--rack-frame); stroke: var(--rack-frame-line); stroke-width: 2; transition: fill .4s, stroke .4s; }
.rack-u rect { fill: var(--rack-unit); transition: fill .6s var(--ease); }
.rack-u circle { fill: var(--rack-dot); transition: fill .6s; }
.rack-u text { font: 600 12px var(--font); fill: var(--rack-text); }
/* связь стойки с рабочим местом (шаг «Рабочие места и устройства») */
.rack-u .rack-link { fill: none; stroke: var(--rack-dot); stroke-width: 2; stroke-dasharray: 4 4; }
.scenes .rack-dev.is-current .rack-link { stroke: var(--teal); animation: link 1.2s linear infinite; }
@keyframes link { to { stroke-dashoffset: -16; } }
.rack-u { transition: opacity .6s var(--ease); }

.industries { margin-top: 96px; }
.industries h3 { margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--head); font-weight: 500; font-size: .925rem; }
@media (hover: hover) { .chips li:hover { border-color: var(--rule); } }

/* ---------- Производителям ---------- */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: start; }
.split__intro p { font-size: 1.05rem; margin-bottom: 32px; }
.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 40px; }
.benefits li { position: relative; padding-left: 32px; }
.benefits li::before {
  content: ""; position: absolute; left: 3px; top: .35em; width: 10px; height: 10px;
  border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule); transform: rotate(45deg);
}
.benefits h3 { font-size: 1.1rem; margin-bottom: 6px; }
.benefits p { margin: 0; font-size: .95rem; }

/* Пилот (B17 «Шаги-кружки»): линия заполняется по скроллу (--p из motion.js) */
.pilot { margin-top: 104px; padding: 48px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pilot__title { font-size: 1.4rem; margin-bottom: 36px; }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps::before, .steps::after { content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px; }
.steps::before { background: var(--line); }
.steps::after { background: var(--teal); transform-origin: 0 50%; transform: scaleX(var(--p, 1)); }
.step { position: relative; z-index: 1; }
.step__n {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font: 700 1rem var(--font-head); margin-bottom: 18px;
  background: var(--teal); color: var(--white); box-shadow: 0 0 0 6px var(--surface-2);
  transition: background .4s, color .4s, box-shadow .4s;
}
.step p { margin: 0; font-size: .925rem; }

/* ---------- Партнёрам ---------- */
#partners .card h3 { font-size: 1.15rem; }

/* ---------- Контакты (B56 + B50) ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 72px; align-items: start; }
.contact__info > p { font-size: 1.1rem; }
.contact__list { margin: 36px 0 0; display: grid; gap: 18px; }
.contact__list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.contact__list dt { font-weight: 600; color: var(--head); font-size: .9rem; }
.contact__list dd { margin: 0; }
.contact__list a { text-decoration: none; }

.form { padding: 40px; border-radius: 16px; display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--head); }
.field input, .field select, .field textarea {
  font: 400 1rem var(--font); color: var(--input-text); width: 100%;
  padding: 13px 14px; border: 1px solid var(--input-line); border-radius: 8px; background: var(--input-bg);
}
.field select option { background: var(--input-bg); color: var(--input-text); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px var(--spot); }
.field .is-invalid, .is-invalid { border-color: var(--danger) !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--teal); width: 16px; height: 16px; flex-shrink: 0; }
.check.is-invalid span { color: var(--danger); }
.check a { font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { margin: 0; font-size: .9rem; min-height: 1.4em; }
.form__status.is-ok { color: var(--link); font-weight: 600; }
.form__status.is-error { color: var(--danger); }

/* ---------- Footer (тёмный в обеих темах) ---------- */
.footer { position: relative; background: var(--abyss); color: var(--text); padding: 48px 0; font-size: .875rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer__logo { height: 40px; width: auto; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__nav a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.footer__nav a:hover { color: var(--white); }
.footer__bottom { width: 100%; padding-top: 24px; border-top: 1px solid var(--g-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer__copy { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__legal a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.footer__legal a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Документы ---------- */
.legal-wrap { max-width: 880px; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 14px; }
.doc__summary { list-style: none; cursor: pointer; padding: 22px 64px 22px 28px; position: relative; font: 600 1.1rem var(--font-head); color: var(--head); }
.doc__summary::-webkit-details-marker { display: none; }
.doc__summary::after {
  content: ""; position: absolute; right: 30px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--rule); border-bottom: 2px solid var(--rule);
  transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease);
}
.doc[open] .doc__summary::after { transform: translateY(-30%) rotate(-135deg); }
.doc__body { padding: 0 28px 32px; border-top: 1px solid var(--line); }
.doc__body .legal__meta { margin: 20px 0 0; font-size: .9rem; }
.legal h3 { font-size: 1.05rem; margin: 1.8em 0 .6em; }
.legal p, .legal li { font-size: 1rem; }
.legal ul { margin: 0 0 1em; }
.legal li { position: relative; padding-left: 22px; margin-bottom: .45em; }
.legal li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--rule); }
.legal strong { color: var(--head); font-weight: 600; }
.legal__card { background: var(--surface-2); border-radius: var(--radius); padding: 24px 28px; margin: 0 0 1em; }
.legal__card p:last-child { margin: 0; }
.legal__note { border-left: 3px solid var(--rule); padding: 4px 0 4px 18px; font-size: .925rem; }
[data-lang-block][hidden] { display: none; }

/* ---------- 404 (тёмная) ---------- */
.error-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: 64px 0; background: var(--deep-teal); color: rgba(255, 255, 255, .8); }
.error-page .hero__mark { position: absolute; right: -6%; top: 50%; transform: translateY(-50%); width: min(62vw, 760px); opacity: .12; }
.error-page .hero__mark polygon { fill: var(--tint-1); stroke: none; }
.error-page .hero__title { color: var(--white); }
.error-page .eyebrow { color: var(--tint-1); }
.error-page .btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, .4); }
.error-page .lang { border-color: rgba(255, 255, 255, .35); }
.error-page .lang__btn { color: rgba(255, 255, 255, .8); }
.error-page .lang__btn[aria-pressed="true"] { background: var(--white); color: var(--deep-teal); }
.error-page__logo { display: inline-block; margin-bottom: 56px; }
.error-page__logo img { height: 52px; width: auto; }
.error-page .hero__actions { margin-bottom: 40px; }
.error-page .lang { width: fit-content; }

/* Reveal on scroll (класс .reveal ставит main.js) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .9s var(--ease), border-color .3s, background-color .4s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =====================================================================
   MOTION — включается motion.js (html.motion), только без reduced motion
   ===================================================================== */
.motion { scroll-behavior: auto; }

/* Заголовки по словам */
.wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.wd__i { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 45ms); }
.is-in .wd__i { transform: none; }

/* Hero: «M» собирается из четырёх граней, затем по скроллу растворяется (--p), следует за курсором (--tx/--ty) */
.motion .hero__mark polygon { transform-box: fill-box; transform-origin: center; animation: m-in 1.6s var(--ease) both; }
.motion .hero__mark polygon:nth-child(1) { --dx: -24px; --dy: 6px; animation-delay: .15s; }
.motion .hero__mark polygon:nth-child(2) { --dx: -10px; --dy: -22px; animation-delay: .3s; }
.motion .hero__mark polygon:nth-child(3) { --dx: 10px; --dy: -22px; animation-delay: .45s; }
.motion .hero__mark polygon:nth-child(4) { --dx: 24px; --dy: 6px; animation-delay: .6s; }
@keyframes m-in { from { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.92); } }
.motion .hero__mark-wrap {
  transform: translateY(-50%) translate3d(calc(var(--tx, 0) * 1px), calc(var(--p, 0) * -8vh + var(--ty, 0) * 1px), 0) scale(calc(1 + var(--p, 0) * .5));
  opacity: calc(1 - var(--p, 0) * 1.3); will-change: transform, opacity;
}
.motion .hero__inner { transform: translate3d(0, calc(var(--p, 0) * -60px), 0); opacity: calc(1 - var(--p, 0) * 1.1); }
.motion .hero__inner > :not(h1) { animation: up 1s var(--ease) both; }
.motion .hero__inner > :nth-child(1) { animation-delay: .1s; }
.motion .hero__inner > :nth-child(3) { animation-delay: .55s; }
.motion .hero__inner > :nth-child(4) { animation-delay: .7s; }
.motion .hero__inner > :nth-child(5) { animation-delay: .85s; }
@keyframes up { from { opacity: 0; transform: translateY(24px); } }

/* Черта надзаголовка вырастает при появлении блока */
.motion .reveal .eyebrow--rule::after { transform: scaleX(0); }
.motion .reveal.is-visible .eyebrow--rule::after { transform: none; }

/* C01: связи рисуются от вендоров к MERID и к партнёрам, акцентные «бегут» */
.motion .hub__links path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s var(--ease); }
.motion .hub__links path:nth-child(n+5) { transition-delay: .7s; }
.motion .hub__nodes, .motion .hub__core { opacity: 0; transition: opacity .8s ease; }
.motion .hub__nodes--p { transition-delay: 1.2s; }
.motion .hub__core { transition-delay: .5s; }
.motion .hub.is-in .hub__links path { stroke-dashoffset: 0; }
.motion .hub.is-in .hub__nodes, .motion .hub.is-in .hub__core { opacity: 1; }
.motion .hub.is-in .hub__hot { stroke-dasharray: .12 .06; animation: hot 2.4s linear 2s infinite; }
@keyframes hot { from { stroke-dashoffset: .18; } to { stroke-dashoffset: 0; } }

/* Пилот: шаги загораются по мере заполнения линии */
.motion .step__n { background: var(--surface-2); color: var(--head); box-shadow: 0 0 0 6px var(--surface-2), inset 0 0 0 2px var(--line); }
.motion .step.is-lit .step__n { background: var(--teal); color: var(--white); box-shadow: 0 0 0 6px var(--surface-2), inset 0 0 0 2px var(--teal); }

/* ---------- Закреплённые сцены (html.scenes: ширина ≥ 1024px) ---------- */
.scenes .scene-sol { padding: 0 0 120px; }
.scenes .scene-sol__track { height: 420vh; }
.scenes .scene-sol__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.scenes .scene-sol__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding-top: var(--header-h); }
.scenes .scene-sol .section__head { margin-bottom: 28px; }
.scenes .sol-list { grid-template-columns: 1fr; gap: 10px; }
.scenes .sol-list .card { display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; align-items: center; padding: 16px 20px; opacity: .55; }
.scenes .sol-list .card__icon { margin: 0; }
.scenes .sol-list .card h3 { margin: 0; font-size: 1.1rem; }
.scenes .sol-list .card p { grid-column: 2; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--ease), opacity .4s, margin .6s var(--ease); }
.scenes .sol-list .card.is-active { opacity: 1; border-color: var(--line-2); background: var(--surface-2); }
.scenes .sol-list .card.is-active p { max-height: 8em; opacity: 1; margin-top: 8px; }
.scenes .sol-list .card.is-done { opacity: .8; }

.scenes .rack { display: block; }
.scenes .rack-u { opacity: .3; }
.scenes .rack-u.is-on, .scenes .rack-u--base { opacity: 1; }
/* Текущий шаг: ключевой юнит — Aqua (одна деталь), остальные юниты шага — Teal */
.scenes .rack-u.is-current rect { fill: var(--teal); }
.scenes .rack-u--key.is-current rect { fill: var(--aqua); }
.scenes .rack-u--key.is-current circle { fill: var(--deep-teal); }

.scenes .scene-sol__dots { display: flex; flex-direction: column; gap: 10px; position: absolute; right: 28px; top: 50%; transform: translateY(-50%); }
.scene-sol__dots li { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s; }
.scene-sol__dots li.is-active { background: var(--rule); transform: scale(1.6); }

/* Без сцен на широком экране (reduced motion): стойка как в C46 — один юнит Aqua */
@media (min-width: 1024px) {
  html:not(.scenes) .scene-sol__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
  html:not(.scenes) .sol-list { grid-template-columns: 1fr; }
  html:not(.scenes) .rack { display: block; }
  html:not(.scenes) .rack-u[data-step="2"].rack-u--key rect { fill: var(--aqua); }
  html:not(.scenes) .rack-u[data-step="2"].rack-u--key circle { fill: var(--deep-teal); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { gap: 20px; }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(3, 1fr); }
}

/* Три языка и длинные казахские пункты не помещаются в строку — бургер с 1200px */
@media (max-width: 1200px) {
  .burger { display: block; }
  .header__cta { display: none; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; gap: 0; padding: 16px 24px; margin: 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: var(--bg); transform: translateX(100%); overflow-y: auto; overscroll-behavior: contain;
    /* закрытое меню скрыто полностью: не ловит Tab и не расширяет страницу в iOS Safari */
    visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s;
  }
  .nav.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .nav a { color: var(--head); font-size: 1.15rem; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav__cta-mobile { display: block; }
  .header__actions { margin-left: auto; }
  .header.menu-open { background: var(--bg); }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .section { padding: 88px 0; }
  .about, .split, .contact, .mvv__grid { grid-template-columns: 1fr; gap: 48px; }
  .mvv__grid { gap: 16px; }
  .mvv { margin-top: 80px; }
  .pillars { grid-template-columns: 1fr; gap: 16px; margin-top: 48px; }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before, .steps::after { display: none; }
  .hero__facts { grid-template-columns: repeat(2, 1fr); }
  .hero__facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__facts li:nth-child(n+3) { padding-top: 16px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .hero__mark-wrap { opacity: .6; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .logo { height: 36px; }
  .hero { padding: calc(var(--header-h) + 48px) 0 72px; min-height: 0; }
  .hero__mark-wrap { width: 120vw; right: -45%; }
  .hero__mark-wrap, .motion .hero__mark-wrap { opacity: .8; }
  .hero__actions { margin-bottom: 48px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__facts li { padding: 16px 12px 0 0; }
  .hero__facts li + li { padding-left: 12px; }
  .hero__facts li:nth-child(3) { padding-left: 0; }
  .hero__facts strong { font-size: 1.05rem; }
  .hero__facts span { font-size: .8rem; line-height: 1.45; display: block; }
  .hero__lead { font-size: 1.05rem; margin-bottom: 28px; }
  h2 { font-size: 1.6rem; }
  .section { padding: 64px 0; }
  .section__head { margin-bottom: 32px; }
  .section__lead, .about__text p, .split__intro p, .contact__info > p { font-size: 1rem; }
  .about, .split, .contact { gap: 36px; }
  .cards--3, .cards--4, .benefits, .form__row, .values { grid-template-columns: 1fr; }
  .cards { gap: 12px; }
  .card { padding: 22px 20px; }
  /* Иконка слева от заголовка — карточка вдвое ниже */
  .card:has(.card__icon) { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; }
  .card__icon { width: 44px; height: 44px; margin: 0; }
  .card:has(.card__icon) h3 { margin: 0; }
  .card:has(.card__icon) p { grid-column: 1 / -1; margin-top: 10px; }
  .mvv { margin-top: 64px; }
  .mvv__card { padding: 26px 22px 26px 26px; }
  .mvv__card .mvv__n { right: 20px; top: 24px; font-size: 1.3rem; }
  .values__title { margin-top: 40px; }
  .value { padding: 18px 4px; }
  .benefits { gap: 20px; }
  .pilot { padding: 24px 18px; margin-top: 56px; }
  .pilot__title { font-size: 1.2rem; margin-bottom: 22px; }
  /* Шаги пилота: номер слева, вертикальная линия прогресса */
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .steps::before, .steps::after { display: block; left: 19px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .steps::after { transform-origin: 50% 0; transform: scaleY(var(--p, 1)); }
  .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
  .step__n { width: 40px; height: 40px; margin: 0; grid-row: span 2; font-size: .9rem; }
  .step h4 { margin: 8px 0 4px; }
  .industries { margin-top: 56px; }
  .chips { gap: 8px; }
  .chips li { padding: 8px 14px; font-size: .85rem; }
  .pillar { padding: 22px 20px; }
  .form { padding: 22px 16px; gap: 14px; }
  .contact__list { margin-top: 24px; gap: 14px; }
  .contact__list div { grid-template-columns: 1fr; gap: 2px; padding-bottom: 14px; }
  .doc__summary { padding: 18px 52px 18px 18px; font-size: 1rem; }
  .doc__summary::after { right: 22px; }
  .doc__body { padding: 0 18px 24px; }
  .legal__card { padding: 18px; }
  .footer { padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__nav { gap: 4px 20px; }
  .footer__nav a, .footer__legal a { display: inline-block; padding: 6px 0; }
}

/* Узкие телефоны (iPhone SE, компактные Android): логотип, тема, языки и бургер в одну строку */
@media (max-width: 400px) {
  .header__inner { gap: 8px; }
  .header__actions { gap: 4px; }
  .logo { height: 28px; }
  .theme-toggle { width: 32px; height: 32px; }
  .lang__btn { padding: 7px 7px; }
  .burger { margin-right: -8px; }
  .hero__title { font-size: 1.85rem; }
  h2 { font-size: 1.45rem; }
}

/* Невысокие экраны: в закреплённой сцене решений прячем вводный абзац */
@media (max-height: 780px) {
  .scenes .scene-sol .section__lead { display: none; }
  .scenes .scene-sol h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
  .scenes .scene-sol .section__head { margin-bottom: 16px; }
  .scenes .scene-sol .eyebrow { margin-bottom: 10px; }
  .scenes .sol-list .card { padding: 10px 18px; }
  .scenes .sol-list .card.is-active p { margin-top: 4px; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, main, .nav, .footer { transition: none; }
}

/* =====================================================================
   ВЕРСИЯ ДЛЯ СЛАБОВИДЯЩИХ — html[data-a11y] (theme.js / main.js)
   Крупный шрифт (3 размера), 3 контрастные схемы, интервал, изображения вкл/выкл.
   Без анимаций, живого фона и декоративной графики; сетки перестраиваются под крупный текст.
   ===================================================================== */
/* кнопка входа (шапка) — как переключатель темы */
.a11y-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 8px; background: none; color: var(--nav);
  transition: color .2s, border-color .2s;
}
.a11y-toggle:hover { color: var(--nav-hover); border-color: var(--nav-hover); }
.a11y-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11y-bar { display: none; }

/* --- схемы: --a-bg / --a-fg, все токены сайта выводятся из них --- */
:root[data-a11y] { --a-bg: #FFFFFF; --a-fg: #000000; --a-err: #B00020; color-scheme: light; }
:root[data-a11y][data-a11y-color="wb"] { --a-bg: #000000; --a-fg: #FFFFFF; --a-err: #FF8A80; color-scheme: dark; }
:root[data-a11y][data-a11y-color="blue"] { --a-bg: #9DD1FF; --a-fg: #063462; --a-err: #8B0000; color-scheme: light; }
:root[data-a11y], :root[data-a11y] .footer {
  --bg: var(--a-bg); --head: var(--a-fg); --text: var(--a-fg); --muted: var(--a-fg);
  --line: var(--a-fg); --line-2: var(--a-fg); --surface: var(--a-bg); --surface-2: var(--a-bg);
  --rule: var(--a-fg); --eyebrow: var(--a-fg); --link: var(--a-fg); --spot: transparent;
  --header-glass: var(--a-bg); --header-line: var(--a-fg); --nav: var(--a-fg); --nav-hover: var(--a-fg);
  --btn2-bg: var(--a-fg); --btn2-text: var(--a-bg); --btn2-hover: var(--a-fg);
  --input-bg: var(--a-bg); --input-text: var(--a-fg); --input-line: var(--a-fg); --danger: var(--a-err);
}
:root[data-a11y] .footer { background: var(--a-bg); border-top: 3px solid var(--a-fg); color: var(--a-fg); }
:root[data-a11y] .footer a, :root[data-a11y] .footer__nav a, :root[data-a11y] .footer__legal a { color: var(--a-fg); text-decoration: underline; }
:root[data-a11y] .footer__bottom { border-top-color: var(--a-fg); }
:root[data-a11y] .footer__legal, :root[data-a11y] .footer__nav, :root[data-a11y] .footer__inner { min-width: 0; max-width: 100%; }
:root[data-a11y] .footer a { overflow-wrap: anywhere; }

/* --- размер шрифта: всё в rem масштабируется от корня --- */
:root[data-a11y] { font-size: 112.5%; }
:root[data-a11y][data-a11y-font="2"] { font-size: 137.5%; }
:root[data-a11y][data-a11y-font="3"] { font-size: 162.5%; }
:root[data-a11y] body { font-size: 1rem; line-height: 1.6; }
:root[data-a11y] h1, :root[data-a11y] .hero__title { font-size: 2.1rem; }
:root[data-a11y] h2 { font-size: 1.75rem; }
:root[data-a11y] h3 { font-size: 1.3rem; }
:root[data-a11y] .eyebrow { text-transform: none; letter-spacing: .02em; font-size: .95rem; }
:root[data-a11y] .card p, :root[data-a11y] .pillar p, :root[data-a11y] .value p, :root[data-a11y] .benefits p,
:root[data-a11y] .step p, :root[data-a11y] .hero__facts span, :root[data-a11y] .chips li, :root[data-a11y] .legal p,
:root[data-a11y] .legal li, :root[data-a11y] .field, :root[data-a11y] .check, :root[data-a11y] .footer { font-size: 1rem; }

/* --- интервал --- */
:root[data-a11y][data-a11y-space="1"] body { letter-spacing: .08em; word-spacing: .16em; line-height: 1.9; }
:root[data-a11y][data-a11y-space="1"] h1, :root[data-a11y][data-a11y-space="1"] h2, :root[data-a11y][data-a11y-space="1"] h3 { letter-spacing: .06em; line-height: 1.4; }

/* --- изображения выкл: скрываем картинки и иконки контента (логотип остаётся) --- */
:root[data-a11y][data-a11y-img="off"] main img { display: none; }

/* --- без анимаций, фона и декоративной графики --- */
:root[data-a11y] *, :root[data-a11y] *::before, :root[data-a11y] *::after { animation: none !important; transition: none !important; }
:root[data-a11y] .backdrop, :root[data-a11y] .hero__mark-wrap, :root[data-a11y] .hub, :root[data-a11y] .rack,
:root[data-a11y] .scene-sol__dots, :root[data-a11y] .theme-toggle, :root[data-a11y] .progress,
:root[data-a11y] .spot::before, :root[data-a11y] .card--cut::after, :root[data-a11y] .mvv__card::after,
:root[data-a11y] .steps::before, :root[data-a11y] .steps::after { display: none; }
:root[data-a11y] .reveal { opacity: 1; transform: none; }
:root[data-a11y] .card--cut { clip-path: none; border-radius: var(--radius); }
:root[data-a11y] .card, :root[data-a11y] .pillar, :root[data-a11y] .mvv__card, :root[data-a11y] .pilot,
:root[data-a11y] .form, :root[data-a11y] .doc, :root[data-a11y] .chips li { border-width: 2px; box-shadow: none; }
:root[data-a11y] .value { border-top-width: 3px; }
:root[data-a11y] .step__n { background: var(--a-fg); color: var(--a-bg); box-shadow: none; }
:root[data-a11y] .sol-list .card { opacity: 1; }

/* ссылки подчёркнуты, кнопки — инверсия, фокус заметный */
:root[data-a11y] main a:not(.btn), :root[data-a11y] .contact__list a { text-decoration: underline; text-underline-offset: .15em; }
:root[data-a11y] .btn, :root[data-a11y] .btn--accent, :root[data-a11y] .btn--primary {
  background: var(--a-fg); color: var(--a-bg); border: 2px solid var(--a-fg); box-shadow: none; transform: none !important;
}
:root[data-a11y] .btn--ghost { background: var(--a-bg); color: var(--a-fg); }
:root[data-a11y] :focus-visible { outline: 3px solid var(--a-fg); outline-offset: 3px; box-shadow: 0 0 0 6px var(--a-bg); }
:root[data-a11y] .field input, :root[data-a11y] .field select, :root[data-a11y] .field textarea { border-width: 2px; font-size: 1rem; }
:root[data-a11y] .check input { width: 1.2rem; height: 1.2rem; accent-color: var(--a-fg); }
/* поля при крупном шрифте сжимаются по ширине колонки, а не по своему содержимому */
:root[data-a11y] .form, :root[data-a11y] .form__row, :root[data-a11y] .field,
:root[data-a11y] .field input, :root[data-a11y] .field select, :root[data-a11y] .field textarea { min-width: 0; }
:root[data-a11y] .form { grid-template-columns: minmax(0, 1fr); }
:root[data-a11y] .check { min-width: 0; }
:root[data-a11y] h1, :root[data-a11y] h2, :root[data-a11y] h3, :root[data-a11y] .check, :root[data-a11y] p, :root[data-a11y] li { overflow-wrap: anywhere; }
@media (max-width: 640px) { :root[data-a11y] h1, :root[data-a11y] h2, :root[data-a11y] h3 { hyphens: auto; } }

/* шапка — в потоке (не фиксирована), логотип по схеме */
:root[data-a11y] .header { position: relative; height: auto; min-height: var(--header-h); background: var(--a-bg); border-bottom: 3px solid var(--a-fg); }
:root[data-a11y] .header__inner { min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px; }
:root[data-a11y] .logo--light { display: none; }
:root[data-a11y] .logo--dark { display: block; }
:root[data-a11y][data-a11y-color="wb"] .logo--light { display: block; }
:root[data-a11y][data-a11y-color="wb"] .logo--dark { display: none; }
:root[data-a11y] .lang { border: 2px solid var(--a-fg); }
:root[data-a11y] .lang__btn { color: var(--a-fg); font-size: .85rem; }
:root[data-a11y] .lang__btn[aria-pressed="true"] { background: var(--a-fg); color: var(--a-bg); }
:root[data-a11y] .a11y-toggle { display: none; }
/* меню всегда «бургером»: при крупном шрифте пункты не помещаются в строку */
:root[data-a11y] .burger { display: block; }
:root[data-a11y] .burger span { background: var(--a-fg); }
:root[data-a11y] .header__cta { display: none; }
:root[data-a11y] .header__actions { margin-left: auto; }
/* меню выпадает под шапкой (шапка в потоке, поэтому от неё и отсчитываем) */
:root[data-a11y] .nav {
  position: absolute; top: 100%; left: 0; right: 0; bottom: auto; z-index: 60;
  flex-direction: column; gap: 0; padding: 8px 24px 24px; margin: 0;
  background: var(--a-bg); border-bottom: 3px solid var(--a-fg);
  transform: none; overflow: visible; visibility: hidden;
}
:root[data-a11y] .nav.is-open { visibility: visible; }
:root[data-a11y] .nav a { color: var(--a-fg); font-size: 1.3rem; padding: 18px 0; border-bottom: 2px solid var(--a-fg); text-decoration: underline; }
:root[data-a11y] .nav a::after { display: none; }
:root[data-a11y] .nav a { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
:root[data-a11y] .btn { white-space: normal; overflow-wrap: anywhere; max-width: 100%; text-align: center; }
:root[data-a11y] .header__inner { flex-wrap: wrap; row-gap: 8px; }
:root[data-a11y] .nav__cta-mobile { display: block; }

/* сетки — по ширине текста, без закреплённых сцен */
:root[data-a11y] .hero { min-height: 0; padding: 48px 0 64px; }
:root[data-a11y] .hero__inner > * { max-width: 46rem; }
:root[data-a11y] .section { padding: 64px 0; border-top: 3px solid var(--a-fg); }
:root[data-a11y] .scene-sol__grid { display: block !important; }
:root[data-a11y] .cards--3, :root[data-a11y] .cards--4, :root[data-a11y] .values, :root[data-a11y] .pillars,
:root[data-a11y] .benefits, :root[data-a11y] .hero__facts, :root[data-a11y] .steps, :root[data-a11y] .mvv__grid,
:root[data-a11y] .about, :root[data-a11y] .split, :root[data-a11y] .contact, :root[data-a11y] .form__row,
:root[data-a11y] .sol-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)) !important;
}
:root[data-a11y] .hero__facts li, :root[data-a11y] .hero__facts li + li { padding: 16px 16px 0 0; border-left: 0; }
:root[data-a11y] .contact__list div { grid-template-columns: 1fr; }
:root[data-a11y] .card:has(.card__icon) { display: block; }
:root[data-a11y] .card__icon { margin: 0 0 16px; }

/* --- панель настроек --- */
:root[data-a11y] .a11y-bar { display: block; background: var(--a-bg); color: var(--a-fg); border-bottom: 3px solid var(--a-fg); }
/* размеры панели в px: она не растёт вместе с выбранным шрифтом и остаётся компактной */
.a11y-bar { font-size: 16px; letter-spacing: 0; word-spacing: 0; line-height: 1.3; }
.a11y-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 10px; padding-bottom: 10px; }
.a11y-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.a11y-group__label { font-weight: 600; margin-right: 4px; white-space: nowrap; }
.a11y-btn {
  min-width: 44px; min-height: 44px; padding: 6px 12px; cursor: pointer;
  font: 700 16px/1 var(--font); color: var(--a-fg); background: var(--a-bg);
  border: 2px solid var(--a-fg); border-radius: 6px;
}
.a11y-btn[aria-pressed="true"] { background: var(--a-fg); color: var(--a-bg); }
.a11y-btn--f2 { font-size: 19px; }
.a11y-btn--f3 { font-size: 22px; }
@media (max-width: 640px) {
  .a11y-bar__inner { gap: 8px 14px; }
  .a11y-group__label { font-size: 14px; }
  .a11y-btn { padding: 6px 9px; }
  .a11y-exit { margin-left: 0; }
}
/* образцы схем всегда в своих цветах; выбранная — с двойной рамкой */
.a11y-swatch--bw, .a11y-swatch--bw[aria-pressed="true"] { background: #FFFFFF; color: #000000; border-color: #000000; }
.a11y-swatch--wb, .a11y-swatch--wb[aria-pressed="true"] { background: #000000; color: #FFFFFF; border-color: #FFFFFF; outline: 2px solid #000000; }
.a11y-swatch--blue, .a11y-swatch--blue[aria-pressed="true"] { background: #9DD1FF; color: #063462; border-color: #063462; }
.a11y-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--a-bg), 0 0 0 6px var(--a-fg); }
.a11y-exit { margin-left: auto; text-decoration: underline; }

/* =========================================================
   СОГЛАСИЕ НА COOKIE — баннер и окно настроек (consent.js, ТЗ — PROMPT-cookies.md)
   ========================================================= */
.consent {
  position: fixed; z-index: 1000; left: 16px; right: 16px; bottom: 16px;
  display: flex; justify-content: flex-start; pointer-events: none;
}
.consent__card {
  pointer-events: auto; max-width: 560px; padding: 22px 24px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -24px rgba(2, 34, 41, .6);
  animation: consent-in .5s var(--ease) both;
}
@keyframes consent-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.consent__title { margin: 0 0 8px; font: 700 1.05rem/1.3 var(--font-head); color: var(--head); }
.consent__text { margin: 0 0 16px; font-size: .92rem; line-height: 1.55; }
.consent__text a { color: var(--link); }
.consent__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.consent-dlg {
  width: calc(100% - 32px); max-width: 560px; max-height: calc(100% - 32px); padding: 0;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(2, 34, 41, .8);
}
.consent-dlg::backdrop { background: rgba(2, 34, 41, .6); }
.consent-dlg__form { display: grid; gap: 14px; padding: 24px; }
.consent-dlg__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.consent-dlg__head .consent__title { margin: 8px 0 0; font-size: 1.25rem; }
.consent-dlg .consent__text { margin: 0; }
.consent-dlg .consent__actions { margin-top: 6px; }
.consent-dlg__close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font: 400 1.6rem/1 var(--font); color: var(--head); background: transparent; border: 1px solid var(--line-2);
}
.consent-dlg__close:hover { background: var(--spot); }

.consent-cat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.consent-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.consent-cat__title { font-weight: 600; color: var(--head); cursor: pointer; }
.consent-cat__desc { margin: 6px 0 0; font-size: .88rem; line-height: 1.5; }
.consent-cat__always { display: inline-block; margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--eyebrow); }

/* переключатель: настоящий checkbox поверх дорожки (клавиатура и экранные дикторы работают как обычно) */
.consent-switch { position: relative; flex: none; width: 46px; height: 26px; }
.consent-switch__input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.consent-switch__input:disabled { cursor: not-allowed; }
.consent-switch__track {
  position: absolute; inset: 0; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--line-2); transition: background .2s, border-color .2s;
}
.consent-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: transform .2s var(--ease), background .2s;
}
.consent-switch__input:checked + .consent-switch__track { background: var(--teal); border-color: var(--teal); }
.consent-switch__input:checked + .consent-switch__track::after { transform: translateX(20px); background: var(--white); }
.consent-switch__input:disabled + .consent-switch__track { opacity: .65; }
.consent-switch__input:focus-visible + .consent-switch__track { outline: 2px solid var(--aqua); outline-offset: 3px; }

@media (max-width: 640px) {
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .consent__card { padding: 18px; }
  .consent__actions .btn { flex: 1 1 auto; }
  .consent-dlg { width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .consent-dlg__form { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .consent__card { animation: none; }
  .consent-switch__track, .consent-switch__track::after { transition: none; }
}
@media print { .consent, .consent-dlg { display: none !important; } }

/* версия для слабовидящих: контрастная рамка, без прозрачности и анимации */
:root[data-a11y] .consent__card, :root[data-a11y] .consent-dlg {
  background: var(--a-bg); color: var(--a-fg); border: 3px solid var(--a-fg);
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; animation: none;
}
:root[data-a11y] .consent__title, :root[data-a11y] .consent-cat__title,
:root[data-a11y] .consent-cat__always, :root[data-a11y] .consent__text a { color: var(--a-fg); }
:root[data-a11y] .consent-cat { border: 2px solid var(--a-fg); }
:root[data-a11y] .consent-dlg__close { color: var(--a-fg); border: 2px solid var(--a-fg); }
:root[data-a11y] .consent-switch__track { background: var(--a-bg); border: 2px solid var(--a-fg); }
:root[data-a11y] .consent-switch__track::after { background: var(--a-fg); }
:root[data-a11y] .consent-switch__input:checked + .consent-switch__track { background: var(--a-fg); border-color: var(--a-fg); }
:root[data-a11y] .consent-switch__input:checked + .consent-switch__track::after { background: var(--a-bg); }
