
:root {
  --pink:       #e6007e;
  --blue:       #009fe3;
  --teal:       #27cfc3;
  --grad:       linear-gradient(135deg, #e6007e 0%, #009fe3 100%);
  --dark:       #0d0d0d;
  --dark-600:   #1a1a1a;
  --dark-400:   #2e2e2e;
  --grey-500:   #676767;
  --grey-400:   #888888;
  --grey-100:   #e0e0e0;
  --white:      #ffffff;

  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-serif:   'EB Garamond', Georgia, serif;
  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body:    'Poppins', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --grid-max: 2000px;
  --grid-cols: 12;
  --grid-gap: 24px;
  --grid-margin: clamp(24px, 5vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--dark);
  color: var(--grey-100);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════════════════════ */

.stats-bar {
  position: relative;
  width: 100%;
  background: var(--dark);
  overflow-x: clip;
  overflow-y: visible;
}

.stats-bar::before,
.stats-bar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad);
  z-index: 2;
  opacity: 0.3;
}

.stats-bar::before { top: 0; }
.stats-bar::after  { bottom: 0; }

/* ─── HEADER ─────────────────────────────────────────── */

.stats-bar-header {
  position: relative;
  z-index: 1;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--grid-margin) 0;
  text-align: center;
}

/* ─── GRID ───────────────────────────────────────────── */

.stats-grid {
  position: relative;
  z-index: 1;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--grid-margin);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stats-grid--8 {
  grid-template-columns: repeat(4, 1fr);
}

.stats-grid--8 .stat-card:nth-child(5)::before {
  display: none;
}

.stats-grid--8 .stat-card:nth-child(n+5) {
  border-top: 1px solid transparent;
  border-image: linear-gradient(to right, transparent 0%, rgba(230,0,126,0.3) 30%, rgba(0,159,227,0.3) 70%, transparent 100%) 1;
}

/* ─── STAT CARD ──────────────────────────────────────── */

.stat-card {
  position: relative;
  text-align: center;
  padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 32px);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(230, 0, 126, 0.1), 0 0 24px rgba(0, 159, 227, 0.08);
}

/* ─── GRADIENT DIVIDER LINES ─────────────────────────── */

.stat-card + .stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(230, 0, 126, 0.4) 30%,
    rgba(0, 159, 227, 0.4) 70%,
    transparent 100%
  );
}

/* ─── NUMBER ─────────────────────────────────────────── */

.stat-number,
.stat-number span {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: #ffffff;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #ffffff;
  background-clip: unset;
  margin-bottom: 4px;
  white-space: nowrap;
}

/* ─── LABEL ──────────────────────────────────────────── */

.stat-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════
   CHART CONTAINERS
   ═══════════════════════════════════════════════════════════ */

.stat-chart {
  width: 100%;
  max-width: 200px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ─── BAR CHART ──────────────────────────────────────── */

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 100%;
  width: 100%;
}

.chart-bar {
  flex: 1;
  max-width: 22px;
  border-radius: 3px 3px 0 0;
  position: relative;
  transform-origin: bottom center;
  transform: scaleY(0);
  opacity: 0;
}

@keyframes barGrow {
  0%   { transform: scaleY(0); opacity: 0; }
  15%  { opacity: 1; }
  40%  { transform: scaleY(1); opacity: 1; }
  70%  { transform: scaleY(1); opacity: 1; }
  85%  { transform: scaleY(0.3); opacity: 0.6; }
  100% { transform: scaleY(0); opacity: 0; }
}

.stat-card.animated .chart-bar {
  animation: barGrow 4s var(--ease-out) infinite;
}

.stat-card.animated .chart-bar:nth-child(1)  { animation-delay: 0s; }
.stat-card.animated .chart-bar:nth-child(2)  { animation-delay: 0.08s; }
.stat-card.animated .chart-bar:nth-child(3)  { animation-delay: 0.16s; }
.stat-card.animated .chart-bar:nth-child(4)  { animation-delay: 0.24s; }
.stat-card.animated .chart-bar:nth-child(5)  { animation-delay: 0.32s; }
.stat-card.animated .chart-bar:nth-child(6)  { animation-delay: 0.4s; }
.stat-card.animated .chart-bar:nth-child(7)  { animation-delay: 0.48s; }
.stat-card.animated .chart-bar:nth-child(8)  { animation-delay: 0.56s; }
.stat-card.animated .chart-bar:nth-child(9)  { animation-delay: 0.64s; }
.stat-card.animated .chart-bar:nth-child(10) { animation-delay: 0.72s; }
.stat-card.animated .chart-bar:nth-child(11) { animation-delay: 0.8s; }
.stat-card.animated .chart-bar:nth-child(12) { animation-delay: 0.88s; }

/* ─── LINE GRAPH ─────────────────────────────────────── */

.chart-line-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.chart-line-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-line-path {
  fill: none;
  stroke: url(#lineGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

@keyframes lineDraw {
  0%   { stroke-dashoffset: 600; }
  40%  { stroke-dashoffset: 0; }
  75%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -600; }
}

.stat-card.animated .chart-line-path {
  animation: lineDraw 5s var(--ease-out) infinite;
}

.chart-line-area {
  opacity: 0;
}

@keyframes areaFade {
  0%   { opacity: 0; }
  30%  { opacity: 0; }
  45%  { opacity: 1; }
  75%  { opacity: 1; }
  90%  { opacity: 0; }
  100% { opacity: 0; }
}

.stat-card.animated .chart-line-area {
  animation: areaFade 5s ease infinite;
}

.chart-line-dot {
  r: 0;
}

@keyframes dotPop {
  0%   { r: 0; }
  35%  { r: 0; }
  45%  { r: 4; }
  55%  { r: 3.5; }
  75%  { r: 3.5; }
  90%  { r: 0; }
  100% { r: 0; }
}

.stat-card.animated .chart-line-dot { animation: dotPop 5s var(--ease-out) infinite; }
.stat-card.animated .chart-line-dot:nth-of-type(1) { animation-delay: 0s; }
.stat-card.animated .chart-line-dot:nth-of-type(2) { animation-delay: 0.15s; }
.stat-card.animated .chart-line-dot:nth-of-type(3) { animation-delay: 0.3s; }
.stat-card.animated .chart-line-dot:nth-of-type(4) { animation-delay: 0.45s; }
.stat-card.animated .chart-line-dot:nth-of-type(5) { animation-delay: 0.6s; }
.stat-card.animated .chart-line-dot:nth-of-type(6) { animation-delay: 0.75s; }

/* ─── DONUT / PIE CHART ──────────────────────────────── */

.chart-donut-wrap {
  width: 110px;
  height: 110px;
  position: relative;
}

.chart-donut-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: var(--dark-400);
  stroke-width: 8;
}

.donut-segment {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 0 283;
}

@keyframes donutFill {
  0%   { stroke-dasharray: 0 283; }
  35%  { stroke-dasharray: var(--donut-arc) 283; }
  70%  { stroke-dasharray: var(--donut-arc) 283; }
  100% { stroke-dasharray: 0 283; }
}

.stat-card.animated .donut-segment {
  animation: donutFill 4.5s var(--ease-out) infinite;
}

.donut-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: #ffffff;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #ffffff;
  background-clip: unset;
  opacity: 0;
  transform: scale(0.6);
}

@keyframes donutText {
  0%   { opacity: 0; transform: scale(0.6); }
  25%  { opacity: 1; transform: scale(1); }
  70%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.6); }
}

.stat-card.animated .donut-center-text {
  animation: donutText 4.5s var(--ease-out) infinite;
}

/* ─── GRID / HEATMAP CHART ───────────────────────────── */

.chart-grid-wrap {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 3px;
  width: 100%;
  height: 100%;
  max-width: 200px;
}

.chart-grid-cell {
  border-radius: 2px;
  background: var(--dark-400);
  transform: scale(0);
}

@keyframes cellPop {
  0%   { transform: scale(0); }
  20%  { transform: scale(1); }
  70%  { transform: scale(1); }
  90%  { transform: scale(0); }
  100% { transform: scale(0); }
}

.stat-card.animated .chart-grid-cell {
  animation: cellPop 5s var(--ease-out) infinite;
}

/* Stagger — wave effect row-by-row */
.stat-card.animated .chart-grid-cell:nth-child(1)  { animation-delay: 0s; }
.stat-card.animated .chart-grid-cell:nth-child(2)  { animation-delay: 0.04s; }
.stat-card.animated .chart-grid-cell:nth-child(3)  { animation-delay: 0.08s; }
.stat-card.animated .chart-grid-cell:nth-child(4)  { animation-delay: 0.12s; }
.stat-card.animated .chart-grid-cell:nth-child(5)  { animation-delay: 0.16s; }
.stat-card.animated .chart-grid-cell:nth-child(6)  { animation-delay: 0.2s; }
.stat-card.animated .chart-grid-cell:nth-child(7)  { animation-delay: 0.24s; }
.stat-card.animated .chart-grid-cell:nth-child(8)  { animation-delay: 0.28s; }
.stat-card.animated .chart-grid-cell:nth-child(9)  { animation-delay: 0.32s; }
.stat-card.animated .chart-grid-cell:nth-child(10) { animation-delay: 0.36s; }
.stat-card.animated .chart-grid-cell:nth-child(11) { animation-delay: 0.1s; }
.stat-card.animated .chart-grid-cell:nth-child(12) { animation-delay: 0.14s; }
.stat-card.animated .chart-grid-cell:nth-child(13) { animation-delay: 0.18s; }
.stat-card.animated .chart-grid-cell:nth-child(14) { animation-delay: 0.22s; }
.stat-card.animated .chart-grid-cell:nth-child(15) { animation-delay: 0.26s; }
.stat-card.animated .chart-grid-cell:nth-child(16) { animation-delay: 0.3s; }
.stat-card.animated .chart-grid-cell:nth-child(17) { animation-delay: 0.34s; }
.stat-card.animated .chart-grid-cell:nth-child(18) { animation-delay: 0.38s; }
.stat-card.animated .chart-grid-cell:nth-child(19) { animation-delay: 0.42s; }
.stat-card.animated .chart-grid-cell:nth-child(20) { animation-delay: 0.46s; }
.stat-card.animated .chart-grid-cell:nth-child(21) { animation-delay: 0.2s; }
.stat-card.animated .chart-grid-cell:nth-child(22) { animation-delay: 0.24s; }
.stat-card.animated .chart-grid-cell:nth-child(23) { animation-delay: 0.28s; }
.stat-card.animated .chart-grid-cell:nth-child(24) { animation-delay: 0.32s; }
.stat-card.animated .chart-grid-cell:nth-child(25) { animation-delay: 0.36s; }
.stat-card.animated .chart-grid-cell:nth-child(26) { animation-delay: 0.4s; }
.stat-card.animated .chart-grid-cell:nth-child(27) { animation-delay: 0.44s; }
.stat-card.animated .chart-grid-cell:nth-child(28) { animation-delay: 0.48s; }
.stat-card.animated .chart-grid-cell:nth-child(29) { animation-delay: 0.52s; }
.stat-card.animated .chart-grid-cell:nth-child(30) { animation-delay: 0.56s; }
.stat-card.animated .chart-grid-cell:nth-child(31) { animation-delay: 0.3s; }
.stat-card.animated .chart-grid-cell:nth-child(32) { animation-delay: 0.34s; }
.stat-card.animated .chart-grid-cell:nth-child(33) { animation-delay: 0.38s; }
.stat-card.animated .chart-grid-cell:nth-child(34) { animation-delay: 0.42s; }
.stat-card.animated .chart-grid-cell:nth-child(35) { animation-delay: 0.46s; }
.stat-card.animated .chart-grid-cell:nth-child(36) { animation-delay: 0.5s; }
.stat-card.animated .chart-grid-cell:nth-child(37) { animation-delay: 0.54s; }
.stat-card.animated .chart-grid-cell:nth-child(38) { animation-delay: 0.58s; }
.stat-card.animated .chart-grid-cell:nth-child(39) { animation-delay: 0.62s; }
.stat-card.animated .chart-grid-cell:nth-child(40) { animation-delay: 0.66s; }
.stat-card.animated .chart-grid-cell:nth-child(41) { animation-delay: 0.4s; }
.stat-card.animated .chart-grid-cell:nth-child(42) { animation-delay: 0.44s; }
.stat-card.animated .chart-grid-cell:nth-child(43) { animation-delay: 0.48s; }
.stat-card.animated .chart-grid-cell:nth-child(44) { animation-delay: 0.52s; }
.stat-card.animated .chart-grid-cell:nth-child(45) { animation-delay: 0.56s; }
.stat-card.animated .chart-grid-cell:nth-child(46) { animation-delay: 0.6s; }
.stat-card.animated .chart-grid-cell:nth-child(47) { animation-delay: 0.64s; }
.stat-card.animated .chart-grid-cell:nth-child(48) { animation-delay: 0.68s; }
.stat-card.animated .chart-grid-cell:nth-child(49) { animation-delay: 0.72s; }
.stat-card.animated .chart-grid-cell:nth-child(50) { animation-delay: 0.76s; }

/* ─── CHART AXIS LABELS ──────────────────────────────── */

.chart-axis {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

.chart-bars-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.25s; }
.reveal-delay-4 { transition-delay: 0.25s; }

/* ═══════════════════════════════════════════════════════════
   BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1800px) {
  :root { --grid-margin: clamp(24px, 4.5vw, 72px); }
}

@media (max-width: 1600px) {
  .stat-number { font-size: clamp(2.4rem, 3.8vw, 3.6rem); }
}

@media (max-width: 1400px) {
  .stat-number { font-size: clamp(2.2rem, 3.5vw, 3.2rem); }
  .stat-chart { height: 100px; }
}

@media (max-width: 1200px) {
  :root { --grid-margin: clamp(20px, 4vw, 56px); }
  .stat-number { font-size: clamp(2rem, 3.2vw, 3rem); }
  .stat-label { font-size: 13px; }
  .stat-chart { height: 90px; }
}

@media (max-width: 1000px) {
  :root { --grid-margin: clamp(20px, 3.5vw, 40px); }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  .stat-card { padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 24px); }

  .stat-card + .stat-card::before { display: none; }

  .stat-card:nth-child(even)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(230, 0, 126, 0.4) 30%,
      rgba(0, 159, 227, 0.4) 70%,
      transparent 100%
    );
  }

  .stat-card:nth-child(n+3)::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    width: auto;
    bottom: auto;
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(230, 0, 126, 0.4) 30%,
      rgba(0, 159, 227, 0.4) 70%,
      transparent 100%
    );
  }

  .stat-chart { height: 100px; max-width: 180px; }
}

@media (max-width: 800px) {
  :root { --grid-margin: 24px; }
  .stat-number { font-size: clamp(2rem, 6vw, 2.8rem); }
  .stat-chart { height: 85px; }
  .chart-donut-wrap { width: 90px; height: 90px; }
}

@media (max-width: 600px) {
  :root { --grid-margin: 20px; }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stat-card { padding: clamp(20px, 4vw, 32px) 16px; }

  .stat-card::before,
  .stat-card::after,
  .stat-card:nth-child(even)::after,
  .stat-card:nth-child(n+3)::before {
    display: none !important;
  }

  .stat-card + .stat-card {
    border-top: 1px solid;
    border-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(230, 0, 126, 0.3) 30%,
      rgba(0, 159, 227, 0.3) 70%,
      transparent 100%
    ) 1;
  }

  .stat-chart { height: 80px; max-width: 220px; }
  .chart-donut-wrap { width: 85px; height: 85px; }
}

@media (max-width: 400px) {
  :root { --grid-margin: 16px; }
  .stat-number { font-size: 2rem; }
  .stat-label { font-size: 12px; }
  .stat-chart { height: 70px; }
}

