/**
 * Front-page hero.
 *
 * One static photo in its natural colour, with no tint or shading layer over
 * it (client request, 2026-10-27). The headline sits directly on the photo;
 * a soft text shadow keeps it legible. With more than one photo the
 * crossfading slideshow in assets/js/hero.js takes over again.
 */

.hero {
	--ph-focus: var(--ph-gold);

	position: relative;
	isolation: isolate;
	display: grid;
	min-height: max(36rem, calc(100vh - var(--wp-admin--admin-bar--height, 0px)));
	min-height: max(36rem, calc(100svh - var(--wp-admin--admin-bar--height, 0px)));
	overflow: clip;
	background: var(--ph-deep);
	color: var(--ph-cream);
}

/* Media and overlay ------------------------------------------------------ */

.hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	isolation: isolate;
}

.hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 62% 40%;
	transform-origin: 62% 40%;
	opacity: 0;
	transition: opacity 1.2s var(--ph-ease-out);
}

/* Phones get the portrait photo (see proharvest_hero_slides()); its two
   runners sit right of centre, so the crop leans right to keep both whole. */
@media (max-width: 47.99rem) {
	.hero__image {
		object-position: 75% 50%;
		transform-origin: 75% 50%;
	}
}

/* The first slide shows without JavaScript; the script moves .is-active. */
.hero__image.is-active {
	opacity: 1;
}

/* The active photo settles very slowly from a slight scale. */
.ph-motion .hero__image {
	scale: 1.03;
	transition:
		opacity 1.2s var(--ph-ease-out),
		scale 7s var(--ph-ease-out);
}

.ph-motion .hero__image.is-active {
	scale: 1;
}

/* Content ---------------------------------------------------------------- */

/* The headline sits low, centred across, so the subject of each photo stays
   clear above it; the bottom padding leaves room for the slide dots. */
.hero__content {
	display: grid;
	align-self: end;
	justify-items: center;
	text-align: center;
	padding-top: calc(var(--ph-header-h) + var(--ph-space-l));
	padding-bottom: calc(var(--ph-space-xl) + var(--ph-space-m));
}

.hero__title {
	display: grid;
	justify-items: center;
	row-gap: var(--ph-space-m);
	margin: 0;
	color: var(--ph-cream);
	font-family: var(--ph-font-heading);
	font-weight: var(--ph-fw-display);
	/* No layer over the photo, so the letters carry their own soft shadow to
	   stay readable over light parts such as sky and pale clothing. */
	text-shadow:
		0 1px 2px rgb(0 0 0 / 0.55),
		0 2px 12px rgb(0 0 0 / 0.45),
		0 4px 36px rgb(0 0 0 / 0.35);
}

/* The statement carries the weight. It is a full sentence, so it is set
   below the display size; the height cap keeps it inside short screens. */
.hero__statement {
	display: block;
	max-width: 21ch;
	font-size: clamp(2.25rem, min(1rem + 3.6vw, 8svh), 4.5rem);
	letter-spacing: var(--ph-tracking-display);
	line-height: 1.04;
	text-wrap: balance;
}

.hero__nowrap {
	white-space: nowrap;
}

/* The reach answers it quietly: a short gold hairline in place of the dash,
   then one calm line at a reading size. */
.hero__reach {
	display: block;
	max-width: 40ch;
	color: rgb(var(--ph-cream-rgb) / 0.88);
	font-size: clamp(1.125rem, 0.95rem + 0.55vw, 1.5rem);
	letter-spacing: -0.005em;
	line-height: 1.35;
	text-wrap: balance;
}

.hero__reach::before {
	content: "";
	display: block;
	width: var(--ph-space-xl);
	height: 1px;
	margin: 0 auto var(--ph-space-m);
	background: var(--ph-gold);
	transform-origin: left center;
}

.ph-motion .hero__statement {
	animation: ph-line-rise 1.1s var(--ph-ease-out) 0.3s backwards;
}

.ph-motion .hero__reach {
	animation: ph-line-rise 1.1s var(--ph-ease-out) 0.75s backwards;
}

.ph-motion .hero__reach::before {
	animation: ph-hairline-draw 1.2s var(--ph-ease-soft) 0.9s backwards;
}

/* Slide dots: small, calm, centred under the headline ------------------ */

.hero__dots {
	position: absolute;
	inset-inline: 0;
	bottom: var(--ph-space-s);
	display: flex;
	justify-content: center;
}

.hero__dots[hidden] {
	display: none;
}

.hero__dot {
	display: grid;
	place-items: center;
	width: var(--ph-space-m);
	height: var(--ph-space-m);
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.hero__dot::before {
	content: "";
	width: var(--ph-space-2xs);
	height: var(--ph-space-2xs);
	border-radius: var(--ph-radius-pill);
	background: var(--ph-cream);
	opacity: 0.4;
	transition: opacity var(--ph-dur-slow) var(--ph-ease-out);
}

.hero__dot:hover::before {
	opacity: 0.7;
}

.hero__dot[aria-current="true"]::before {
	opacity: 1;
}

.hero__dot:focus-visible {
	outline: 1px solid var(--ph-cream);
	outline-offset: 0;
	border-radius: var(--ph-radius-pill);
}

@media (prefers-reduced-motion: reduce) {
	.hero__image {
		transition: none;
	}
}

/* Motion ------------------------------------------------------------------ */

@keyframes ph-line-rise {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		transform: none;
	}
}

@keyframes ph-hairline-draw {
	from {
		transform: scaleX(0);
	}
}
