.parallax {
	position: relative;
	isolation: isolate;
	display: grid;
	place-items: center;
	min-height: min(78vh, 40rem);
	color: var(--color-white);
	background: var(--color-black);
}

.parallax__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: var(--color-black);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}

.parallax__media--fallback {
	background-image:
		radial-gradient(ellipse at 40% 30%, rgba(48, 96, 44, 0.5), transparent 55%),
		linear-gradient(165deg, #0d0d0d 0%, #1a2e18 50%, #0d0d0d 100%);
	background-attachment: scroll;
}

.parallax__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			180deg,
			rgba(13, 13, 13, 0.62) 0%,
			rgba(13, 13, 13, 0.5) 45%,
			rgba(13, 13, 13, 0.7) 100%
		);
	pointer-events: none;
}

.parallax__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	width: min(100% - 2rem, 36rem);
	padding-block: 5rem;
	text-align: center;
}

.parallax__title {
	margin: -0.18em -0.2em 0;
	padding: 0.18em 0.2em 0.06em;
	overflow: hidden;
	color: var(--color-white);
	font-family: var(--font-script);
	font-size: clamp(3.5rem, 9vw, 7.5rem);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.1;
	text-transform: capitalize;
}

.parallax__text {
	margin: -0.12em 0;
	max-width: 28rem;
	padding-block: 0.12em;
	overflow: hidden;
	color: rgba(255, 255, 255, 0.88);
	font-family: var(--font-body);
	font-size: clamp(1rem, 1.5vw, 1.125rem);
	font-weight: 400;
	line-height: 1.75;
}

.parallax__line {
	display: block;
	opacity: 0;
	translate: 0 -120%;
}

.parallax.is-inview .parallax__line {
	animation: parallax-drop 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.parallax.is-inview .parallax__title .parallax__line {
	animation-delay: 0.08s;
}

.parallax.is-inview .parallax__text .parallax__line {
	animation-delay: 0.42s;
}

@keyframes parallax-drop {
	from {
		opacity: 0;
		translate: 0 -120%;
	}
	to {
		opacity: 1;
		translate: 0 0;
	}
}

/* Mobile / reduced motion: scroll-linked transform instead of fixed bg. */
.parallax--scroll {
	overflow: hidden;
}

.parallax--scroll .parallax__media {
	top: -30%;
	bottom: -30%;
	height: auto;
	background-attachment: scroll;
	will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
	.parallax--scroll .parallax__media,
	.parallax__media {
		top: 0;
		bottom: 0;
		will-change: auto;
		transform: none !important;
		background-attachment: scroll;
	}

	.parallax__line,
	.parallax.is-inview .parallax__line {
		opacity: 1;
		translate: none;
		animation: none;
	}
}

@media (scripting: none) {
	.parallax__line {
		opacity: 1;
		translate: none;
	}
}
