/* =========================================================
   Технический аудит САПР и ИТ-ландшафта — Нормасофт
   Приоритет: 1) шрифт Manrope  2) токены DESIGN.md  3) стиль презентации

   Правило интерфейса — два визуальных языка, без исключений:
   • Интерактивное (кнопки, вкладки, summary, документы, стрелки, ссылки-карточки):
     рамка или заливка + срез угла, обязательный признак действия (+/−, →, ←, «i» — подсказка,
     подчёркнутая ссылка), hover и :focus-visible, cursor:pointer, высота ≥ 40–44 px.
   • Неинтерактивное (теги, факты, цифры, метки, бейджи): плоско — без рамки, тени,
     стрелок и hover; мелкий текст 500.
   ========================================================= */

/* ---------- Шрифты (локально, без Google Fonts) ---------- */
@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Manrope-Regular.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Manrope-Medium.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/Manrope-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Manrope-Bold.ttf") format("truetype"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/Manrope-ExtraBold.ttf") format("truetype"); }

/* ---------- Токены ---------- */
:root {
  /* DESIGN.md */
  --font-primary: "Manrope", sans-serif;
  --fs-xs: 15px; --fs-sm: 16px; --fs-md: 17px; --fs-lg: 18px;
  --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 29px; --fs-4xl: 32px;
  --fw-base: 500;
  --lh-base: 28px;

  --c-accent: #00adef;      /* только кнопки действия и акценты на тёмном */
  --c-ink: #081c36;
  --c-muted: #f2f4f7;

  /* из презентации */
  --c-blue: #0386fc;
  --c-blue-deep: #0068d6;   /* белый текст ≥ 5:1 */
  --c-blue-soft: #e3effe;
  --c-line: #c9d3e0;
  --c-text-2: #4b5563;
  --c-on-dark-2: #b9c6d8;
  --c-error: #b42318;
  --c-ok: #0b7a3b;

  --s-3: 25.5px; --s-4: 40px; --s-5: 64px; --s-6: 96px;

  --radius-panel: 24px;
  --radius-sm: 8px;
  --cut: 20px;
  --cut-sm: 10px;
  --dur: 200ms;
  --container: 1200px;
  --gutter: 16px;
  --header-h: 68px;
}
@media (min-width: 768px)  { :root { --gutter: 24px; --cut: 24px; } }
@media (min-width: 1024px) { :root { --header-h: 80px; } }
@media (min-width: 1280px) { :root { --gutter: 32px; } }

/* Форма среза считается на каждом элементе — так локальный --cut действительно работает */
*, *::before, *::after {
  box-sizing: border-box;
  --cut-shape: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

/* ---------- База ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-primary); font-size: var(--fs-md); font-weight: var(--fw-base);
  line-height: var(--lh-base); color: var(--c-ink); background: #fff; overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--c-blue-deep); text-underline-offset: 3px; transition: color var(--dur); }
a:hover { color: var(--c-ink); }
small { font-size: var(--fs-xs); line-height: 1.5; }
abbr[title] { text-decoration: none; cursor: help; }
button, input { font: inherit; color: inherit; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 3px; border-radius: 2px; }
/* у элементов со срезом (clip-path) кольцо фокуса внутри */
.tab:focus-visible, .arrow:focus-visible, .symptom summary:focus-visible, .faq__item summary:focus-visible,
.more__item summary:focus-visible, .link-cards a:focus-visible, .main-nav__list a:focus-visible { outline-offset: -5px; }
.tab[aria-selected="true"]:focus-visible, .section--dark :focus-visible, .site-header :focus-visible,
.site-footer :focus-visible, .form :focus-visible, .task__gives :focus-visible, .case__stats :focus-visible { outline-color: #fff; }
.main-nav__list a.is-active:focus-visible { outline-color: var(--c-ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 200; background: var(--c-ink); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 16px; color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Рамка со срезом: рисуется слоями, поэтому идёт и по скосу ---------- */
.tabs--pills .tab, .carousel__tabs .tab, .tabs--stages .tab__num, .arrow {
  --bw: 2px; position: relative; isolation: isolate;
  background: var(--frame, var(--c-blue-deep)); clip-path: var(--cut-shape);
}
.tabs--pills .tab::before, .carousel__tabs .tab::before, .tabs--stages .tab__num::before, .arrow::before {
  content: ""; position: absolute; inset: var(--bw); z-index: -1; background: var(--fill, #fff);
  --cut-in: calc(var(--cut) - var(--bw) * .41);
  clip-path: polygon(0 0, calc(100% - var(--cut-in)) 0, 100% var(--cut-in), 100% 100%, 0 100%);
  transition: background var(--dur);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 28px;
  font-weight: 700; font-size: var(--fs-sm); line-height: 1.2; text-align: center; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius-sm); cursor: pointer;
  transition: background var(--dur), color var(--dur), border-color var(--dur), transform var(--dur);
}
.btn-primary { background: var(--c-accent); color: var(--c-ink); border-color: var(--c-accent); }
.btn-primary:hover { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn-secondary:hover { background: var(--c-ink); color: #fff; }
.btn-secondary--light { color: #fff; border-color: #fff; justify-self: start; }
.btn-secondary--light:hover { background: #fff; color: var(--c-ink); }
.btn-small { min-height: 40px; padding: 8px 18px; }

/* ссылка-действие в тексте */
.link-arrow { font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; }
.link-arrow::after { content: " →"; }
.link-arrow + .link-arrow { margin-left: 20px; }

/* стрелки ← → */
.arrow {
  --cut: var(--cut-sm); --frame: var(--c-ink); width: 44px; height: 44px; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--c-ink);
}
.arrow:hover { --fill: var(--c-ink); color: #fff; }
.arrow:disabled { opacity: .35; cursor: default; --fill: #fff; color: var(--c-ink); }

/* ---------- Шапка (как «вкладка» на слайдах) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--c-blue-deep); color: #fff; }
.header-inner { display: flex; align-items: center; gap: 8px; min-height: var(--header-h); }
@media (min-width: 640px) { .header-inner { gap: 12px; } }
/* логотип без плашки: цветной знак с белым контуром + слово живым текстом */
.logo-link { display: flex; flex: none; align-items: center; gap: 8px; text-decoration: none; }
.logo-mark { height: 30px; width: auto; filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff); }
.wordmark { font-weight: 800; font-size: 16px; line-height: 1; letter-spacing: .01em; color: #fff; white-space: nowrap; }
.wordmark span { color: #bfe9ff; }
@media (min-width: 480px)  { .logo-mark { height: 36px; } .wordmark { font-size: 19px; } }
@media (min-width: 640px)  { .logo-mark { height: 42px; } .wordmark { font-size: 22px; } .logo-link { gap: 10px; } }
@media (min-width: 1024px) { .logo-mark { height: 50px; } .wordmark { font-size: 26px; } .logo-link { gap: 12px; } }
.header-phone { display: none; color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; margin-left: auto; }
.header-phone:hover { color: #fff; text-decoration: underline; }
.header-cta { margin-left: auto; white-space: nowrap; padding-inline: 12px; font-size: 14px; }
@media (max-width: 479px) { .header-cta { padding-inline: 10px; font-size: 13px; } }
.nav-toggle {
  flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff; border-radius: var(--radius-sm); cursor: pointer; color: #fff;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 1px; position: relative; transition: transform var(--dur), background var(--dur);
}
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after  { top: 6px; }
.nav-check:checked ~ .nav-toggle .nav-toggle__bar { background: transparent; }
.nav-check:checked ~ .nav-toggle .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-check:checked ~ .nav-toggle .nav-toggle__bar::after  { transform: translateY(-6px) rotate(-45deg); }
.nav-check:focus-visible ~ .nav-toggle { outline: 3px solid #fff; outline-offset: 3px; }

.main-nav {
  order: 5; position: absolute; left: 0; right: 0; top: 100%; display: none;
  background: var(--c-blue-deep); padding: 8px var(--gutter) 20px;
}
.nav-check:checked ~ .main-nav { display: block; }
.main-nav__list a {
  display: block; padding: 12px 16px; color: #fff; text-decoration: none; font-weight: 600;
  font-size: 14px; line-height: 16px; letter-spacing: .03em; text-transform: uppercase;
  --cut: var(--cut-sm); clip-path: var(--cut-shape); transition: background var(--dur), color var(--dur);
}
.main-nav__list a:hover { background: rgba(255,255,255,.14); color: #fff; }
.main-nav__list a.is-active { background: #fff; color: var(--c-blue-deep); }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; display: block; background: none; padding: 0; order: 0; border-radius: 0; margin-left: 12px; }
  .main-nav__list { display: flex; gap: 4px; }
  .main-nav__list a { padding: 12px 16px; white-space: nowrap; }
  .header-cta { padding-inline: 18px; font-size: var(--fs-sm); }
}
@media (min-width: 1280px) {
  .header-phone { display: inline; }
  .header-cta { margin-left: 4px; }
}

/* ---------- Первый экран ---------- */
.hero { position: relative; overflow: hidden; margin: 12px 12px 0; border-radius: var(--radius-panel); background: var(--c-muted); }
.hero-inner { position: relative; z-index: 2; padding-block: 32px 36px; }
.hero__body { display: grid; gap: 20px; max-width: 680px; }
.hero__eyebrow { font-size: 13px; line-height: 1.5; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-blue-deep); }
.hero__eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.hero__eyebrow a:hover { color: var(--c-ink); }
.hero__title { font-weight: 800; font-size: clamp(32px, 5.4vw, 58px); line-height: 1.08; letter-spacing: -.01em; }
.hero__lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.45; color: var(--c-text-2); max-width: 36em; font-weight: 600; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 14px 36px; }
.hero__facts div { display: flex; flex-direction: column-reverse; }
.hero__facts dt { font-size: 14px; line-height: 1.4; color: var(--c-text-2); }
.hero__facts dd { font-size: var(--fs-3xl); font-weight: 800; line-height: 1.15; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__wave { display: none; }

.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; padding-block: 24px 4px; }
.trust div { display: flex; flex-direction: column-reverse; gap: 4px; }
.trust dd { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.1; color: var(--c-blue-deep); }
.trust dt { font-size: 14px; line-height: 1.4; color: var(--c-text-2); }
.trust dt a { font-weight: 600; }

@media (max-width: 639px) { .hero__actions .btn { flex: 1; padding-inline: 14px; } }
@media (min-width: 640px) { .hero__eyebrow { font-size: 14px; } }
@media (min-width: 900px) {
  .hero { margin-inline: 24px; }
  .hero-inner { padding-block: 64px 72px; }
  .hero__wave { display: block; position: absolute; right: -4%; bottom: -14%; width: min(58%, 820px); height: auto; z-index: 1; pointer-events: none; }
  .hero__body { max-width: 580px; }
  .trust { grid-template-columns: repeat(4, 1fr); padding-top: 32px; }
}
@media (min-width: 1280px) { .hero__body { max-width: 640px; } }

/* ---------- Секции ---------- */
.section { padding-block: 48px; }
@media (min-width: 768px) { .section { padding-block: var(--s-5); } }
.section--muted { background: var(--c-muted); }
.section--dark { position: relative; background: var(--c-ink); color: #fff; }
/* линия штриховки на обоих стыках с соседними блоками, на всю ширину экрана */
.section--dark::before, .section--dark::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px; opacity: .8; pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--c-ink) 0 2px, transparent 2px 8px);
}
.section--dark::before { bottom: 100%; }
.section--dark::after { top: 100%; }
.section--dark a { color: var(--c-accent); }
.section--dark a:hover { color: #fff; }
@media (min-width: 1024px) { .section { padding-block: var(--s-6); } }

.section-header { display: grid; gap: 12px; margin-bottom: 28px; max-width: 880px; }
@media (min-width: 768px) { .section-header { margin-bottom: var(--s-4); } }
.section-header__num { font-size: clamp(44px, 7vw, 76px); font-weight: 800; line-height: 1; color: var(--c-accent); }
.section-header h2 { font-size: clamp(var(--fs-3xl), 3.6vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
.section-header__lead { font-size: var(--fs-lg); line-height: 1.55; color: var(--c-text-2); padding-top: 24px; position: relative; }
/* штриховка */
.section-header__lead::before, .section-header--nolead::after {
  content: ""; display: block; width: 140px; height: 10px; opacity: .8;
  background: repeating-linear-gradient(135deg, var(--c-ink) 0 2px, transparent 2px 8px);
}
.section-header__lead::before { position: absolute; left: 0; top: 0; }

.subsection { margin-top: var(--s-5); }
.subsection > h3 { font-size: clamp(var(--fs-2xl), 2.6vw, var(--fs-4xl)); margin-bottom: 20px; }
.footnote { margin-top: 14px; color: var(--c-text-2); }
.note { margin-top: 24px; padding: 18px 22px; background: var(--c-muted); border-left: 4px solid var(--c-blue-deep); font-weight: 600; }

/* ---------- Списки ---------- */
.check-list { display: grid; gap: 10px; }
.check-list li { padding-left: 32px; position: relative; line-height: 1.5; }
.check-list li::before, .decision li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 15px; height: 8px;
  border-left: 3px solid var(--c-blue-deep); border-bottom: 3px solid var(--c-blue-deep); transform: rotate(-45deg);
}
.check-list--dark li::before { border-color: var(--c-accent); }
.dash-list { display: grid; gap: 8px; }
.dash-list li { position: relative; padding-left: 20px; font-size: var(--fs-sm); line-height: 1.5; color: #d6deea; }
.dash-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--c-accent); }
.dash-list strong { color: #fff; }

/* теги — неинтерактивные */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--c-muted); padding: 4px 10px; border-radius: 2px; font-size: 14px; line-height: 1.4; }
.tags--dark li { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Вкладки (из <details>; без JS — аккордеон) ---------- */
.tab-panel { background: #fff; padding: 24px 22px 28px; clip-path: var(--cut-shape); }
.section:not(.section--muted) .tab-panel { background: var(--c-muted); }
.tab-panel[hidden] { display: none; }
.tab-panel__title { font-size: var(--fs-2xl); }
.tab-panel > summary { position: relative; padding-right: 44px; }
.tab-panel[open] > summary { margin-bottom: 16px; }
.tab-panel > summary::after, .symptom summary::after, .faq__item summary::after, .more__item summary::after {
  content: "+"; position: absolute; right: 0; top: 0; width: 28px; height: 28px; line-height: 26px; text-align: center;
  font-size: 22px; font-weight: 700; background: var(--c-blue-deep); color: #fff; border-radius: 50%; transition: rotate var(--dur);
}
.tab-panel[open] > summary::after, .symptom[open] summary::after, .faq__item[open] summary::after, .more__item[open] summary::after { rotate: 180deg; }

/* плавное раскрытие по клику (вкладки переключаются мгновенно): высота, где поддерживается, + появление */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  details:not(.tab-panel)::details-content { block-size: 0; overflow: clip; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
  details:not(.tab-panel)[open]::details-content { block-size: auto; }
}
details:not(.tab-panel)[open] > :not(summary) { animation: fade-in .35s ease; }
@keyframes fade-in { from { opacity: 0; translate: 0 -6px; } }
.tab-panel[open] > summary::after, .symptom[open] summary::after, .faq__item[open] summary::after, .more__item[open] summary::after { content: "−"; }
.tabs:not(.is-enhanced) .tab-panel { padding: 16px 20px; --cut: 14px; }
.tabs:not(.is-enhanced) .tab-panel + .tab-panel { margin-top: 8px; }
.tabs:not(.is-enhanced) .tab-panel__title { font-size: var(--fs-xl); }
.is-enhanced > .tab-panel > summary { padding-right: 0; cursor: default; }
.is-enhanced > .tab-panel > summary::after { display: none; }

.tablist { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { border: 0; padding: 0; background: none; cursor: pointer; text-align: left; font-weight: 700; }

/* вкладки-кнопки (задачи, кейсы) */
.tabs--pills .tablist, .carousel__tabs { overflow-x: auto; scrollbar-width: none; }
.tabs--pills .tablist::-webkit-scrollbar, .carousel__tabs::-webkit-scrollbar { display: none; }
.tabs--pills .tab, .carousel__tabs .tab {
  --cut: var(--cut-sm); flex: none; min-height: 44px; padding: 10px 20px; font-size: 15px; line-height: 1.3; white-space: nowrap; color: var(--c-ink);
}
.tabs--pills .tab:hover, .carousel__tabs .tab:hover { --fill: var(--c-blue-soft); }
.tabs--pills .tab[aria-selected="true"], .carousel__tabs .tab[aria-current="true"] { --fill: var(--c-blue-deep); color: #fff; }
.tabs--pills.is-enhanced > .tab-panel { background: none; padding: 0; clip-path: none; }
.tabs--pills.is-enhanced > .tab-panel > summary { display: none; }

/* ---------- 01. Задачи ---------- */
.task { display: grid; gap: 20px; }
@media (min-width: 900px) { .task { grid-template-columns: 1.45fr 1fr; gap: 28px; align-items: start; } }
.task__risk { font-size: var(--fs-xl); font-weight: 700; line-height: 1.4; }
.task__risk em { font-style: normal; color: var(--c-blue-deep); }
.task__sub, .stage__count, .stage__label, .case__tag, .case__facts dt {
  display: block; font-size: 13px; line-height: 1.4; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-blue-deep);
}
.task__sub { margin: 22px 0 10px; color: var(--c-text-2); }
.task__gives { background: var(--c-ink); color: #fff; padding: 28px 24px; clip-path: var(--cut-shape); }
.task__gives h4 { font-size: var(--fs-xl); margin-bottom: 16px; }
.task__gives li { font-size: var(--fs-sm); }
.task__docs { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.18); font-size: 14px; line-height: 1.6; color: var(--c-on-dark-2); }
.task__docs a { color: var(--c-accent); }
.task__docs a:hover { color: #fff; }

/* симптомы — одинаковые окошки */
.symptoms { display: grid; gap: 8px; }
.symptom { background: var(--c-muted); --cut: 14px; clip-path: var(--cut-shape); transition: background var(--dur); }
.symptom[open] { background: var(--c-blue-soft); }
.symptom summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 12px 60px 12px 20px; font-weight: 700; font-size: var(--fs-sm); line-height: 1.4; }
.symptom summary::after { right: 18px; top: 50%; translate: 0 -50%; }
.symptom summary:hover { color: var(--c-blue-deep); }
.symptom p { padding: 0 20px 18px; font-size: var(--fs-sm); line-height: 1.55; }

/* ---------- 02. Этапы: линия шагов ---------- */
.tabs--stages .tablist { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tabs--stages .tablist::before { content: ""; position: absolute; left: 20px; right: 20px; top: 19px; height: 2px; background: var(--c-line); }
.tabs--stages .tab { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--c-ink); }
.tabs--stages .tab__num {
  --cut: 8px; --frame: var(--c-blue-deep); width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--fs-lg); color: var(--c-blue-deep);
}
.tabs--stages .tab:hover .tab__num { --fill: var(--c-blue-soft); }
.tabs--stages .tab.is-done .tab__num { --frame: var(--c-blue-soft); --fill: var(--c-blue-soft); }
.tabs--stages .tab[aria-selected="true"] .tab__num { --frame: var(--c-blue-deep); --fill: var(--c-blue-deep); color: #fff; }
.tab__label, .tab__badge { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabs--stages .tab[aria-selected="true"] .tab__label { color: var(--c-blue-deep); }
@media (min-width: 900px) {
  .tabs--stages .tablist { gap: 12px; margin-bottom: 24px; }
  .tabs--stages .tab__num { width: 44px; height: 44px; }
  .tabs--stages .tablist::before { top: 21px; }
  .tab__label, .tab__badge { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .tab__label { font-size: 14px; line-height: 1.3; hyphens: auto; -webkit-hyphens: auto; }
  .tab__badge { margin-top: -6px; font-size: 12px; line-height: 1.3; font-weight: 500; color: var(--c-text-2); }
}

.stage__count { margin-bottom: 6px; }
.stage { display: grid; gap: 20px; }
.stage__body { display: grid; gap: 16px; align-content: start; }
.stage__body > p:first-child { font-size: var(--fs-lg); line-height: 1.5; }
.stage__result { display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 20px; background: var(--c-blue-soft); --cut: 18px; clip-path: var(--cut-shape); }
.stage__doc { font-size: var(--fs-xl); font-weight: 800; line-height: 1.3; }
.stage__next { font-size: 14px; color: var(--c-text-2); }
.stage__nav { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; }
@media (min-width: 900px) {
  .tabs--stages.is-enhanced > .tab-panel { padding: 32px 32px 32px; }
  .stage { grid-template-columns: 1.6fr 1fr; gap: 32px; }
  .stage__result { min-height: 220px; }
}

/* ---------- 03. Результат: список документов + пример ---------- */
.decision { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: -12px 0 28px; font-weight: 700; }
.decision li { position: relative; padding-left: 26px; }
.docs { display: grid; gap: 20px; }
.docs__list { display: grid; gap: 6px; align-content: start; }
.docs__group { margin: 12px 0 2px; font-size: 13px; line-height: 1.4; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-2); }
.docs__group:first-child { margin-top: 0; }
.doc-item, .doc-link {
  position: relative; display: block; min-height: 44px; padding: 11px 48px 11px 16px; font-size: 15px; line-height: 1.4; font-weight: 700;
  background: var(--c-muted); --cut: var(--cut-sm); transition: background var(--dur), color var(--dur);
}
.doc-item { cursor: help; }
.doc-item::after, .doc-link::after { position: absolute; right: 16px; top: 11px; font-weight: 800; color: var(--c-blue-deep); }
/* «i» — подсказка; «→» — открыть пример справа */
.doc-item::after { content: "i"; width: 20px; height: 20px; top: 12px; border: 2px solid currentColor; border-radius: 50%; font-size: 11px; line-height: 16px; text-align: center; }
.doc-link::after { content: "→"; }
.doc-item:hover, .doc-item:focus-visible, .doc-item:target, .doc-link:hover { background: var(--c-blue-soft); }
.doc-link { color: var(--c-ink); text-decoration: none; clip-path: var(--cut-shape); }
.doc-link[aria-current="true"] { background: var(--c-blue-deep); color: #fff; }
.doc-link[aria-current="true"]::after { color: #fff; }
.doc-item__tip { display: none; padding-top: 6px; font-size: 14px; line-height: 1.5; font-weight: 500; color: var(--c-ink); }
.doc-item__tip em { font-style: normal; font-weight: 700; color: var(--c-blue-deep); white-space: nowrap; }
.doc-item:hover .doc-item__tip, .doc-item:focus .doc-item__tip, .doc-item:target .doc-item__tip { display: block; }
.tabs--docs.is-enhanced > .tablist { display: none; }
.doc p + p, .doc .doc__figure, .doc .gantt { margin-top: 14px; }
.doc__figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--c-text-2); }
.matrix__open { position: relative; display: block; width: 100%; padding: 0; background: #fff; border: 2px solid var(--c-line); cursor: zoom-in; transition: border-color var(--dur); }
.matrix__open:hover { border-color: var(--c-blue-deep); }
.matrix__zoom { position: absolute; right: 12px; bottom: 12px; padding: 6px 14px; background: var(--c-ink); color: #fff; font-size: 14px; font-weight: 700; border-radius: var(--radius-sm); }
.matrix__zoom::before { content: "⤢ "; }
@media (min-width: 900px) {
  .docs { grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
  /* на ПК подсказка — окошко рядом с пунктом, поверх примера */
  .doc-item__tip {
    display: block; position: absolute; left: calc(100% + 14px); top: 50%; z-index: 5; width: 340px; padding: 16px 18px;
    background: var(--c-ink); color: #fff; --cut: 12px; clip-path: var(--cut-shape); box-shadow: 0 12px 32px rgba(8, 28, 54, .25);
    opacity: 0; visibility: hidden; transform: translate(-8px, -50%); transition: opacity var(--dur), transform var(--dur), visibility var(--dur);
  }
  .doc-item__tip em { color: var(--c-accent); }
  .doc-item:hover .doc-item__tip, .doc-item:focus .doc-item__tip, .doc-item:target .doc-item__tip { opacity: 1; visibility: visible; transform: translate(0, -50%); }
  .tabs--docs > .tab-panel { padding: 28px 32px 32px; min-height: 560px; }
}
/* дорожная карта */
.gantt { display: grid; gap: 8px; }
.gantt li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; font-size: 14px; line-height: 1.3; font-weight: 600; }
.gantt small { display: block; font-size: 12px; font-weight: 500; color: var(--c-text-2); }
.gantt__bar { position: relative; height: 22px; background: repeating-linear-gradient(90deg, #fff 0 calc(100% / 12 - 1px), var(--c-line) calc(100% / 12 - 1px) calc(100% / 12)); }
.gantt__bar::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; background: var(--c-blue);
  left: calc(var(--from) / 24 * 100%); width: calc((var(--to) - var(--from)) / 24 * 100%);
}
@media (min-width: 640px) { .gantt li { grid-template-columns: 200px 1fr; } }

/* окупаемость */
.roi { display: grid; gap: 20px; }
@media (min-width: 1024px) { .roi { grid-template-columns: 1fr 2fr; align-items: stretch; } }
.roi__calc { background: var(--c-muted); padding: 24px; clip-path: var(--cut-shape); display: grid; gap: 16px; align-content: start; }
.roi__error { color: var(--c-error); font-weight: 700; font-size: var(--fs-sm); }
.roi__notes { display: grid; gap: 8px; margin-top: 20px; max-width: 920px; font-size: var(--fs-sm); line-height: 1.55; color: var(--c-text-2); }
.roi__notes .footnote { margin-top: 0; }
.stats { display: grid; gap: 14px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--c-muted); padding: 24px 22px 26px; clip-path: var(--cut-shape); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.stat dd { font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1.05; color: var(--c-blue-deep); overflow-wrap: anywhere; }
.stat dt { font-size: var(--fs-sm); line-height: 1.45; font-weight: 600; }
.roi__stats .stat dd { font-size: clamp(30px, 3.2vw, 42px); }
@media (max-width: 639px) {
  .roi__stats { gap: 8px; }
  .roi__stats .stat { flex-direction: row-reverse; align-items: center; gap: 14px; padding: 14px 16px; }
  .roi__stats .stat dd { flex: none; min-width: 112px; font-size: 24px; }
  .roi__stats .stat dt { font-size: 14px; line-height: 1.4; }
}
.stat--accent { background: var(--c-blue-deep); }
.stat--accent dd, .stat--accent dt { color: #fff; }

/* ---------- 04. Кейсы: карусель ---------- */
.carousel__tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.carousel__track { position: relative; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel__track::-webkit-scrollbar { display: none; }
.case { flex: 0 0 88%; scroll-snap-align: start; display: grid; background: #fff; clip-path: var(--cut-shape); }
.is-enhanced .case { flex-basis: 100%; }
.case__media { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--c-blue-soft); }
.case__media img { max-height: 220px; width: auto; }
@media (min-width: 900px) { .case__media img { max-height: 340px; } }
.case__stats { flex-direction: column; align-items: flex-start; gap: 22px; padding: 32px 28px; background: var(--c-blue-deep); color: #fff; }
.case__stats div { display: flex; flex-direction: column-reverse; }
.case__stats dd { font-size: clamp(36px, 4.4vw, 52px); font-weight: 800; line-height: 1; }
.case__stats dt { font-size: var(--fs-sm); line-height: 1.4; color: #dbe7fb; margin-top: 6px; }
.case__body { padding: 26px 22px 28px; }
.case__title { font-size: clamp(var(--fs-xl), 2.4vw, var(--fs-3xl)); margin: 6px 0 16px; }
.case__facts > div { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--c-line); }
.case__facts dd { font-size: var(--fs-sm); line-height: 1.55; }
.case__link { margin-top: 16px; padding: 14px 18px; background: var(--c-muted); font-size: 15px; line-height: 1.5; }
@media (min-width: 640px) { .case__facts > div { grid-template-columns: 120px 1fr; gap: 16px; } .case__facts dt { padding-top: 3px; } }
@media (min-width: 900px) {
  .case { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .case__body { padding: 36px 40px 40px; }
}
.carousel__nav { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.carousel__dots { display: flex; gap: 2px; margin-left: 8px; }
.carousel__dot { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel__dot::before, .carousel__dot span { content: ""; position: absolute; left: 4px; right: 4px; top: 20px; height: 4px; background: var(--c-line); transition: background var(--dur); }
.carousel__dot:hover::before { background: var(--c-blue-soft); }
/* полоса загрузки: заполняется до следующего слайда */
.carousel__dot span { right: auto; width: 0; background: var(--c-blue-deep); }
.carousel__dot[aria-current="true"] span { width: calc(100% - 8px); }
.is-auto .carousel__dot[aria-current="true"] span { width: calc((100% - 8px) * var(--p, 0)); transition: width .1s linear; }
.carousel__count { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--c-text-2); }

/* ---------- Нормасофт (свёрнутые блоки) ---------- */
#about-title { font-size: clamp(36px, 5vw, 60px); }
.about-intro { max-width: 860px; display: grid; gap: 4px; color: #d6deea; }
.about-intro__lead { font-size: clamp(var(--fs-xl), 2.2vw, var(--fs-2xl)); line-height: 1.35; color: #fff; }
.about-intro__lead strong { font-weight: 800; }
.about-intro__mission { margin-top: 18px; font-size: clamp(var(--fs-xl), 2.2vw, 26px); line-height: 1.3; font-weight: 700; color: #fff; }

.more { display: grid; gap: 10px; margin-top: 36px; }
.more__item { background: rgba(255,255,255,.07); --cut: 16px; clip-path: var(--cut-shape); transition: background var(--dur); }
.more__item:hover, .more__item[open] { background: rgba(255,255,255,.11); }
.more__item summary { position: relative; display: grid; gap: 4px; align-content: center; min-height: 84px; padding: 16px 64px 16px 22px; }
.more__item summary h3 { font-size: var(--fs-xl); color: #fff; }
.more__item summary span { font-size: var(--fs-xs); line-height: 1.4; color: var(--c-on-dark-2); }
.more__item summary::after { right: 22px; top: 50%; translate: 0 -50%; background: var(--c-accent); color: var(--c-ink); }
.more__body { display: grid; gap: 16px; padding: 4px 22px 28px; }
.more__body h4 { font-size: var(--fs-lg); color: #fff; margin-top: 8px; }
@media (min-width: 900px) { .more__body { padding: 4px 32px 32px; } }

.link-cards { display: grid; gap: 10px; }
@media (min-width: 900px) { .link-cards { grid-template-columns: repeat(3, 1fr); } }
.link-cards a {
  position: relative; display: grid; gap: 6px; align-content: start; height: 100%; padding: 18px 52px 20px 20px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.08); --cut: 12px; clip-path: var(--cut-shape); transition: background var(--dur);
}
.link-cards a::after { content: "→"; position: absolute; right: 18px; top: 18px; font-size: 22px; font-weight: 800; color: var(--c-accent); transition: translate var(--dur); }
.link-cards a:hover { background: rgba(255,255,255,.16); color: #fff; }
.link-cards a:hover::after { translate: 4px 0; }
.link-cards strong { font-size: var(--fs-lg); }
.link-cards span { font-size: var(--fs-xs); line-height: 1.45; color: var(--c-on-dark-2); }

/* команда: направления + консультанты */
.team-dirs { display: grid; gap: 1px; background: rgba(255,255,255,.12); }
@media (min-width: 640px) { .team-dirs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team-dirs { grid-template-columns: repeat(4, 1fr); } }
.team-dirs li { display: grid; gap: 4px; align-content: start; padding: 18px 20px; background: var(--c-ink); }
.team-dirs strong { font-size: var(--fs-lg); color: var(--c-accent); }
.team-dirs span { font-size: var(--fs-xs); line-height: 1.45; color: #d6deea; }
.consult { display: grid; gap: 8px; }
@media (min-width: 900px) { .consult { grid-template-columns: repeat(2, 1fr); } }
.consult li { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px 10px 10px; background: rgba(255,255,255,.05); color: #fff; font-size: var(--fs-sm); line-height: 1.4; font-weight: 600; }
.consult img { flex: none; width: 44px; height: 44px; padding: 7px; background: var(--c-blue-deep); --cut: 8px; clip-path: var(--cut-shape); object-fit: contain; }

/* шаги записи на обучение: первый шаг — кнопка */
.steps { display: grid; gap: 12px; margin: 8px 0 0; }
.steps li { position: relative; display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; font-size: var(--fs-sm); line-height: 1.35; }
/* номер шага: цифра + кольцо со срезанным углом (контур вырезан evenodd-clip-path, поэтому линия идёт и по скосу) */
.step-n { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-weight: 800; color: var(--c-accent); }
.step-n::before {
  content: ""; position: absolute; inset: 0; background: var(--c-accent);
  clip-path: polygon(evenodd, 0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%, 0 0,
    1px 1px, calc(100% - 8.41px) 1px, calc(100% - 1px) 8.41px, calc(100% - 1px) calc(100% - 1px), 1px calc(100% - 1px), 1px 1px);
}.steps__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; background: var(--c-accent); color: var(--c-ink) !important; text-decoration: none; font-weight: 700; border-radius: var(--radius-sm); transition: background var(--dur), color var(--dur); }
.steps__cta:hover { background: #fff; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .steps li { flex-direction: column; align-items: flex-start; }
  .steps li:not(:last-child)::after { content: ""; position: absolute; left: 52px; right: 0; top: 20px; height: 1px; background: repeating-linear-gradient(90deg, var(--c-accent) 0 6px, transparent 6px 10px); }
}
/* ---------- 05. Вопросы + заявка ---------- */
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; } }
.faq { display: grid; gap: 8px; }
.faq__item { background: #fff; --cut: 14px; clip-path: var(--cut-shape); }
.faq__item summary { position: relative; display: flex; align-items: center; min-height: 60px; padding: 12px 60px 12px 22px; }
.faq__item summary::after { right: 18px; top: 50%; translate: 0 -50%; }
.faq__q { font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; }
.faq__item summary:hover .faq__q { color: var(--c-blue-deep); }
.faq__item > p { padding: 0 22px 18px; font-size: var(--fs-sm); line-height: 1.6; }
.faq__item > .faq__more { margin-top: -8px; }

.form { background: var(--c-ink); color: #fff; padding: 28px 22px 30px; clip-path: var(--cut-shape); display: grid; gap: 16px; }
@media (min-width: 640px) { .form { padding: 32px 32px 34px; } }
.form a { color: var(--c-accent); }
.form a:hover { color: #fff; }
.form__person { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.16); }
.form__avatar { flex: none; width: 48px; height: 48px; padding: 8px; background: #fff; border-radius: 50%; object-fit: contain; }
.form__person strong, .form__person span { display: block; font-size: var(--fs-sm); line-height: 1.4; }
.form__person span, .form__hint, .form__direct { font-size: 14px; line-height: 1.45; color: var(--c-on-dark-2); }
.form__title { font-size: var(--fs-2xl); line-height: 1.25; }
.form__hint { margin-top: -8px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: 14px; }
.field input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 14px; background: #fff; color: var(--c-ink);
  border: 2px solid var(--c-line); border-radius: var(--radius-sm); font-size: var(--fs-md); line-height: 1.4;
  transition: border-color var(--dur);
}
.field input:hover { border-color: var(--c-blue-deep); }
.field input:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; border-color: var(--c-ink); }
/* форма Битрикс24 рисует себя сама; пока не загрузилась (или без JS) — текст-заглушка и прямые контакты ниже */
.form__b24 { min-width: 0; }
.form__fallback { font-size: 14px; line-height: 1.45; color: var(--c-on-dark-2); }
.form.is-b24 .form__fallback { display: none; }
.form__b24 .b24-form * { font-family: var(--font-primary) !important; } /* шрифт сайта вместо шрифта виджета */
/* ---------- Футер ---------- */
.site-footer { background: var(--c-ink); color: var(--c-on-dark-2); padding-block: 24px; border-top: 1px solid rgba(255,255,255,.08); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--c-accent); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 14px; line-height: 1.5; }
.footer-inner small { font-size: inherit; }
.footer-site { font-weight: 700; }
@media (min-width: 1024px) { .footer-site { margin-left: auto; } }

/* ---------- Плавающие элементы ---------- */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 52px; height: 52px;
  display: none; align-items: center; justify-content: center;
  background: #000; color: #fff; text-decoration: none; font-size: 24px; font-weight: 800;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  opacity: 0; pointer-events: none; transition: opacity var(--dur), background var(--dur);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--c-blue-deep); color: #fff; }
.sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; box-shadow: 0 8px 24px rgba(8, 28, 54, .25);
  transform: translateY(140%); transition: transform var(--dur);
}
.sticky-cta.is-visible { transform: none; }
@media (min-width: 768px) {
  .sticky-cta { display: none; }
  .to-top { display: inline-flex; right: 24px; bottom: 24px; }
}

/* ---------- Lightbox ---------- */
.lightbox { max-width: min(96vw, 1500px); width: 96vw; max-height: 92vh; padding: 0; border: 0; background: #fff; }
.lightbox::backdrop { background: rgba(8, 28, 54, .85); }
.lightbox__img { width: 100%; height: auto; max-height: 92vh; object-fit: contain; }
.lightbox__close { position: absolute; right: 8px; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--c-ink); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox__close:hover { background: var(--c-blue-deep); }

/* ---------- Появление при прокрутке ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@media print {
  .site-header, .to-top, .sticky-cta, .form { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
