/**
 * MediaOne Widgets — "The Winning Formula" cards.
 *
 * Three cards whose icon circle overhangs the top edge. The original did that
 * with `-translate-y-12` plus a compensating `margin-top:-1.5rem` on the title —
 * two magic numbers that had to stay in sync. Here the card simply reserves
 * padding for the circle and the circle is pulled up by half its own height, so
 * changing the circle size can't break the spacing.
 */

.mow-formula {

	/* One value drives every alignment in this section — `text-align`,
	   `align-items` and `justify-content` all accept start/center/end, so the
	   alignment control writes this once and the whole block follows. */
	--mow-align: center;
}

.mow-formula__head {
	max-width: 36rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: var(--mow-align);
	text-align: var(--mow-align);
}

.mow-formula__label {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mow-blue);
	background: var(--mow-sky);
	padding: 5px 16px;
	border-radius: 100px;
	margin-bottom: 14px;
}

.mow-formula__title {
	font-weight: 900;
	font-size: clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem);
	line-height: 1.25;
	margin: 0.75rem 0;
}

.mow-formula__hl {
	color: var(--mow-orange);
}

/* ── Grid ─────────────────────────────────────────────────────────────── */

.mow-formula__grid {
	--mow-formula-circle: 4rem;

	display: grid;
	grid-template-columns: 1fr;
	/* The row gap has to clear the overhanging circle. */
	gap: calc(var(--mow-formula-circle) / 2 + 1.5rem);
	margin-top: calc(var(--mow-formula-circle) / 2 + 3rem);
}

@media (min-width: 768px) {

	.mow-formula__grid {
		grid-template-columns: repeat(3, 1fr);
		column-gap: 1.5rem;
	}
}

/* ── Card ─────────────────────────────────────────────────────────────── */

.mow-formula__card {
	display: flex;
	flex-direction: column;
	align-items: var(--mow-card-align, center);
	/* Room for the circle that hangs over the top edge. */
	padding: calc(var(--mow-formula-circle) / 2 + 1rem) 1.5rem 1.5rem;
	text-align: var(--mow-card-align, center);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 25px -5px rgba(0, 14, 62, 0.1);
}

.mow-formula__icon {
	width: var(--mow-formula-circle);
	height: var(--mow-formula-circle);
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Exactly half of itself, so the overhang follows the circle size. */
	margin-top: calc(var(--mow-formula-circle) / -1);
	margin-bottom: 1rem;
	border-radius: 50%;
	color: #fff;
	font-size: 20px;
	box-shadow: 0 10px 15px -3px rgba(0, 14, 62, 0.2);
}

.mow-formula__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.mow-formula__card-title {
	font-family: var(--mow-font-head);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--mow-deep);
	line-height: 1.3;
	margin-bottom: 0.75rem;
}

.mow-formula__text {
	font-size: 0.875rem;
	line-height: 1.7;
	color: var(--mow-muted);
	/* Pushes the footer down so cards in a row align. */
	flex: 1;
}

/* ── Card footer: a pill, or a plain note ─────────────────────────────── */

.mow-formula__pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	border: 1px solid currentColor;
	font-size: 0.75rem;
	font-weight: 700;
}

.mow-formula__pill svg {
	width: 0.75rem;
	height: 0.75rem;
	fill: currentColor;
}

.mow-formula__note {
	margin-top: 1rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--mow-faint);
}

.mow-formula__note strong {
	font-weight: 700;
	color: var(--mow-orange);
}
