/* ==========================================================================
   Block: Ambient - Hero (Presentation 3)
   ========================================================================== */

/* Reset parent .hero base styles */
.hero.presentation3 {
	--hero-content-offset: 4.125rem;
	--hero-video-max-width: 100%;
	--hero-video-offset-top: 0px;

	align-items: initial;
	block-size: 160vh;
	display: block;
	min-block-size: auto;
	padding-block: 0;
	padding-inline: 0;
	position: relative;
	z-index: 0;
}

.hero.presentation3 .hero__sticky {
	block-size: 100svh;
	inline-size: 100%;
	inset-block-start: 0;
	position: sticky;
}

.hero.presentation3 .hero__video-wrapper {
	block-size: 100%;
	box-sizing: border-box;
	display: flex;
	inline-size: 100%;
	inset: 0;
	justify-content: center;
	padding-block-start: var(--hero-video-offset-top);
	position: absolute;
}

.hero.presentation3 .hero__video-frame {
	block-size: 100%;
	inline-size: 100%;
	max-inline-size: var(--hero-video-max-width);
	overflow: hidden;
	position: relative;
}

.hero.presentation3 .hero__video {
	block-size: 100%;
	inline-size: 100%;
	object-fit: cover;
}

.hero.presentation3 .hero__video-frame::after {
	background-color: rgba(0, 0, 0, 0.17);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.hero.presentation3 .hero__video-placeholder {
	align-items: center;
	background-color: var(--color-dark);
	block-size: 100%;
	color: var(--color-gray);
	display: flex;
	font-size: 1rem;
	inline-size: 100%;
	justify-content: center;
	text-align: center;
}

.hero.presentation3 .hero__content--p3 {
	block-size: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	inline-size: 100%;
	inset-block-end: var(--hero-content-offset);
	inset-inline: 0;
	justify-content: flex-end;
	margin-inline: auto;
	max-inline-size: var(--container-max-width);
	position: absolute;
	z-index: 1;
}

.hero.presentation3 .hero__title {
	color: var(--color-white);
	font-size: 5.9375rem;
	font-weight: var(--fw-bold);
	line-height: 6rem;
	margin: 0;
	margin-block-end: -0.12em;
	overflow-wrap: anywhere;
	text-box-edge: cap alphabetic;
	text-box-trim: both;
	text-transform: uppercase;
}

/* ---- Bottom Spacing Toggle ---- */
.hero.presentation3.hero--bottom-spacing {
	padding-block-end: 7.5rem;
}

@media (max-width: 48rem) {
	.hero.presentation3.hero--bottom-spacing {
		padding-block-end: 5rem;
	}
}

/* ==========================================================================
   Subpage Hero (non-frontpage)
   Sticky banner — next sections scroll over it.
   ========================================================================== */

/* ---- Next sections cover the sticky hero + header ---- */
.hero.presentation3.hero--subpage ~ *,
.hero.presentation3.hero--work-single ~ * {
	position: relative;
	z-index: 11;
}

.hero.presentation3.hero--subpage ~ *:not([class*="--dark"]),
.hero.presentation3.hero--work-single ~ *:not([class*="--dark"]) {
	background-color: var(--color-white);
}

.hero.presentation3.hero--subpage {
	block-size: auto;
	inset-block-start: 0;
	padding-block-start: var(--header-height);
	position: sticky;
}

.hero-sub__sticky {
	position: relative;
}

.hero-sub__banner {
	block-size: 36.875rem;
	margin-inline: auto;
	max-inline-size: var(--container-max-width);
	overflow: hidden;
	position: relative;
}

.hero-sub__content {
	display: flex;
	flex-direction: column;
	inset-block-end: -2.375rem;
	inset-inline-start: 0;
	justify-content: flex-end;
	position: absolute;
	z-index: 2;
}

.hero-sub__title {
	color: var(--color-white);
	font-size: 9.375rem;
	font-weight: var(--fw-bold);
	line-height: 1;
	margin: 0;
	overflow-wrap: anywhere;
	text-transform: uppercase;
}

/* ==========================================================================
   Work Single Hero (is_singular('work'))
   Sticky hero — next sections scroll over it.
   ========================================================================== */

/* Work single: same structure as subpage but full-width + original sizing */
.hero.presentation3.hero--work-single {
	block-size: auto;
	inset-block-start: 0;
	overflow: hidden;
	position: sticky;
}

.hero-sub__banner--media {
	block-size: 100vh;
	margin-inline: 0;
	max-inline-size: none;
}

.hero-sub__media {
	block-size: 100%;
	inline-size: 100%;
	inset: 0;
	object-fit: cover;
	position: absolute;
}

/* Work single: original title sizes */
.hero.presentation3.hero--work-single .hero-sub__title {
	font-size: 7.5rem;
	line-height: 6.25rem;
}

/* Work single: content positioned at bottom, aligned with container */
.hero.presentation3.hero--work-single .hero-sub__content {
	inset-block-end: 3.75rem;
	inset-inline: 0;
	margin-inline: auto;
	max-inline-size: var(--container-max-width);
}

.hero.presentation3.hero--work-single .hero-work__pretitle + .hero-sub__title {
	padding-block-start: 4.125rem;
}

/* ---- Darker overlay for work single ---- */
.hero.presentation3.hero--work-single .hero-sub__banner--media::after {
	background-color: rgba(0, 0, 0, 0.37);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: 1;
}

/* ---- Pretitle inside hero content ---- */
.hero-work__pretitle {
	color: var(--color-white);
	font-size: 2.25rem;
	font-weight: var(--fw-bold);
	line-height: 2.25rem;
	margin: 0;
}

.hero-work__pretitle + .hero__title {
	padding-block-start: 4.125rem;
}

/* Responsive: Mobile */
@media (max-width: 48rem) {
	.hero.presentation3 {
		--hero-content-offset: 1.5625rem;

		block-size: 100svh;
	}

	/* Frontpage hero: no scroll boxing on mobile (matches JS guard). The
	   sticky video is made static so it no longer shows through / overlaps
	   the content below it. Subpage/work-single override block-size + keep
	   their own sticky behaviour via higher specificity. */
	.hero.presentation3 .hero__sticky {
		position: relative;
	}

	.hero.presentation3 .hero__content--p3 {
		padding-block-end: 0;
		padding-inline: 1.25rem;
	}

	.hero.presentation3 .hero__title {
		font-size: 2.8125rem;
		line-height: 2.8125rem;
	}

	.hero.presentation3.hero--subpage {
		margin-block-end: 0;
		padding-block-start: 5.375rem;
	}

	.hero-sub__sticky {
		position: relative;
	}

	.hero-sub__banner {
		block-size: 22.25rem;
		margin-inline: 1.5625rem;
	}

	.hero-sub__content {
		inset-block-end: 0;
	}

	.hero-sub__title {
		font-size: 3rem;
		line-height: 3rem;
	}

	/* ---- Work Single Hero: Mobile ---- */
	.hero.presentation3.hero--work-single {
		position: sticky;
	}

	.hero.presentation3.hero--work-single .hero-sub__banner {
		block-size: 42.6875rem;
		margin-inline: 0;
	}

	.hero.presentation3.hero--work-single .hero-sub__content {
		inset-block-end: 0;
		max-inline-size: none;
		padding-inline: var(--space-md);
	}

	.hero.presentation3.hero--work-single .hero-work__pretitle {
		font-size: 1.5rem;
		line-height: 2.25rem;
	}

	.hero.presentation3.hero--work-single .hero-sub__title {
		font-size: 2.8125rem;
		line-height: 2.8125rem;
	}

	.hero.presentation3.hero--work-single .hero-work__pretitle + .hero-sub__title {
		padding-block-start: 0.9375rem;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.hero.presentation3 {
		block-size: 100svh;
	}

	.hero.presentation3 .hero__sticky {
		position: relative;
	}
}
