/* Layout: Step detail */

.step-detail__row {
	display: grid;
	align-items: stretch;
}

/* White breathing room between the steps, so each reads as its own block. */
.step-detail__row + .step-detail__row {
	margin-top: var(--space-2xl);
}

@media (min-width: 860px) {
	.step-detail__row {
		grid-template-columns: 1fr 1fr;
	}

	/*
	 * Flipping swaps the columns with `order`, not with a reversed
	 * grid-template — that keeps the DOM order (image, then text) intact, so
	 * the reading order stays the same in both directions.
	 */
	.step-detail__row--flipped .step-detail__media {
		order: 2;
	}

	.step-detail__row--flipped .step-detail__content {
		order: 1;
	}

	/* The image column is square-ish; the panel beside it stretches to match. */
	.step-detail__media {
		aspect-ratio: 1 / 1;
	}
}

.step-detail__media {
	position: relative;
	min-height: 18rem;
	background-color: var(--color-surface-alt);
}

.step-detail__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * The big number sits in the image's bottom corner. It is decorative and
 * aria-hidden; the heading beside it carries the meaning.
 */
.step-detail__number {
	position: absolute;
	right: var(--space-m);
	bottom: var(--space-2xs);
	color: #ffffff;
	font-family: var(--font-heading);
	font-size: clamp(4rem, 2rem + 7vw, 7.5rem);
	font-weight: 800;
	line-height: 1;
	opacity: 0.92;
	pointer-events: none;
}

.step-detail__row--flipped .step-detail__number {
	right: auto;
	left: var(--space-m);
}

.step-detail__content {
	display: flex;
	align-items: center;
	padding: clamp(var(--space-l), 1.5rem + 4vw, 5rem);
	background-color: var(--color-surface-strong);
}

.step-detail__inner {
	width: 100%;
	max-width: 46rem;
	margin-inline: auto;
	text-align: center;
}

.step-detail__inner > :last-child {
	margin-bottom: 0;
}

/*
 * The repeated lead-in ("Ganz einfach") takes its own line above the step
 * name: serif and large, the sans title a size below it.
 */
.step-detail__title {
	margin-bottom: var(--space-l);
	font-size: var(--text-2xl);
	line-height: var(--leading-tight);
}

.step-detail__title .section__title-lead {
	display: block;
	margin-bottom: var(--space-3xs);
	font-size: var(--text-3xl);
}

/* The prose helper caps at 68ch; here the column already limits the measure. */
.step-detail__text {
	max-width: none;
	margin-bottom: var(--space-l);
	font-size: var(--text-lg);
}

.step-detail__action {
	margin-bottom: 0;
}
