/* ZHI — stats: counters hanging from fine lines over a misty skyline */
.stats { overflow: hidden; isolation: isolate; padding-bottom: 0; }

/* Background: the photo is cooled and desaturated, mist drifts across it,
   and a dark "water" band closes the section. */
.stats__bg { position: absolute; inset: -8% 0; z-index: -3; opacity: 0.7; }
.stats__bg img { filter: grayscale(0.45) contrast(1.05) brightness(0.8); }
.stats::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(60% 45% at 8% 78%, rgba(201, 167, 107, 0.32), transparent 70%),
		linear-gradient(180deg, rgba(7, 27, 41, 0.86) 0%, rgba(7, 27, 41, 0.35) 38%, rgba(7, 27, 41, 0.5) 72%, var(--navy-900) 100%);
}
.stats__fog { position: absolute; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.stats__fog i {
	position: absolute; left: -25%; width: 150%; height: 55%; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(214, 222, 228, 0.22), transparent);
	filter: blur(40px); will-change: transform;
}
.stats__fog i:nth-child(1) { top: 22%; animation: zhiMist 46s ease-in-out infinite alternate; }
.stats__fog i:nth-child(2) { top: 48%; opacity: 0.8; animation: zhiMist 62s ease-in-out -20s infinite alternate-reverse; }
@keyframes zhiMist { from { transform: translate3d(-6%, 0, 0); } to { transform: translate3d(6%, -4%, 0); } }
@media (prefers-reduced-motion: reduce) { .stats__fog i { animation: none; } }

/* Counters: one row, each hanging from a fine line that ends in a ring. */
.stats__grid {
	--unit: clamp(1.5rem, 0.5rem + 2.6vw, 3.25rem);
	display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 clamp(0.75rem, 0.25rem + 1.4vw, 2rem);
	align-items: stretch; margin-top: var(--space-4);
}
.stat {
	position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: var(--space-2);
	margin-top: calc(var(--o, 0) * var(--unit));
	padding: 0 0 clamp(3.5rem, 2rem + 5vw, 7rem) clamp(1.1rem, 0.6rem + 1.2vw, 1.75rem);
}
.stat::before { /* the line */
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.25) 70%, rgba(255, 255, 255, 0));
	transform-origin: top; transition: transform 1400ms var(--ease-cinema) calc(var(--i, 0) * 120ms);
}
.stat::after { /* the ring */
	content: ""; position: absolute; left: -4px; top: 0; width: 9px; height: 9px; border-radius: 50%;
	border: 1px solid #fff; background: var(--navy-900); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.js .stat[data-reveal]:not(.is-visible)::before { transform: scaleY(0); }
.stat { container-type: inline-size; }
.stat:first-child { padding-left: 0; }
.stat:first-child::before, .stat:first-child::after { display: none; }
.stat__value {
	font-family: var(--font-display); font-weight: 400; color: #fff; white-space: nowrap; line-height: 1;
	font-size: clamp(32px, calc(32px + 0.0325 * (100vw - 375px)), 64px);
	font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; margin-top: -0.1em;
}
.stat__prefix { color: var(--bronze-300); font-size: 0.3em; letter-spacing: 0.14em; vertical-align: 0.95em; margin-right: 0.35em; text-transform: uppercase; }
.stat__unit--sub { font-size: 0.5em; color: var(--bronze-300); margin-left: 0.1em; }
.stat__plus { color: var(--bronze-300); font-size: 0.62em; vertical-align: 0.8em; margin-left: 0.06em; font-weight: 400; }
.stat__label { font-size: var(--fs-sm); line-height: 1.45; color: rgba(255, 255, 255, 0.72); max-width: 15ch; }
.stats__license { display: flex; align-items: center; gap: 0.7rem; margin: 0; padding-bottom: var(--space-8); font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.7); }
.stats__license .icon { width: 20px; height: 20px; color: var(--bronze-300); flex: none; }

/* Desktop row: size each figure to its own column so long numbers fit. */
@media (min-width: 1100px) {
	.stat__value { font-size: clamp(30px, 27cqw, 64px); }
}

/* Tablet and phone: the row becomes a swipe row, lines keep their stagger. */
@media (max-width: 1099px) {
	.stats__grid { --unit: 1.75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-5); }
	.stat { padding-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
}
@media (max-width: 759px) {
	.stats__grid { --swipe-w: 46%; --swipe-gap: var(--space-4); --unit: 1.4rem; grid-template-columns: none; padding-bottom: 0; }
	.stat { padding-left: 1.1rem; }
	.stats__license { padding-top: var(--space-5); }
}
