/* ===================================
	Success driven: stats and awards slides, a green circle CTA, and a pager.
	Script: blocks/success-driven/script.js (the crossfade and pager below).
=================================== */

.section_success_driven .section_title .textcolor-darkgreen {
	color: var(--wp--preset--color--neongreen);
}
.stats_row {
	display: flex;
	align-items: center;
	gap: 84px;
	position: relative;
	margin-top: 44px;
}
.stats_row .stats-group,
.stats_row .awards_winner_logos {
	display: flex;
	align-items: center;
	gap: 49px;
	max-width: 800px;
	width: 100%;
}
.stats_row .awards_winner_logos {
	border-top: 1px solid;
	padding-top: 40px;
	gap: 37px;
}
.stats_row .stat {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	border-top: 1px solid;
	position: relative;
	width: 30%;
}
.stats_row .stat-number {
	letter-spacing: -5%;
	padding-bottom: 6px;
}
.stats_row .stat-number .plus {
	font-size: var(--wp--preset--font-size--large-70);
}
.stats_row .stat-label {
	text-transform: uppercase;
	letter-spacing: 2.16px;
	max-width: 190px;
}

/* the green circle CTA */
.stats_row .cta-circle {
	width: 18vw;
	max-width: 300px;
	min-width: 230px;
	aspect-ratio: 1;
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}
.stats_row .cta-number {
	letter-spacing: -14.47px;
	transform: translateY(-8%);
	line-height: 0.8;
}
.stats_row .cta-number .plus {
	margin-left: -1.2vw;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 100;
	font-size: 82%;
	position: relative;
	top: -10px;
}
.stats_row .cta-label {
	letter-spacing: 2.16px;
}

.section_success_driven .directional_nav {
	display: none;
}
@media only screen and (min-width: 980px) {
	.section_success_driven .slider_control {
		margin: 0;
	}
	.section_success_driven .slider_control .pager {
		position: absolute;
		right: max(50px, calc((100% - 1540px) / 2 - 20px)); /* by the content on wide screens, not at the window edge */
		top: 50%;
		flex-direction: column;
		transform: translateY(-50%);
	}
}

/* ===================================
	Responsive
=================================== */
@media only screen and (max-width: 1300px) {
	.stats_row .cta-number {
		font-size: 100px;
		letter-spacing: -7.47px;
	}
	.stats_row .cta-number .plus {
		margin-left: -9px;
		top: -4px;
	}
	.stats_row .cta-label {
		letter-spacing: 1.16px;
		font-size: 16px;
	}
}
@media only screen and (max-width: 1024px) {
	.stats_row {
		gap: 30px;
	}
	.stats_row .stats-group,
	.stats_row .awards_winner_logos {
		gap: 27px;
	}
	.stats_row .stat-label {
		letter-spacing: 1px;
		max-width: 150px;
		font-size: 16px;
		min-height: 42px;
	}
	.stats_row .cta-circle {
		min-width: 180px;
	}
	.stats_row .cta-number {
		font-size: 80px;
		letter-spacing: -6.47px;
	}
	.stats_row .cta-label {
		letter-spacing: 1px;
		font-size: 14px;
	}
	.awards_winner .section_title br {
		display: none;
	}
}
@media only screen and (max-width: 979px) {
	.section_success_driven .slider_control {
		margin-top: 30px;
	}
}
@media only screen and (max-width: 768px) {
	.stats_row .stats-group,
	.stats_row .awards_winner_logos {
		gap: 19px;
	}
	.stats_row {
		gap: 10px;
	}
	.stats_row .stat-label {
		min-height: 63px;
	}
}
@media only screen and (max-width: 680px) {
	.stats_row {
		gap: 40px;
		flex-direction: column;
	}
	.stats_row .stats-group,
	.stats_row .awards_winner_logos {
		gap: 14px;
		justify-content: space-between;
		align-items: flex-start;
	}
	.stats_row .stat-label {
		font-size: 14px;
	}
}

/* ===================================
	Choreographed crossfade (script.js)
	Only applies once the script adds .is-crossfade; without JS both slides simply show.
=================================== */
.section_success_driven.is-crossfade {
	position: relative; /* anchors the pager (the old carousel wrapper used to) */
}
.section_success_driven.is-crossfade .slides {
	display: grid;
	list-style: none;
	margin: 0;
	padding: 0;
}
/* Both slides occupy the same cell, so the section is as tall as the taller slide and never jumps. */
.section_success_driven.is-crossfade .slides > li {
	grid-area: 1 / 1;
	visibility: hidden;
	pointer-events: none;
}
.section_success_driven.is-crossfade .slides > li.is-active,
.section_success_driven.is-crossfade .slides > li.is-leaving {
	visibility: visible;
}
.section_success_driven.is-crossfade .slides > li.is-active {
	pointer-events: auto;
}

/* Resting (hidden) state of each piece: slightly low, soft-focus, transparent. */
.section_success_driven.is-crossfade [data-cf] {
	opacity: 0;
	filter: blur(6px);
	transform: translate3d(0, 22px, 0);
	transition:
		opacity 450ms var(--ease-in),
		filter 450ms var(--ease-in),
		transform 450ms var(--ease-in);
	transition-delay: calc(var(--i, 0) * 30ms);
}
/* Leaving: drift up while dissolving. */
.section_success_driven.is-crossfade .slides > li.is-leaving [data-cf] {
	transform: translate3d(0, -14px, 0);
	filter: blur(8px);
}
/* Arriving: resolve into focus, one piece after another, after the old slide has mostly gone. */
.section_success_driven.is-crossfade .slides > li.is-active [data-cf] {
	opacity: 1;
	filter: none;
	transform: none;
	transition:
		opacity 900ms var(--ease-out),
		filter 1000ms var(--ease-out),
		transform 1200ms var(--ease-out);
	transition-delay: calc(280ms + var(--i, 0) * 80ms);
}
/* The green circle settles from a little smaller. */
.section_success_driven.is-crossfade .cta-circle[data-cf] {
	transform: translate3d(0, 22px, 0) scale(0.9);
}
.section_success_driven.is-crossfade .slides > li.is-leaving .cta-circle[data-cf] {
	transform: translate3d(0, -14px, 0) scale(0.96);
}
.section_success_driven.is-crossfade .stat-number,
.section_success_driven.is-crossfade .cta-number {
	font-variant-numeric: tabular-nums; /* steady width while counting up */
}

/* Pager: the shared slide pager (.exc-pager, global/components.css). Its position is set above. */
.section_success_driven .slider_control .exc-pager {
	gap: 10px; /* the carousels' .slider_control .pager rule sets 5px */
}
@media (prefers-reduced-motion: reduce) {
	.section_success_driven.is-crossfade [data-cf] {
		filter: none;
		transform: none;
	}
}

/* The divider above the award logos (2nd slide) draws in from the left with the slide and fades
	out with it (a plain border would appear instantly on a slide switch). */
.section_success_driven.is-crossfade .stats_row .awards_winner_logos {
	position: relative;
	border-top-color: transparent;
}
.section_success_driven.is-crossfade .stats_row .awards_winner_logos::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -1px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: 0 50%;
	opacity: 0;
	transition:
		transform 450ms var(--ease-in),
		opacity 450ms var(--ease-in);
}
.section_success_driven.is-crossfade .slides > li.is-active .awards_winner_logos::before {
	transform: none;
	opacity: 1;
	transition:
		transform 1100ms var(--ease-out) 380ms,
		opacity 600ms var(--ease-out) 380ms;
}
