/**
 * Hero Slider: full-bleed photo slides, crossfade with a slow push-in,
 * numbered vertical navigation on the end side, social links at the foot.
 */

.wt-hero {
	--wt-hero-h: 92vh;
	--wt-hero-shade: var(--wt-navy-dark);
	--wt-hero-shade-strength: 72%;
	position: relative;
	height: max(var(--wt-hero-h), 600px);
	min-height: 600px;
	max-height: 1040px;
	overflow: hidden;
	isolation: isolate;
	background: var(--wt-navy-dark);
	color: var(--wt-white);
}

.wt-hero__slides {
	position: absolute;
	inset: 0;
}

.wt-hero__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1100ms ease, visibility 0s linear 1100ms;
}

.wt-hero__slide.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
	transition: opacity 1100ms ease, visibility 0s;
}

.wt-hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.wt-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, color-mix(in srgb, var(--wt-hero-shade) var(--wt-hero-shade-strength), transparent) 0%, color-mix(in srgb, var(--wt-hero-shade) calc(var(--wt-hero-shade-strength) * 0.55), transparent) 48%, color-mix(in srgb, var(--wt-hero-shade) 12%, transparent) 100%),
		linear-gradient(0deg, color-mix(in srgb, var(--wt-hero-shade) 70%, transparent) 0%, transparent 34%),
		linear-gradient(180deg, color-mix(in srgb, var(--wt-hero-shade) 55%, transparent) 0%, transparent 26%);
}

.wt-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
	.wt-hero__img {
		transform: scale(1.08);
		transition: transform 9s cubic-bezier(0.25, 0.1, 0.25, 1);
	}

	.wt-hero__slide.is-active .wt-hero__img {
		transform: scale(1);
	}

	.wt-hero__content > * {
		opacity: 0;
		transform: translateY(22px);
		transition: opacity 700ms ease, transform 900ms var(--wt-ease);
	}

	.wt-hero__slide.is-active .wt-hero__content > * {
		opacity: 1;
		transform: none;
	}

	.wt-hero__slide.is-active .wt-hero__content > :nth-child(2) {
		transition-delay: 140ms;
	}

	.wt-hero__slide.is-active .wt-hero__content > :nth-child(3) {
		transition-delay: 260ms;
	}
}

.wt-hero__content {
	width: 100%;
	max-width: calc(var(--wt-wrap) + var(--wt-gutter) * 2);
	margin-inline: auto;
	padding: 150px calc(var(--wt-gutter) + 120px) 110px var(--wt-gutter);
}

.wt-hero__title {
	max-width: 18ch;
	margin: 0;
	color: var(--wt-white);
	font-size: clamp(2.25rem, 1.3rem + 3.4vw, 4rem);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: 0;
	text-transform: uppercase;
}

.wt-hero__text {
	max-width: 54ch;
	margin: 22px 0 0;
	color: rgba(255, 255, 255, 0.88);
	font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.6;
}

.wt-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 34px;
}

/* Numbered navigation: a line grows beside the active number. */
.wt-hero__nav {
	position: absolute;
	top: 50%;
	right: max(var(--wt-gutter), calc((100% - var(--wt-wrap)) / 2));
	z-index: 3;
	display: grid;
	gap: 18px;
	transform: translateY(-30%);
}

.wt-hero__dot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	min-height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.55);
	font-size: 1.125rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: color 200ms ease;
}

.wt-hero__dot-line {
	display: block;
	width: 0;
	height: 1.5px;
	background: currentColor;
	transition: width 420ms var(--wt-ease);
}

.wt-hero__dot:hover {
	color: var(--wt-white);
}

.wt-hero__dot.is-active {
	color: var(--wt-white);
}

.wt-hero__dot.is-active .wt-hero__dot-line {
	width: 48px;
	background: var(--wt-yellow);
}

.wt-hero__progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	height: 3px;
	background: rgba(255, 255, 255, 0.12);
}

.wt-hero__progress span {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--wt-yellow);
	transform: scaleX(0);
	transform-origin: left;
}

.wt-hero.is-playing .wt-hero__progress span {
	animation: wt-hero-progress var(--wt-hero-delay, 7000ms) linear forwards;
}

.wt-hero.is-paused .wt-hero__progress span {
	animation-play-state: paused;
}

@keyframes wt-hero-progress {
	to {
		transform: scaleX(1);
	}
}

.wt-hero__social {
	position: absolute;
	bottom: 44px;
	left: max(var(--wt-gutter), calc((100% - var(--wt-wrap)) / 2));
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	list-style: none;
}

.wt-hero__social a {
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-decoration: none;
	text-transform: uppercase;
}

.wt-hero__social a:hover {
	color: var(--wt-yellow);
}

@media (max-width: 900px) {
	.wt-hero__content {
		padding-right: var(--wt-gutter);
		padding-bottom: 130px;
	}

	.wt-hero__nav {
		top: auto;
		right: auto;
		bottom: 40px;
		left: var(--wt-gutter);
		display: flex;
		gap: 16px;
		transform: none;
	}

	.wt-hero__dot {
		font-size: 1rem;
	}

	.wt-hero__dot.is-active .wt-hero__dot-line {
		width: 28px;
	}

	.wt-hero__social {
		display: none;
	}
}

@media (max-width: 600px) {
	.wt-hero {
		height: max(var(--wt-hero-h), 640px);
	}

	.wt-hero__content {
		padding-top: 140px;
	}
}
