/* Компоненты слайдов. Все размеры — в пикселях сцены 1920×1080,
   сцена целиком масштабируется под окно. */

.slide {
  position: absolute;
  inset: 0;
  padding: 72px 96px 76px;
  display: flex;
  flex-direction: column;
  font-size: 32px;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.slide.is-current {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0s;
  z-index: 2;
}

.slide.is-leaving {
  z-index: 1;
}

.no-anim .slide,
.no-anim .slide * {
  transition: none !important;
  animation: none !important;
}

/* ------------------------------------------------------------ заголовок */

.s-head {
  margin: 0 300px 36px 0; /* справа — место под логотип */
  flex: none;
}

.s-kicker {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.s-head h2 {
  margin: 0;
  font-size: 58px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.s-body {
  flex: 1;
  min-height: 0;
  position: relative;
}

.s-source {
  position: absolute;
  left: 96px;
  bottom: 30px;
  font-size: 16px;
  color: var(--muted);
  max-width: 1300px;
}

.lead {
  font-size: 36px;
  color: var(--ink-2);
  max-width: 1300px;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* ------------------------------------------------------------ сетки */

.row {
  display: flex;
  gap: 32px;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.grid-2,
.grid-3,
.grid-4,
.grid-5,
.grid-6 {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}
.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.fill {
  height: 100%;
}

.center {
  display: grid;
  place-items: center;
}

/* ------------------------------------------------------------ карточки */

.card {
  background: var(--bg-2);
  border-radius: 22px;
  padding: 28px 30px;
  position: relative;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 650;
}

.card p {
  margin: 0;
  font-size: 24px;
  color: var(--ink-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
  font-weight: 600;
}

/* ------------------------------------------------------------ иконки */

.ico {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}

.ico svg {
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------ фото */

.ph {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-3);
}

.ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph.contain img {
  object-fit: contain;
  background: var(--bg-2);
}

.ph-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 24px 18px;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
}

.ph-credit {
  position: absolute;
  right: 8px;
  top: 8px;
  max-width: 70%;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------ числа */

.stat-v {
  font-size: 104px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.stat-l {
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.25;
  color: var(--ink-2);
}

.stat-n {
  margin-top: 6px;
  font-size: 18px;
  color: var(--muted);
}

.stat.sm .stat-v {
  font-size: 72px;
}

/* ------------------------------------------------------------ шаги и выбор */

/* Элемент появляется на шаге N: <div data-step="1">…</div> */
[data-step] {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

[data-step]:not(.is-on) {
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

[data-step].step-fade:not(.is-on) {
  transform: none;
}

/* Варианты выбора: <div data-opt="fixed">…</div>.
   Пока ничего не выбрано — видны все; при выборе остальные приглушаются. */
[data-opt] {
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.slide.has-sel [data-opt]:not(.is-sel):not(.no-dim) {
  opacity: 0.28;
  filter: grayscale(1);
}

.card[data-opt].is-sel {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 3px var(--accent);
}

/* Панели, видимые только при выбранном варианте: <div data-show="fixed">.
   data-show="" — обзорное состояние (ничего не выбрано). Несколько id — через пробел. */
[data-show] {
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}

[data-show]:not(.is-shown) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
}

[data-show].is-shown {
  transition: opacity 0.4s ease 0.08s, transform 0.4s ease 0.08s, visibility 0s;
}

/* Наложение панелей друг на друга в одной области */
.stack {
  display: grid;
}

.stack > * {
  grid-area: 1 / 1;
}

/* ------------------------------------------------------------ разделитель */

.slide.is-divider {
  padding: 0;
}

.divider {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.divider-bg {
  position: absolute;
  inset: 0;
}

.divider-bg .ph {
  height: 100%;
  border-radius: 0;
}

.divider-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 32%, color-mix(in srgb, var(--bg) 70%, transparent) 52%, transparent 75%);
}

.divider-body {
  position: relative;
  padding: 0 96px 120px;
  max-width: 1100px;
}

.divider-ico {
  width: 120px;
  height: 120px;
  color: var(--accent);
  margin-bottom: 36px;
}

.divider-num {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.divider h1 {
  margin: 0;
  font-size: 96px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.divider p {
  margin: 24px 0 0;
  font-size: 34px;
  color: var(--ink-2);
}

/* ------------------------------------------------------------ графики */

.chart {
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: var(--font);
}

.chart text {
  fill: var(--ink-2);
  font-size: 22px;
}

.chart .c-grid line {
  stroke: var(--grid);
  stroke-width: 1;
}

.chart .c-axis line,
.chart .c-base {
  stroke: var(--axis);
  stroke-width: 2;
}

.chart .c-tick {
  fill: var(--muted);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.chart .c-label {
  fill: var(--ink-2);
  font-size: 22px;
}

.chart .c-value {
  fill: var(--ink);
  font-size: 24px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.chart .c-note {
  fill: var(--muted);
  font-size: 18px;
}

.chart .c-line {
  fill: none;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .c-area {
  opacity: 0.14;
}

.chart .c-dot {
  stroke: var(--bg);
  stroke-width: 3;
}

.chart .c-bar {
  transition: opacity 0.4s ease;
}

.chart .c-dim {
  opacity: 0.3;
}

/* Анимация появления графика при показе слайда */
.slide.is-current .chart .c-grow {
  animation: c-grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes c-grow {
  from {
    transform: scaleY(0);
  }
}

.slide.is-current .chart .c-growx {
  animation: c-growx 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes c-growx {
  from {
    transform: scaleX(0);
  }
}

.slide.is-current .chart .c-draw {
  stroke-dasharray: var(--len, 4000);
  animation: c-draw 1.4s ease both;
}

@keyframes c-draw {
  from {
    stroke-dashoffset: var(--len, 4000);
  }
  to {
    stroke-dashoffset: 0;
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 22px;
  color: var(--ink-2);
}

.legend i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  margin-right: 10px;
  vertical-align: -2px;
}

/* ------------------------------------------------------------ таблица */

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 24px;
}

.tbl th,
.tbl td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tbl th {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
