.pts-hero {
	--hero-copy-limit: 900px;
	--hero-control-edge: clamp(14px, 2.4vw, 42px);
	--hero-control-size: 50px;
	--hero-purple: #4e0b6f;
	--hero-white: #fff;
	position: relative;
	isolation: isolate;
	inline-size: 100%;
	block-size: 100svh;
	min-block-size: 620px;
	overflow: hidden;
	color: var(--hero-white);
	background-color: #19191b;
}

.pts-hero__slides,
.pts-hero__slide {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
}

.pts-hero__slide {
	--hero-slide-alpha: 0;
	--hero-slide-layer: 1;
	z-index: var(--hero-slide-layer);
	visibility: hidden;
	opacity: var(--hero-slide-alpha);
	transition: opacity 800ms ease, visibility 800ms ease;
}

.pts-hero__slide:is(.is-active, .is-leaving) {
	visibility: visible;
}

.pts-hero__slide.is-active {
	--hero-slide-alpha: 1;
	--hero-slide-layer: 2;
}

.pts-hero__slide.is-leaving {
	--hero-slide-alpha: 0;
	--hero-slide-layer: 1;
}

.pts-hero__slide :where(.pts-hero__media, .pts-hero__picture, .pts-hero__poster, .pts-hero__video, .pts-hero__shade) {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
}

.pts-hero :is(.pts-hero__picture, .pts-hero__poster, .pts-hero__video) {
	display: block;
}

.pts-hero__poster,
.pts-hero__video {
	object-position: 50% var(--pts-media-y, 50%);
	object-fit: cover;
}

.pts-hero__video {
	--hero-video-alpha: 0;
	z-index: var(--hero-video-layer, 2);
	opacity: var(--hero-video-alpha);
	transition-property: opacity;
	transition-duration: 220ms;
	transition-timing-function: ease;
}

.pts-hero__slide.has-video-frame .pts-hero__video {
	--hero-video-alpha: 1;
}

.pts-hero__shade {
	z-index: var(--hero-shade-layer, 3);
	background-color: rgba(0, 0, 0, 0.5);
}

.pts-hero__content {
	position: absolute;
	z-index: 4;
	inset-block-start: 54%;
	inset-inline-start: 50%;
	inline-size: min(var(--hero-copy-limit), calc(100% - 180px));
	padding: 24px;
	translate: -50% -50%;
	color: var(--hero-white);
	text-align: center;
	text-shadow: 0 2px 3px rgba(0, 0, 0, 0.95);
}

.pts-hero__content :is(.pts-hero__title, .pts-hero__subtitle) {
	margin-block: 0;
	margin-inline: 0;
	color: var(--hero-white);
	font-weight: 700;
	text-align: inherit;
}

.pts-hero__title {
	font-size: clamp(25px, 2.25vw, 38px);
	line-height: 1.13;
	text-transform: uppercase;
}

.pts-hero__subtitle {
	margin-block-start: 20px;
	font-size: clamp(18px, 1.65vw, 29px);
	line-height: 1.45;
}

.pts-hero__slide.is-text-entering .pts-hero__content {
	animation: ptsHeroCopyReveal 480ms ease-out 140ms both;
}

@keyframes ptsHeroCopyReveal {
	0% {
		opacity: 0;
		translate: -50% calc(-50% + 12px);
	}

	100% {
		opacity: 1;
		translate: -50% -50%;
	}
}

.pts-hero__controls {
	position: absolute;
	z-index: 6;
	inset: 0;
	pointer-events: none;
}

.pts-hero__control {
	position: absolute;
	inset-block-start: 50%;
	display: grid;
	place-items: center;
	inline-size: var(--hero-control-size);
	block-size: var(--hero-control-size);
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	background-color: rgba(25, 25, 27, 0.72);
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.22);
	color: var(--hero-white);
	translate: 0 -50%;
	pointer-events: auto;
	transition: background-color 150ms ease, translate 150ms ease;
}

.pts-hero__control:is(:hover, :focus-visible) {
	background-color: var(--hero-purple);
}

.pts-hero__control:focus-visible {
	outline: 3px solid var(--hero-white);
	outline-offset: 3px;
}

.pts-hero__control--previous {
	inset-inline-start: var(--hero-control-edge);
}

.pts-hero__control--next {
	inset-inline-end: var(--hero-control-edge);
}

.pts-hero__control--toggle {
	top: auto;
	right: var(--hero-control-edge);
	bottom: clamp(20px, 2.4vw, 34px);
}

.pts-hero__control:disabled {
	opacity: 0.66;
	cursor: default;
}

.pts-hero__control svg {
	inline-size: 25px;
	block-size: 25px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pts-hero__control--toggle .pts-hero__icon {
	display: grid;
	place-items: center;
}

.pts-hero__control--toggle :is(.pts-hero__icon, svg) {
	inline-size: 24px;
	block-size: 24px;
}

.pts-hero__progress {
	position: absolute;
	z-index: 7;
	inset-inline: 0;
	inset-block-end: 0;
	block-size: 4px;
	overflow: hidden;
	background-color: rgba(255, 255, 255, 0.72);
}

.pts-hero__progress-fill {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	background-color: var(--hero-purple);
	transform: scaleX(0);
	transform-origin: 0 50%;
	will-change: transform;
}

@media (max-width: 700px) {
	.pts-hero {
		--hero-control-size: 48px;
		block-size: 100svh;
		min-block-size: 520px;
	}

	.pts-hero__content {
		inset-block-start: 51%;
		inline-size: calc(100% - 30px);
		padding: 82px 8px 105px;
	}

	.pts-hero__title {
		font-size: clamp(22px, 7vw, 31px);
		overflow-wrap: anywhere;
		line-height: 1.16;
	}

	.pts-hero__subtitle {
		margin-block-start: 15px;
		font-size: clamp(16px, 4.8vw, 21px);
		line-height: 1.4;
	}

	.pts-hero__controls {
		display: flex;
		inset-block-start: auto;
		inset-inline-end: auto;
		bottom: calc(22px + env(safe-area-inset-bottom));
		left: 50%;
		gap: 13px;
		width: auto;
		translate: -50% 0;
	}

	.pts-hero__control {
		position: static;
		translate: none;
	}

	.pts-hero__progress {
		block-size: 3px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pts-hero :is(.pts-hero__slide, .pts-hero__video, .pts-hero__control) {
		transition-duration: 0s;
	}

	.pts-hero__slide.is-text-entering .pts-hero__content {
		animation: none;
	}
}
