/**
 * Hero Image — outline from DS 0.2.4 (draft).
 *
 * Structure: section.ya-hero-image → Cover.__media
 * → image + ::after overlay (10% scrim + 80% radial) + inner H1.
 */

.ya-hero-image {
	--ya-hero-image-container-max: 1920px;
	--ya-hero-image-content-max: var(--wp--style--global--wide-size, 1440px);
	--ya-hero-image-padding-inline: var(--wp--custom--spacing--padding-inline, clamp(1rem, -1.486rem + 8.304vi, 2.5rem));
	--ya-hero-image-padding-block: var(--wp--custom--spacing--padding-block, clamp(3rem, 1.004rem + 4.163vi, 6rem));
	--ya-hero-image-height: 370px;
	--ya-hero-image-radius: 16px;
	--ya-hero-image-background: var(--wp--custom--color--background-base);
	--ya-hero-image-text: var(--wp--custom--color--text-inverse);
	--ya-hero-image-overlay: rgb(0 0 0 / 80%);
	--ya-hero-image-scrim: rgb(0 0 0 / 10%);
	--ya-hero-image-text-shadow: 0 0 50px rgb(255 255 255 / 25%);

	box-sizing: border-box;
	width: 100%;
	margin-block: 0;
	margin-block-start: var(--wp--custom--header--height);
	padding: 0 var(--ya-hero-image-padding-inline);
	overflow: hidden;
	background: var(--ya-hero-image-background);
}

.ya-hero-image,
.ya-hero-image * {
	box-sizing: border-box;
}

.ya-hero-image__media.wp-block-cover {
	position: relative;
	isolation: isolate;
	width: 100%;
	max-width: var(--ya-hero-image-container-max);
	min-height: var(--ya-hero-image-height) !important;
	height: var(--ya-hero-image-height);
	margin-inline: auto;
	padding: 0;
	overflow: hidden;
	border-radius: var(--ya-hero-image-radius);
	background: var(--ya-hero-image-background);
}

.ya-hero-image__media .wp-block-cover__image-background,
.ya-hero-image__media .wp-block-cover__video-background {
	object-fit: cover;
	object-position: center;
	border-radius: inherit;
}

/* Cover dim stays off; toning lives on ::after. */
.ya-hero-image__media .wp-block-cover__background {
	display: none;
}

.ya-hero-image__media::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	background:
		radial-gradient(ellipse at center, var(--ya-hero-image-overlay) 0%, transparent 100%),
		linear-gradient(var(--ya-hero-image-scrim), var(--ya-hero-image-scrim));
	pointer-events: none;
}

.ya-hero-image__media .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: var(--ya-hero-image-content-max);
	margin-inline: auto;
	padding: var(--ya-hero-image-padding-block) var(--ya-hero-image-padding-inline);
}

.ya-hero-image__media .wp-block-cover__inner-container > *,
.ya-hero-image__title {
	max-width: none;
}

.ya-hero-image__title {
	margin: 0;
	overflow-wrap: anywhere;
	color: var(--ya-hero-image-text);
	text-align: center;
	text-shadow: var(--ya-hero-image-text-shadow);
}

@media (min-width: 768px) {
	.ya-hero-image {
		--ya-hero-image-height: 500px;
	}
}

@media (min-width: 1280px) {
	.ya-hero-image {
		--ya-hero-image-height: 600px;
	}
}
