/**
 * 121 Platform
 * Homepage Hero
 */

.nd-homepage-hero {
	margin: 0;
	padding-block: var(--wp--custom--section--space-large);
}

.nd-homepage-hero__inner {
	display: grid;
	width: 100%;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding-inline: var(--wp--custom--layout--gutter);
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
	column-gap: var(--wp--preset--spacing--70);
}

/*
 * Gutenberg constrains full-width groups to the editor content width.
 * Give the top-level hero the same working width as the other Platform
 * patterns that use a full-width section.
 */
.is-root-container
	> .block-editor-block-list__block.nd-homepage-hero {
	width: calc(100% - 48px);
	max-width: none;
	margin-inline: auto;
}

.nd-homepage-hero__inner > *,
.nd-homepage-hero__support > *,
.nd-homepage-hero__actions > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.nd-homepage-hero__inner > .nd-eyebrow {
	grid-column: 1 / -1;
	margin-bottom: var(--wp--preset--spacing--50);
}

.nd-homepage-hero__heading {
	grid-column: 1;
	max-width: none;
	margin: 0;
	font-size: var(--wp--preset--font-size--heading-2);
}

.nd-homepage-hero__support {
	grid-column: 2;
	align-self: end;
	min-width: 0;
}

.nd-homepage-hero__summary {
	max-width: var(--wp--custom--layout--copy-measure);
	margin-bottom: var(--wp--preset--spacing--50);
	line-height: 1.6;
}

.nd-homepage-hero__actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--50);
}

/* Image-backed variant */

.nd-homepage-hero--image {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--primary-dark);
	background-position: center 45%;
	background-repeat: no-repeat;
	background-size: cover;
}

.nd-homepage-hero--image::before {
	position: absolute;
	z-index: 0;
	inset: 0;
	content: "";
	background: var(--wp--preset--color--primary-dark);
	opacity: 0.42;
}

.nd-homepage-hero--image .nd-homepage-hero__inner {
	position: relative;
	z-index: 1;
}

.nd-homepage-hero--image .nd-eyebrow,
.nd-homepage-hero--image .nd-homepage-hero__heading,
.nd-homepage-hero--image .nd-homepage-hero__summary,
.nd-homepage-hero--image .nd-text-link,
.nd-homepage-hero--image .nd-text-link a {
	color: var(--wp--preset--color--base);
}

.nd-homepage-hero--image .nd-text-link:hover,
.nd-homepage-hero--image .nd-text-link:hover a {
	color: var(--wp--preset--color--accent);
}

.nd-homepage-hero--image
	.wp-block-button:not(.is-style-outline)
	.wp-block-button__link {
	color: var(--wp--preset--color--primary-dark);
	background-color: var(--wp--preset--color--accent);
}

.nd-homepage-hero--image
	.wp-block-button:not(.is-style-outline)
	.wp-block-button__link:hover {
	color: var(--wp--preset--color--primary-dark);
	background-color: var(--wp--preset--color--base);
}

@media (max-width: 781px) {
	.nd-homepage-hero {
		padding-block: var(--wp--custom--section--space-large);
	}

	.nd-homepage-hero__inner {
		grid-template-columns: 1fr;
		row-gap: 0;
	}

	.nd-homepage-hero__inner > .nd-eyebrow {
		grid-column: 1;
		margin-bottom: var(--wp--preset--spacing--40);
	}

	.nd-homepage-hero__heading {
		grid-column: 1;
		max-width: none;
		margin-bottom: var(--wp--preset--spacing--50);
	}

	.nd-homepage-hero__support {
		grid-column: 1;
	}

	.nd-homepage-hero__actions {
		flex-direction: column;
		align-items: center;
		gap: var(--wp--preset--spacing--40);
	}

	.nd-homepage-hero .nd-text-link {
		transform: translateX(0.6em);
	}
}
