.stat {
  display: flex;
}

.stat,
.stat .sequence span {
  color: rgb(var(--color-stat, var(--color-foreground)));
  background-image: var(--color-heading-gradient-background, none);
  -webkit-background-clip: var(--color-heading-gradient-background-clip, border-box);
  -webkit-text-fill-color: var(--color-heading-gradient-fill, currentColor);
  text-align: center;
}

.stat .sequence span {
  display: block;
}

/* Animate number transitions (modern browsers only) */
.js-number-counter .digit {
  width: 1ch;
  height: 1em;
  overflow: hidden;
  transition-property: transform;
}

.js-number-counter .sequence {
  transition: transform 1.5s var(--cubic-bezier-ease-out-slow);
  transition-delay: inherit;
}

.js-number-counter .digit:nth-of-type(10) { transition-delay: 450ms; }
.js-number-counter .digit:nth-of-type(9)  { transition-delay: 400ms; }
.js-number-counter .digit:nth-of-type(8)  { transition-delay: 350ms; }
.js-number-counter .digit:nth-of-type(7)  { transition-delay: 300ms; }
.js-number-counter .digit:nth-of-type(6)  { transition-delay: 250ms; }
.js-number-counter .digit:nth-of-type(5)  { transition-delay: 200ms; }
.js-number-counter .digit:nth-of-type(4)  { transition-delay: 150ms; }
.js-number-counter .digit:nth-of-type(3)  { transition-delay: 100ms; }
.js-number-counter .digit:nth-of-type(2)  { transition-delay: 50ms; }
.js-number-counter .digit:nth-of-type(1)  { transition-delay: 0ms; }

/* ============================================================
   Fallback for browsers that don't support background-clip:text
   → Revert to solid color and disable animations
   ============================================================ */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .stat,
  .stat .sequence span {
    background: none;
    -webkit-text-fill-color: initial;
    color: rgb(var(--color-stat, var(--color-foreground)));
  }

  /* Disable animated transforms */
  .js-number-counter .sequence,
  .js-number-counter .digit {
    transition: none !important;
    transform: none !important;
  }
}
