/* ------------------------------------------------------------------
   Микросериалы и Гороскопы — запрос к борду
   Сцена 1920×1080, масштабируется целиком под окно.
   Палитра взята с обложек сериалов (ночь, свет ламп) и из Soulit (фиолетовый).
------------------------------------------------------------------ */

:root {
  --night: #0b1230;
  --night-deep: #070b20;
  --text: #f6f1e7;
  --text-2: #b4bcd6;
  --text-3: #8a93b4;
  --amber: #ffb454;
  --amber-mark: #d98524;
  --amber-soft: rgba(217, 133, 36, 0.38);
  --violet: #b9a9ff;
  --violet-mark: #8e7bff;
  --violet-soft: rgba(142, 123, 255, 0.36);
  --muted-mark: #5d688f;
  --muted-soft: rgba(93, 104, 143, 0.45);
  --hair: rgba(246, 241, 231, 0.16);
  --hair-strong: rgba(246, 241, 231, 0.34);
  --loss: #ff7a6b;
  --panel: rgba(14, 22, 56, 0.72);

  --f-text: 'Sofia Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-cond: 'Sofia Sans Condensed', 'Arial Narrow', Arial, sans-serif;
  --f-xcond: 'Sofia Sans Extra Condensed', 'Arial Narrow', Arial, sans-serif;

  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  --accent: var(--amber);
  --accent-mark: var(--amber-mark);
  --accent-soft: var(--amber-soft);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--text);
  font-family: var(--f-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: default;
  user-select: none;
}

/* ---------- фон: один слой на всю презентацию ---------- */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#veil {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 78% 70% at 50% 52%, rgba(11, 18, 48, 0.62) 0%, rgba(11, 18, 48, 0.34) 55%, rgba(11, 18, 48, 0) 100%);
}
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
}

/* ---------- сцена ---------- */
#stage {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: 50% 50%;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 70px 120px 84px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(var(--dx, 70px), 0, 0);
  transition: opacity 0.26s ease, transform 0.4s ease, visibility 0s linear 0.26s;
}
.slide.is-past { --dx: -70px; }
.slide.is-future { --dx: 70px; }
.slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity 0.4s ease 0.06s, transform 0.62s var(--ease-out) 0.06s, visibility 0s;
}
.slide[data-product='astro'] {
  --accent: var(--violet);
  --accent-mark: var(--violet-mark);
  --accent-soft: var(--violet-soft);
}

/* ---------- типографика ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 600 30px/1 var(--f-text);
  color: var(--text-2);
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}
.kicker i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-mark);
  flex: none;
}
.h {
  font: 800 88px/1.02 var(--f-cond);
  letter-spacing: -0.005em;
  max-width: 1640px;
  text-wrap: balance;
}
.h.sm { font-size: 76px; }
.body { position: relative; min-height: 0; }
/* контейнер, который держит видимое на шаге содержимое по центру (см. place() в deck.js) */
[data-fit] { transition: transform 0.8s var(--ease-out); }
.num {
  font-family: var(--f-xcond);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.01em;
  color: var(--accent);
  white-space: nowrap;
}
.cap { font: 500 36px/1.18 var(--f-text); color: var(--text-2); text-wrap: pretty; }
.cap b, .lead b { color: var(--text); font-weight: 700; }
.lead { font: 500 44px/1.16 var(--f-text); color: var(--text); text-wrap: pretty; }
.nowrap { white-space: nowrap; }

/* ---------- появление ---------- */
.rv {
  opacity: 0;
  transition: opacity 0s linear 0.3s;
}
.is-active .rv {
  opacity: 1;
  transition: opacity 0.6s ease calc(var(--d, 0) * 1ms + 160ms);
}
.rise {
  display: block;
  overflow: hidden;
  padding: 0.07em 0.04em 0.02em 0;
  margin: -0.07em -0.04em -0.02em 0;
}
.rise > span {
  display: inline-block;
  transform: translateY(104%);
  transition: transform 0s linear 0.3s;
}
.is-active .rise > span {
  transform: none;
  transition: transform 0.95s var(--ease-out) calc(var(--d, 0) * 1ms + 140ms);
}
[data-step] {
  opacity: 0;
  transition: opacity 0.2s ease;
}
[data-step].on {
  opacity: 1;
  transition: opacity 0.55s ease calc(var(--sd, 0) * 1ms + 120ms);
}
[data-step].dimmed.on { opacity: 0.42; }

/* ---------- подсказка о кликабельности: только при наведении ---------- */
[data-open] { cursor: pointer; position: relative; }
[data-open]::after {
  content: attr(data-hint);
  position: absolute;
  right: 0;
  bottom: -52px;
  padding: 8px 18px 9px;
  border-radius: 999px;
  background: var(--text);
  color: var(--night);
  font: 700 24px/1 var(--f-text);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}
[data-open][data-hint-pos='in']::after { right: 18px; bottom: 18px; }
[data-open][data-hint-pos='top']::after { bottom: auto; top: -52px; }
[data-open][data-hint-pos='tr']::after { bottom: auto; top: 48px; }
[data-open]:hover::after { opacity: 1; transform: none; }
[data-open]:focus-visible { outline: 3px solid var(--text); outline-offset: 8px; border-radius: 12px; }

/* ---------- графики ---------- */
svg.chart { display: block; overflow: visible; }
.chart text { font-family: var(--f-text); fill: var(--text-2); }
.chart .t-val { font: 700 38px/1 var(--f-cond); fill: var(--text); }
.chart .t-val.big { font-size: 56px; font-weight: 800; }
.chart .t-axis { font: 500 30px/1 var(--f-text); fill: var(--text-2); }
.chart .t-note { font: 500 28px/1 var(--f-text); fill: var(--text-3); }
.chart .axis { stroke: var(--hair-strong); stroke-width: 2; }
.chart .grid { stroke: var(--hair); stroke-width: 2; }

.bar {
  fill: var(--accent-mark);
  y: var(--base);
  height: 0px;
  transition: y 0s linear 0.3s, height 0s linear 0.3s, fill 0.4s ease, opacity 0.4s ease;
}
.is-active .bar {
  y: var(--y);
  height: var(--h);
  transition:
    y 0.9s var(--ease-out) calc(var(--i, 0) * 45ms + 220ms),
    height 0.9s var(--ease-out) calc(var(--i, 0) * 45ms + 220ms),
    fill 0.4s ease, opacity 0.4s ease;
}
.is-active .chart.rescaled .bar { transition: y 0.9s var(--ease-out), height 0.9s var(--ease-out), fill 0.4s ease, opacity 0.4s ease; }
.bar.muted { fill: var(--muted-mark); }
.bar.soft { fill: var(--accent-soft); }
.bar.light { fill: var(--text); }
.hbar {
  fill: var(--accent-mark);
  width: 0px;
  transition: width 0s linear 0.3s;
}
.is-active .hbar {
  width: var(--w);
  transition: width 1s var(--ease-out) calc(var(--i, 0) * 90ms + 240ms);
}
.hbar.muted { fill: var(--muted-mark); }
.hbar.track { fill: rgba(246, 241, 231, 0.1); }
.hbar.loss { fill: var(--loss); }

.lbl {
  opacity: 0;
  transform: translateY(var(--ty, 0px));
  transition: opacity 0s linear 0.3s, transform 0s linear 0.3s;
}
.is-active .lbl {
  opacity: 1;
  transition: opacity 0.45s ease calc(var(--i, 0) * 45ms + 620ms), transform 0.9s var(--ease-out);
}
.is-active .chart.rescaled .lbl { transition: opacity 0.45s ease 0.3s, transform 0.9s var(--ease-out); }
.lbl.off, .is-active .lbl.off, .is-active .chart.rescaled .lbl.off { opacity: 0; transition: opacity 0.2s ease, transform 0.9s var(--ease-out); }
/* график меняет размер покадрово (resize в charts.js): геометрия идёт за кадрами без CSS-переходов */
.is-active .chart.tw-y .bar { transition: fill 0.4s ease, opacity 0.4s ease; }
.is-active .chart.tw-y .lbl { transition: opacity 0.45s ease 0.3s; }
.is-active .chart.tw-y .lbl.off { transition: opacity 0.2s ease; }
.is-active .chart.tw-x .hbar { transition: none; }
.hit { fill: transparent; }
.chart .ctitle { font: 500 30px/1 var(--f-text); fill: var(--text-2); }
.chart .t-val.in { font-size: 36px; }
.chart .t-val.in.dark { fill: var(--night); }
.chart .dim { fill: var(--text-3); }
.chart .sw { fill: var(--accent-mark); }
.chart .sw.soft { fill: var(--accent-soft); }
.chart .ref { stroke: var(--text-2); stroke-width: 2; stroke-dasharray: 12 10; fill: none; }
.chart .bracket { fill: none; stroke: var(--hair-strong); stroke-width: 2; }
.chart .marker { stroke: var(--text); stroke-width: 4; stroke-linecap: round; }
.chart .band { fill: rgba(246, 241, 231, 0.07); }
.bar.ghost { fill: rgba(0, 0, 0, 0); stroke: var(--accent-mark); stroke-width: 3; stroke-dasharray: 10 8; }
.hbar.inner { fill: rgba(246, 241, 231, 0.42); }
.hbar.neg { x: var(--x0); transition: width 0s linear 0.3s, x 0s linear 0.3s; }
.is-active .hbar.neg {
  x: var(--x);
  transition: width 1s var(--ease-out) calc(var(--i, 0) * 90ms + 240ms), x 1s var(--ease-out) calc(var(--i, 0) * 90ms + 240ms);
}
.is-active [data-step]:not(.on) .hbar { width: 0px; transition: width 0s; }
.chart .line { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart .l-model .line { stroke: var(--amber-mark); stroke-width: 6; }
.chart .l-median .line { stroke: var(--text); }
.chart .l-weak .line { stroke: var(--muted-mark); }
.chart .dot { stroke: var(--night); stroke-width: 3; }
.chart .l-model .dot { fill: var(--amber-mark); }
.chart .l-median .dot { fill: var(--text); }
.chart .l-weak .dot { fill: var(--muted-mark); }
.chart .series { transition: opacity 0.5s ease; }
.chart.focus .l-median, .chart.focus .l-weak { opacity: 0.45; }
.wrap { height: 100%; position: relative; }
svg.mini { display: block; width: 100%; height: 12px; margin-top: 12px; overflow: visible; }
svg.mini.mid { height: 36px; }
svg.mini.tall { height: 56px; margin-top: 0; }
body.idle, body.idle * { cursor: none !important; }
body.idle [data-open]::after { opacity: 0 !important; }

.draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0s linear 0.3s;
}
.is-active .draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1) calc(var(--i, 0) * 180ms + 250ms);
}

#tip {
  position: absolute;
  z-index: 40;
  pointer-events: none;
  padding: 12px 18px 13px;
  border-radius: 12px;
  background: var(--text);
  color: var(--night);
  font: 600 26px/1.15 var(--f-text);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.12s ease;
}
#tip.on { opacity: 1; }
#tip b { font: 800 30px/1 var(--f-cond); margin-right: 8px; }

.legend { display: flex; gap: 40px; align-items: center; font: 500 30px/1 var(--f-text); color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 12px; }
.legend i { width: 28px; height: 28px; border-radius: 6px; background: var(--accent-mark); flex: none; }
.legend i.line { height: 6px; border-radius: 3px; width: 44px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ================= экраны ================= */

/* --- обложка --- */
#cover { padding: 0; display: block; }
#cover .title {
  position: absolute;
  left: 120px;
  bottom: 150px;
  width: 900px;
}
#cover h1 {
  font: 800 172px/0.9 var(--f-xcond);
  letter-spacing: -0.012em;
}
#cover h1 .c-a { color: var(--amber); }
#cover h1 .c-v { color: var(--violet); }
#cover .sub {
  margin-top: 40px;
  font: 500 48px/1.1 var(--f-text);
  color: var(--text-2);
}
#cover .frames {
  position: absolute;
  right: 80px;
  top: 0;
  height: 1080px;
  width: 860px;
}
.frame {
  position: absolute;
  border-radius: 28px;
  overflow: hidden;
  background: #0a0f24;
  box-shadow: 0 40px 90px rgba(3, 5, 16, 0.6), 0 0 0 2px rgba(246, 241, 231, 0.12);
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
#cover .frame {
  width: 260px;
  height: 462px;
  opacity: 0;
  transform: translateY(var(--from, 80px));
  transition: opacity 0s linear 0.3s, transform 0s linear 0.3s;
}
#cover.is-active .frame {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease calc(var(--d) * 1ms), transform 1.3s var(--ease-out) calc(var(--d) * 1ms);
}
#cover .frame.f1 { left: 0; top: 70px; --d: 250; --from: 90px; }
#cover .frame.f2 { left: 290px; top: 300px; --d: 370; --from: -90px; }
#cover .frame.f3 { left: 580px; top: 100px; --d: 490; --from: 90px; }
#cover .frame.f4 { left: 580px; top: 592px; --d: 610; --from: 90px; height: 400px; }
#cover .frame.f4 img { object-position: 50% 0; }

/* --- запрос --- */
#ask .hero { display: flex; align-items: flex-end; gap: 44px; margin-top: 40px; }
#ask .hero .num { font-size: 430px; }
#ask .hero .side { padding-bottom: 34px; }
#ask .hero .side .for { font: 800 170px/0.9 var(--f-xcond); color: var(--text); }
#ask .hero .side .where { font: 500 46px/1.1 var(--f-text); color: var(--text-2); margin-top: 18px; }
#ask .lead-in { font: 500 46px/1 var(--f-text); color: var(--text-2); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; }
.fact { border-top: 2px solid var(--hair-strong); padding-top: 22px; }
.fact .n { font: 800 96px/0.95 var(--f-cond); color: var(--text); white-space: nowrap; }
.fact .cap { margin-top: 10px; }
#ask .facts { margin-top: 84px; }

/* --- на что --- */
#money .facts { grid-template-columns: repeat(2, 1fr); margin-top: 70px; }

/* --- доля --- */
#return .wrap, #market .wrap, #organic .wrap, #views .wrap { padding-top: 30px; }
/* пока справа пусто, график на всю ширину; с выводом сжимается до 1080 */
#return .wrap { width: 100%; }
#return[data-at='1'] .wrap { width: 1080px; }
#return .note { position: absolute; right: 0; top: 50%; width: 520px; transform: translateY(-50%); }

/* --- рынок --- */
#market .callout { position: absolute; }
.callout .n { font: 800 110px/0.9 var(--f-xcond); color: var(--accent); white-space: nowrap; }
.callout .cap { margin-top: 8px; }

/* --- ИИ --- */
#ai .body { display: flex; align-items: flex-end; gap: 70px; }
#ai .pair { display: flex; align-items: flex-end; gap: 56px; flex: none; }
#ai .was { padding-bottom: 40px; }
#ai .was .n { font: 800 160px/0.86 var(--f-xcond); color: var(--muted-mark); }
#ai .now .n { font-size: 440px; font-variant-numeric: tabular-nums; }
#ai .yr { font: 600 36px/1 var(--f-text); color: var(--text-2); margin-bottom: 10px; }
#ai .now .yr { margin-bottom: -18px; }
#ai .arrow { width: 110px; height: 6px; background: var(--hair-strong); margin-bottom: 140px; position: relative; border-radius: 3px; }
#ai .arrow::after { content: ''; position: absolute; right: -2px; top: -13px; width: 28px; height: 28px; border-top: 6px solid var(--hair-strong); border-right: 6px solid var(--hair-strong); transform: rotate(45deg); border-radius: 3px; }
#ai .cheap { flex: none; display: flex; align-items: center; gap: 20px; padding-bottom: 24px; }
#ai .cheap img { width: 170px; height: 170px; display: block; mix-blend-mode: screen; margin: -14px -6px -14px 0; flex: none; }
#ai .cheap .n { font: 800 104px/0.9 var(--f-xcond); color: var(--text); white-space: nowrap; }
#ai .cheap .cap { margin-top: 6px; font-size: 38px; color: var(--text); white-space: nowrap; }

/* --- сделки --- */
#deals .cols { display: grid; grid-template-columns: 580px 1fr; gap: 60px; height: 100%; align-items: center; }
#deals .total .num { font-size: 156px; }
#deals .total .cap { margin-top: 18px; font-size: 40px; color: var(--text); }
.rows { display: grid; gap: 0; }
.row {
  display: grid;
  grid-template-columns: 252px 1fr;
  gap: 26px;
  align-items: center;
  padding: 15px 0 16px;
  border-top: 2px solid var(--hair);
}
.row:first-child { border-top: 0; }
.row .amt { font: 800 70px/0.95 var(--f-cond); color: var(--text); white-space: nowrap; }
.row .who { font: 700 38px/1.08 var(--f-text); color: var(--text); }
.row .why { font: 500 30px/1.18 var(--f-text); color: var(--text-2); margin-top: 4px; }
.row svg.mini { margin-top: 10px; }
.row .track { height: 10px; border-radius: 5px; background: var(--accent-mark); margin-top: 12px; width: 0; transition: width 0s linear 0.3s; }
.is-active .row .track { width: var(--w); transition: width 1s var(--ease-out) calc(var(--d, 0) * 1ms + 300ms); }

/* --- реклама --- */
.cmp { display: grid; gap: 34px; }
.cmp .line { display: grid; grid-template-columns: 420px 1fr; gap: 40px; align-items: center; }
.cmp .n { font: 800 150px/0.9 var(--f-xcond); color: var(--text); white-space: nowrap; }
.cmp .line.hot .n { color: var(--accent); font-size: 230px; }
.cmp .lab { font: 500 34px/1.15 var(--f-text); color: var(--text-2); margin-bottom: 14px; }
.cmp .t { height: 56px; border-radius: 0 8px 8px 0; background: var(--muted-mark); width: 0; transition: width 0s linear 0.3s; }
.cmp .line.hot .t { background: var(--accent-mark); }
.is-active .cmp .t { width: var(--w); transition: width 1.1s var(--ease-out) calc(var(--d, 0) * 1ms + 260ms); }
#paid .qoq { margin-top: 70px; display: flex; align-items: baseline; gap: 36px; border-top: 2px solid var(--hair-strong); padding-top: 22px; }
#paid .qoq .n { font: 800 110px/0.9 var(--f-cond); color: var(--text); white-space: nowrap; }
#paid .qoq .cap { max-width: 900px; }

/* --- органика --- */
#organic .body { display: flex; flex-direction: column; }
#organic .wrap { flex: 1 1 auto; min-height: 0; height: auto; }
#organic .facts { flex: none; grid-template-columns: repeat(2, 1fr); gap: 60px; margin-top: 36px; }
/* пока фактов не видно, они не занимают места и график растянут до низа */
#organic:not([data-at='2']) .facts { position: absolute; left: 0; right: 0; bottom: 0; }
#organic .fact { display: flex; gap: 26px; align-items: center; padding-top: 16px; }
#organic .fact .n { font-size: 100px; color: var(--accent); }
#organic .fact .cap { margin: 0; font-size: 33px; }

/* --- просмотры и примеры серий --- */
#views .body { display: flex; gap: 80px; }
#views .main { flex: 1 1 auto; min-width: 0; position: relative; display: flex; flex-direction: column; }
#views .wrap { flex: 1 1 auto; min-height: 0; height: auto; }
#views .facts { flex: none; gap: 50px; margin-top: 36px; }
#views:not([data-at='1']) .facts { position: absolute; left: 0; right: 0; bottom: 0; }
#views .fact { padding-top: 16px; }
#views .fact .n { font-size: 84px; color: var(--accent); }
#views .fact .cap { font-size: 32px; }
/* три обложки каскадом: каждая следующая ниже и правее предыдущей */
#views .shelf { flex: none; position: relative; width: 400px; height: 656px; align-self: center; }
.cover {
  position: absolute;
  width: 196px;
  height: 348px;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0f24;
  box-shadow: 0 30px 70px rgba(3, 5, 16, 0.6), 0 0 0 2px rgba(246, 241, 231, 0.14);
}
.cover:nth-of-type(1) { left: 0; top: 0; }
.cover:nth-of-type(2) { left: 102px; top: 154px; }
.cover:nth-of-type(3) { left: 204px; top: 308px; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: rgba(246, 241, 231, 0.94);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.3s var(--ease-out);
}
.cover .play::after {
  content: '';
  position: absolute;
  left: 32px;
  top: 25px;
  border-style: solid;
  border-width: 17px 0 17px 27px;
  border-color: transparent transparent transparent var(--night);
}
.cover:hover, .cover:focus-visible { z-index: 4; }
.cover:hover { box-shadow: 0 40px 90px rgba(3, 5, 16, 0.75), 0 0 0 3px var(--amber); }
.cover:hover .play { opacity: 1; transform: none; }
.cover[data-open]::after { right: 50%; transform: translate(50%, -6px); bottom: 16px; padding: 7px 14px 8px; font-size: 20px; }
.cover[data-open]:hover::after { transform: translate(50%, 0); }
#views .cover { opacity: 0; transform: translateY(40px); transition: opacity 0s linear 0.3s, transform 0s linear 0.3s, box-shadow 0.35s ease; }
#views.is-active .cover { opacity: 1; transform: none; transition: opacity 0.6s ease calc(var(--d) * 1ms), transform 1s var(--ease-out) calc(var(--d) * 1ms), box-shadow 0.35s ease; }
#views.is-active .cover:hover { transform: translateY(-8px); transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease; }

/* --- осторожный план --- */
#caution .plot { width: 100%; height: 100%; display: flex; flex-direction: column; }
#caution[data-at='1'] .plot { width: 1250px; }
#caution .legend { flex: none; padding-left: 120px; margin-top: 32px; }
#caution .wrap { flex: 1 1 auto; min-height: 0; height: auto; padding-top: 18px; }
#caution .cross { position: absolute; right: 0; top: 50%; width: 360px; transform: translateY(-50%); }

/* --- микросериалы: прибыль --- */
/* четыре столбца драфта на общей базовой линии; сумма стоит на своём столбце.
   Вычитания не рисуем: суммы в драфте не сходятся арифметически. */
#mspl .stair { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 100%; padding-top: 24px; }
.stair .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 0; }
.stair .v {
  font: 800 92px/0.9 var(--f-cond);
  color: var(--text);
  white-space: nowrap;
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 0s linear 0.3s;
}
.stair .b {
  position: relative;
  display: block;
  width: 236px;
  height: 0;
  border-radius: 6px 6px 0 0;
  background: var(--muted-mark);
  overflow: hidden;
  transition: height 0s linear 0.3s;
}
.stair .b .in { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--ri) * 100%); background: rgba(246, 241, 231, 0.42); }
.stair .lab { flex: none; align-self: stretch; height: 132px; border-top: 2px solid var(--hair-strong); padding: 22px 16px 0; text-align: center; }
.stair .lab p { font: 500 34px/1.12 var(--f-text); color: var(--text-2); text-wrap: balance; }
.stair .lab .sub { font-size: 28px; color: var(--text-3); margin-top: 8px; }
.stair .hot .v { color: var(--accent); }
.stair .hot .b { background: var(--accent-mark); }
.stair .hot .lab p { color: var(--text); }
/* высота столбца: доля от выручки × место, которое остаётся под самым высоким столбцом */
.is-active .stair .b { height: calc(var(--r) * (100% - 250px)); transition: height 0.95s var(--ease-out) calc(var(--i) * 110ms + 220ms); }
.is-active .stair .v { opacity: 1; transition: opacity 0.5s ease calc(var(--i) * 110ms + 760ms); }
/* строки P&L: подпись над полосой, сумма сразу за концом своей полосы */
.pl { display: grid; gap: 34px; }
.pl .ln .lab { font: 500 34px/1.1 var(--f-text); color: var(--text-2); }
.pl .ln .tr { position: relative; width: calc(100% - 300px); margin-top: 14px; }
.pl .ln .tr svg.mini { margin-top: 0; }
.pl .ln .tr b {
  position: absolute;
  left: calc(var(--r, 1) * 100% + 22px);
  top: 50%;
  transform: translateY(-50%);
  font: 800 60px/1 var(--f-cond);
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0s linear 0.3s;
}
.is-active .pl .ln .tr b { opacity: 1; transition: opacity 0.5s ease calc(var(--d, 0) * 1ms + 800ms); }
.is-active [data-step]:not(.on) .pl .ln .tr b { opacity: 0; transition: opacity 0s; }
.pl .ln.hot .tr b { color: var(--accent); }
.pl .sub { font: 500 28px/1.1 var(--f-text); color: var(--text-3); margin-top: 10px; }

/* --- органика делает прибыль --- */
#orgprofit .wrap { height: auto; display: grid; gap: 44px; }
.split .lab { font: 600 40px/1 var(--f-text); color: var(--text); margin-bottom: 16px; }
.split .track { display: flex; gap: 4px; height: 130px; }
.split .seg {
  height: 100%;
  width: 0;
  background: var(--muted-mark);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  white-space: nowrap;
  transition: width 0s linear 0.3s;
}
.split .seg.org { background: var(--accent-mark); }
.split .seg span { padding: 0 26px; font: 500 34px/1 var(--f-text); color: var(--text); }
.split .seg.org span { color: #1a1206; font-weight: 600; }
.split .seg span b { font: 800 84px/1 var(--f-cond); margin-right: 14px; vertical-align: -0.08em; }
.is-active .split .seg { width: var(--w); transition: width 1.2s var(--ease-out) calc(var(--d, 0) * 1ms + 240ms); }
#orgprofit .payback { border-top: 2px solid var(--hair-strong); padding-top: 24px; max-width: 1300px; }

/* --- гороскопы: рынок --- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; height: 100%; align-content: center; }
.trio .num { font-size: 168px; }
.trio .cap { margin-top: 26px; font-size: 38px; }

/* --- почему мы --- */
#whyus .why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 110px 120px; height: 100%; align-content: center; }
#whyus .it { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: center; }
#whyus .it img { width: 220px; height: 220px; margin: -20px 0 -20px -30px; mix-blend-mode: screen; display: block; }
#whyus .it .t { font: 800 62px/1 var(--f-cond); color: var(--text); }
#whyus .it .cap { margin-top: 12px; }

/* --- Soulit --- */
.phones { display: flex; justify-content: space-between; padding: 40px 10px 0; }
.phone-item { width: 290px; }
.phone {
  width: 290px;
  height: 566px;
  border-radius: 40px;
  overflow: hidden;
  background: #f4f0ff;
  box-shadow: 0 34px 80px rgba(3, 5, 16, 0.55), 0 0 0 3px rgba(246, 241, 231, 0.22);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.phone-item .t { font: 800 44px/1 var(--f-cond); color: var(--text); margin-top: 26px; }
.phone-item .cap { font-size: 28px; margin-top: 8px; }
.phone-item[data-open]::after { right: 50%; bottom: auto; top: 504px; transform: translate(50%, -6px); }
.phone-item[data-open]:hover::after { transform: translate(50%, 0); }
.phone-item:hover .phone { transform: translateY(-10px); box-shadow: 0 44px 100px rgba(3, 5, 16, 0.7), 0 0 0 4px var(--violet-mark); }
#soulit .phone-item { opacity: 0; transform: translateY(50px); transition: opacity 0s linear 0.3s, transform 0s linear 0.3s; }
#soulit.is-active .phone-item { opacity: 1; transform: none; transition: opacity 0.6s ease calc(var(--d) * 1ms), transform 1s var(--ease-out) calc(var(--d) * 1ms); }

/* --- гороскопы: экономика --- */
/* без блока справа юнит-экономика идёт на всю ширину; с ним сжимается до 900 */
#astro .cols { position: relative; display: flex; gap: 80px; align-items: flex-start; }
#astro .unit { flex: none; width: 900px; }
#astro .right { flex: none; width: 700px; display: grid; gap: 24px; align-content: start; }
#astro:not([data-at='1']):not([data-at='2']) .unit { width: 100%; }
#astro:not([data-at='1']):not([data-at='2']) .right { position: absolute; right: 0; top: 0; }
#astro .right .cap { font-size: 32px; }
#astro .year .ttl, #astro .unit .ttl { font: 600 34px/1 var(--f-text); color: var(--text-2); margin-bottom: 20px; }
#astro .peak { border-top: 2px solid var(--hair-strong); padding-top: 22px; }
#astro .peak .n { font: 800 84px/0.95 var(--f-cond); color: var(--text); }
#astro .year .ttl { margin-bottom: 14px; }
#astro .pl .ln .tr { margin-top: 10px; }
#astro .pl { gap: 22px; }
#astro .net { margin-top: 4px; }

/* --- команда --- */
#team .org { position: relative; margin-top: 26px; height: calc(100% - 26px); }
#team .org svg { position: absolute; left: 0; top: 0; overflow: visible; }
.node {
  position: absolute;
  border-radius: 14px;
  padding: 11px 16px 13px;
  background: rgba(20, 30, 70, 0.9);
  box-shadow: inset 0 0 0 2px rgba(246, 241, 231, 0.18);
  opacity: 0;
  transition: opacity 0s linear 0.3s;
}
.is-active .node { opacity: 1; transition: opacity 0.5s ease calc(var(--lvl, 0) * 220ms + 200ms); }
.node .nm { font: 700 30px/1.04 var(--f-cond); color: var(--text); letter-spacing: 0.005em; }
.node .rl { font: 500 23px/1.12 var(--f-text); color: var(--text-2); margin-top: 5px; }
.node.founder { background: var(--text); box-shadow: none; }
.node.founder .nm { color: var(--night); font-size: 34px; }
.node.founder .rl { color: #3a4570; font-weight: 600; }
.node.lead { box-shadow: inset 0 0 0 2px var(--amber-mark); }
.node.open { background: transparent; box-shadow: none; border: 2px dashed rgba(246, 241, 231, 0.42); padding: 9px 14px 11px; }
.node.open .nm { color: var(--text-2); }
.node.group .nm.small { font: 600 26px/1.22 var(--f-cond); color: var(--text); }
.node.group .gh { font: 500 23px/1 var(--f-text); color: var(--text-2); margin-bottom: 8px; }
.org .wire { fill: none; stroke: rgba(246, 241, 231, 0.34); stroke-width: 2; }
#team .gov {
  position: absolute;
  left: 264px;
  bottom: 0;
  width: 830px;
  border-top: 2px solid var(--hair-strong);
  padding-top: 18px;
}
#team .gov .lead { font-size: 36px; text-wrap: balance; }
#team .orglegend { position: absolute; right: 0; top: 0; display: flex; gap: 28px; font: 500 24px/1 var(--f-text); color: var(--text-2); }
#team .orglegend span { display: inline-flex; align-items: center; gap: 10px; }
#team .orglegend i { width: 30px; height: 22px; border-radius: 6px; display: inline-block; }
#team .orglegend i.a { background: var(--text); }
#team .orglegend i.b { box-shadow: inset 0 0 0 2px rgba(246, 241, 231, 0.3); background: rgba(20, 30, 70, 0.9); }
#team .orglegend i.c { border: 2px dashed rgba(246, 241, 231, 0.42); }

/* --- риски --- */
#risks .cols { display: grid; grid-template-columns: 760px 1fr; gap: 70px; padding-top: 34px; height: 100%; }
.risklist { display: grid; gap: 0; align-content: start; }
.risk {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-top: 2px solid var(--hair);
  cursor: pointer;
  transition: opacity 0.4s ease;
}
.risk:first-child { border-top: 0; }
.risk img { width: 130px; height: 130px; margin: -22px 0 -22px -22px; mix-blend-mode: screen; display: block; }
.risk .p { font: 600 24px/1 var(--f-text); color: var(--text-3); margin-bottom: 7px; }
.risk .t { font: 700 38px/1.06 var(--f-cond); color: var(--text); }
#risks[data-focus] .risk { opacity: 0.36; }
#risks[data-focus='1'] .risk[data-r='1'],
#risks[data-focus='2'] .risk[data-r='2'],
#risks[data-focus='3'] .risk[data-r='3'],
#risks[data-focus='4'] .risk[data-r='4'] { opacity: 1; }
.riskdetail { position: relative; }
.riskdetail .card {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  display: grid;
  gap: 32px;
  align-content: start;
  border-left: 2px solid var(--hair-strong);
  padding-left: 60px;
}
#risks[data-focus='1'] .card[data-r='1'],
#risks[data-focus='2'] .card[data-r='2'],
#risks[data-focus='3'] .card[data-r='3'],
#risks[data-focus='4'] .card[data-r='4'] { opacity: 1; pointer-events: auto; transition: opacity 0.5s ease 0.1s; }
#risks:not([data-focus]) .card[data-r='0'] { opacity: 1; transition: opacity 0.5s ease 0.1s; }
.riskdetail .q { font: 600 28px/1 var(--f-text); color: var(--accent); margin-bottom: 12px; }
.riskdetail .a { font: 500 38px/1.2 var(--f-text); color: var(--text); }
.riskdetail .a.big { font: 800 60px/1.04 var(--f-cond); }
.riskdetail .card[data-p='astro'] .q { color: var(--violet); }

/* --- запас прочности --- */
.levers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px; height: 100%; align-content: center; }
.levers .num { font-size: 150px; color: var(--text); }
.levers > div:first-child .num { color: var(--accent); }
.levers .cap { margin-top: 26px; font-size: 38px; }

/* --- стресс --- */
#stress .wrap { height: auto; }
#stress .assume { margin-top: 30px; display: flex; gap: 16px 18px; flex-wrap: wrap; }
.chip { font: 500 32px/1 var(--f-text); color: var(--text); padding: 14px 22px 16px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--hair-strong); white-space: nowrap; }
#stress .assume .ttl { font: 500 32px/1 var(--f-text); color: var(--text-2); flex-basis: 100%; padding: 0 0 2px; }
#stress .do { margin-top: 36px; border-top: 2px solid var(--hair-strong); padding-top: 20px; }
#stress .do .lead { font-size: 36px; max-width: 1640px; text-wrap: balance; }

/* --- транши --- */
#tranches .tl { position: relative; height: 468px; }
.ms { position: absolute; top: 195px; width: 400px; }
.ms .sum { font: 800 110px/0.9 var(--f-xcond); color: var(--accent); position: absolute; bottom: calc(100% + 96px); left: 0; white-space: nowrap; }
.ms .date { font: 700 40px/1 var(--f-cond); color: var(--text-2); }
.ms .t { font: 800 50px/1.02 var(--f-cond); color: var(--text); margin-top: 12px; }
.ms .cap { font-size: 30px; margin-top: 12px; }
.ms[data-p='astro'] { --accent: var(--violet); --accent-mark: var(--violet-mark); }
.ms .pin { position: absolute; left: 0; top: -72px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-mark); box-shadow: 0 0 0 6px var(--night); }
.ms { opacity: 0; transition: opacity 0s linear 0.3s; }
.is-active .ms { opacity: 1; transition: opacity 0.6s ease calc(var(--d) * 1ms + 300ms); }
#tranches .rail { position: absolute; left: 0; right: 0; top: 136px; height: 4px; background: var(--hair-strong); border-radius: 2px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 0s linear 0.3s; }
#tranches.is-active .rail { transform: none; transition: transform 1.4s var(--ease-out) 0.2s; }
#tranches .founders { margin-top: 60px; border-top: 2px solid var(--hair-strong); padding-top: 20px; display: flex; align-items: baseline; gap: 30px; }
#tranches .founders .n { font: 800 84px/0.95 var(--f-cond); color: var(--text); white-space: nowrap; }

/* --- решение --- */
.asks { display: grid; gap: 0; }
.asks .a { display: grid; grid-template-columns: 120px 200px 1fr; align-items: center; gap: 18px; padding: 14px 0; border-top: 2px solid var(--hair); }
.asks .a:first-child { border-top: 0; }
.asks .a .k { font: 800 150px/0.9 var(--f-xcond); color: var(--accent); }
.asks .a img { width: 220px; height: 220px; margin: -20px 0 -20px -20px; mix-blend-mode: screen; display: block; }
.asks .a .t { font: 800 70px/1.02 var(--f-cond); color: var(--text); }
.asks .a .cap { margin-top: 10px; font-size: 38px; }

/* ================= раскрывающиеся элементы ================= */
#overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  visibility: hidden;
  pointer-events: none;
}
#overlay[data-product='astro'] { --accent: var(--violet); --accent-mark: var(--violet-mark); }
#overlay.open { visibility: visible; pointer-events: auto; }
#overlay .shade {
  position: absolute;
  inset: -2000px;
  background: rgba(5, 8, 24, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}
#overlay.open .shade { opacity: 1; }
/* у видео слайд под подложкой не должен проступать: белые экраны Soulit шумят под списком шагов */
#overlay:has(#ov-soulit.on) .shade, #overlay:has(#ov-series.on) .shade { background: rgba(5, 8, 24, 0.97); }
.ov {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.ov.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.35s ease 0.05s, visibility 0s; }

/* плеер серий */
#ov-series .screen {
  position: absolute;
  left: 50%;
  top: 40px;
  width: 562px;
  height: 1000px;
  margin-left: -281px;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(246, 241, 231, 0.16);
  cursor: pointer;
}
#ov-series video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
#ov-series .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 26px; cursor: pointer; }
#ov-series .bar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: rgba(246, 241, 231, 0.22); }
#ov-series .bar i { position: absolute; left: 0; bottom: 0; height: 8px; width: 0; background: var(--amber); }
#ov-series .paused {
  position: absolute; left: 50%; top: 50%; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%;
  background: rgba(246, 241, 231, 0.94); opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
#ov-series .paused::after { content: ''; position: absolute; left: 49px; top: 37px; border-style: solid; border-width: 25px 0 25px 40px; border-color: transparent transparent transparent var(--night); }
#ov-series .screen.is-paused .paused { opacity: 1; }
#ov-series .side {
  position: absolute;
  top: 290px;
  width: 282px;
  height: 500px;
  border-radius: 26px;
  overflow: hidden;
  opacity: 0.5;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(246, 241, 231, 0.12);
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out);
}
#ov-series .side img { width: 100%; height: 100%; object-fit: cover; display: block; }
#ov-series .side:hover { opacity: 1; transform: scale(1.03); }
#ov-series .side.prev { left: 250px; }
#ov-series .side.next { right: 250px; }
#ov-series .time { position: absolute; left: 50%; margin-left: 310px; bottom: 44px; font: 600 30px/1 var(--f-cond); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Soulit */
#ov-soulit .device {
  position: absolute;
  left: 420px;
  top: 40px;
  width: 462px;
  height: 1000px;
  border-radius: 54px;
  overflow: hidden;
  background: #f4f0ff;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7), 0 0 0 4px rgba(246, 241, 231, 0.3);
  cursor: pointer;
}
#ov-soulit video, #ov-soulit .device img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
#ov-soulit .device img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; object-position: 50% 30%; }
#ov-soulit .device.still img { opacity: 1; }
#ov-soulit .steps { position: absolute; left: 980px; top: 150px; width: 640px; display: grid; gap: 0; }
#ov-soulit .ttl { position: absolute; left: 980px; top: 66px; font: 800 60px/1 var(--f-cond); color: var(--text); }
.stp {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  padding: 20px 0 22px;
  border-top: 2px solid var(--hair);
  cursor: pointer;
  opacity: 0.5;
  position: relative;
  transition: opacity 0.25s ease;
}
.stp:hover { opacity: 0.85; }
.stp.cur { opacity: 1; }
.stp .k { font: 800 64px/0.9 var(--f-xcond); color: var(--violet); }
.stp .t { font: 700 42px/1.05 var(--f-cond); color: var(--text); }
.stp .cap { font-size: 27px; margin-top: 4px; }
.stp .prog { position: absolute; left: 0; top: -2px; height: 4px; width: 0; background: var(--violet-mark); }

/* шторка с деталями */
#ov-drawer .sheet {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 980px;
  padding: 80px 90px 60px 90px;
  background: #0d1538;
  box-shadow: -2px 0 0 rgba(246, 241, 231, 0.14), -60px 0 120px rgba(0, 0, 0, 0.45);
  transform: translateX(60px);
  transition: transform 0.45s var(--ease-out);
  overflow: hidden;
}
#ov-drawer.on .sheet { transform: none; }
.sheet h3 { font: 800 68px/1 var(--f-cond); color: var(--text); margin-bottom: 34px; }
.sheet .page { display: none; }
.sheet .page.cur { display: block; }
.sheet h4 { font: 700 44px/1.05 var(--f-cond); color: var(--accent); margin: 0 0 14px; }
.sheet p { font: 500 34px/1.26 var(--f-text); color: var(--text); margin-bottom: 20px; }
.sheet p.dim { color: var(--text-2); font-size: 28px; }
.sheet table { width: 100%; border-collapse: collapse; margin-bottom: 26px; }
.sheet td, .sheet th { text-align: left; font: 500 34px/1.2 var(--f-text); padding: 15px 0 16px; border-top: 2px solid var(--hair); vertical-align: top; color: var(--text); }
.sheet tr:first-child td, .sheet tr:first-child th { border-top: 0; }
.sheet th { color: var(--text-2); font-weight: 500; padding-right: 30px; }
.sheet td.v { font: 800 46px/1 var(--f-cond); white-space: nowrap; text-align: right; padding-left: 30px; }
.sheet .pager { position: absolute; left: 90px; bottom: 50px; display: flex; gap: 12px; }
.sheet .pager i { width: 46px; height: 6px; border-radius: 3px; background: var(--hair-strong); }
.sheet .pager i.cur { background: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .slide, .is-active .rv, .is-active .rise > span, .is-active .bar, .is-active .hbar, .is-active .draw, .is-active .stair .b, .is-active .stair .v { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}
