/* STATS: four true numbers on cards of staggered heights that overlap a little, bottoms fading
   into the page; the third card is the blue highlight with bars rising inside it. The numbers
   count up and the bars grow as the row comes into view (js/pitch.js adds .is-counted). */
.stats { padding: 0 0 clamp(70px, 9vw, 120px); }
.stats__row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; max-width: 1180px; height: clamp(400px, 38vw, 520px); margin: 0 auto; }
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-right: -22px;
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 -20px 50px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  /* the bottom of every card melts into the page */
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.stat:last-child { margin-right: 0; }
.stat--1 { z-index: 1; height: 70%; }
.stat--2 { z-index: 2; height: 56%; }
.stat--3 { z-index: 3; height: 100%; }
.stat--4 { z-index: 4; height: 74%; }
.stat b { color: var(--text-1); font-size: clamp(40px, 4.4vw, 60px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat span { max-width: 26ch; color: var(--text-3); font-size: 15.5px; line-height: 1.5; }

/* the highlight: brand blue, bars rising from the bottom */
.stat--hi { overflow: hidden; background: linear-gradient(180deg, #1668ff 0%, #0a4dff 45%, rgba(10, 77, 255, 0.35) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 30px 70px -30px rgba(10, 77, 255, 0.9); }
.stat--hi b { color: #fff; }
.stat--hi span { color: #fff; }
.stat__bars { position: absolute; left: 8%; right: 8%; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; height: 52%; max-width: none !important; }
.stat__bars i { width: 7%; height: var(--h); border-radius: 99px 99px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0)); transform: scaleY(0.12); transform-origin: 50% 100%; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d); }
.stats.is-counted .stat__bars i { transform: none; }

[data-theme="light"] .stat { background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.6)); box-shadow: inset 0 0 0 1px var(--line-card), 0 -20px 50px -34px rgba(10, 40, 90, 0.3); }
[data-theme="light"] .stat--hi { background: linear-gradient(180deg, #1668ff 0%, #0a4dff 45%, rgba(10, 77, 255, 0.35) 100%); box-shadow: 0 30px 70px -34px rgba(10, 77, 255, 0.6); }

@media (max-width: 900px) {
  /* two by two, the right column stepped down, every card a full card with rounded corners */
  .stats__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; height: auto; align-items: start; }
  .stat { height: auto !important; min-height: 190px; margin: 0; border-radius: 22px; -webkit-mask-image: none; mask-image: none; }
  .stat--2, .stat--4 { margin-top: 28px; }
  .stat--hi { min-height: 230px; }
  .stat__bars { height: 42%; }
}
@media (max-width: 480px) {
  .stat { min-height: 170px; padding: 18px; gap: 10px; }
  .stat--hi { min-height: 210px; }
  .stat b { font-size: 36px; }
  .stat span { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .stat__bars i { transform: none; transition: none; }
}
