/**
 * Homepage numbers strip.
 *
 * Treated as a masthead credits line rather than a row of marketing tiles:
 * no cards, no boxes, no icons. The strip is bounded by two hairlines and the
 * figures are separated by thin vertical rules, so it reads as part of the
 * hero block above it rather than as a separate promotional band.
 *
 * The section pads tighter than a normal homepage section, because it is a
 * continuation of the hero rather than a section in its own right.
 *
 * Loaded on the homepage only, enqueued by inc/home-stats.php.
 *
 * @package GeneratePress_Child
 */

.ha-home__section.ha-stats-band {
	padding-top: 0;
	padding-bottom: var(--ha-section);
}

.ha-stats {
	display: grid;
	grid-template-columns: repeat(var(--ha-stats-count, 4), minmax(0, 1fr));
	gap: 0;
	margin: 0;
	padding: var(--ha-gap) 0;
	border-top: var(--ha-border-width) solid var(--ha-rule-strong);
	border-bottom: var(--ha-border-width) solid var(--ha-rule);
}

.ha-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
	padding: 0.35rem var(--ha-gap);
	border-left: var(--ha-border-width) solid var(--ha-rule);
	text-align: center;
}

/* Column counts are explicit rather than auto-fit, so it is always known
   which item starts a row and therefore which one drops its divider. Adding a
   fifth figure through the ha_home_stats filter needs this count updated. */
.ha-stat:first-child {
	border-left: none;
}

.ha-stat__label {
	order: 1;
	margin: 0;
	font-family: var(--ha-font-body);
	font-size: var(--ha-size-label);
	font-weight: 600;
	letter-spacing: var(--ha-track-label);
	text-transform: uppercase;
	color: var(--ha-accent-deep);
}

.ha-stat__value {
	order: 2;
	margin: 0;
	font-family: var(--ha-font-display);
	font-size: clamp(1.5rem, 2.2vw, 1.875rem);
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: var(--ha-track-tight);
	color: var(--ha-ink);
	font-variant-numeric: tabular-nums;
}

.ha-stat__note {
	order: 3;
	margin: 0;
	font-family: var(--ha-font-body);
	font-size: var(--ha-size-small);
	line-height: 1.4;
	color: var(--ha-ink-soft);
	text-wrap: pretty;
}

/* Two across on small screens: the left column starts each row, so it loses
   its divider and its indent. */
@media (max-width: 59.9375em) {
	.ha-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: var(--ha-gap);
	}

	.ha-stat:nth-child(odd) {
		border-left: none;
	}
}

/* Single column: every item starts its own row. */
@media (max-width: 20em) {
	.ha-stats {
		grid-template-columns: minmax(0, 1fr);
	}

	.ha-stat {
		border-left: none;
	}
}
