/*
 * hero.css — S1 full-bleed birch-video hero.
 * Lower-left asymmetric content, gradient for legibility, word-by-word reveal,
 * slow ken-burns on the video, subtle scroll cue. All motion reduced-safe.
 */

.hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 100dvh;
	overflow: hidden;
	background: var(--ink); /* fallback before the poster/video paints */
	isolation: isolate;
}

/* ---- Media ---- */
.hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/*
 * The still frame sits underneath and the video plays over it. On phones no
 * video is loaded at all (see hero.js), so this image is the hero; on desktop
 * it is what shows until the video has enough data to paint.
 */
.hero__poster,
.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: heroKenBurns 24s ease-in-out infinite alternate;
	transform-origin: center;
}

@keyframes heroKenBurns {
	from { transform: scale(1.05); }
	to   { transform: scale(1.14); }
}

/* Dark wash — stronger at the bottom + lower-left, where the text sits. */
.hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(180deg, rgba(21, 36, 27, 0.34) 0%, rgba(21, 36, 27, 0.04) 32%, rgba(21, 36, 27, 0.70) 100%),
		linear-gradient(90deg, rgba(21, 36, 27, 0.48) 0%, rgba(21, 36, 27, 0) 62%);
}

/* ---- Content ---- */
.hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	padding-block: var(--s-16) var(--s-24);
	color: #fff;
}

.hero__eyebrow {
	font-family: var(--font-body);
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.92);
	margin: 0 0 var(--s-4);
	opacity: 0;
	animation: heroFade 0.7s var(--ease) 0.05s forwards;
}

.hero__title {
	color: #fff;
	font-size: var(--fs-display);
	line-height: var(--lh-tight);
	letter-spacing: -0.02em;
	max-width: 16ch;
	margin: 0 0 var(--s-6);
}

.hero__word {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.45em);
	animation: heroWord 0.72s var(--ease) forwards;
	animation-delay: calc(var(--i) * 0.09s + 0.18s);
}

.hero__subline {
	font-size: var(--fs-body-lg);
	color: rgba(255, 255, 255, 0.9);
	max-width: 42ch;
	margin: 0 0 var(--s-8);
	opacity: 0;
	animation: heroFade 0.7s var(--ease) 0.75s forwards;
}

.hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-3);
	opacity: 0;
	animation: heroFade 0.7s var(--ease) 0.9s forwards;
}

/* Ghost CTA must read on the dark video. */
.hero .btn--ghost {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.55);
}

.hero .btn--ghost:hover {
	background: #fff;
	color: var(--ink);
	border-color: #fff;
}

/* ---- Scroll cue ---- */
.hero__scroll {
	position: absolute;
	left: 50%;
	bottom: var(--s-6);
	z-index: 2;
	transform: translateX(-50%);
	display: block;
}

.hero__scroll-line {
	display: block;
	width: 1px;
	height: 48px;
	background: rgba(255, 255, 255, 0.6);
	transform-origin: top;
	animation: heroScroll 2.4s var(--ease) infinite;
}

@keyframes heroWord { to { opacity: 1; transform: none; } }
@keyframes heroFade { to { opacity: 1; } }
@keyframes heroScroll {
	0%   { transform: scaleY(0); }
	40%  { transform: scaleY(1); transform-origin: top; }
	60%  { transform: scaleY(1); transform-origin: bottom; }
	100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- Reduced motion: show everything, no video motion ---- */
@media (prefers-reduced-motion: reduce) {
	.hero__poster,
	.hero__video { animation: none; }
	.hero__eyebrow,
	.hero__word,
	.hero__subline,
	.hero__cta { opacity: 1; transform: none; animation: none; }
	.hero__scroll-line { animation: none; }
}
