.ashv-home > .ashv-steps {
	margin-block: 0;
}

.ashv-steps {
	position: relative;
	overflow: hidden;
	padding-block: clamp(72px, 10vw, 144px);
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--limestone);
}

.ashv-steps h2 {
	margin: 0 0 clamp(40px, 5vw, 72px);
	max-width: 18ch;
}

.ashv-steps__stage {
	display: grid;
	grid-template-columns: 1fr;
}

.ashv-steps__list {
	display: contents;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ashv-steps__item {
	display: contents;
}

.ashv-steps__media {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	margin: 0;
	min-height: 260px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--wp--preset--color--charcoal);
}

.ashv-steps__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ashv-steps__copy {
	grid-column: 1;
	grid-row: 2;
	display: grid;
	align-content: start;
	justify-items: start;
	gap: 14px;
	padding: 32px var(--ashv-gutter) 8px;
}

.ashv-steps__copy > * {
	margin: 0;
}

.ashv-steps__copy h3 {
	font-size: clamp(26px, 2.4vw, 34px);
	line-height: 1.08;
}

.ashv-steps__copy p {
	color: var(--wp--preset--color--on-dark-muted);
	font-size: 16px;
	line-height: 1.6;
}

.ashv-steps__number {
	display: grid;
	place-items: center;
	width: 56px;
	height: 44px;
	margin-bottom: 8px;
	background: var(--wp--preset--color--ember);
	color: var(--wp--preset--color--white);
	font: 700 24px/1 var(--wp--preset--font-family--display);
	clip-path: polygon(var(--ashv-slant) 0, 100% 0, calc(100% - var(--ashv-slant)) 100%, 0 100%);
}

.ashv-steps__item:last-child .ashv-steps__number {
	background: var(--wp--preset--color--flame);
	color: var(--wp--preset--color--charcoal);
}

.ashv-steps__controls {
	grid-column: 1;
	grid-row: 3;
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 24px var(--ashv-gutter) 0;
}

.ashv-steps__controls[hidden] {
	display: none;
}

.ashv-steps__arrow {
	display: grid;
	place-items: center;
	width: 56px;
	height: 44px;
	padding: 0;
	border: 0;
	background: var(--wp--preset--color--limestone);
	color: var(--wp--preset--color--charcoal);
	cursor: pointer;
	clip-path: polygon(var(--ashv-slant) 0, 100% 0, calc(100% - var(--ashv-slant)) 100%, 0 100%);
	transition: background-color 200ms var(--ashv-ease), color 200ms var(--ashv-ease), opacity 200ms var(--ashv-ease);
}

.ashv-steps__arrow .ashv-icon {
	width: 20px;
	height: 20px;
}

.ashv-steps__arrow:not(.ashv-steps__arrow--next) .ashv-icon {
	rotate: 180deg;
}

.ashv-steps__arrow--next {
	background: var(--wp--preset--color--ember);
	color: var(--wp--preset--color--white);
}

.ashv-steps__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

.ashv-steps__arrow:not(:disabled):active {
	background: var(--wp--preset--color--flame);
	color: var(--wp--preset--color--charcoal);
}

@media (hover: hover) and (pointer: fine) {
	.ashv-steps__arrow:not(:disabled):hover {
		background: var(--wp--preset--color--flame);
		color: var(--wp--preset--color--charcoal);
	}
}

.ashv-steps__arrow:focus-visible,
.ashv-steps__dot:focus-visible {
	outline: 2px solid var(--wp--preset--color--flame);
	outline-offset: 3px;
}

.ashv-steps__dots {
	display: flex;
	flex: 1;
	gap: 6px;
}

.ashv-steps__dot {
	position: relative;
	flex: 1;
	height: 24px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.ashv-steps__dot::before {
	content: "";
	position: absolute;
	inset: 10px 0;
	background: rgb(243 240 231 / 0.2);
	transition: background-color 250ms var(--ashv-ease);
}

.ashv-steps__dot.is-done::before {
	background: var(--wp--preset--color--ember);
}

.ashv-steps__dot[aria-current="step"]::before {
	background: var(--wp--preset--color--flame);
}

.ashv-steps__cta {
	margin-top: clamp(48px, 5vw, 72px);
}

.ashv-steps--live .ashv-steps__item:not(.is-active, .is-leaving) > * {
	visibility: hidden;
}

.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__media {
	z-index: 2;
}

.ashv-steps--live .ashv-steps__item.is-leaving .ashv-steps__media {
	z-index: 1;
}

.ashv-steps--live .ashv-steps__item.is-leaving .ashv-steps__copy {
	animation: ashv-step-copy-out 260ms var(--ashv-ease) forwards;
}

.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__media {
	animation: ashv-step-media 900ms var(--ashv-ease-io) backwards;
}

.ashv-steps--live.is-back .ashv-steps__item.is-active .ashv-steps__media {
	animation-name: ashv-step-media-back;
}

.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__media img {
	animation: ashv-step-zoom 1200ms var(--ashv-ease) backwards;
}

.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__copy > * {
	animation: ashv-step-copy 600ms var(--ashv-ease) backwards;
}

.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__copy > :nth-child(1) { animation-delay: 250ms; }
.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__copy > :nth-child(2) { animation-delay: 340ms; }
.ashv-steps--live .ashv-steps__item.is-active .ashv-steps__copy > :nth-child(3) { animation-delay: 430ms; }

@keyframes ashv-step-media {
	from { clip-path: inset(0 100% 0 0); }
}

@keyframes ashv-step-media-back {
	from { clip-path: inset(0 0 0 100%); }
}

@keyframes ashv-step-copy-out {
	to { opacity: 0; translate: 0 -12px; }
}

@keyframes ashv-step-zoom {
	from { scale: 1.14; }
}

@keyframes ashv-step-copy {
	from { opacity: 0; translate: 0 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.ashv-steps--live .ashv-steps__item.is-active :is(.ashv-steps__media, .ashv-steps__media img, .ashv-steps__copy > *, .ashv-steps__copy) {
		animation: none;
	}
}

@media (min-width: 900px) {
	.ashv-steps__stage {
		grid-template-columns: 7fr 3fr;
		grid-template-rows: 1fr auto;
		min-height: clamp(520px, 44vw, 720px);
	}

	.ashv-steps__media {
		grid-row: 1 / span 2;
		aspect-ratio: auto;
		min-height: 0;
	}

	.ashv-steps__copy {
		grid-column: 2;
		grid-row: 1;
		align-content: center;
		padding: clamp(28px, 3vw, 56px);
	}

	.ashv-steps__controls {
		grid-column: 2;
		grid-row: 2;
		flex-wrap: wrap;
		padding: 0 clamp(28px, 3vw, 56px) clamp(28px, 3vw, 48px);
	}

	.ashv-steps__dots {
		order: 3;
		flex-basis: 100%;
	}
}
