/* ============================================================
   GEMMA COFFEE × ИДЕЯ — коммерческое предложение
   Редакционная система: белый фон, чёрный текст, синий #202EB0.
   Дисплей — Prata (кириллическая антиква), текст и данные — Manrope.
   Правила: одна фокусная точка на сцену, волосяные линейки вместо
   коробок, сцена всегда помещается в экран (JS-фитектор).
   ============================================================ */

/* ---------- Шрифты (самохостинг) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/manrope-cyr-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/manrope-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/prata-cyr-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Prata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/prata-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Prata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/prata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

/* ---------- Токены ---------- */
:root {
  --paper: #ffffff;
  --ink: #101014;
  --ink-2: #54565f;
  --ink-3: #9699a6;
  --accent: #202eb0;
  --accent-soft: #cdd3f6;
  --wash: #f5f6fb;
  --line: #e7e8ef;
  --line-strong: #c9ccdb;

  --d-bg: #0e0e13;
  --d-ink: #f4f4f7;
  --d-2: #b4b7c6;
  --d-3: #7e8296;
  --d-accent: #93a0ff;
  --d-line: #262633;

  --font-display: "Prata", "Georgia", "Times New Roman", serif;
  --font-ui: "Manrope", "Arial", sans-serif;

  --maxw: 1280px;
  --header-h: 56px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 0; }

/* ============ Верхняя панель: скрыта, выплывает при наведении ============ */
.top-ui { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.hover-zone {
  position: absolute; top: 0; left: 0; right: 0;
  height: 26px; z-index: 1;
}
.top-ui:hover .presentation-header,
.top-ui.is-open .presentation-header,
.top-ui:focus-within .presentation-header {
  transform: translateY(0);
}
.presentation-header {
  position: absolute; inset: 0 0 auto 0;
  display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 3vw, 44px);
  height: var(--header-h);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .25s var(--ease);
}
.top-ui.is-open .hover-zone { height: var(--header-h); }

.progress-track {
  position: fixed; left: 0; right: 0; top: 0; z-index: 49;
  height: 3px;
}
.progress-bar {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}

.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.wordmark .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
.wordmark .x { color: var(--accent); font-weight: 400; }

.presentation-meta {
  margin-left: auto; display: flex; align-items: baseline; gap: 10px;
  white-space: nowrap;
}
.scene-counter {
  font-weight: 700; color: var(--accent); font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.scene-label {
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}

.presentation-actions { display: flex; gap: 8px; }

.chrome-button, .icon-button {
  font-family: inherit; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  padding: 8px 14px; cursor: pointer; border-radius: 2px;
  transition: border-color .15s, color .15s;
}
.chrome-button:hover, .icon-button:hover {
  border-color: var(--accent); color: var(--accent);
}
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
}
.icon-button .icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.icon-button .icon-exit { display: none; }
.icon-button[aria-label*="выйти"] .icon-enter { display: none; }
.icon-button[aria-label*="выйти"] .icon-exit { display: block; }

/* ============ Меню сцен: привязано к кнопке «Сцены» справа ============ */
.contents-dialog {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: clamp(16px, 3vw, 44px);
  left: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  padding: clamp(20px, 4vh, 36px);
  max-width: 780px;
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--header-h) - 24px);
  overflow: auto;
}
.contents-dialog[open] { animation: dialogIn .3s var(--ease); }
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.contents-dialog::backdrop { background: rgba(16, 16, 20, .45); }
.dialog-close {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-strong); background: #fff;
  border-radius: 2px; cursor: pointer; color: var(--ink);
  transition: border-color .15s, color .15s;
}
.dialog-close:hover { border-color: var(--accent); color: var(--accent); }
.dialog-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.contents-dialog h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 22px; margin-bottom: 18px;
}
.contents-groups {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 32px);
}
.contents-dialog h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.contents-dialog ol { list-style: none; }
.contents-dialog a {
  display: flex; gap: 10px; padding: 6px 8px; margin-left: -8px;
  text-decoration: none; color: var(--ink); font-size: 13.5px;
  border-radius: 2px;
}
.contents-dialog a:hover { background: var(--wash); color: var(--accent); }
.contents-dialog a[aria-current="true"] { color: var(--accent); font-weight: 700; }
.contents-dialog a span:first-child {
  color: var(--accent); font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ============ Сцены ============ */
.deck { display: block; }

.scene {
  position: relative;
  height: 100vh;
  height: 100dvh;
  padding: calc(var(--header-h) + clamp(28px, 5vh, 56px)) clamp(24px, 5vw, 72px) clamp(24px, 4vh, 44px);
  scroll-snap-align: start;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.scene-fit {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column;
  transform-origin: top center;
}

/* Индекс сцены: линейка + номер + название */
.scene-index {
  display: flex; align-items: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: clamp(12px, 2.2vh, 26px);
  white-space: nowrap;
}
.scene-index::before {
  content: ""; width: 26px; height: 2px;
  background: var(--accent); margin-right: 12px;
}
.scene-index span {
  color: var(--accent); font-weight: 800; margin-right: 10px;
  font-variant-numeric: tabular-nums;
}

/* Заголовок сцены — антиква */
.scene h1, .scene h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}
.scene h2 {
  font-size: clamp(27px, 4.8vh, 50px);
  margin-bottom: clamp(10px, 1.8vh, 20px);
}
.scene h1 { font-size: clamp(30px, 5.4vh, 56px); margin-bottom: clamp(8px, 1.4vh, 18px); }

.lead {
  font-size: clamp(14px, 2vh, 18.5px);
  color: var(--ink-2);
  max-width: 62ch;
  margin-bottom: clamp(12px, 2.4vh, 28px);
}

.scene-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
/* В сценах с выводом внизу свободное пространство делится поровну:
   контент центрируется между заголовком и выводом */
.scene-body:has(> .outro) > :first-child { margin-top: auto; }
.scene-body.tabs > :first-child { margin-top: 0; }

/* Вывод сцены — тихая строка, прибита к низу */
.outro {
  margin-top: auto;
  padding-top: clamp(10px, 1.8vh, 18px);
  border-top: 1px solid var(--line);
  font-size: clamp(12.5px, 1.7vh, 15px);
  color: var(--ink-2);
  max-width: 90ch;
}
.outro strong { color: var(--ink); font-weight: 700; }

/* ============ Редакционные строки (вместо карточек) ============ */
.rows { display: grid; }
.row {
  border-top: 1px solid var(--line);
  padding: clamp(10px, 1.7vh, 18px) 0 clamp(8px, 1.4vh, 14px);
}
.row h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(17px, 2.4vh, 22px);
  line-height: 1.25;
  margin-bottom: clamp(3px, .7vh, 8px);
}
.row p { font-size: clamp(12.5px, 1.7vh, 15px); color: var(--ink-2); max-width: 58ch; }
.row-icon {
  display: block;
  width: 100%;
  height: clamp(52px, 8vh, 76px);
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Иконные строки: иконка НАД отчерком, линейка под ней на всю ширину */
.row-ico { border-top: 0; padding-top: 0; }
.row-ico .row-icon {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(10px, 1.6vh, 18px);
  margin-bottom: clamp(10px, 1.6vh, 18px);
}
.rows-3 { grid-template-columns: repeat(3, 1fr); column-gap: clamp(20px, 3vw, 44px); }
.rows-grid { grid-template-columns: repeat(3, 1fr); column-gap: clamp(20px, 3vw, 44px); }
.rows-2col { grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3.5vw, 56px); }
.rows-num { grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3.5vw, 56px); }
.rows-num .row::before {
  content: attr(data-n);
  display: block;
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
  color: var(--accent); margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

/* ============ Числа-статистика ============ */
.inline-stats {
  display: flex; gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(12px, 2.4vh, 28px);
}
.stat { border-top: 2px solid var(--accent); padding-top: clamp(8px, 1.4vh, 14px); }
.stat b {
  font-family: var(--font-display);
  font-weight: 400;
  display: block;
  font-size: clamp(30px, 5.4vh, 54px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span {
  display: block; margin-top: clamp(4px, .9vh, 8px);
  font-size: clamp(11px, 1.5vh, 13.5px); color: var(--ink-3);
  max-width: 24ch;
}

/* ============ Потоковые цепочки (документы → модель → платформа) ============ */
.flow-chain {
  display: flex; align-items: center;
  gap: clamp(10px, 1.8vw, 24px);
  margin: clamp(6px, 1.6vh, 18px) 0 0;
}
.chain-docs { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-block;
  border: 1px solid var(--line-strong); border-radius: 2px;
  padding: clamp(6px, 1vh, 9px) clamp(12px, 1.6vw, 18px);
  font-size: clamp(12px, 1.6vh, 14.5px); font-weight: 600;
  color: var(--ink-2); background: #fff; white-space: nowrap;
}
.chip-strong { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chain-node {
  font-family: var(--font-display);
  font-size: clamp(15px, 2.2vh, 21px);
  border: 1px solid var(--line-strong); border-radius: 2px;
  padding: clamp(8px, 1.3vh, 13px) clamp(14px, 2vw, 24px);
  white-space: nowrap;
}
.chain-node-strong { border-color: var(--accent); color: var(--accent); }
.chain-arrow { width: clamp(36px, 4.5vw, 56px); height: 12px; flex: none; }

/* ============ Формула возможности (сцена 05) ============ */
.formula {
  display: flex; align-items: stretch;
  gap: clamp(12px, 2vw, 28px);
  margin-top: clamp(10px, 2.4vh, 28px);
}
.f-item { flex: 1; border-top: 2px solid var(--line-strong); padding-top: clamp(10px, 1.8vh, 18px); }
.f-item-gemma { border-top-color: var(--accent); }
.f-item h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(17px, 2.7vh, 27px);
}
.f-item p { font-size: clamp(12px, 1.6vh, 15px); color: var(--ink-2); margin-top: clamp(4px, .8vh, 8px); }
.f-op {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.6vh, 38px);
  color: var(--ink-3); align-self: center; flex: none;
}
.formula-result {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.4vh, 46px);
  line-height: 1.18;
  color: var(--accent);
  margin-top: clamp(14px, 3.2vh, 40px);
  max-width: 24ch;
}

/* ============ Разделители актов ============ */
.scene-divider .scene-fit { justify-content: center; }
.divider-numeral {
  font-family: var(--font-display);
  font-size: clamp(110px, 30vh, 300px);
  line-height: .95;
  color: var(--accent);
  margin-left: -6px;
}
.divider-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.8vh, 50px);
  margin-top: clamp(10px, 2.4vh, 26px);
}
.divider-sub {
  font-size: clamp(13px, 1.8vh, 17px);
  color: var(--ink-3);
  margin-top: clamp(6px, 1.2vh, 14px);
  max-width: 52ch;
}

/* ============ Контраст «сейчас / предлагаем» (сцена 09) ============ */
.contrast {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4.5vw, 80px);
}
.c-col h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(16px, 2.3vh, 22px);
  margin-bottom: clamp(8px, 1.4vh, 16px);
}
.c-now h3 { color: var(--ink-2); }
.c-new h3 { color: var(--accent); }
.c-col ul { list-style: none; }
.c-col li {
  border-top: 1px solid var(--line);
  padding: clamp(7px, 1.2vh, 12px) 0;
  font-size: clamp(12.5px, 1.65vh, 15px);
  color: var(--ink-2);
}
.c-col li strong { color: var(--ink); font-weight: 700; }

/* ============ Маршруты: табы и шаги (сцена 08) ============ */
.tabs { display: flex; flex-direction: column; min-height: 0; flex: 1; }
[role="tablist"] {
  display: flex; gap: clamp(18px, 2.8vw, 40px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(14px, 2.4vh, 26px);
  flex-wrap: wrap;
}
[role="tab"] {
  font-family: inherit;
  font-size: clamp(13.5px, 1.9vh, 17px); font-weight: 600;
  padding: 0 0 clamp(8px, 1.4vh, 12px);
  margin-bottom: -1px;
  border: none; border-bottom: 2px solid transparent;
  background: none; cursor: pointer; color: var(--ink-3);
  transition: color .15s, border-color .15s;
}
[role="tab"]:hover { color: var(--ink); }
[role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
[role="tabpanel"] { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
[role="tabpanel"][hidden] { display: none; }

.route-head { margin-bottom: clamp(10px, 2vh, 22px); }
.route-head h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(17px, 2.6vh, 25px); margin-bottom: clamp(3px, .6vh, 7px);
}
.route-head p { font-size: clamp(12.5px, 1.7vh, 15px); color: var(--ink-2); }

.steps {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.8vw, 24px);
}
.step { border-top: 2px solid var(--line-strong); padding-top: clamp(8px, 1.4vh, 14px); }
.step::before {
  content: attr(data-n);
  display: block;
  font-size: 12px; font-weight: 800; color: var(--accent);
  margin-bottom: clamp(4px, .8vh, 8px);
  font-variant-numeric: tabular-nums;
}
.step p { font-size: clamp(11.5px, 1.6vh, 14.5px); color: var(--ink-2); }
.step p strong { color: var(--ink); font-weight: 700; }

/* ============ Фокусные элементы ============ */
.focal-inline {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: clamp(12px, 2vw, 28px);
  margin: clamp(4px, 1vh, 12px) 0 clamp(12px, 2.2vh, 26px);
}
.focal-num {
  font-family: var(--font-display);
  font-size: clamp(64px, 13vh, 140px);
  line-height: .9;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.focal-cap {
  font-size: clamp(13.5px, 1.9vh, 17.5px);
  color: var(--ink-2);
  max-width: 34ch;
}

/* ============ SVG-графика ============ */
.fig svg { display: block; width: 100%; height: auto; }
svg text { font-family: var(--font-ui); }
svg .ln { stroke: var(--line-strong); stroke-width: 1.3; fill: none; }
svg .ln-a { stroke: var(--accent); }
svg .node { fill: #fff; stroke: var(--accent); stroke-width: 1.6; }
svg .node-a { fill: var(--accent); }
svg .box { fill: #fff; stroke: var(--line-strong); stroke-width: 1.3; }
svg .box-core { stroke: var(--accent); stroke-width: 1.6; fill: var(--wash); }
svg .hub { fill: var(--accent); }
svg .t-hub { fill: #fff; font-family: var(--font-display); font-size: 22px; }
svg .t-hubsub { fill: var(--accent-soft); font-size: 11px; letter-spacing: .08em; }
svg .t-title { font-weight: 700; font-size: 19px; fill: var(--ink); }
svg .t-accent { fill: var(--accent); }
svg .t-sub { font-size: 12.5px; fill: var(--ink-2); }
svg .t-tag { font-size: 11.5px; font-weight: 700; fill: var(--ink); letter-spacing: .04em; }
svg .t-lab { font-size: 13px; font-weight: 600; fill: var(--ink-2); }
svg .t-num { font-size: 13px; font-weight: 800; fill: var(--accent); font-variant-numeric: tabular-nums; }
svg .t-lab2 { font-size: 14px; font-weight: 700; fill: var(--ink); }
svg .t-sub2 { font-size: 12.5px; fill: var(--ink-2); }
svg .t-ink { fill: var(--ink); font-size: 24px; font-weight: 700; }
svg .t-accent-t { fill: var(--accent); font-weight: 700; font-size: 14px; }
svg .dot-a { fill: var(--wash); stroke: var(--line-strong); stroke-width: 1.2; }

.arch-fig, .timeline-fig {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center;
  margin-top: clamp(8px, 2vh, 22px);
}
.arch-fig svg { max-height: 60vh; }
.timeline-fig svg { max-height: 58vh; }

/* ============ Приложение (сцена 12) ============ */
.app-layout {
  display: grid;
  grid-template-columns: minmax(200px, 270px) 1fr;
  gap: clamp(24px, 4.5vw, 72px);
  align-items: center;
  flex: 1 1 auto; min-height: 0;
}
.phone-fig { display: flex; justify-content: center; }
.phone-fig svg { width: 100%; max-width: 250px; max-height: 56vh; height: auto; }
.api-flow {
  display: flex; align-items: center; gap: clamp(8px, 1.4vw, 16px);
  margin-top: clamp(10px, 2vh, 20px);
  flex-wrap: wrap;
}

/* ============ Каскад восстановления (сцена 14) ============ */
.rescue-flow {
  display: flex; align-items: stretch;
  gap: clamp(8px, 1.4vw, 16px);
  margin: clamp(8px, 2vh, 22px) 0 clamp(10px, 2vh, 22px);
}
.rescue { flex: 1; border-top: 2px solid var(--line-strong); padding-top: clamp(8px, 1.3vh, 12px); min-width: 0; }
.rescue-final { border-top-color: var(--accent); }
.rescue h3 { font-size: clamp(12.5px, 1.7vh, 16px); font-weight: 700; }
.rescue p { font-size: clamp(11px, 1.5vh, 13.5px); color: var(--ink-3); margin-top: 2px; }

/* ============ Цена (сцена 16) ============ */
.price-focal { margin-top: clamp(6px, 1.4vh, 16px); }
.price-sum {
  font-family: var(--font-display);
  font-size: clamp(52px, 10.5vh, 112px);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.price-desc {
  font-size: clamp(13px, 1.8vh, 16.5px);
  color: var(--ink-2);
  max-width: 66ch;
  margin-top: clamp(8px, 1.6vh, 16px);
}
.paystrip {
  display: grid; grid-template-columns: repeat(10, 1fr);
  gap: 0 clamp(8px, 1.2vw, 18px);
  margin-top: clamp(12px, 2.6vh, 30px);
}
.paycell {
  border-top: 2px solid var(--line-strong);
  padding: clamp(7px, 1.2vh, 12px) 0 0;
}
.paycell span {
  display: block;
  font-size: clamp(10px, 1.4vh, 12.5px); color: var(--ink-3);
  margin-bottom: 2px; white-space: nowrap;
}
.paycell b {
  font-size: clamp(11px, 1.5vh, 14px); font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pay-first, .pay-last { border-top-color: var(--accent); }
.pay-first span, .pay-last span { color: var(--accent); font-weight: 700; }

/* ============ Обложка ============ */
.scene-cover .scene-fit { justify-content: center; }
.cover-layout {
  display: grid; grid-template-columns: 1.08fr .92fr;
  gap: clamp(24px, 4.5vw, 72px); align-items: center;
}
.cover-title {
  font-size: clamp(52px, 11vh, 118px) !important;
  line-height: 1.04 !important;
  margin: clamp(8px, 1.6vh, 18px) 0 clamp(8px, 1.6vh, 18px);
}
.cover-sub {
  font-size: clamp(19px, 3.2vh, 32px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: clamp(10px, 2vh, 22px);
  letter-spacing: -.01em;
}
.cover-desc {
  font-size: clamp(13.5px, 1.9vh, 17px);
  color: var(--ink-2); max-width: 50ch;
}
.cover-footnote {
  margin-top: clamp(12px, 2.6vh, 30px);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-3);
}
.cover-footnote b { color: var(--accent); }

.cover-fig { display: flex; justify-content: center; }
.cover-fig svg { width: min(100%, 52vh); height: auto; }

/* ============ Финал ============ */
.scene-final {
  background: var(--d-bg); color: var(--d-ink);
}
.scene-final .scene-index { color: var(--d-3); }
.scene-final .scene-index span { color: var(--d-accent); }
.scene-final .scene-index::before { background: var(--d-accent); }
.scene-final h2 { color: var(--d-ink); }
.final-title { font-size: clamp(34px, 6.4vh, 68px) !important; }
.scene-final .lead { color: var(--d-2); }
.final-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(16px, 2.5vw, 36px);
  margin: clamp(12px, 2.6vh, 30px) 0;
}
.final-stat { border-top: 2px solid var(--d-line); padding-top: clamp(8px, 1.4vh, 14px); }
.final-stat b {
  font-family: var(--font-display); font-weight: 400;
  display: block; font-size: clamp(24px, 4.4vh, 42px);
  color: var(--d-accent); line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.final-stat span { display: block; margin-top: 6px; font-size: clamp(11.5px, 1.6vh, 14px); color: var(--d-3); }
.final-contacts {
  margin-top: auto;
  padding-top: clamp(10px, 1.8vh, 18px);
  border-top: 1px solid var(--d-line);
  font-size: clamp(12.5px, 1.75vh, 15px);
  color: var(--d-2); line-height: 1.8;
}
.final-contacts p { margin: 0; }
.final-contacts a { color: var(--d-ink); text-decoration: none; border-bottom: 1px solid var(--d-accent); }
.final-note { margin-top: clamp(6px, 1vh, 10px) !important; font-size: clamp(10.5px, 1.4vh, 12px); letter-spacing: .1em; text-transform: uppercase; color: var(--d-3); }

/* ============ Появление сцены (stagger) ============ */
html.js .scene .scene-fit > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
html.js .scene.is-active .scene-fit > * { opacity: 1; transform: none; }
html.js .scene.is-active .scene-fit > *:nth-child(2) { transition-delay: .07s; }
html.js .scene.is-active .scene-fit > *:nth-child(3) { transition-delay: .14s; }
html.js .scene.is-active .scene-fit > *:nth-child(4) { transition-delay: .21s; }
html.js .scene.is-active .scene-fit > *:nth-child(5) { transition-delay: .28s; }
html.js .scene.is-active .scene-fit > *:nth-child(6) { transition-delay: .35s; }
html.js .scene .cover-copy > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
html.js .scene.is-active .cover-copy > * { opacity: 1; transform: none; }
html.js .scene.is-active .cover-copy > *:nth-child(2) { transition-delay: .07s; }
html.js .scene.is-active .cover-copy > *:nth-child(3) { transition-delay: .14s; }
html.js .scene.is-active .cover-copy > *:nth-child(4) { transition-delay: .21s; }
html.js .scene.is-active .cover-copy > *:nth-child(5) { transition-delay: .28s; }
html.js .scene.is-active .cover-fig { transition-delay: .2s; }

/* Рисование линий на диаграммах */
html.js .scene svg [data-draw] {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
html.js .scene.is-active svg [data-draw] {
  animation: linedraw 1s cubic-bezier(.5, 0, .15, 1) forwards;
  animation-delay: var(--d, .1s);
}
@keyframes linedraw { to { stroke-dashoffset: 0; } }

html.no-anim .scene .scene-fit > *,
html.no-anim .scene .cover-copy > * {
  opacity: 1 !important; transform: none !important; transition: none !important;
}
html.no-anim .scene svg [data-draw] {
  animation: none !important;
  stroke-dasharray: none !important;
  stroke-dashoffset: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  html.js .scene .scene-fit > *,
  html.js .scene .cover-copy > * { opacity: 1 !important; transform: none !important; }
  html.js .scene svg [data-draw] {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ============ Мобильная версия: свободный скролл, всё видно ============ */
@media (max-width: 50rem) {
  html { scroll-snap-type: none; }
  .scene {
    height: auto; min-height: 100dvh;
    overflow: visible;
    padding: calc(var(--header-h) + 20px) 18px 30px;
  }
  .rows-3, .rows-grid, .rows-2col, .rows-num, .contrast, .final-grid,
  .cover-layout, .app-layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .inline-stats { flex-direction: column; gap: 16px; }
  .flow-chain, .api-flow, .rescue-flow { flex-wrap: wrap; }
  .formula { flex-direction: column; gap: 12px; }
  .f-op { display: none; }
  .formula-result { font-size: clamp(22px, 6vw, 30px); }
  .paystrip { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .arch-fig, .timeline-fig { overflow-x: auto; justify-content: flex-start; }
  .arch-fig svg, .timeline-fig svg { min-width: 680px; }
  .cover-fig svg { width: min(100%, 72vw); }
  .scene-label { display: none; }
  .contents-groups { grid-template-columns: 1fr; }
  .divider-numeral { font-size: clamp(90px, 24vw, 160px); }
  .focal-num { font-size: clamp(56px, 16vw, 96px); }
  .price-sum { font-size: clamp(40px, 13vw, 64px); }
  .paycell span { white-space: normal; }
}

/* ============ Печать ============ */
@media print {
  .top-ui, .contents-dialog, .skip-link { display: none !important; }
  .scene { height: auto; min-height: 0; overflow: visible; page-break-after: always; padding: 12mm 10mm; }
  .scene .scene-fit { opacity: 1 !important; transform: none !important; }
  .scene .scene-fit > *, .scene .cover-copy > * { opacity: 1 !important; transform: none !important; }
  .scene svg [data-draw] { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; animation: none !important; }
}
