/* An open, continuous statistics band using the existing TAVIO palette and type. */
.home-page .home-stats {
  position: relative;
  isolation: isolate;
  padding-block: 52px 64px;
}

.home-page .home-stats::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset-block: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #e5e5e5;
}

.home-page .home-stats-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: left center;
  transition: opacity 1.3s ease, transform 2.2s cubic-bezier(.22, 1, .36, 1);
}

.home-page .home-stats-heading::before {
  content: '';
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.home-page .home-stats-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0 0;
  padding: 0;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  transition: opacity 1.3s ease, transform 2.2s cubic-bezier(.22, 1, .36, 1);
}

.home-page .home-stats-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  padding-inline: clamp(24px, 4.4vw, 64px);
  transition: opacity 1.1s ease, transform 1.3s cubic-bezier(.16, 1, .3, 1);
}

.home-page .home-stats-item:first-child { padding-left: 0; }
.home-page .home-stats-item:last-child { padding-right: 0; }

.home-page .home-stats-item:nth-child(2) { transition-delay: .1s; }
.home-page .home-stats-item:nth-child(3) { transition-delay: .2s; }

.home-page .home-stats-item + .home-stats-item::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--line), #2932390a);
  opacity: 1;
  transition: opacity .25s ease;
}

.home-page .home-stats-label {
  order: 1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .015em;
}

.home-page .home-stats-value {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(46px, 7.3vw, 104px);
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.065em;
  line-height: 1.1;
}

.home-page .home-stats-figure {
  display: inline-flex;
  align-items: flex-start;
  gap: .12em;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}

/* Reserve the final digit width so counting never moves the plus or the layout. */
.home-page .home-stats-digits { display: grid; text-align: right; }
.home-page .home-stats-digits > span { grid-area: 1 / 1; }
.home-page .home-stats-reserve { visibility: hidden; }
.home-page .home-stats-plus {
  padding-top: .16em;
  color: var(--accent-ink);
  font-size: .48em;
  font-weight: 400;
  letter-spacing: 0;
}

.home-page .home-stats.is-pending:not(.is-visible) .home-stats-heading,
.home-page .home-stats.is-pending:not(.is-visible) .home-stats-band {
  opacity: 0;
  /* Camera Zoom: gently approach the final size as the section enters view. */
  transform: translate3d(0, 20px, 0) scale(.94);
  transition: none;
}

.home-page .home-stats.is-pending:not(.is-visible) .home-stats-item {
  opacity: 0;
  transform: translateY(16px);
  transition: none;
}

@media (hover: hover) and (pointer: fine) {
  .home-page .home-stats-item:hover .home-stats-figure { transform: translateY(-3px); }
  .home-page .home-stats-item:hover::before { opacity: .55; }
}

@media (max-width: 900px) {
  .home-page .home-stats-item { padding-inline: 24px; }
  .home-page .home-stats-label { font-size: 13px; }
}

@media (max-width: 580px) {
  .home-page .home-stats { padding-block: 36px 40px; }
  .home-page .home-stats-band { grid-template-columns: 1fr; margin-top: 28px; }
  .home-page .home-stats-item { gap: 10px; padding: 25px 0; }
  .home-page .home-stats-item:first-child { padding-top: 0; }
  .home-page .home-stats-item:last-child { padding-bottom: 0; }
  .home-page .home-stats-value { font-size: clamp(64px, 18vw, 80px); }
  .home-page .home-stats-label { font-size: 14px; }
  .home-page .home-stats-item + .home-stats-item::before {
    top: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--line), #29323906);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .home-stats .home-stats-heading,
  .home-page .home-stats .home-stats-band,
  .home-page .home-stats .home-stats-item,
  .home-page .home-stats .home-stats-figure {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .home-page .home-stats-item::before { transition: none; }
}

@media (forced-colors: active) {
  .home-page .home-stats-heading::before { background: CanvasText; }
  .home-page .home-stats-item + .home-stats-item::before { background: CanvasText; }
}
