.topaz-product-story {
	--topaz-ritual-bg: var(--topaz-white);
	--topaz-ritual-green: var(--topaz-forest);
	--topaz-ritual-sage: var(--topaz-eucalyptus);
	--topaz-ritual-accent: #b79a68;
	position: relative;
	color: var(--topaz-ritual-green);
	background: var(--topaz-ritual-bg);
	overflow: clip;
}

.topaz-product-story__sticky {
	position: relative;
}

.topaz-product-story__inner {
	position: relative;
	width: min(100%, 1320px);
	min-height: 42rem;
	margin-inline: auto;
	padding: clamp(5rem, 8vw, 8rem) clamp(1.25rem, 4vw, 3rem);
}

.topaz-product-story__visual {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--topaz-ritual-bg);
}

.topaz-product-story__fallback,
.topaz-product-story__canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.topaz-product-story__fallback {
	object-fit: contain;
}

.topaz-product-story__canvas {
	display: none;
}

.topaz-product-story__copy {
	position: relative;
	z-index: 2;
	max-width: 32rem;
	margin-top: 2rem;
}

.topaz-product-story__eyebrow {
	margin: 0 0 1.25rem;
	font-size: var(--topaz-text-label);
	font-weight: var(--topaz-font-medium);
	line-height: 1.3;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--topaz-ritual-sage);
}

.topaz-product-story__stages {
	display: grid;
	gap: 2.5rem;
}

.topaz-product-story__stage {
	min-width: 0;
}

.topaz-product-story__stage h2 {
	max-width: 13ch;
	margin: 0;
	font-size: clamp(2.8rem, 5vw, 5rem);
	font-weight: var(--topaz-font-light);
	line-height: 0.98;
	letter-spacing: 0;
	text-wrap: balance;
}

.topaz-product-story__stage p {
	max-width: 31rem;
	margin: 1.25rem 0 0;
	font-size: var(--topaz-text-body);
	line-height: 1.65;
	color: var(--topaz-muted);
}

.topaz-product-story__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.topaz-product-story__actions .button {
	min-height: 3.5rem;
}

.topaz-product-story__button--secondary {
	color: var(--topaz-ritual-green);
	border: 1px solid rgb(23 61 45 / 0.48);
	background: transparent;
}

.topaz-product-story__button--secondary:hover,
.topaz-product-story__button--secondary:focus-visible {
	color: var(--topaz-white);
	border-color: var(--topaz-ritual-green);
	background: var(--topaz-ritual-green);
}

.js .topaz-product-story {
	height: 315svh;
}

.js .topaz-product-story__sticky {
	--topaz-ritual-stage-height: clamp(42rem, 82svh, 52rem);
	position: sticky;
	top: max(0px, calc((100svh - var(--topaz-ritual-stage-height)) / 2));
	height: var(--topaz-ritual-stage-height);
	min-height: 0;
	max-height: 52rem;
	overflow: hidden;
}

.js .topaz-product-story__inner {
	width: min(calc(100% - clamp(3rem, 7vw, 6rem)), 73.75rem);
	height: 100%;
	min-height: 0;
	padding: 0;
}

.js .topaz-product-story__visual {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
}

.js .topaz-product-story__canvas {
	display: block;
}

.js .topaz-product-story__fallback,
.js .topaz-product-story__canvas {
	position: absolute;
	inset: 0;
}

.js .topaz-product-story__fallback {
	opacity: 1;
	transition: opacity 240ms var(--topaz-ease-out);
}

.js .topaz-product-story__fallback.is-hidden {
	opacity: 0;
}

.js .topaz-product-story__copy {
	position: absolute;
	top: 50%;
	left: 0;
	width: min(45%, 33rem);
	margin: 0;
	transform: translateY(-50%);
}

.js .topaz-product-story__stages {
	position: relative;
	min-height: 15rem;
}

.js .topaz-product-story__stage {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: translate3d(0, 18px, 0);
	pointer-events: none;
	transition:
		opacity 500ms cubic-bezier(0.23, 1, 0.32, 1),
		transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
}

.js .topaz-product-story__stage.is-active {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	pointer-events: auto;
}

@media (max-width: 767px) {
	.topaz-product-story__inner {
		min-height: 0;
		padding: 4.5rem 1.25rem;
	}

	.topaz-product-story__copy {
		margin-top: 1.5rem;
	}

	.topaz-product-story__stage h2 {
		font-size: clamp(2.55rem, 12vw, 3.8rem);
	}

	.topaz-product-story__stage p {
		font-size: var(--topaz-text-body-mobile);
	}

	.js .topaz-product-story {
		height: 235svh;
	}

	.js .topaz-product-story__sticky {
		--topaz-ritual-stage-height: 100svh;
		top: 0;
		min-height: 40rem;
		max-height: none;
	}

	.js .topaz-product-story__inner {
		display: flex;
		flex-direction: column;
		width: 100%;
		padding: clamp(2.75rem, 6svh, 3.5rem) 1.25rem 1rem;
	}

	.js .topaz-product-story__visual {
		position: relative;
		inset: auto;
		order: 2;
		flex: 1 1 auto;
		width: calc(100% + 2.5rem);
		height: auto;
		min-height: 18rem;
		margin: clamp(1.25rem, 3svh, 1.75rem) -1.25rem 0;
	}

	.js .topaz-product-story__fallback {
		object-fit: cover;
		object-position: 74% center;
	}

	.js .topaz-product-story__copy {
		position: relative;
		top: auto;
		left: auto;
		order: 1;
		flex: 0 0 auto;
		width: 100%;
		max-width: 31rem;
		margin: 0 auto;
		transform: none;
	}

	.js .topaz-product-story__eyebrow {
		margin-bottom: 0.85rem;
	}

	.js .topaz-product-story__stages {
		min-height: 13.5rem;
	}

	.js .topaz-product-story__stage h2 {
		max-width: 11ch;
		font-size: clamp(2.25rem, 10.5vw, 3.25rem);
		line-height: 1;
	}

	.js .topaz-product-story__stage p {
		max-width: 29rem;
		margin-top: 0.9rem;
		line-height: 1.55;
	}

	.js .topaz-product-story__actions {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0.625rem;
		margin-top: 1.125rem;
	}

	.js .topaz-product-story__actions .button {
		width: 100%;
		min-height: 3.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.js .topaz-product-story {
		height: auto;
	}

	.js .topaz-product-story__sticky {
		position: relative;
		height: auto;
		min-height: 0;
		overflow: visible;
	}

	.js .topaz-product-story__inner {
		height: auto;
		padding: clamp(4.5rem, 8vw, 7rem) clamp(1.25rem, 4vw, 3rem);
	}

	.js .topaz-product-story__visual {
		position: relative;
		inset: auto;
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.js .topaz-product-story__canvas {
		display: none;
	}

	.js .topaz-product-story__fallback {
		position: relative;
		inset: auto;
		opacity: 1;
		object-fit: contain;
		object-position: center;
		transition: none;
	}

	.js .topaz-product-story__copy {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		max-width: 64rem;
		margin-top: clamp(2rem, 5vw, 4rem);
		transform: none;
	}

	.js .topaz-product-story__stages {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(1.5rem, 4vw, 3rem);
		min-height: 0;
	}

	.js .topaz-product-story__stage {
		position: relative;
		inset: auto;
		opacity: 1;
		transform: none;
		pointer-events: auto;
		transition: none;
	}

	.js .topaz-product-story__stage h2 {
		font-size: clamp(2rem, 3.5vw, 3.25rem);
	}
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.js .topaz-product-story__stages {
		grid-template-columns: 1fr;
	}
}
