/*
 * Always full-bleed, regardless of any core alignment class — a hero is
 * meant to run edge-to-edge every time it's used, not depend on the user
 * picking "full width" from the block toolbar. Fixed to the viewport height
 * and always bottom-aligned, on every breakpoint.
 *
 * "100vh" is reduced by "--announcement-bar-height" (a custom property set
 * by announcement-bar/view.js from that bar's own actual rendered height,
 * since it wraps to two lines under 768px) so the hero fills exactly the
 * viewport space left below the bar instead of pushing its own bottom edge
 * off-screen by the bar's height. No bar on the page - or already dismissed
 * on load - means the property is never set, and the "0px" fallback here
 * makes this a plain 100vh, same as before that bar existed.
 *
 * The "100dvh" line right after is a progressive enhancement, not a
 * duplicate: mobile Chrome (and Safari) resolve plain "vh" against the
 * *layout* viewport, which is sized as if the address bar / bottom toolbar
 * were always in their smallest, most space-consuming state and then never
 * recalculated as those bars actually hide and show while scrolling - on
 * some devices that stale value is small enough that the hero visibly falls
 * well short of the real, visible screen height (reported: ~50vh instead of
 * the intended full screen). "dvh" is defined to track the *actual* visible
 * viewport instead, which is exactly what "fill the screen" needs here. A
 * browser that doesn't recognize "dvh" treats the whole declaration as
 * invalid and ignores it, leaving the "vh" line above in effect - so this
 * is safe as a plain second declaration, no @supports needed.
 */
.wp-block-andrei-saguna-hero {
	position: relative;
	box-sizing: border-box;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	height: calc(100vh - var(--announcement-bar-height, 0px));
	height: calc(100dvh - var(--announcement-bar-height, 0px));
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-bottom: var(--wp--preset--spacing--8);
	background-color: var(--wp--preset--color--neutral-900);
	color: var(--wp--preset--color--base-white);
}

/*
 * Background image + scrim in one composited layer, matching the design's
 * linear-gradient(scrim, scrim) + image formula. The "Overlay darkness"
 * control in the sidebar drives the scrim's alpha.
 */
.wp-block-andrei-saguna-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: lightgray;
	background-position: 50% center;
	background-size: cover;
	background-repeat: no-repeat;
}

/*
 * Content sits in the same 1360px container as every other section on the
 * site (var(--wp--style--global--content-size)), centered — not an
 * arbitrary fixed width — so the hero's text column lines up with the
 * header/content edges above and below it. Horizontal padding is this
 * block's own (spacing/4), not a shared site-wide gutter setting.
 */
.wp-block-andrei-saguna-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--wp--style--global--content-size);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--4);
}

/* Text column (9/12) + actions column (3/12), bottom-aligned, gap 32px on desktop. */
.wp-block-andrei-saguna-hero__row {
	display: flex;
	align-items: flex-end;
	gap: var(--wp--preset--spacing--8);
	width: 100%;
}

.wp-block-andrei-saguna-hero__text-col {
	flex: 0 0 calc(75% - var(--wp--preset--spacing--8) / 2);
	max-width: calc(75% - var(--wp--preset--spacing--8) / 2);
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--3);
}

.wp-block-andrei-saguna-hero__actions-col {
	flex: 0 0 calc(25% - var(--wp--preset--spacing--8) / 2);
	max-width: calc(25% - var(--wp--preset--spacing--8) / 2);
}

.wp-block-andrei-saguna-hero.is-content-align-center .wp-block-andrei-saguna-hero__text-col {
	text-align: center;
}

.wp-block-andrei-saguna-hero__eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--label-tag);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 1.12px;
	text-transform: uppercase;
}

.wp-block-andrei-saguna-hero__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--ivypresto-headline);
	font-size: var(--wp--preset--font-size--h-1);
	color: var(--wp--preset--color--base-white);
}

.wp-block-andrei-saguna-hero__subheading {
	margin: 0;
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: var(--wp--preset--font-size--body-lead);
	color: var(--wp--preset--color--neutral-100);
}

/* Buttons stack vertically and fill 100% of the actions column's width. */
.wp-block-andrei-saguna-hero__actions-col .wp-block-buttons {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	gap: var(--wp--preset--spacing--3);
}

.wp-block-andrei-saguna-hero__actions-col .wp-block-button {
	width: 100%;
}

.wp-block-andrei-saguna-hero__actions-col .wp-block-button__link {
	width: 100%;
}

@media (max-width: 767px) {
	.wp-block-andrei-saguna-hero {
		padding-bottom: var(--wp--preset--spacing--6);
	}

	/* Below 768px the 75/25 row becomes a single stacked column: text first,
	   then full-width actions underneath. */
	.wp-block-andrei-saguna-hero__row {
		flex-direction: column;
		align-items: stretch;
		gap: var(--wp--preset--spacing--4);
	}

	.wp-block-andrei-saguna-hero__text-col,
	.wp-block-andrei-saguna-hero__actions-col {
		flex: 1 1 100%;
		max-width: 100%;
	}
}
