/*
 * JS Products v0.7.0 motion foundation.
 * Motion is progressive enhancement: the site remains usable when JS/GSAP fails.
 */

:root {
	--jsp-scroll-progress: 0;
}

.js-products-motion-active [data-jsp-reveal] {
	will-change: transform, opacity;
}

[data-jsp-parallax],
[data-jsp-scrub-layer] {
	transform: translateZ(0);
	backface-visibility: hidden;
}

.jsp-motion-foundation {
	position: relative;
	background: var(--jsp-bg);
}

.jsp-motion-foundation__intro {
	min-height: calc(100svh - var(--jsp-header-h));
	display: grid;
	align-items: end;
	padding: clamp(70px, 10vw, 140px) 0 clamp(54px, 8vw, 100px);
}

.jsp-motion-foundation__intro-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(240px, .5fr);
	gap: clamp(30px, 6vw, 90px);
	align-items: end;
}

.jsp-motion-foundation__title {
	max-width: 1050px;
	margin: 0;
	font-size: clamp(4rem, 10vw, 9.5rem);
	font-weight: 500;
	line-height: .82;
	letter-spacing: -.075em;
}

.jsp-motion-foundation__copy {
	max-width: 420px;
	margin: 0 0 10px;
	color: var(--jsp-muted);
	font-size: clamp(1rem, 1.7vw, 1.2rem);
	line-height: 1.65;
}

.jsp-motion-foundation__scene {
	position: relative;
	min-height: 100svh;
	overflow: clip;
	background: #111;
	color: #fff;
}

.jsp-motion-foundation__scene-inner {
	position: relative;
	width: 100%;
	height: 100svh;
	min-height: 640px;
	overflow: hidden;
}

.jsp-motion-foundation__halo {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(66vw, 900px);
	aspect-ratio: 1;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background:
		radial-gradient(circle at 35% 30%, rgba(255,255,255,.96), rgba(255,255,255,.22) 28%, rgba(255,255,255,.035) 62%, transparent 72%);
	filter: blur(.2px);
	pointer-events: none;
}

.jsp-motion-foundation__frame {
	position: absolute;
	inset: clamp(18px, 3vw, 46px);
	border: 1px solid rgba(255,255,255,.18);
	border-radius: clamp(18px, 3vw, 36px);
	pointer-events: none;
}

.jsp-motion-foundation__word {
	position: absolute;
	left: var(--jsp-gutter);
	right: var(--jsp-gutter);
	top: 50%;
	margin: 0;
	font-size: clamp(4rem, 12vw, 12rem);
	font-weight: 500;
	line-height: .8;
	letter-spacing: -.08em;
	text-align: center;
	transform: translateY(-50%);
}

.jsp-motion-foundation__word--secondary {
	font-size: clamp(2.8rem, 8vw, 8rem);
	color: rgba(255,255,255,.8);
}

.jsp-motion-foundation__caption {
	position: absolute;
	left: var(--jsp-gutter);
	bottom: clamp(28px, 5vw, 62px);
	max-width: 420px;
	margin: 0;
	color: rgba(255,255,255,.7);
	font-size: .82rem;
	line-height: 1.65;
	letter-spacing: .02em;
}

.jsp-motion-foundation__after {
	padding: clamp(80px, 12vw, 160px) 0;
}

.jsp-motion-foundation__after-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 3vw, 34px);
}

.jsp-motion-foundation__card {
	min-height: 300px;
	padding: clamp(22px, 3vw, 34px);
	border: 1px solid var(--jsp-line);
	border-radius: var(--jsp-radius-lg);
	background: var(--jsp-surface);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.jsp-motion-foundation__card-index {
	color: var(--jsp-muted);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .14em;
}

.jsp-motion-foundation__card h2 {
	margin: 0;
	font-size: clamp(1.6rem, 3vw, 3.2rem);
	font-weight: 500;
	line-height: .95;
	letter-spacing: -.05em;
}

.jsp-motion-foundation__card p {
	margin: 14px 0 0;
	color: var(--jsp-muted);
	line-height: 1.6;
}

.jsp-video-scrub--fallback video {
	pointer-events: none;
}

@media (max-width: 899px) {
	.jsp-motion-foundation__intro {
		min-height: auto;
		padding-top: 90px;
	}

	.jsp-motion-foundation__intro-grid,
	.jsp-motion-foundation__after-grid {
		grid-template-columns: 1fr;
	}

	.jsp-motion-foundation__title {
		font-size: clamp(4rem, 20vw, 7rem);
	}

	.jsp-motion-foundation__scene-inner {
		min-height: 560px;
	}

	.jsp-motion-foundation__halo {
		width: min(100vw, 680px);
	}

	.jsp-motion-foundation__word {
		font-size: clamp(4rem, 18vw, 7rem);
	}

	.jsp-motion-foundation__word--secondary {
		font-size: clamp(3rem, 13vw, 5rem);
	}

	.jsp-motion-foundation__card {
		min-height: 240px;
	}
}

@media (prefers-reduced-motion: reduce) {
	[data-jsp-reveal],
	[data-jsp-parallax],
	[data-jsp-scrub-layer] {
		transform: none !important;
		opacity: 1 !important;
		will-change: auto !important;
	}

	.jsp-motion-foundation__scene {
		min-height: auto;
	}

	.jsp-motion-foundation__scene-inner {
		min-height: 72svh;
	}

	.jsp-motion-foundation__word--secondary {
		opacity: .35;
	}
}
