/* ==========================================================================
   Homepage only: hero, before/after, stats
   ========================================================================== */

/* ---------- Hero ---------- */

.home-page .hero {
	position: relative;
	overflow: hidden;
	color: var(--color-white);
	background: var(--color-navy);
}

.home-page .hero__slides {
	display: grid;
}

.home-page .hero__slide {
	position: relative;
	display: flex;
	align-items: center;
	grid-area: 1 / 1;
	min-height: clamp(520px, calc(88svh - 112px), 820px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .9s var(--ease);
	isolation: isolate;
}

.home-page .hero__slide.is-active {
	z-index: 1;
	opacity: 1;
	pointer-events: auto;
}

.home-page .hero__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Slider only: each incoming slide's photo settles from a slight zoom while it
 * is shown, and its text rises in after the crossfade. The slide that is active
 * on load is already in its final state (no transition runs on first paint).
 */
.home-page .hero--slider .hero__img {
	transform: scale(1.06);
	transition: transform 7s linear;
}

.home-page .hero--slider .hero__slide.is-active .hero__img {
	transform: none;
}

.home-page .hero--slider .hero__content > * {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}

.home-page .hero--slider .hero__slide.is-active .hero__content > * {
	opacity: 1;
	transform: none;
}

.home-page .hero--slider .hero__slide.is-active .hero__content > :nth-child(2) {
	transition-delay: .07s;
}

.home-page .hero--slider .hero__slide.is-active .hero__content > :nth-child(3) {
	transition-delay: .14s;
}

.home-page .hero--slider .hero__slide.is-active .hero__content > :nth-child(4) {
	transition-delay: .21s;
}

.home-page .hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(9, 16, 34, .35) 0%, rgba(9, 16, 34, .55) 55%, rgba(9, 16, 34, .88) 100%);
}

.home-page .hero__content {
	padding-block: clamp(72px, 10vw, 120px) clamp(110px, 12vw, 150px);
}

.home-page .hero__content > * {
	max-width: 680px;
}

.home-page .hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	color: var(--color-steel);
	font-size: 1.0625rem;
	font-weight: 700;
}

.home-page .hero__eyebrow::before {
	content: "";
	width: 32px;
	height: 4px;
	border-radius: 2px;
	background: var(--color-red);
}

.home-page .hero__title {
	margin: 0;
	color: var(--color-white);
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 800;
	line-height: 1.18;
}

.home-page .hero__subtitle {
	margin: 18px 0 0;
	color: #dbe4eb;
	font-size: clamp(17px, 1.5vw, 20px);
}

.home-page .hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-block-start: 30px;
}

.home-page .hero__controls {
	position: absolute;
	inset-block-end: clamp(24px, 4vw, 40px);
	inset-inline: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 14px;
}

.home-page .hero__arrow {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: 50%;
	color: var(--color-white);
	background: rgba(255, 255, 255, .08);
	cursor: pointer;
	transition: background-color .2s var(--ease), color .2s var(--ease), transform .16s var(--ease-out);
}

.home-page .hero__arrow:hover {
	color: var(--color-navy);
	background: var(--color-white);
}

.home-page .hero__arrow:active,
.home-page .ba-slider__arrow:active {
	transform: scale(.94);
}

.home-page .hero__dots {
	display: flex;
	align-items: center;
	gap: 4px;
}

.home-page .hero__dot {
	position: relative;
	width: 28px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.home-page .hero__dot::before {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	width: 10px;
	height: 10px;
	margin-block-start: -5px;
	margin-inline-start: -5px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .45);
	transition: background-color .2s var(--ease), width .2s var(--ease), margin .2s var(--ease);
}

.home-page .hero__dot.is-active::before {
	width: 24px;
	margin-inline-start: -12px;
	background: var(--color-red);
}

/* ---------- Before / after ---------- */

.home-page .ba-slider {
	position: relative;
	max-width: 960px;
	margin-inline: auto;
}

/*
 * overflow-y must be hidden explicitly: with overflow-x auto it computes to auto,
 * a 1px rounding overflow made the track vertically scrollable, and mouse-wheel
 * scrolling of the page stopped whenever the pointer was over the slider.
 */
.home-page .ba-slider__track {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--radius);
}

.home-page .ba-slider__track::-webkit-scrollbar {
	display: none;
}

.home-page .ba-slider__track:focus-visible {
	outline: 3px solid var(--color-red);
	outline-offset: 4px;
}

.home-page .ba-slider__track > .ba {
	flex: 0 0 100%;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

@media (prefers-reduced-motion: reduce) {
	.home-page .ba-slider__track {
		scroll-behavior: auto;
	}
}

.home-page .ba-slider__arrow {
	position: absolute;
	inset-block-start: calc(50% - 28px);
	z-index: 4;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--color-navy);
	background: var(--color-white);
	box-shadow: var(--shadow);
	cursor: pointer;
	transition: background .2s, color .2s, transform .2s;
}

.home-page .ba-slider__arrow:hover,
.home-page .ba-slider__arrow:focus-visible {
	color: var(--color-white);
	background: var(--color-red);
	transform: scale(1.05);
}

.home-page .ba-slider__arrow:focus-visible {
	outline: 3px solid var(--color-navy);
	outline-offset: 2px;
}

.home-page .ba-slider__arrow[disabled] {
	opacity: .35;
	cursor: default;
	transform: none;
}

/* Arrows point in reading direction: "prev" sits at the inline start. */
.home-page .ba-slider__arrow--prev {
	inset-inline-start: 12px;
}

.home-page .ba-slider__arrow--next {
	inset-inline-end: 12px;
}

[dir="rtl"] .home-page .ba-slider__arrow svg {
	transform: scaleX(-1);
}

.home-page .ba-slider__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-block-start: 18px;
}

.home-page .ba-slider__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--color-steel);
	cursor: pointer;
	transition: width .25s, background .25s;
}

.home-page .ba-slider__dot.is-active {
	width: 32px;
	background: var(--color-red);
}

.home-page .ba-slider__dot:focus-visible {
	outline: 3px solid var(--color-red);
	outline-offset: 3px;
}

.home-page .ba-slider__count {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-start: 50%;
	z-index: 2;
	padding: 4px 14px;
	border-radius: 999px;
	color: var(--color-white);
	background: rgba(9, 16, 34, .72);
	font-size: .8125rem;
	font-weight: 700;
	transform: translateX(-50%);
	pointer-events: none;
}

[dir="rtl"] .home-page .ba-slider__count {
	transform: translateX(50%);
}

@media (max-width: 599px) {
	.home-page .ba-slider__arrow {
		width: 40px;
		height: 40px;
		inset-block-start: calc(50% - 24px);
	}

	.home-page .ba-slider__arrow--prev {
		inset-inline-start: 6px;
	}

	.home-page .ba-slider__arrow--next {
		inset-inline-end: 6px;
	}
}

.home-page .ba {
	margin: 0;
}

.home-page .ba__frame {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--color-steel-soft);
	box-shadow: var(--shadow);
	user-select: none;
	touch-action: pan-y;
}

/* A plain work photo has no divider to drag: let a horizontal swipe move the slider. */
.home-page .ba--single .ba__frame {
	touch-action: pan-x pan-y;
}

.home-page .ba__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.home-page .ba__before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.home-page .ba__label {
	position: absolute;
	inset-block-start: 16px;
	z-index: 2;
	padding: 4px 14px;
	border-radius: 999px;
	color: var(--color-white);
	background: rgba(9, 16, 34, .72);
	font-size: .875rem;
	font-weight: 700;
	pointer-events: none;
}

.home-page .ba__label--before {
	inset-inline-start: 16px;
}

.home-page .ba__label--after {
	inset-inline-end: 16px;
}

.home-page .ba__range {
	position: absolute;
	inset: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
}

.home-page .ba__handle {
	position: absolute;
	inset-block: 0;
	inset-inline-start: var(--pos, 50%);
	z-index: 2;
	width: 3px;
	margin-inline-start: -1.5px;
	background: var(--color-white);
	pointer-events: none;
}

.home-page .ba__handle::before {
	content: "‹ ›";
	position: absolute;
	inset-block-start: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	color: var(--color-navy);
	background: var(--color-white);
	box-shadow: var(--shadow);
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1;
	transform: translate(-50%, -50%);
}

.home-page .ba__range:focus-visible + .ba__handle::before {
	outline: 3px solid var(--color-red);
	outline-offset: 2px;
}

.home-page .ba__caption {
	margin-block-start: 12px;
	color: var(--color-muted);
	text-align: center;
}

/* ---------- Stats ---------- */

.home-page .stats__grid {
	display: grid;
	gap: 24px;
	padding: 0;
	margin: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.home-page .stat {
	padding: 12px 20px;
	text-align: center;
}

@media (min-width: 700px) {
	.home-page .stat + .stat {
		border-inline-start: 1px solid var(--color-border);
	}
}

.home-page .stat__value {
	margin: 0;
	color: var(--color-navy);
	font-size: clamp(44px, 6vw, 72px);
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.home-page .stat__suffix {
	color: var(--color-red);
}

.home-page .stat__label {
	margin: 6px 0 0;
	color: var(--color-muted);
	font-weight: 600;
}
