/* -------------------------------------------------------------------------------------------------

Counter — styles for the ACF "Counter" flexible content layout.

Markup:  parts/content-case-study.php
Motion:  js/counter.js (counts up on scroll; leaves values alone for prefers-reduced-motion)
Design:  Figma "Case Studies" node 974-15, stat row 975:2321–975:2332

Selectors are scoped under #case-study because the inherited
`#case-study .flexible-rows p` rule (Roboto Slab / #666 / 1.5em) is more specific than a
bare class would be. If this layout is ever enabled on another post type, broaden the scope.

-------------------------------------------------------------------------------------------------- */

#case-study .flexible-rows .flexible-row.counter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 4em auto;
}

/* Four even columns on the 1170px container, matching the 410px pitch in the comp. */
#case-study .flexible-rows .flexible-row.counter .counter-item {
	box-sizing: border-box;
	flex: 0 0 25%;
	max-width: 25%;
	padding: 0 10px;
	text-align: center;
}

#case-study .flexible-rows .flexible-row.counter .counter-number,
#case-study .flexible-rows .flexible-row.counter .counter-text {
	color: #f15a29;
	font-family: 'Open Sans', sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	margin: 0;
	padding: 0;
}

/* nowrap keeps the prefix/number/suffix spans on one line while the value animates. */
#case-study .flexible-rows .flexible-row.counter .counter-number {
	font-size: 48px;
	line-height: 1.35;
	margin-bottom: 12px;
	white-space: nowrap;
}

#case-study .flexible-rows .flexible-row.counter .counter-text {
	font-size: 24px;
	line-height: 1.375;
}

/* Two up on tablet. */
@media (max-width: 767px) {
	#case-study .flexible-rows .flexible-row.counter .counter-item {
		flex: 0 0 50%;
		max-width: 50%;
		margin-bottom: 2em;
	}

	#case-study .flexible-rows .flexible-row.counter .counter-number {
		font-size: 36px;
	}

	#case-study .flexible-rows .flexible-row.counter .counter-text {
		font-size: 18px;
	}
}

/* One up on phones. */
@media (max-width: 479px) {
	#case-study .flexible-rows .flexible-row.counter .counter-item {
		flex: 0 0 100%;
		max-width: 100%;
	}
}
