/* Robonik — один фон на всю страницу. Главы отделяются подписью и воздухом, а не цветом. Единственное синее на странице — сам робот. */

:root {
  --bg: #ecedef;
  --surface: #ffffff;
  --line: #d9dce1;
  --floor: #dfe1e5;
  --horizon: #cbcfd5;
  --ink: #15171b;
  --muted: #5b616b;
  /* акцент один: кнопки, провал на графике, живые состояния */
  --accent: #2b4a8c;
  --accent-deep: #1f3769;
  --accent-tint: #d0dbf1;
  --shadow: none;

  --font: "Rubik", system-ui, sans-serif;
  /* пять размеров на всю страницу: подписи, текст, заголовки глав, заголовок первого экрана, слово-кнопка */
  --step-small: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --step-body: clamp(1rem, 0.93rem + 0.3vw, 1.1875rem);
  --step-head: clamp(2.25rem, 0.8rem + 3.4vw, 4rem);
  --step-display: clamp(2.6rem, 0.4rem + 5vw, 5.5rem);
  --step-giant: clamp(4rem, 19.5vw, 24rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --radius: 22px;
  --top: clamp(4.5rem, 10svh, 6.5rem); /* отступ сцены под шапкой */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --stagger-line: 90ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

h1, h2 { font-weight: 600; text-wrap: balance; }
.display { font-size: var(--step-display); line-height: 0.98; letter-spacing: -0.04em; }
.head { font-size: var(--step-head); line-height: 1; letter-spacing: -0.035em; }
.lead { font-size: var(--step-body); line-height: 1.45; max-width: 36ch; }
p { max-width: 60ch; text-wrap: pretty; }
.kicker { font-size: var(--step-small); font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.5rem; padding: 0 1.75rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 500; text-decoration: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button--small { min-height: 2.75rem; padding: 0 1.25rem; font-size: var(--step-small); }
.button:active { transform: scale(0.97); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; text-decoration-thickness: 2px; transition: text-decoration-color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-deep); }
  .link:hover { text-decoration-color: currentColor; }
}

/* ---------- header: всегда на экране, с кнопкой и полоской прогресса страницы ---------- */
.bar {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem var(--margin);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.bar::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.brand img { width: clamp(118px, 10vw, 150px); height: auto; }
.bar-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); font-size: var(--step-small); font-weight: 500; }
.bar-nav .button { white-space: nowrap; }
@media (max-width: 900px) { .bar-nav .link { display: none; } } /* на узком экране остаётся одна кнопка */

/* ---------- главы ---------- */
.ch { position: relative; }

/* Глава 1: hero */
.ch-hero {
  min-height: 100svh; overflow: clip;
  display: grid; align-content: center; padding: 6rem var(--margin) 4rem;
  background: radial-gradient(circle at 66% 50%, #fff 0, rgba(255, 255, 255, 0) 52svh);
}
.ch-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 9svh; background: var(--floor); }
.hero-copy { position: relative; z-index: 1; max-width: min(46rem, 52vw); display: grid; justify-items: start; gap: 1.75rem; }
.hero-copy .lead { margin-top: -0.5rem; }
.what { max-width: 40ch; margin-top: -0.75rem; font-size: var(--step-small); line-height: 1.5; color: var(--muted); }
.what strong { color: var(--ink); font-weight: 600; }
.hero-spot { position: absolute; left: 66%; bottom: 9svh; width: 1px; height: clamp(220px, 48svh, 440px); }

/* общая сцена: пол, якорь для ступней робота */
.floor { position: absolute; left: -50vw; right: -50vw; bottom: 0; height: var(--floor-h); background: var(--floor); }
.robot-gauge { position: absolute; left: 0; bottom: 0; width: 1px; height: var(--robot-h); visibility: hidden; }
.count { font-weight: 500; }

/* Глава 2: проблема — бумаги и телефон на полу, папка справа */
.prob-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr;
  column-gap: var(--gutter); row-gap: 1.25rem;
  padding: var(--top) var(--margin) 0;
}
.prob-copy { grid-column: 1 / 6; display: grid; gap: 1rem; align-content: start; }

.room {
  --robot-h: clamp(140px, 28svh, 260px);
  --floor-h: clamp(90px, 15svh, 140px);
  --paper-w: clamp(104px, 9.4vw, 150px);
  grid-column: 6 / 13; position: relative; min-height: 420px;
}
/* с видео: документы и папка живут внутри клипа, поэтому HTML-версия прячется; без видео остаётся прежняя сцена */
.room.has-video { --D: min(60svh, 520px); --robot-h: calc(var(--D) * 0.633); }
.prob-vid { position: absolute; left: 50%; bottom: calc(var(--floor-h) - var(--D) * 0.1); width: var(--D); height: var(--D); transform: translateX(-50%); object-fit: contain; opacity: 0; pointer-events: none; display: none; }
.room.has-video .prob-vid { display: block; }
.room.has-video .prob-vid.on { opacity: 1; }
.room.has-video .papers, .room.has-video .folder { display: none; }
.room-spot { position: absolute; left: 0; bottom: calc(var(--floor-h) * 0.55); width: 2px; height: 2px; }
.room .robot-gauge { width: 2px; }
.papers { margin: 0; padding: 0; position: absolute; inset: auto 0 0 0; height: var(--floor-h); }
.paper {
  position: absolute; left: var(--x); bottom: var(--y);
  width: calc(var(--paper-w) * var(--k, 1));
  transform: rotate(var(--r)); transform-origin: 50% 50%;
}
.paper img { width: 100%; height: auto; filter: drop-shadow(0 6px 8px rgba(21, 23, 27, 0.12)); }
.paper strong {
  position: absolute; left: 50%; bottom: -0.55rem; transform: translateX(-50%);
  padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--surface);
  font-size: var(--step-small); font-weight: 500; line-height: 1.3; white-space: nowrap;
}
.folder { position: absolute; right: 0; bottom: calc(var(--floor-h) * 0.3); width: clamp(150px, 15vw, 230px); }
.folder img { width: 100%; height: auto; filter: drop-shadow(0 8px 10px rgba(21, 23, 27, 0.14)); }
.folder-label {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
  padding: 0.15rem 0.8rem; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: var(--step-small); font-weight: 600; letter-spacing: 0.02em;
  transition: background-color var(--t-ui) ease;
}
.folder.is-full .folder-label { background: var(--accent); }

/* Глава 3: интеграции — устройства с логотипами, кабели идут от роутера */
.int-stage {
  height: 100svh; min-height: 560px; overflow: clip; /* высота задана явно: от неё считаются размеры устройств */
  display: flex; flex-direction: column; gap: clamp(1rem, 2.5svh, 2rem);
  padding: var(--top) var(--margin) 0;
}
.int-copy { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1rem; align-items: end; }
.int-copy .kicker { grid-column: 1 / -1; }
.int-copy .head { grid-column: 1 / 7; }
.int-text { grid-column: 8 / 13; display: grid; gap: 0.75rem; }

.scene {
  --robot-h: clamp(120px, 21svh, 200px);
  --floor-h: clamp(88px, 13svh, 120px); /* на полу лежат таблички с логотипами, робот ходит перед устройствами */
  position: relative; flex: 1 1 auto; min-height: 300px;
  display: flex; align-items: flex-end; gap: clamp(6px, 0.9vw, 14px);
  padding-bottom: var(--floor-h);
}
.cables { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; pointer-events: none; }
.cables path { fill: none; stroke: var(--accent); stroke-linecap: round; }

/* с видео: устройства, роутер и кабели нарисованы в клипе (1280×504, ступни на 81% высоты), в разметке остаются только таблички с логотипами */
.scene.has-video { --VW: min(calc(100vw - 2 * var(--margin)), 130svh, 1400px); --VH: calc(var(--VW) * 504 / 1280); --robot-h: calc(var(--VW) * 0.287); }
.int-vid { position: absolute; left: 50%; width: var(--VW); height: var(--VH); bottom: calc(var(--floor-h) - var(--VH) * 0.19); transform: translateX(-50%); opacity: 0; pointer-events: none; display: none; }
.scene.has-video .int-vid { display: block; }
.scene.has-video .int-vid.on { opacity: 1; }
.scene.has-video .hub, .scene.has-video .cables, .scene.has-video .sys-dev, .scene.has-video .sys-socket, .scene.has-video .sys-note { display: none; }
.scene.has-video .systems { position: absolute; left: 50%; width: var(--VW); transform: translateX(-50%); bottom: var(--floor-h); height: 0; display: block; }
.scene.has-video .sys { position: absolute; left: calc(var(--x) * 100%); bottom: 0; width: calc(var(--VW) * 0.1); height: 0; transform: translateX(-50%); display: block; }
.scene.has-video .sys-tag { top: 0; padding: 0.4rem 0.3rem; justify-items: center; transition: background-color var(--t-ui) ease; }
.scene.has-video .sys:not(.is-on) .sys-tag { background: #e1e3e8; }
.scene.has-video .sys-brand { min-height: 0; justify-content: center; }
.scene.has-video .sys-logo { height: 20px; }
.scene.has-video .sys-logo--iiko { height: 34px; margin: -7px 0; }
.scene.has-video .sys-logo--bitrix, .scene.has-video .sys-logo--moysklad { height: 11px; }
.scene.has-video .sys-logo ~ .sys-name { display: none; }
.scene.has-video .sys-name { font-size: var(--step-small); }
.hub { position: relative; flex: 0.9 1 0; height: 42%; min-width: 0; }
.hub img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.hub-port { position: absolute; right: 8%; bottom: calc(var(--robot-h) * 0.3); width: 2px; height: 2px; } /* точка-якорь для шнуров, не линия */

.systems { flex: 6 1 0; height: 100%; display: flex; align-items: flex-end; gap: inherit; min-width: 0; }
.sys { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem; }
.sys-dev { width: 100%; height: auto; min-height: 0; max-height: 80%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 6px 8px rgba(21, 23, 27, 0.12)); transition: filter var(--t-ui) ease; }
.sys:not(.is-on) .sys-dev { filter: grayscale(1) contrast(0.92) drop-shadow(0 6px 8px rgba(21, 23, 27, 0.12)); }
.sys-tag { position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.45rem; display: grid; gap: 0.25rem; padding: 0.6rem 0.75rem; border-radius: 14px; background: var(--surface);; }
.sys-brand { display: flex; align-items: center; gap: 0.5rem; min-height: 28px; }
.sys-logo { height: 26px; width: auto; max-width: 100%; object-fit: contain; }
.sys-logo--iiko { height: 44px; margin: -8px 0; }
.sys-logo--bitrix, .sys-logo--moysklad { height: 18px; }
.sys-name { font-size: var(--step-body); font-weight: 600; line-height: 1.15; }
.sys-note { font-size: var(--step-small); line-height: 1.3; color: var(--muted); }
.sys-socket {
  position: absolute; left: 50%; bottom: calc(var(--robot-h) * 0.48);
  width: 18px; height: 18px; margin: 0 0 -9px -9px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--ink);
  transition: transform var(--t-ui) var(--ease-out), background-color var(--t-ui) ease, border-color var(--t-ui) ease;
}
.sys.is-on .sys-socket { background: var(--accent); border-color: var(--ink); transform: scale(1.2); }

/* Глава 4: поддержка — стол слева, переписка справа */
.sup-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr;
  column-gap: var(--gutter); row-gap: 1.5rem;
  padding: var(--top) var(--margin) 0;
}
.sup-copy { grid-column: 1 / 7; display: grid; gap: 1rem; align-content: start; }
.clock { font-weight: 500; }
.clock-time { display: block; font-size: var(--step-head); font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }

/* Окно-сцена: небо за роботом меняется день, закат, ночь, утро; страница вокруг остаётся на своём сером фоне */
.office {
  --office-h: clamp(240px, calc(100svh - 540px), 460px); /* высота под заголовком и часами */
  --D: calc(var(--office-h) * 1.1); /* сторона квадратного кадра клипа */
  --robot-h: calc(var(--D) * 0.75); /* рост робота в кадре клипа */
  --floor-h: calc(var(--office-h) * 0.11);
  grid-column: 1 / 8; grid-row: 2; align-self: end; position: relative;
  height: var(--office-h); border-radius: 28px; overflow: hidden; isolation: isolate; background: #cfe3f5;
}
.office .sky, .office .clouds, .office .stars, .office .glow, .office .dim { position: absolute; inset: 0; pointer-events: none; }
.office .sky { background: linear-gradient(rgb(173, 208, 240) 0%, rgb(236, 244, 250) 78%); }
.office .clouds { background:
  radial-gradient(ellipse 18% 6% at 22% 22%, rgba(255, 255, 255, 0.9), transparent 70%),
  radial-gradient(ellipse 22% 7% at 70% 14%, rgba(255, 255, 255, 0.85), transparent 70%),
  radial-gradient(ellipse 16% 5% at 55% 34%, rgba(255, 255, 255, 0.7), transparent 70%); }
.office .stars { opacity: 0; background:
  radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(2px 2px at 28% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 44% 22%, #fff, transparent),
  radial-gradient(2px 2px at 63% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 79% 24%, #fff, transparent), radial-gradient(2px 2px at 90% 10%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 20% 34%, #fff, transparent), radial-gradient(1.5px 1.5px at 72% 36%, #fff, transparent), radial-gradient(2px 2px at 54% 5%, #fff, transparent); }
.office .glow { opacity: 0; background: radial-gradient(ellipse 70% 40% at 50% 100%, rgba(255, 150, 60, 0.5), transparent 70%); }
.office .sun, .office .moon { position: absolute; left: 0; top: 0; width: calc(var(--office-h) * 0.16); aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.office .sun { background: radial-gradient(circle, #fff6c8 0, #ffd35a 60%, #ffb02e 100%); box-shadow: 0 0 60px 20px rgba(255, 200, 80, 0.5); }
.office .moon { opacity: 0; background: radial-gradient(circle at 35% 35%, #fff, #dfe6f5 60%, #b9c4de 100%); box-shadow: 0 0 50px 12px rgba(190, 205, 255, 0.3); }
.office .floor { left: 0; right: 0; }
.office .dim { background: #0b1020; opacity: 0; z-index: 3; }
.sup-vid, .sup-still {
  position: absolute; left: 50%; bottom: calc(var(--floor-h) - var(--D) * 0.1); width: var(--D); height: var(--D);
  transform: translateX(-50%); object-fit: contain; opacity: 0; pointer-events: none;
}
.sup-vid.on, .sup-still.on { opacity: 1; }
.sup-still { display: none; }
html:not(.js) .sup-still, .office.no-video .sup-still { display: block; opacity: 1; }
.office.no-video .sup-vid { display: none; }
.office.is-empty .sup-vid, .office.is-empty .sup-still { opacity: 0; }
.sup-stage.is-night .clock-time { color: var(--accent); }
.clock-time { transition: color 0.6s ease; }

.chat {
  grid-column: 8 / 13; grid-row: 1 / 3; align-self: center;
  height: min(76svh, 680px); margin-bottom: clamp(28px, 5svh, 48px);
  display: flex; flex-direction: column; overflow: clip;
  background: var(--surface); color: var(--ink); border-radius: var(--radius);;
}
.chat-head { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; background: #f6f6f7; }
.chat-head strong { display: block; line-height: 1.2; }
.chat-avatar { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent); }
.chat-status { font-size: var(--step-small); color: var(--muted); }
.chat-log { list-style: none; margin: 0; flex: 1 1 auto; min-height: 0; overflow: clip; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.6rem; padding: 1rem 1.25rem 0.5rem; }
.msg { max-width: 86%; font-size: var(--step-small); line-height: 1.4; }
.msg p { padding: 0.65rem 0.9rem; border-radius: 16px; }
.msg time { display: block; margin-top: 0.2rem; font-size: var(--step-small); color: var(--muted); }
.msg--in { align-self: flex-start; }
.msg--in p { background: #eceef1; border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; text-align: right; }
.msg--out p { background: var(--accent-tint); color: var(--ink); text-align: left; border-bottom-right-radius: 4px; }
.msg--note { align-self: center; max-width: 92%; padding: 0.4rem 0.8rem; border-radius: 999px; background: #e3e6ea; font-size: var(--step-small); text-align: center; }
.chat-typing { display: none; padding: 0 1.25rem 1rem; font-size: var(--step-small); color: var(--muted); }

/* Глава 5: контент и промо — баннер на мольберте в стиле бренда клиента, вывеска-доска слева */
.promo-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr; column-gap: var(--gutter);
  padding: var(--top) var(--margin) 0;
}
.promo-copy { grid-column: 1 / 6; display: grid; gap: 1rem; align-content: start; }
.deliver { margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.dv { position: relative; padding-left: 1.75rem; display: grid; gap: 0.1rem; }
.dv::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 0.9rem; height: 0.9rem; border-radius: 4px; border: 2px solid var(--muted); transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease, transform var(--t-ui) var(--ease-out); }
.dv.is-on::before { background: var(--accent); border-color: var(--accent); }
.dv--signal::before { background: var(--ink); border-color: var(--ink); }
.dv strong { font-weight: 600; }
.dv span { font-size: var(--step-small); color: var(--muted); }

.studio {
  --robot-h: clamp(130px, 22svh, 210px);
  --floor-h: clamp(28px, 5svh, 48px);
  --canvas-left: 17%; /* слева доска-вывеска, дальше мольберт, справа от него робот: заходит справа и не перекрывает баннер */
  --canvas-w: calc(var(--robot-h) * 1.8);
  --canvas-h: calc(var(--robot-h) * 1.3);
  --canvas-bottom: calc(var(--floor-h) + var(--robot-h) * 0.4);
  grid-column: 6 / 13; position: relative; min-height: calc(var(--canvas-bottom) + var(--canvas-h) + 2rem);
}
.paint-spot { position: absolute; left: calc(var(--canvas-left) + var(--canvas-w) + var(--robot-h) * 0.34); bottom: var(--floor-h); width: 2px; height: 2px; }
/* с видео: мольберт и холст нарисованы в клипе, баннер с текстом проявляется поверх холста (его наклон задаёт matrix3d из скрипта) */
.studio.has-video { --D: min(62svh, 640px); --robot-h: calc(var(--D) * 0.76); min-height: calc(var(--D) * 0.96); }
.promo-vid { position: absolute; left: 50%; bottom: calc(var(--floor-h) - var(--D) * 0.07); width: var(--D); height: var(--D); transform: translateX(-50%); object-fit: contain; opacity: 0; pointer-events: none; display: none; }
.studio.has-video .promo-vid { display: block; }
.studio.has-video .promo-vid.on { opacity: 1; }
.studio.has-video .easel, .studio.has-video .tray, .studio.has-video .prop-board { display: none; }
.studio.has-video .canvas { left: 0; top: 0; bottom: auto; width: 600px; height: 800px; border-radius: 0; opacity: 0; transform-origin: 0 0; box-shadow: none; z-index: 2; }
.studio.has-video .bn-bg { inset: 0; border-radius: 0; }
.studio.has-video .bn-big { left: 9%; top: 6%; font-size: 190px; }
.studio.has-video .bn-sub { left: 10%; top: 30%; font-size: 54px; max-width: 80%; }
.studio.has-video .bn-art { right: 7%; bottom: 7%; width: 64%; }
.prop-board { position: absolute; left: 0; bottom: calc(var(--floor-h) - 6px); height: calc(var(--robot-h) * 1.05); width: auto; filter: drop-shadow(0 6px 8px rgba(21, 23, 27, 0.14)); }
.easel {
  position: absolute; left: calc(var(--canvas-left) + var(--canvas-w) * 0.12); bottom: var(--floor-h);
  width: calc(var(--canvas-w) * 0.76); height: calc(var(--canvas-bottom) - var(--floor-h) + var(--canvas-h) * 0.9);
  overflow: visible;
}
.easel path { fill: none; stroke: #8b6b4a; stroke-width: 8; stroke-linecap: round; }
.tray { position: absolute; left: calc(var(--canvas-left) - 10px); bottom: calc(var(--canvas-bottom) - 12px); width: calc(var(--canvas-w) + 20px); height: 12px; border-radius: 6px; background: #8b6b4a; }
.canvas {
  position: absolute; margin: 0; left: var(--canvas-left); bottom: var(--canvas-bottom);
  width: var(--canvas-w); height: var(--canvas-h);
  background: #fff; border-radius: 8px; overflow: clip;
}
.bn { position: absolute; }
.bn-bg { inset: 8px; background: #6f2a22; border-radius: 4px; }
.bn-big { left: 8%; top: 8%; color: #efeae4; font-weight: 600; font-size: var(--step-head); line-height: 1; letter-spacing: -0.05em; }
.bn-sub { left: 8.5%; top: calc(8% + var(--step-head) * 1.1); color: #efeae4; font-weight: 500; font-size: var(--step-small); line-height: 1.2; max-width: 52%; }
.bn-art { right: 6%; bottom: 8%; width: 42%; height: auto; }
.brush-layer { display: none; } /* кисть рисовалась SVG-рукой; у робота-картинки её нет */

/* Глава 6: аналитика — график выручки на всю ширину, по линии ходит робот */
.an-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr;
  column-gap: var(--gutter); row-gap: 1rem;
  padding: var(--top) var(--margin) 1.25rem;
}
.an-copy { grid-column: 1 / 6; display: grid; gap: 1rem; align-content: start; }

.insight { grid-column: 8 / 13; align-self: start; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--surface);; }
.ins-title { font-weight: 600; margin-bottom: 0.6rem; }
.ins-list { margin: 0; display: grid; gap: 0.55rem; }
.ins-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.75rem; font-size: var(--step-small); line-height: 1.35; }
.ins-row dt { font-weight: 600; }
.ins-row dd { margin: 0; }

.chart {
  --robot-h: clamp(100px, 15svh, 150px);
  grid-column: 1 / -1; margin: 0; min-height: 0;
  display: flex; flex-direction: column;
}
.chart-label { font-size: var(--step-small); color: var(--muted); }
.chart-plot { position: relative; flex: 1 1 auto; min-height: 220px; margin-top: calc(var(--robot-h) * 0.8); }
.chart-plot .robot-gauge { width: 2px; }
/* с видео: робот у графика изучает планшет и смотрит в лупу на месте; скрипт ставит клип так, чтобы ступни стояли на линии выручки слева */
.chart.has-video { --robot-h: clamp(130px, 22svh, 210px); --D: calc(var(--robot-h) * 1.4); }
.an-vid { position: absolute; left: 0; top: 0; width: var(--D); height: var(--D); object-fit: contain; opacity: 0; pointer-events: none; display: none; z-index: 2; }
.chart.has-video .an-vid { display: block; }
.chart.has-video .an-vid.on { opacity: 1; }
.chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-area { fill: #e1e3e8; }
.chart-line { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart-dip { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; opacity: 0; transition: opacity var(--t-ui) ease; }
.chart-dip.is-on { opacity: 1; }
.chart-days { margin: 0.5rem 0 0; padding: 0 1%; display: flex; justify-content: space-between; font-size: var(--step-small); color: var(--muted); }
.chart-days li { width: 2.2em; text-align: center; }
/* флажок и подпись ставит скрипт в точку провала; без скрипта — по процентам из той же точки */
.dip-flag, .dip-note { position: absolute; left: 75.85%; top: 76.2%; }
.dip-flag { width: 34px; height: 51px; margin: -51px 0 0 -6px; }
.dip-note { margin: 0.75rem 0 0 -1rem; padding: 0.4rem 0.75rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: var(--step-small); font-weight: 500; white-space: nowrap; }

/* Глава 7: сквозная система — лента шагов на общей CRM */
.sys-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr;
  column-gap: var(--gutter); row-gap: 1.5rem;
  padding: var(--top) var(--margin) 0;
}
.sys-copy { grid-column: 1 / 7; display: grid; gap: 1rem; align-content: start; }

.flow {
  --robot-h: clamp(120px, 25svh, 240px);
  --mini-h: calc(var(--robot-h) * 0.6);
  --belt: 14px;
  grid-column: 1 / -1; align-self: end;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 6fr); grid-template-rows: 1fr auto;
}
.flow-main { position: relative; min-height: calc(var(--robot-h) + var(--belt) + 1rem); }
.main-spot { position: absolute; left: 50%; bottom: var(--belt); width: 2px; height: 2px; }
.flow-main .robot-gauge { width: 2px; }
.flow-main::after, .step::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--belt); background: var(--ink); }
.flow-main::after { border-radius: 999px 0 0 999px; }
.steps { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.step {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  gap: 0.75rem; padding: 0 6px var(--belt); min-height: calc(var(--mini-h) + 8.5rem);
}
.step:last-child::after { border-radius: 0 999px 999px 0; }
.step::before { content: ''; position: absolute; left: calc(50% - 3px); top: 2rem; bottom: var(--belt); width: 6px; background: var(--horizon); } /* столбик таблички за роботом */
.step-sign {
  position: relative; z-index: 1; width: 100%; display: grid; gap: 0.25rem;
  padding: 0.75rem 0.8rem; border-radius: 14px; background: var(--surface); color: var(--ink);
  transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease;
}
.step-sign::before { content: ''; width: 1.75rem; height: 4px; border-radius: 2px; background: var(--accent); }
.step-sign strong { font-size: var(--step-body); font-weight: 600; line-height: 1.2; }
.step-agent { font-size: var(--step-small); line-height: 1.3; color: var(--muted); transition: opacity var(--t-ui) ease; }
/* мини-робот — тот же Робоник, без перекраски */
.mini { position: relative; z-index: 1; flex: none; width: calc(var(--mini-h) * 1.2); height: calc(var(--mini-h) * 1.2); margin-bottom: calc(var(--mini-h) * -0.12); object-fit: contain; transform-origin: 50% 90%; }
.crm-bar {
  grid-column: 1 / -1; max-width: none; margin: 0.75rem 0 1.25rem; padding: 0.9rem 1.25rem;
  border-radius: var(--radius); background: var(--ink); color: var(--bg); font-weight: 500; text-align: center;
}

/* Глава 8: кейс La Poste — живые экраны справа */
.case-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr;
  column-gap: var(--gutter); row-gap: 1.25rem;
  padding: var(--top) var(--margin) 0;
}
.case-copy { grid-column: 1 / 6; display: grid; gap: 1rem; align-content: start; }
.facts { margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.facts .fact { position: relative; padding-left: 1.6rem; font-weight: 500; }
.facts .fact::before { content: ''; position: absolute; left: 0; top: 0.32em; width: 0.85rem; height: 0.85rem; border-radius: 4px; border: 2px solid var(--muted); transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease; }
.facts .fact.is-on::before { background: var(--accent); border-color: var(--accent); }
.case-next { font-size: var(--step-small); max-width: 46ch; color: var(--muted); }

.demos {
  --robot-h: clamp(130px, 24svh, 230px);
  --floor-h: clamp(28px, 5svh, 48px);
  grid-column: 6 / 13; position: relative; min-height: 420px;
}
/* с видео: поднос с круассанами нарисован в клипе; ступни робота в кадре на 90% высоты, ровно в точке case-spot */
.demos.has-video { --D: min(46svh, 420px); --robot-h: calc(var(--D) * 0.714); }
.case-vid { position: absolute; left: 7%; bottom: calc(var(--floor-h) - var(--D) * 0.1); width: var(--D); height: var(--D); transform: translateX(-50%); object-fit: contain; opacity: 0; pointer-events: none; display: none; }
.demos.has-video .case-vid { display: block; }
.demos.has-video .case-vid.on { opacity: 1; }
.case-spot { position: absolute; left: 7%; bottom: var(--floor-h); width: 2px; height: 2px; }
.demos .robot-gauge { width: 2px; }
.demo { position: absolute; margin: 0; }
.demo--crm { left: 16%; top: 0; width: 70%; }
.demo--team { right: 0; bottom: calc(var(--floor-h) + 3.75rem); width: 27%; padding: 8px; border-radius: 34px; background: var(--ink); }
.demo-frame { position: relative; aspect-ratio: var(--fw) / var(--fh); overflow: clip; border-radius: 14px; background: #fff; }
.demo--team .demo-frame { border-radius: 26px; }
.demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* скрипт рендерит экран в настоящем размере и уменьшает под рамку */
.demos-fit .demo-frame iframe { inset: 0 auto auto 0; width: calc(var(--fw) * 1px); height: calc(var(--fh) * 1px); transform: scale(var(--k, 1)); transform-origin: 0 0; }
.demo figcaption { margin-top: 0.5rem; font-size: var(--step-small); font-weight: 500; }
.team-tabs { position: absolute; right: 0; bottom: calc(var(--floor-h) + 0.6rem); display: flex; gap: 0.4rem; }
.team-tabs button {
  min-height: 2.6rem; padding: 0 1rem; border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: var(--step-small); font-weight: 500;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.team-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.team-tabs button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .team-tabs button[aria-pressed="false"]:hover { background: var(--accent-tint); }
}

/* Глава 9: как начать — лестница из трёх ступеней */
.start-stage {
  position: relative; min-height: 100svh; overflow: clip;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 1fr;
  column-gap: var(--gutter); row-gap: 1.25rem;
  padding: var(--top) var(--margin) 0;
}
.start-copy { grid-column: 1 / 6; display: grid; gap: 1rem; align-content: start; }
.why-title { margin: 0.75rem 0 0; font-size: var(--step-body); font-weight: 600; line-height: 1.2; }
.why { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.why dt { font-weight: 600; }
.why dd { margin: 0.2rem 0 0; font-size: var(--step-small); line-height: 1.4; color: var(--muted); }

.stairs {
  --robot-h: clamp(120px, 21svh, 200px);
  --floor-h: clamp(28px, 5svh, 48px);
  grid-column: 6 / 13; position: relative; min-height: 420px;
}
/* с видео: ступени нарисованы в клипе (светлый камень), названия лежат прозрачными подписями ровно на их гранях; описание текущей ступени — подпись под лестницей */
.stairs.has-video { --D: min(70svh, 640px); --robot-h: calc(var(--D) * 0.408); --floor-h: clamp(56px, 10svh, 90px); }
.start-vid { position: absolute; left: 50%; bottom: calc(var(--floor-h) - var(--D) * 0.1); width: var(--D); height: var(--D); transform: translateX(-50%); object-fit: contain; opacity: 0; pointer-events: none; display: none; }
.stairs.has-video .start-vid { display: block; }
.stairs.has-video .start-vid.on { opacity: 1; }
.stairs.has-video .stair-list { left: calc(50% - var(--D) * 0.5 + var(--D) * 0.42); right: auto; width: calc(var(--D) * 0.54); height: calc(var(--D) * 0.28); z-index: 2; pointer-events: none; }
.stairs.has-video .start-vid { z-index: 1; }
.stairs.has-video .stair, .stairs.has-video .stair:not(.is-on) { background: transparent; border: 0; color: var(--muted); transition: color var(--t-ui) ease; }
.stairs.has-video .stair.is-on { color: var(--accent); }
.stairs.has-video .stair::before { display: none; }
.stairs.has-video .stair { padding: 0.35rem 0.4rem; border-radius: 10px 10px 0 0; }
.stairs.has-video .stair:nth-child(1) { height: 35.7%; }
.stairs.has-video .stair:nth-child(2) { height: 67.9%; }
.stairs.has-video .stair:nth-child(3) { height: 100%; }
.stairs.has-video .stair span { display: none; }
.stairs.has-video .stair strong { font-size: var(--step-small); line-height: 1.2; }
.stair-caption { display: none; }
.stairs.has-video .stair-caption { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--floor-h) - 0.5rem); max-width: none; margin: 0; padding: 0 0.5rem; text-align: center; font-size: var(--step-small); line-height: 1.35; display: grid; place-items: center; color: var(--ink); }
.stairs-spot { position: absolute; left: 7%; bottom: var(--floor-h); width: 2px; height: 2px; }
.stairs .robot-gauge { width: 2px; }
.stair-list {
  margin: 0; padding: 0;
  position: absolute; left: 20%; right: 0; bottom: var(--floor-h);
  height: calc(100% - var(--floor-h) - var(--robot-h) - 1rem);
  display: flex; align-items: flex-end;
}
.stair {
  flex: 1 1 0; height: var(--h); min-width: 0;
  display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.1rem;
  background: var(--accent-tint); color: var(--ink); border-radius: 18px 18px 0 0;
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease, border-color var(--t-ui) ease;
}
.stair:not(.is-on) { background: #e1e3e8; border-color: #e1e3e8; color: var(--ink); }
.stair::before { content: ''; width: 1.75rem; height: 4px; border-radius: 2px; background: var(--accent); }
.stair:not(.is-on)::before { background: var(--muted); }
.stair strong { font-size: var(--step-body); font-weight: 600; line-height: 1.2; }
.stair span { font-size: var(--step-small); line-height: 1.4; }

/* Глава 10: действие — белая карточка на том же фоне */
.ch-cta { min-height: 100svh; padding: clamp(5rem, 10svh, 6.5rem) var(--margin) var(--margin); } /* точка покоя страницы: блок занимает весь экран под шапкой */
.cta-card { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); overflow: clip; }
.cta-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); counter-reset: step; padding: clamp(1.25rem, 2.5vw, 2rem); }
.cta-steps li { counter-increment: step; display: grid; gap: 0.2rem; align-content: start; }
.cta-steps li::before { content: counter(step); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-bottom: 0.4rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: var(--step-small); font-weight: 600; }
.cta-steps strong { font-weight: 600; line-height: 1.25; }
.cta-steps span { font-size: var(--step-small); line-height: 1.4; color: var(--muted); }
.cta { position: relative; display: block; min-height: 58svh; padding: clamp(1.25rem, 2.5vw, 2rem); color: var(--ink); text-decoration: none; overflow: clip; }
.cta-note { display: block; max-width: 30ch; font-size: var(--step-body); line-height: 1.35; }
.cta-go {
  position: absolute; top: clamp(1.25rem, 2.5vw, 2rem); right: clamp(1.25rem, 2.5vw, 2rem);
  display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--accent); color: #fff;
  transition: transform var(--t-hover) var(--ease-out), background-color var(--t-hover) ease;
}
.cta-go svg { width: 2rem; height: 2rem; }
.cta-word {
  position: absolute; left: clamp(1.25rem, 2.5vw, 2rem); bottom: 0.04em;
  font-size: var(--step-giant); line-height: 0.8; letter-spacing: -0.05em; font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .cta:hover .cta-go { transform: translate(4px, -4px); background: var(--accent-deep); }
}
.cta-robot { position: absolute; right: calc(clamp(1.25rem, 2.5vw, 2rem) + 5.5rem); top: clamp(1.25rem, 2.5vw, 2rem); width: auto; height: clamp(150px, 30svh, 300px); pointer-events: none; } /* над словом, не заходит на него */
.cta:focus-visible { outline-offset: -6px; }
.cta-alt { max-width: none; padding: 1rem clamp(1.25rem, 2.5vw, 2rem) clamp(1.25rem, 2.5vw, 2rem); font-size: var(--step-small); font-weight: 500; background: #f6f6f7; }
.cta-alt .link { text-decoration-color: currentColor; }

/* ---------- робот ---------- */
.robot-layer { display: none; position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: clip; }
.js .robot-layer { display: block; }
/* размер и точку опоры (ступни) задаёт скрипт по каждой позе */
.robot-pos { position: absolute; left: 0; top: 0; width: 200px; height: 200px; will-change: transform; }
#robot { display: block; width: 100%; height: 100%; object-fit: contain; }
#robotWalk { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; visibility: hidden; pointer-events: none; }

/* Без JS робот стоит на первом экране статичной картинкой */
.robot-static { display: none; }
html:not(.js) .robot-static--hero { display: block; position: absolute; left: calc(63% - clamp(110px, 24svh, 230px)); bottom: 5svh; height: clamp(220px, 46svh, 440px); width: auto; }

/* ---------- узкие и вертикальные экраны ---------- */
@media (max-width: 720px), (max-width: 1100px) and (orientation: portrait) {
  .ch-hero { align-content: start; padding-top: 15svh; background: radial-gradient(circle at 54% 72%, #fff 0, rgba(255, 255, 255, 0) 34svh); }
  .ch-hero::after { height: 4svh; }
  .hero-copy { max-width: none; gap: 1.25rem; }
  .display { --step-display: 10.4vw; font-size: var(--step-display); }
  .hero-spot { left: 54%; bottom: 4svh; height: 36svh; }
  html:not(.js) .robot-static--hero { left: calc(54% - 22svh); bottom: 1svh; height: 44svh; }
  /* проблема: текст сверху, комната снизу */
  .prob-stage { grid-template-rows: auto 1fr; }
  .prob-copy, .room { grid-column: 1 / -1; }
  /* поддержка в одну колонку: текст, переписка, стол */
  .sup-stage { grid-template-rows: auto auto 1fr; }
  .sup-copy, .office, .chat { grid-column: 1 / -1; }
  .chat { grid-row: 2; height: 38svh; margin-bottom: 0; }
  .office { grid-row: 3; --office-h: clamp(230px, 30svh, 400px); }
  /* промо в одну колонку: текст, мольберт, список материалов */
  .promo-stage { grid-template-rows: auto auto 1fr auto; row-gap: 1rem; }
  .promo-copy { display: contents; }
  .promo-copy > .head, .promo-copy > p { grid-column: 1 / -1; }
  .promo-copy > .kicker { display: none; }
  .studio { grid-column: 1 / -1; grid-row: 3; min-height: 0; }
  .deliver { grid-column: 1 / -1; grid-row: 4; margin: 0 0 1.25rem; }
  /* аналитика в одну колонку: текст, отчёт, график */
  .an-copy, .insight { grid-column: 1 / -1; }
  .an-stage { grid-template-rows: auto auto 1fr; }
  /* система: робот слева, шаги в три колонки, у каждого ряда своя лента */
  .sys-copy { grid-column: 1 / -1; }
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 3.2fr); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step:nth-child(3n)::after { border-radius: 0 999px 999px 0; }
  /* кейс: текст сверху, экраны снизу */
  .case-stage { grid-template-rows: auto 1fr; }
  .case-copy, .demos { grid-column: 1 / -1; }
  .demos { --robot-h: clamp(90px, 12svh, 140px); }
  /* как начать: текст сверху, лестница снизу */
  .start-stage { grid-template-rows: auto 1fr; }
  .start-copy, .stairs { grid-column: 1 / -1; }
  .stairs { --robot-h: clamp(90px, 13svh, 150px); }
  .cta-steps { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* ---------- телефон ---------- */
@media (max-width: 720px) {
  .room { --robot-h: clamp(130px, 21svh, 190px); --floor-h: clamp(200px, 36svh, 300px); --paper-w: 118px; min-height: 0; }
  .paper { bottom: calc(var(--y) * 2.4); } /* на высоком полу бумаги разбросаны глубже */
  .paper strong { bottom: -0.45rem; padding: 0 0.4rem; }
  .folder { width: 150px; bottom: calc(var(--floor-h) * 0.55); }
  .room.has-video { --D: min(40svh, 340px); --floor-h: clamp(120px, 22svh, 200px); }
  .int-copy { grid-template-columns: 1fr; }
  .int-copy .head, .int-text { grid-column: 1; }
  .scene { --robot-h: clamp(90px, 14svh, 130px); --floor-h: 46px; min-height: 0; gap: 2px; }
  .hub { flex: 0.7 1 0; height: 30%; }
  .sys-dev { width: 150%; max-width: none; margin-inline: -25%; max-height: 70%; } /* на узком экране устройства стоят вплотную, как на полке */
  .sys-tag { margin-top: 0.3rem; padding: 0.3rem 0.2rem; border-radius: 10px; justify-items: center; }
  .sys-brand { min-height: 0; justify-content: center; }
  .sys-logo { height: 18px; }
  .sys-logo--iiko { height: 32px; margin: -6px 0; }
  .sys-logo--bitrix, .sys-logo--moysklad { height: 10px; }
  .sys-logo ~ .sys-name { display: none; } /* у иконки логотип сам читается; текстом остаётся только «Сайт» */
  .sys-name { font-size: var(--step-small); }
  .sys-note { display: none; }
  .sys-socket { width: 12px; height: 12px; margin: 0 0 -6px -6px; border-width: 3px; }

  .sup-stage { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; row-gap: 1rem; }
  .sup-copy, .office, .chat { grid-column: 1; }
  .sup-copy { gap: 0.6rem; }
  .clock-time { display: inline; font-size: inherit; margin-right: 0.25rem; }
  .chat { grid-row: 2; height: 30svh; margin-bottom: 0; border-radius: 16px; }
  .chat-head { padding: 0.6rem 0.9rem; }
  .chat-avatar { width: 28px; height: 28px; border-radius: 9px; }
  .chat-log { padding: 0.6rem 0.9rem 0.4rem; gap: 0.4rem; }
  .msg p { padding: 0.5rem 0.75rem; }
  .office { grid-row: 3; --office-h: clamp(180px, calc(100svh - 650px), 280px); border-radius: 20px; }

  .studio.has-video { --D: min(46svh, 100vw); }
  .studio { --robot-h: clamp(110px, 16svh, 140px); --floor-h: 24px; --canvas-left: 0px; --canvas-w: calc(100% - var(--robot-h) * 0.74); --canvas-h: calc(var(--robot-h) * 1.3); }
  .prop-board { display: none; }
  .deliver { grid-template-columns: 1fr 1fr; gap: 0.4rem 0.75rem; }
  .dv { padding-left: 1.25rem; }
  .dv::before { width: 0.7rem; height: 0.7rem; }
  .dv strong { font-size: var(--step-small); line-height: 1.25; }
  .dv span { display: none; }

  .insight { padding: 0.75rem 0.9rem; border-radius: 16px; }
  .ins-title { margin-bottom: 0.35rem; }
  .ins-list { gap: 0.3rem; }
  .ins-row { grid-template-columns: 5.5rem 1fr; gap: 0.5rem; }
  .chart { --robot-h: clamp(76px, 10svh, 100px); }
  .chart-plot { min-height: 120px; }
  .chart-days li:nth-child(even) { visibility: hidden; }
  .dip-note { margin-left: -8.5rem; }

  .flow { --robot-h: clamp(84px, 12svh, 110px); --mini-h: calc(var(--robot-h) * 0.62); --belt: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step { min-height: calc(var(--mini-h) + 3.6rem); gap: 0.4rem; padding: 0 3px var(--belt); }
  .step::before { top: 1rem; width: 4px; left: calc(50% - 2px); }
  .step:nth-child(3n)::after { border-radius: 0; }
  .step:nth-child(2n)::after { border-radius: 0 999px 999px 0; }
  .step-sign { padding: 0.4rem 0.5rem; border-radius: 10px; text-align: center; }
  .step-sign strong { font-size: var(--step-small); }
  .step-agent { display: none; }
  .crm-bar { font-size: var(--step-small); padding: 0.6rem 0.9rem; border-radius: 14px; margin-bottom: 1rem; }

  .case-copy { gap: 0.6rem; }
  .facts { grid-template-columns: 1fr 1fr; gap: 0.35rem 0.75rem; }
  .facts .fact { font-size: var(--step-small); line-height: 1.3; padding-left: 1.1rem; }
  .facts .fact::before { width: 0.6rem; height: 0.6rem; }
  .case-next { display: none; }
  .demos { --robot-h: clamp(80px, 11svh, 104px); --floor-h: 24px; min-height: 0; }
  .demo--crm { left: 0; width: 70%; }
  .demo--team { top: 6%; bottom: auto; width: 31%; padding: 5px; border-radius: 20px; }
  .demo--team .demo-frame { border-radius: 15px; }
  .demo-frame { border-radius: 10px; }
  .demo figcaption { display: none; }
  .team-tabs { left: 0; justify-content: flex-end; }
  .team-tabs button { min-height: 2.75rem; padding: 0 0.8rem; }
  .case-spot { left: 14%; bottom: calc(var(--floor-h) + 3.6rem); }
  .demos.has-video { --D: min(26svh, 230px); }
  .case-vid { left: 14%; bottom: calc(var(--floor-h) + 3.6rem - var(--D) * 0.1); }

  .start-copy { gap: 0.6rem; }
  .why-title { margin-top: 0.25rem; }
  .why { gap: 0.4rem 0.75rem; }
  .why dt { font-size: var(--step-small); line-height: 1.25; }
  .why dd { display: none; }
  .stairs { --robot-h: clamp(76px, 10svh, 96px); --floor-h: 24px; min-height: 0; }
  .stair-list { left: 24%; }
  .stairs.has-video { --D: min(46svh, 100vw); }
  .stair { padding: 0.5rem 0.45rem; border-radius: 12px 12px 0 0; }
  .stair strong { font-size: var(--step-small); }
  .stair span { display: none; }

  .cta { min-height: 52svh; }
  .cta-go { width: 3.25rem; height: 3.25rem; }
  .cta-go svg { width: 1.5rem; height: 1.5rem; }
  .cta-note { max-width: 22ch; padding-right: 3.75rem; }
  .cta-word { --step-giant: 19vw; }
  .cta-robot { right: clamp(1.25rem, 2.5vw, 2rem); top: auto; bottom: calc(19vw * 0.9 + 0.5rem); height: 22svh; }
}

/* ---------- движение ---------- */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }

@media (prefers-reduced-motion: no-preference) {
  /* прогресс страницы в шапке */
  @supports (animation-timeline: scroll()) {
    .bar::after { animation: progress linear both; animation-timeline: scroll(root); }
  }
  /* загрузка: строки заголовка, затем текст и кнопка */
  .js .ch-hero [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-expo) forwards; animation-delay: calc(120ms + var(--i) * var(--stagger-line)); }
  .js .ch-hero [data-load] { opacity: 0; transform: translateY(14px); animation: rise 520ms var(--ease-out) forwards; animation-delay: var(--d); }
  .js #robot { opacity: 0; transform: translateY(-28px); animation: rise 600ms var(--ease-out) 760ms forwards; }

  /* появление текста главы */
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* сцены держатся, пока робот работает; длина подобрана так, чтобы страница не тянулась */
  .js .ch-prob { height: 210svh; }
  .js .prob-stage { position: sticky; top: 0; height: 100svh; }
  .js .ch-int { height: 220svh; }
  .js .int-stage { position: sticky; top: 0; height: 100svh; }
  .js .sys-note { transition: color var(--t-ui) ease; }
  .js .ch-sup { height: 420svh; } /* сцена идёт 28 секунд: путь длинный, чтобы шаг за кадр был больше пикселя */
  .js .sup-stage { position: sticky; top: 0; height: 100svh; }
  .js .msg.is-shown { animation: msg-in 260ms var(--ease-out); }
  .js .ch-promo { height: 195svh; }
  .js .promo-stage { position: sticky; top: 0; height: 100svh; }
  .js .dv.is-on::before { transform: scale(1.15); }
  .js .ch-an { height: 225svh; }
  .js .an-stage { position: sticky; top: 0; height: 100svh; }
  /* отчёт заполняется строка за строкой: пока строка не пришла, её нет */
  .js .ins-row { transition: opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out); }
  .js .ins-row:not(.is-on) { opacity: 0; transform: translateY(6px); }
  .js .dip-flag { transform-origin: 6px 100%; transition: transform 320ms var(--ease-out), opacity 200ms ease; }
  .js .dip-flag:not(.is-on) { opacity: 0; transform: scale(0.6) translateY(12px); }
  .js .dip-note { transition: opacity var(--t-ui) ease, transform var(--t-ui) var(--ease-out); }
  .js .dip-note:not(.is-on) { opacity: 0; transform: translateY(8px); }
  .js .ch-sys { height: 210svh; }
  .js .sys-stage { position: sticky; top: 0; height: 100svh; }
  /* шаг без агента: пунктирная табличка без описания; текст читается при любом положении скролла */
  .js .step:not(.is-on) .step-sign { background: #e1e3e8; }
  .js .step:not(.is-on) .step-sign::before { background: var(--muted); }
  .js .step:not(.is-on) .step-agent { opacity: 0; }
  .js .ch-case { height: 165svh; }
  .js .case-stage { position: sticky; top: 0; height: 100svh; }
  .js .case-next:not(.is-on) { opacity: 0; }
  .js .case-next { transition: opacity var(--t-ui) ease; }
  .js .ch-start { height: 180svh; }
  .js .start-stage { position: sticky; top: 0; height: 100svh; }
}
@media (prefers-reduced-motion: reduce) {
  .js .dip-note:not(.is-on), .js .dip-flag:not(.is-on) { opacity: 0; }
}
/* сообщения показываются по скроллу; без JS переписка видна целиком */
.js .msg:not(.is-shown) { display: none; }
.js .chat-typing { display: block; visibility: hidden; }
.js .chat.is-typing .chat-typing { visibility: visible; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes progress { to { transform: scaleX(1); } }
