.hero {
	--hero-min-height: clamp(100dvh, 90dvh + 25vw, 130dvh);
	position: relative;
	min-height: var(--hero-min-height);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: var(--gutter);
	padding-top: clamp(6.5rem, 4.5rem + 5.5vw, 9rem);
	overflow: hidden;
	background: var(--color-bg);
	isolation: isolate;
}

/* Optional hero backdrop (Homepage Content → Hero Media).
   Art-directed rather than a literal full-opacity photograph: the image
   is held at reduced opacity and cut back by a two-axis gradient so it
   reads strongest in the upper right — the one region the composition
   leaves empty — while the bottom (heading, rule, copy, CTA) and the
   left edge stay solid black. The headline therefore stays dominant and
   the black editorial aesthetic survives whatever image is chosen.

   z-index -1 sits it above the section background but below all in-flow
   content; .hero already establishes `isolation: isolate`, so it can
   never escape the hero's own stacking context. */
.hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	pointer-events: none;
}

/* Image and video share one media layer: same fit, same crop bias, same
   opacity, same gradient treatment above. A video background is the same
   composition as the image one, moving. */
.hero__media img,
.hero__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 70% 30%;
	opacity: 0.55;
}

/* The poster is painted by the element itself, so a video that is never
   given a source (mobile, reduced motion, load failure) still fills the
   layer with the poster frame rather than showing through to the page. */
.hero__media video {
	display: block;
	background-color: var(--color-bg);
}

.hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to top,
			var(--color-bg) 6%,
			color-mix(in srgb, var(--color-bg) 62%, transparent) 48%,
			color-mix(in srgb, var(--color-bg) 18%, transparent) 100%
		),
		linear-gradient(
			to right,
			var(--color-bg) 0%,
			color-mix(in srgb, var(--color-bg) 45%, transparent) 42%,
			transparent 78%
		);
}

/* The outlined mark and a chosen image occupy the same corner, so only
   one of them is ever shown. With no image the hero is unchanged. */
.hero--has-media .hero__mark {
	display: none;
}

/* Large faint decorative numeral / mark — gives the hero a designed,
   non-template feel without reproducing any reference artwork. */
.hero__mark {
	position: absolute;
	top: clamp(2rem, -1rem + 8vw, 6rem);
	right: var(--gutter);
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(6rem, 2rem + 16vw, 22rem);
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--color-line);
	z-index: -1;
	user-select: none;
	pointer-events: none;
}

.hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none; /* Direction C: no capitals */
	color: var(--color-fg-dim);
	margin-bottom: var(--space-md);
}

.hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-accent);
}

.hero__heading {
	font-size: var(--size-hero);
	max-width: 22ch;
	font-weight: 800;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.hero__heading em {
	font-style: normal;
	color: var(--color-accent);
}

.hero__rule {
	height: clamp(10px, 4px + 1.2vw, 22px);
	width: clamp(4rem, 2rem + 8vw, 11rem);
	background: var(--color-accent);
	margin-block: var(--space-md);
}

.hero__copy {
	max-width: 42ch;
	font-size: var(--size-body-lg);
	font-weight: 500;
	line-height: 1.4;
	color: var(--color-fg-dim);
	margin-left: auto;
}

.hero__descriptor {
	margin-top: var(--space-md);
	margin-left: auto;
	max-width: 42ch;
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none; /* Direction C: no capitals */
	color: var(--color-fg-faint);
}

/* Higher specificity than .button-pill's own inline-flex so the auto
   margin below can push the button into the same right-aligned column
   as the copy above it — an inline-level box ignores auto margins. */
.hero__body .hero__cta {
	display: flex;
	width: fit-content;
	margin-top: var(--space-lg);
	margin-left: auto;
}

.hero__foot {
	margin-top: var(--space-lg);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
}

.hero__scroll-cue {
	display: flex;
	align-items: center;
	gap: var(--space-2xs);
	font-size: var(--size-label);
	letter-spacing: 0;
	text-transform: none; /* Direction C: no capitals */
	color: var(--color-fg-faint);
}

.hero__scroll-cue-line {
	width: 1px;
	height: 40px;
	background: linear-gradient(var(--color-fg-faint), transparent);
	position: relative;
	overflow: hidden;
}

.hero__scroll-cue-line::after {
	content: "";
	position: absolute;
	top: -100%;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-fg);
	animation: hero-scroll-cue 2.2s var(--ease-out) infinite;
}

@keyframes hero-scroll-cue {
	0% {
		top: -100%;
	}
	60%,
	100% {
		top: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__scroll-cue-line::after {
		animation: none;
		top: 0;
	}
}

@media (max-width: 640px) {
	.hero {
		justify-content: flex-end;
	}

	.hero__copy {
		margin-left: 0;
		max-width: 34ch;
	}

	.hero__descriptor {
		margin-left: 0;
	}

	.hero__body .hero__cta {
		margin-left: 0;
	}

	.hero__foot {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-md);
	}
}

@media (max-width: 640px) {
	/* Portrait viewports put the full text stack over the image's centre,
	   so the backdrop is held back further and biased to the top. */
	.hero__media img,
	.hero__media video {
		opacity: 0.4;
		object-position: 65% 22%;
	}

	.hero__media::after {
		background: linear-gradient(
			to top,
			var(--color-bg) 22%,
			color-mix(in srgb, var(--color-bg) 70%, transparent) 58%,
			color-mix(in srgb, var(--color-bg) 25%, transparent) 100%
		);
	}
}
