.hero {
	overflow: clip;
}

.hero .section__inner {
	container-type: inline-size;
	position: relative;
}

.hero__layout {
	display: grid;
	gap: clamp(2rem, 5vw, 5rem);
	position: relative;
	z-index: 2;
}

.hero__content {
	display: grid;
	gap: 1.5rem;
	max-inline-size: 48rem;
	position: relative;
	z-index: 2;
}

.hero__body {
	color: var(--text-body);
	margin-block: 0;
	max-inline-size: 42rem;
}

.hero__body > * {
	margin-block: 0 1em;
}

.hero__body > :last-child {
	margin-block-end: 0;
}

.hero__editor-placeholder {
	color: var(--text-muted);
	font-style: italic;
	margin: 0;
}

.hero__media {
	min-inline-size: 0;
}

.hero__media-placeholder,
.hero__background-placeholder {
	align-items: center;
	aspect-ratio: var(--ratio-landscape);
	background: color-mix(in srgb, var(--section-background), var(--text-body) 10%);
	border: 2px dashed var(--border-color);
	border-radius: var(--radius-large);
	color: var(--text-muted);
	display: flex;
	justify-content: center;
	padding: 2rem;
	text-align: center;
}

/* -------------------------------------------------------------------------- */
/* Overlay                                                                    */
/* -------------------------------------------------------------------------- */

.hero[data-layout="overlay"] {
	/* Darker scrim so white / accent copy stays nearer AA on bright photos. */
	--hero-overlay: linear-gradient(
		to top,
		color-mix(in srgb, var(--color-dark) 78%, transparent) 0%,
		color-mix(in srgb, var(--color-dark) 58%, transparent) 45%,
		color-mix(in srgb, var(--color-dark) 62%, transparent) 100%
	);
	--hero-stage-radius: 0;
	--hero-stage-pad: clamp(2rem, 5vw, 5rem);
	--hero-min-size: min(53.125rem, 85vh);

	isolation: isolate;
}

.hero[data-layout="overlay"][data-frame="full"] {
	padding-block: 0;
}

/* Full overlay must ignore section gutters so the image reaches the viewport edges. */
.hero[data-layout="overlay"][data-frame="full"] .section__inner {
	box-sizing: border-box;
	max-inline-size: none;
	padding-inline: 0;
}

.hero[data-layout="overlay"] .hero__stage {
	isolation: isolate;
	min-block-size: var(--hero-min-size);
	overflow: clip;
	position: relative;
}

.hero[data-layout="overlay"][data-frame="framed"] .hero__stage {
	border-radius: var(--hero-stage-radius);
	min-block-size: min(58.125rem, 90vh);
}

.hero[data-layout="overlay"] .hero__background,
.hero[data-layout="overlay"] .hero__background-placeholder {
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.hero[data-layout="overlay"] .hero__background .media {
	aspect-ratio: auto;
	block-size: 100%;
	border-radius: 0;
	inline-size: 100%;
}

.hero[data-layout="overlay"] .hero__background .media img {
	block-size: 100%;
	inline-size: 100%;
	object-fit: cover;
}

.hero[data-layout="overlay"] .hero__background::after {
	background: var(--hero-overlay);
	content: "";
	inset: 0;
	position: absolute;
}

.hero[data-layout="overlay"] .hero__background-placeholder {
	aspect-ratio: auto;
	block-size: 100%;
	border-radius: inherit;
	inline-size: 100%;
}

.hero[data-layout="overlay"] .hero__layout {
	align-items: flex-end;
	box-sizing: border-box;
	display: flex;
	gap: 0;
	justify-content: flex-start;
	min-block-size: var(--hero-min-size);
	padding: var(--hero-stage-pad);
}

.hero[data-layout="overlay"][data-frame="framed"] .hero__layout {
	min-block-size: min(58.125rem, 90vh);
	padding: clamp(2rem, 4vw, 3.75rem);
}

.hero[data-layout="overlay"][data-content-align="center"] .hero__layout {
	justify-content: center;
}

.hero[data-layout="overlay"][data-content-align="right"] .hero__layout {
	justify-content: flex-end;
}

.hero[data-layout="overlay"][data-content-valign="top"] .hero__layout {
	align-items: flex-start;
}

.hero[data-layout="overlay"][data-content-valign="center"] .hero__layout {
	align-items: center;
}

.hero[data-layout="overlay"][data-content-valign="bottom"] .hero__layout {
	align-items: flex-end;
}

.hero[data-layout="overlay"] .hero__content {
	--text-heading: var(--color-white);
	--text-body: var(--color-white);
	--text-muted: var(--color-white);
	--text-accent: var(--color-white);
	--link-color: var(--color-white);
	--link-hover-color: var(--color-white);
	--button-auto-fill: var(--color-white);
	--button-auto-text: var(--color-dark);
	--button-auto-hover: color-mix(in srgb, black 10%, var(--color-white));
	--button-auto-plain: var(--color-white);

	color: var(--color-white);
	max-inline-size: min(44.5rem, 100%);
}

.hero[data-layout="overlay"] .hero__body {
	color: var(--color-white);
	max-inline-size: min(42rem, 100%);
}

.hero[data-layout="overlay"][data-content-align="center"] .hero__content {
	justify-items: center;
	text-align: center;
}

.hero[data-layout="overlay"][data-content-align="center"] .hero__body {
	margin-inline: auto;
}

.hero[data-layout="overlay"][data-content-align="center"] .hero__actions {
	justify-content: center;
}

.hero[data-layout="overlay"][data-content-align="right"] .hero__content {
	justify-items: end;
	text-align: right;
}

.hero[data-layout="overlay"][data-content-align="right"] .hero__body {
	margin-inline-start: auto;
}

.hero[data-layout="overlay"][data-content-align="right"] .hero__actions {
	justify-content: flex-end;
}

/* -------------------------------------------------------------------------- */
/* Stacked                                                                    */
/* -------------------------------------------------------------------------- */

.hero[data-layout="stacked"] {
	--hero-stage-radius: 0;
}

.hero[data-layout="stacked"] .hero__layout {
	gap: clamp(2.5rem, 5vw, 5rem);
	justify-items: center;
}

.hero[data-layout="stacked"] .hero__content {
	justify-items: center;
	margin-inline: auto;
	max-inline-size: min(71rem, 100%);
	text-align: center;
}

.hero[data-layout="stacked"] .hero__heading {
	color: var(--text-heading);
}

.hero[data-layout="stacked"] .hero__body {
	margin-inline: auto;
	max-inline-size: 42rem;
}

.hero[data-layout="stacked"] .hero__actions {
	justify-content: center;
}

.hero[data-layout="stacked"] .hero__media {
	inline-size: 100%;
	max-inline-size: var(--width-content-wide);
}

.hero[data-layout="stacked"] .hero__media .media,
.hero[data-layout="stacked"] .hero__media-placeholder {
	border-radius: var(--hero-stage-radius, 0);
}

.hero[data-layout="stacked"] .hero__media .media img {
	border-radius: inherit;
}

/* -------------------------------------------------------------------------- */
/* Animated heading                                                           */
/* -------------------------------------------------------------------------- */

.hero[data-layout="animated-heading"] {
	--hero-animated-word: #ffc72c;
	--hero-stage-radius: 0;
}

.hero[data-layout="animated-heading"] .hero__layout {
	gap: clamp(2.5rem, 4vw, 3.75rem);
	justify-items: center;
}

.hero[data-layout="animated-heading"] .hero__heading {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: clamp(2.75rem, 9.5vw, 9.0625rem);
	line-height: 1.1;
	max-inline-size: 100%;
	text-align: center;
}

.hero[data-layout="animated-heading"] .hero__heading-static {
	color: var(--text-heading);
	display: block;
}

.hero[data-layout="animated-heading"] .hero__heading-words {
	display: grid;
	inline-size: 100%;
	justify-items: center;
	min-block-size: 1.1em;
}

.hero[data-layout="animated-heading"] .hero__heading-word {
	color: var(--hero-animated-word);
	grid-area: 1 / 1;
	opacity: 0;
	overflow-wrap: anywhere;
	text-align: center;
	transform: scale(0.72);
	transform-origin: center;
	visibility: hidden;
}

.hero[data-layout="animated-heading"] .hero__heading-word.is-active {
	animation: hero-word-cycle 2.8s var(--motion-ease, cubic-bezier(0.2, 0, 0, 1)) forwards;
	visibility: visible;
}

.hero[data-layout="animated-heading"] .hero__heading-word.is-visible {
	opacity: 1;
	transform: scale(1);
	visibility: visible;
}

.hero[data-layout="animated-heading"] .hero__heading-words--placeholder .hero__heading-word {
	color: var(--text-muted);
	font-style: italic;
	opacity: 1;
	transform: none;
	visibility: visible;
}

@keyframes hero-word-cycle {
	0% {
		opacity: 0;
		transform: scale(0.72);
	}
	18% {
		opacity: 1;
		transform: scale(1);
	}
	72% {
		opacity: 1;
		transform: scale(1);
	}
	100% {
		opacity: 0;
		transform: scale(1.12);
	}
}

.hero[data-layout="animated-heading"] .hero__media {
	inline-size: 100%;
}

.hero[data-layout="animated-heading"] .hero__media .media,
.hero[data-layout="animated-heading"] .hero__media-placeholder {
	border-radius: var(--hero-stage-radius, 0);
}

.hero[data-layout="animated-heading"] .hero__media .media img,
.hero[data-layout="animated-heading"] .hero__media .media--video {
	border-radius: inherit;
}

.hero[data-layout="animated-heading"] .hero__media .media--video {
	inline-size: 100%;
	object-fit: cover;
}

.hero[data-layout="animated-heading"] .hero__content {
	display: grid;
	gap: clamp(1.5rem, 3vw, 2.5625rem);
	justify-items: center;
	margin-inline: auto;
	max-inline-size: min(65.5625rem, 100%);
	text-align: center;
}

.hero[data-layout="animated-heading"] .hero__body {
	margin-inline: auto;
	max-inline-size: min(65.5625rem, 100%);
}

.hero[data-layout="animated-heading"] .hero__actions {
	justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
	.hero[data-layout="animated-heading"] .hero__heading-word.is-active {
		animation: none;
		opacity: 1;
		transform: scale(1);
	}
}

/* -------------------------------------------------------------------------- */
/* Show the WAY                                                               */
/* -------------------------------------------------------------------------- */

.hero[data-layout="show-the-way"] {
	--hero-stage-pad: clamp(1.5rem, 4vw, 3.75rem);
	--hero-min-size: min(53.125rem, 85vh);
	--hero-card-pad: 1.875rem;
	--hero-card-gap: 1.875rem;
	--hero-meta-gap: 1.875rem;
	--hero-card-ink: var(--color-dark);

	isolation: isolate;
}

.hero[data-layout="show-the-way"] .section__inner {
	max-inline-size: 1500px;
}

.hero[data-layout="show-the-way"] .hero__stage {
	isolation: isolate;
	min-block-size: var(--hero-min-size);
	overflow: clip;
	position: relative;
}

.hero[data-layout="show-the-way"] .hero__background,
.hero[data-layout="show-the-way"] .hero__background-placeholder {
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.hero[data-layout="show-the-way"] .hero__background .media,
.hero[data-layout="show-the-way"] .hero__background .media--video {
	aspect-ratio: auto;
	block-size: 100%;
	border-radius: 0;
	inline-size: 100%;
	object-fit: cover;
}

.hero[data-layout="show-the-way"] .hero__background .media img {
	block-size: 100%;
	inline-size: 100%;
	object-fit: cover;
}

.hero[data-layout="show-the-way"] .hero__background-placeholder {
	aspect-ratio: auto;
	block-size: 100%;
	border-radius: 0;
	inline-size: 100%;
}

.hero[data-layout="show-the-way"] .hero__layout {
	align-items: flex-end;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	min-block-size: var(--hero-min-size);
	padding: var(--hero-stage-pad);
	position: relative;
	z-index: 2;
}

.hero[data-layout="show-the-way"] .hero__card {
	--button-auto-fill: var(--color-dark);
	--button-auto-text: var(--color-white);
	--button-auto-hover: color-mix(in srgb, white 10%, var(--color-dark));
	--button-auto-plain: var(--color-dark);

	align-items: center;
	background: var(--color-white);
	color: var(--hero-card-ink);
	display: flex;
	flex-wrap: wrap;
	gap: var(--hero-card-gap);
	inline-size: min(53.125rem, 100%);
	justify-content: space-between;
	padding: var(--hero-card-pad);
}

.hero[data-layout="show-the-way"] .hero__card-copy {
	display: grid;
	flex: 1 1 16rem;
	gap: 0.625rem;
	min-inline-size: 0;
}

.hero[data-layout="show-the-way"] .hero__heading {
	color: inherit;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0;
	text-transform: uppercase;
}

.hero[data-layout="show-the-way"] .hero__heading.heading {
	color: inherit;
	letter-spacing: 0;
}

.hero[data-layout="show-the-way"] .hero__heading[data-type-size="xs"] {
	font-size: 1.25rem;
}

.hero[data-layout="show-the-way"] .hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem var(--hero-meta-gap);
	margin: 0;
	padding-block: 0.625rem;
}

.hero[data-layout="show-the-way"] .hero__meta-item {
	display: grid;
	gap: 0.625rem;
	min-inline-size: 0;
}

.hero[data-layout="show-the-way"] .hero__meta-label {
	color: inherit;
	font-family: var(--font-family-heading);
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1;
	margin: 0;
	text-transform: uppercase;
}

.hero[data-layout="show-the-way"] .hero__meta-value {
	color: inherit;
	font-family: var(--font-family-body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.4;
	margin: 0;
}

.hero[data-layout="show-the-way"] .hero__card-action {
	flex: 0 0 auto;
}

.hero[data-layout="show-the-way"] .hero__card-action .button {
	white-space: nowrap;
}

@media (max-width: 39.99rem) {
	.hero[data-layout="show-the-way"] .hero__card {
		align-items: stretch;
		flex-direction: column;
	}

	.hero[data-layout="show-the-way"] .hero__card-action .button {
		inline-size: 100%;
		justify-content: center;
	}
}

@media (min-width: 48rem) and (max-width: 63.99rem) {
	.hero[data-layout="show-the-way"] {
		--hero-min-size: min(42rem, 70vh);
	}
}
