/* ==========================================================================
   SECTION-STATS.CSS — Stats + scroll-driven keyframes
   ========================================================================== */

.stats {
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Left — bars
   -------------------------------------------------------------------------- */
.stats__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  height: 100%;
  padding: var(--space-lg) 0;
}

.stats__eyebrow {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: 14px;
  line-height: 32px;
  color: var(--color-mint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stats__headline {
  font-family: var(--font-base);
  font-weight: 700;
  font-size: clamp(24px, 3.33vw, 48px);
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.stats__bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Each bar row */
.stats__bar {
  display: flex;
  align-items: center;
  position: relative;
  padding: var(--space-xs);
  overflow: hidden;
}

.stats__icon-box {
  background: var(--color-bg);
  border-radius: var(--radius-stat-inner);
  z-index: 2;
  padding: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
}

.stats__icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

/* Fill track (fill/content position against .stats__bar, not the track) */
.stats__bar-track {
  flex: 1;
  min-width: 0;
  height: 88px;        /* match icon-box height */
  overflow: hidden;
}

/* Animated fill — % width of .stats__bar (position: relative) */
.stats__bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;            /* driven by stats.js */
  background: var(--color-teal);
  border-radius: var(--radius-stat-inner);
}

/* Content sits on top of the fill, always visible */
.stats__bar-content {
  position: absolute;
  inset: 0;
  left: 88px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 24px;
  white-space: nowrap;
  pointer-events: none;
}

.stats__number {
  font-family: var(--font-base);
  font-weight: 900;
  font-size: 48px;
  line-height: 0.9;
  color: var(--color-white);
}

.stats__label {
  font-family: var(--font-base);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -0.08px;
  color: var(--color-white);
  opacity: 0;               /* animated by GSAP */
  transform: translateY(-12px);
}

/* --------------------------------------------------------------------------
   Right — keyframe sequence
   -------------------------------------------------------------------------- */
.stats__right {
  position: relative;
  height: 80vh;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.stats__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Responsive: Mobile & Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .stats {
    height: auto;
    min-height: 100vh;
    padding: 48px 0;
    overflow: visible;
  }

  .stats > .container {
    display: flex;
    flex-direction: column;
  }

  .stats > .container .row {
    flex-direction: column;
  }

  /* Left column: text above */
  .stats .col-6:first-child {
    order: 1;
    width: 100%;
    margin-bottom: 32px;
  }

  /* Right column: video below */
  .stats .col-6:last-child {
    order: 2;
    width: 100%;
  }

  .stats__left {
    padding: 0;
  }

  .stats__headline {
    font-size: clamp(20px, 5vw, 32px);
    margin-bottom: 24px;
  }

  .stats__bars {
    gap: 12px;
  }

  .stats__bar {
    padding: 8px;
  }

  .stats__icon-box {
    width: 56px;
    height: 56px;
    padding: 12px;
  }

  .stats__icon {
    width: 32px;
    height: 32px;
  }

  .stats__bar-track {
    height: 56px;
  }

  .stats__number {
    font-size: 32px;
  }

  .stats__label {
    font-size: 13px;
  }

  .stats__bar-content {
    padding: 0 16px;
    gap: 8px;
  }

  /* Video below text */
  .stats__right {
    height: 50vh;
    min-height: 280px;
    width: 100%;
  }

  .stats__video {
    position: relative;
    height: 100%;
  }
}

@media (max-width: 767.98px) {
  .stats {
    padding: 32px 0;
  }

  .stats__headline {
    font-size: clamp(18px, 5vw, 26px);
    margin-bottom: 20px;
  }

  .stats__icon-box {
    width: 48px;
    height: 48px;
    padding: 10px;
  }

  .stats__icon {
    width: 28px;
    height: 28px;
  }

  .stats__bar-track {
    height: 48px;
  }

  .stats__number {
    font-size: 28px;
  }

  .stats__label {
    font-size: 12px;
  }

  .stats__bar-content {
    padding: 0 12px;
  }

  .stats__right {
    height: 40vh;
    min-height: 220px;
    border-radius: 20px;
  }
}

/* Tablet: recover two-column layout but with adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
  .stats {
    padding: 64px 0;
  }

  .stats__headline {
    font-size: clamp(22px, 4vw, 36px);
  }

  .stats__right {
    height: 60vh;
  }
}
