.le-cta-section {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2.5rem;
	min-height: 56.25rem;
	padding: 2.25rem var(--le-gutter);
	overflow: hidden;
	color: var(--le-200);
	background: var(--le-black);
	isolation: isolate;
}

/* The photo, darkened so text reads over it: an even grey-black wash plus extra shade from the top right. */
.le-cta-section__background {
	position: absolute;
	z-index: -1;
	inset: 0;
}

.le-cta-section__background img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.le-cta-section__background::after {
	position: absolute;
	z-index: 3; /* Over the hover lens's canvas too, so the photo stays shaded. */
	inset: 0;
	background:
		linear-gradient(rgb(67 70 71 / 0.58), rgb(67 70 71 / 0.58)),
		linear-gradient(218.5deg, rgb(0 0 0 / 0.95) 1%, transparent 72%),
		linear-gradient(rgb(0 0 0 / 0.52), rgb(0 0 0 / 0.52));
	content: "";
}

/* The inline copy of the photo belongs to the phone layout. */
.le-cta-section__photo {
	display: none;
}

.le-cta-section__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: min(28.125rem, 100%);
}

.le-cta-section__title {
	max-width: 26.25rem;
	margin-bottom: 2.5rem;
	color: var(--le-100);
}

.le-cta-section__heading {
	margin: 0 0 1.125rem;
	font-family: var(--le-font-sans);
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3125rem;
	letter-spacing: -0.0119rem;
	color: var(--le-100);
	text-box: trim-both cap alphabetic;
}

.le-cta-section__text > :first-child {
	margin-top: 0;
}

.le-cta-section__text > :last-child {
	margin-bottom: 0;
}

.le-cta-section__text p {
	margin: 0 0 0.5rem;
}

.le-cta-section__text ol,
.le-cta-section__text ul {
	margin: 0 0 0.5rem;
	padding-left: 1.5rem;
}

.le-cta-section__text img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-block: 1rem;
}

.le-cta-section__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 1.125rem;
	margin-top: 2rem;
}

.le-cta-section .le-btn--outline {
	color: var(--le-white);
}

.le-cta-section .le-btn--outline:hover,
.le-cta-section .le-btn--outline:focus-visible {
	color: var(--le-black);
}

/*
 * Split: a shorter band with the title across the left half and the text and buttons in the four
 * columns after it, on the page grid.
 */
@media (min-width: 881px) {
	.le-cta-section--split {
		min-height: 32.625rem;
		padding-top: 1.625rem;
	}

	/* The title spans all three rows; the last one takes up its extra height, so the buttons stay right under the text. */
	.le-cta-section--split .le-cta-section__main {
		display: grid;
		grid-template-columns: var(--le-grid-columns);
		grid-template-rows: auto auto 1fr;
		column-gap: var(--le-grid-gap);
		align-items: start;
		width: 100%;
	}

	.le-cta-section--split .le-cta-section__title {
		grid-row: 1 / span 3;
		grid-column: 1 / span 6;
		max-width: 34.925rem;
		margin: 0.625rem 0 0;
	}

	.le-cta-section--split .le-cta-section__copy,
	.le-cta-section--split .le-cta-section__buttons {
		grid-column: 7 / span 4;
	}
}

@media (min-width: 881px) and (max-width: 1023px) {
	.le-cta-section--split .le-cta-section__copy,
	.le-cta-section--split .le-cta-section__buttons {
		grid-column: 7 / -1;
	}
}

/* Card stack ------------------------------------------------------------------
 * Collapsed, the cards sit in a pile: each one behind is a little smaller and peeks out below
 * the one in front. Expanded, they slide down into a column. Every card is positioned from
 * the top of the list, so the change is a single transform per card.
 */

.le-card-stack {
	--card-height: 5.0625rem; /* Measured from the first card by the script. */
	--gap: 0.5rem;
	--shrink: 0.077; /* How much narrower each card behind the first is. */
	--step: 0.96875rem; /* How far each card behind the first shows below the one in front. */

	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	align-items: center;
	gap: 0.75rem;
	width: 19.125rem;
}

.le-card-stack__cards {
	position: relative;
	width: 100%;
	/* Down to the bottom edge of the deepest visible card, which is both lower and smaller than the first. */
	--deepest: min(var(--count) - 1, 2);

	height: calc(var(--deepest) * var(--step) + var(--card-height) * (1 - var(--deepest) * var(--shrink)));
	margin: 0;
	padding: 0;
	list-style: none;
	transform-origin: 50% 0;
	transition: height 0.7s var(--le-ease-out), transform 0.7s var(--le-ease-out);
}

.le-card-stack:has(.le-card-stack__toggle):not(.is-open) .le-card-stack__cards {
	cursor: pointer;
}

/* Hovering the closed pile lifts it a little and fans the cards behind out, inviting a click. */
@media (hover: hover) {
	.le-card-stack:not(.is-open):hover {
		--step: 1.375rem;
	}

	.le-card-stack:not(.is-open):hover .le-card-stack__cards {
		transform: scale(1.03);
	}
}

/* The cards behind show only their edges while the pile is closed, so their contents stay out of sight even when it fans out. */
.le-card-stack__item:not(:first-child) .le-card-stack__card > * {
	transition: opacity 0.4s;
}

.le-card-stack:not(.is-open) .le-card-stack__item:not(:first-child) .le-card-stack__card > * {
	opacity: 0;
	transition-duration: 0.2s;
}

.le-card-stack.is-open .le-card-stack__cards {
	height: calc(var(--card-height) * var(--count) + var(--gap) * (var(--count) - 1));
}

.le-card-stack__item {
	position: absolute;
	z-index: calc(10 - var(--index));
	inset: 0 0 auto;
	/* Depth in the pile: the third card and any after it share the last visible place. */
	--depth: min(var(--index), 2);

	transform: translateY(calc(var(--depth) * var(--step))) scale(calc(1 - var(--depth) * var(--shrink)));
	transform-origin: 50% 0;
	transition: transform 0.7s var(--le-ease-out), opacity 0.4s;
}

.le-card-stack__item:nth-child(n + 4) {
	opacity: 0;
}

.le-card-stack.is-open .le-card-stack__item {
	opacity: 1;
	transform: translateY(calc(var(--index) * (var(--card-height) + var(--gap))));
	transition-delay: calc(var(--index) * 50ms);
}

.le-card-stack__card {
	display: flex;
	align-items: center;
	gap: 0.8125rem;
	padding: 0.875rem;
	border: 0.5px solid rgb(255 255 255 / 0.24);
	border-radius: 0.625rem;
	color: var(--le-100);
	text-decoration: none;
	background: rgb(17 18 18 / 0.66);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	transition: background-color 0.2s;
}

a.le-card-stack__card:hover,
a.le-card-stack__card:focus-visible {
	color: var(--le-100);
	background: rgb(17 18 18 / 0.86);
}

.le-card-stack__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 3.3125rem;
	height: 3.3125rem;
	border-radius: 0.4375rem;
	background: var(--le-black);
}

.le-card-stack__icon img {
	width: 2rem;
}

.le-card-stack__text {
	display: flex;
	flex-direction: column;
	gap: 0.5625rem;
	min-width: 0;
}

.le-card-stack__title {
	font-size: 0.975rem;
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.0098rem;
	text-box: trim-both cap alphabetic;
}

.le-card-stack__detail,
.le-card-stack__toggle {
	font-family: var(--le-font-mono);
	font-size: 0.6275rem;
	font-weight: 500;
	line-height: 1.27;
	letter-spacing: 0.0314rem;
	text-transform: uppercase;
	color: var(--le-300);
}

.le-card-stack__detail {
	text-box: trim-both cap alphabetic;
}

.le-card-stack__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4375rem;
	margin: 0;
	padding: 0.4375rem 0.5625rem;
	border: 0.5px solid rgb(255 255 255 / 0.24);
	border-radius: 2rem;
	background: rgb(17 18 18 / 0.66);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	cursor: pointer;
	transition: background-color 0.2s;
}

.le-card-stack__toggle:hover,
.le-card-stack__toggle:focus {
	color: var(--le-300);
	background: rgb(17 18 18 / 0.86);
}

.le-card-stack__caret {
	width: 0.25rem;
	height: 0.25rem;
	margin-top: -0.1875rem;
	border-bottom: 1px solid currentColor;
	border-left: 1px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.4s var(--le-ease-out), margin 0.4s var(--le-ease-out);
}

.le-card-stack.is-open .le-card-stack__caret {
	margin-top: 0.125rem;
	transform: rotate(135deg);
}

/* Phones: a flat grey panel. The photo moves inline under the title, and the card stack sits centred at the bottom. */
@media (max-width: 880px) {
	.le-cta-section {
		flex-direction: column;
		gap: 3rem;
		min-height: 0;
		padding-block: 1.5rem 1.875rem;
		background: var(--le-600);
	}

	.le-cta-section__background {
		display: none;
	}

	.le-cta-section__main {
		width: 100%;
	}

	.le-cta-section__title {
		max-width: none;
		margin-bottom: 2rem;
	}

	.le-cta-section__photo {
		display: block;
		width: 100%;
		height: 15.5625rem;
		margin-bottom: 2rem;
		overflow: hidden;
	}

	.le-cta-section__photo img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		/* The phone design shows this photo in black and white. */
		filter: grayscale(1);
	}

	/* Full width on a phone, but no wider than the text column on larger screens, centred. */
	.le-card-stack {
		--shrink: 0.112;

		align-self: center;
		width: 100%;
		max-width: 28.125rem;
	}
}

/*
 * Content width (stacked layout): the widget's per-screen limit on the title, text and buttons. On desktop and tablet
 * the content column itself takes that width and the title fills it; on phones, where the photo sits inside the
 * column at full width, the limit goes on the title, text and buttons instead.
 */
@media (min-width: 1024px) {
	.le-cta-section--content-max-desktop .le-cta-section__main {
		width: min(var(--le-cta-content-max-desktop), 100%);
	}

	.le-cta-section--content-max-desktop .le-cta-section__title {
		max-width: 100%;
	}
}

@media (min-width: 881px) and (max-width: 1023px) {
	.le-cta-section--content-max-tablet .le-cta-section__main {
		width: min(var(--le-cta-content-max-tablet), 100%);
	}

	.le-cta-section--content-max-tablet .le-cta-section__title {
		max-width: 100%;
	}
}

@media (max-width: 880px) {
	.le-cta-section--content-max-mobile .le-cta-section__title,
	.le-cta-section--content-max-mobile .le-cta-section__copy,
	.le-cta-section--content-max-mobile .le-cta-section__buttons {
		max-width: var(--le-cta-content-max-mobile);
	}
}

@media (prefers-reduced-motion: reduce) {
	.le-card-stack__cards,
	.le-card-stack__item {
		transition-duration: 0.01s;
		transition-delay: 0s;
	}
}
