:root {
  --bg: #0e141e;
  --bg-card: #374151;
  --text: #f9fafb;
  --text-muted: #d1d5db;
  --text-footer: #9ca3af;
  --accent: #FBD83D;
  --accent-hover: #e6c435;
  --border: #374151;
  --font: "Inter", sans-serif;
  --slide-duration: 0.7s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Логотип */
.header {
  position: fixed;
  top: 0;
  left: 0;
  padding: 1.5rem;
  z-index: 100;
}

.header__logo {
  display: block;
  width: 56px;
  height: 56px;
}

/* Слайды — вертикальная лента */
.slides {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slides__track {
  display: flex;
  flex-direction: column;
  transition: transform var(--slide-duration) cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.slide {
  position: relative;
  width: 100%;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.slide__inner {
  text-align: center;
  max-width: 42rem;
}

.slide__inner--wide {
  max-width: 40rem;
}

/* Типографика слайдов */
.slide__title {
  margin: 0 0 1rem;
  font-size: 50px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.slide__label {
  margin: 0 0 0.75rem;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.slide__heading {
  margin: 0 0 1.25rem;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.slide__quote {
  margin: 0 0 2.5rem;
  font-size: 20px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.slide__subtitle {
  margin: 0;
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.5;
}

/* Слайд с разделением: текст сверху, панели снизу */
.slide--split {
  flex-direction: column;
  padding: 0;
}

.slide__top {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-bottom: max(2rem, 40px);
  width: 100%;
}

.slide__top--left {
  padding: 2rem 0;
  padding-bottom: max(2rem, 40px);
}

.slide__top--left .slide__inner {
  text-align: left;
  max-width: 54rem;
  width: 100%;
  padding: 0;
  margin: 0 auto;
}

.slide__top--left .slide__heading {
  max-width: 80%;
}

/* Панели статистики — обрезаны низом слайда */
.stats-panels {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 40vh;
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
}

.stats-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 4rem;
}

.stats-panel:first-child {
  border-radius: 16px 0 0 0;
}

.stats-panel:last-child {
  border-radius: 0 16px 0 0;
}

.stats-panel--blue {
  background: #498bfa;
}

.stats-panel--dark {
  background: #2f6fdb;
}

.stats-panel__number {
  font-size: 64px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stats-panel__label {
  margin-top: 0.5rem;
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

/* Грид категорий — 4 в ряд, без зазоров, прижаты к низу */
.cat-grid {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  height: 60vh;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  border: none;
  transition: background 0.25s ease;
}

/* Диагональный градиент: левый верхний светлее → правый нижний прозрачнее */
.cat-card:nth-child(1)  { background: rgba(255, 255, 255, 0.16); }
.cat-card:nth-child(2)  { background: rgba(255, 255, 255, 0.14); }
.cat-card:nth-child(3)  { background: rgba(255, 255, 255, 0.12); }
.cat-card:nth-child(4)  { background: rgba(255, 255, 255, 0.10); }
.cat-card:nth-child(5)  { background: rgba(255, 255, 255, 0.12); }
.cat-card:nth-child(6)  { background: rgba(255, 255, 255, 0.10); }
.cat-card:nth-child(7)  { background: rgba(255, 255, 255, 0.08); }
.cat-card:nth-child(8)  { background: rgba(255, 255, 255, 0.06); }
.cat-card:nth-child(9)  { background: rgba(255, 255, 255, 0.08); }
.cat-card:nth-child(10) { background: rgba(255, 255, 255, 0.06); }
.cat-card:nth-child(11) { background: rgba(255, 255, 255, 0.04); }
.cat-card:nth-child(12) { background: rgba(255, 255, 255, 0.03); }

.cat-card:hover {
  background: rgba(255, 255, 255, 0.20);
}

.cat-card__icon {
  font-size: 24px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.cat-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.cat-card__count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Слайд «В цифрах» — инфографика */
.slide--stats-layout {
  flex-direction: column;
  padding: 0;
}

.slide__stats-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  width: 100%;
}

.slide__stats-bottom {
  flex-shrink: 0;
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding-bottom: 2.5rem;
}

.slide__inner--stats {
  max-width: 54rem;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.slide__heading--left {
  text-align: left;
}

.infographic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-top: 2.5rem;
}

/* KPI блоки */
.infographic__kpis {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.kpi {
  text-align: left;
}

.kpi__number {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.kpi__desc {
  display: block;
  margin-top: 0.35rem;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}



/* Столбчатая диаграмма устройств */
.infographic__devices {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  height: 280px;
}

.bars__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  height: 100%;
  justify-content: flex-end;
}

.bars__fill {
  width: 100%;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
}

.bars__fill--mobile {
  background: rgba(255, 255, 255, 0.14);
}

.bars__fill--desktop {
  background: rgba(255, 255, 255, 0.10);
}

.bars__pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.bars__name {
  margin-top: 0.5rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Источники трафика — одна полоса */
.sources {
  margin-top: 2.5rem;
  text-align: left;
}

.sources__title {
  margin: 0 0 0.75rem;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.sources-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sources-bar-labels {
  display: flex;
}

.sources-bar-labels__item {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.sources-bar {
  position: relative;
  width: 100%;
  height: 48px;
}

.sources-bar__segment {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  overflow: visible;
}

.sources-bar__segment--1 {
  background: rgba(255, 255, 255, 0.06);
  z-index: 1;
  justify-content: flex-end;
  padding-right: 1.25rem;
}

.sources-bar__segment--2 {
  background: rgba(255, 255, 255, 0.10);
  z-index: 2;
  justify-content: flex-end;
  padding-right: 1.25rem;
}

.sources-bar__segment--3 {
  background: rgba(255, 255, 255, 0.16);
  z-index: 3;
  padding-left: 1.25rem;
}

.sources-bar__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Средние значения под заголовком */
.avg-stats {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.avg-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avg-stat__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avg-stat__dot--views {
  background: #498bfa;
}

.avg-stat__dot--visitors {
  background: #2f6fdb;
}

.avg-stat__text {
  font-size: 14px;
  color: var(--text-muted);
}

.avg-stat__text strong {
  color: var(--text);
  font-weight: 600;
}

/* График годовой динамики */
.chart-wrap--full {
  flex-shrink: 0;
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  height: 65vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
}

.chart {
  position: relative;
  flex: 1;
  width: 100%;
}

#chartCanvas {
  width: 100% !important;
  height: 100% !important;
}

/* Плитки рекламных форматов */
.formats-grid {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  height: 60vh;
}

.format-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  border: none;
  transition: background 0.25s ease;
}

.format-card:nth-child(1) { background: rgba(255, 255, 255, 0.08); }
.format-card:nth-child(2) { background: rgba(255, 255, 255, 0.05); }
.format-card:nth-child(3) { background: rgba(255, 255, 255, 0.08); }
.format-card:nth-child(4) { background: rgba(255, 255, 255, 0.05); }
.format-card:nth-child(5) { background: rgba(255, 255, 255, 0.08); }
.format-card:nth-child(6) { background: rgba(255, 255, 255, 0.05); }

.format-card:hover {
  background: rgba(255, 255, 255, 0.16);
}

.format-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
  color: var(--accent);
}

.format-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.format-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.format-card__desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Email контакт */
.slide__email {
  display: block;
  margin-top: 0.5rem;
  font-size: 32px;
  font-weight: 700;
  color: #498bfa;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.slide__email:hover {
  text-decoration: underline;
}

/* Пагинация — точки справа по центру */
.pagination {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 100;
}

.pagination__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.pagination__dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.pagination__dot.active {
  width: 14px;
  height: 14px;
  background: #ffffff;
}
