.machine {
	display: grid;
	align-content: start;
	align-items: baseline;
	gap: 0 var(--margin-double);
	grid-template-columns: 1fr 1fr;
	padding-top: 33vh; /* title and text come first, then the renderings */
	padding-top: 33svh;
	padding-inline: var(--margin-double);
}

.machine:has(.reveal:last-child) {
	padding-bottom: 33vh;
	padding-bottom: 33svh;
}

:not(.hero, .invert, .machine, .steps) + .machine.invert {
	margin-top: 33vh;
	margin-top: 33svh;
}

.machine__wrapper {
	--height: 100vh;
	--height: 100svh;
	grid-column: 1 / -1;
	height: var(--height); /* was 2 * height, which pinned the images for a full screen of scrolling */
	position: relative;
	margin-top: calc(33vh - var(--header));
	margin-top: calc(33svh - var(--header));
}

.machine__images {
	display: flex;
	align-items: center;
	gap: 20%;
	justify-content: space-evenly;
	width: 100%;
	max-width: 1200px;
	height: var(--height);
	margin-inline: auto;
	padding: var(--header) 0 var(--margin-double);
	overflow: hidden;
	position: relative;
	z-index: 0;
	mask: linear-gradient(-90deg, hsla(var(--background), 0) 25%, hsl(var(--background)) 75%) 100% 0% / 400% 100% no-repeat;
	transition: mask-position 1.5s;
}

.machine__images--active {
	mask-position: 0% 0%;
}

.machine__images > figure {
	aspect-ratio: var(--width) / var(--height);
	max-width: calc(var(--width) / var(--total) * 80%);
	max-height: 100%;
	position: relative;
}

.machine__images > figure > img {
	max-width: 100%;
	max-height: 100%;
}

.machine__images > figure > figcaption {
	display: none;
	align-items: baseline;
	padding-top: var(--margin);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translateX(-50%);
	font-family: "Suisse Intl Mono";
	font-size: var(--fontsize);
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.machine__images--active > figure > figcaption {
	display: flex;
}

.machine__images > figure > figcaption::before {
	content: "";
	display: inline-block;
	width: 0.725em;
	height: 0.725em;
	margin-right: 1ch;
	background-color: currentColor;
}

.machine > .reveal {
	grid-column: 2;
	z-index: 1;
}

/* Newsletter form: bottom right of the section, below the text, in the footer's fourth column */
.machine:has(> .machine__subscribe:last-child) {
	padding-bottom: 33vh; /* space before the recipes ("01 Explore"), same rhythm as the other sections */
	padding-bottom: 33svh;
}

.machine__subscribe {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-top: calc(16vh - var(--margin-double)); /* half the usual section spacing, closer to the renderings */
	margin-top: calc(16svh - var(--margin-double));
}

.machine__subscribe > .subscribe {
	grid-column: 4;
	padding-inline: var(--margin);
	font-family: "Suisse Intl Mono";
	text-transform: uppercase;
}

.machine__subscribe .subscribe > form > input {
	background-color: hsl(var(--hsl-white));
	color: hsl(var(--hsl-black));
}

.machine__subscribe .subscribe > form > button {
	background-color: hsl(var(--hsl-orange));
	color: hsl(var(--hsl-white));
}

.machine__subscribe .subscribe > form > button:hover,
.machine__subscribe .subscribe > form > button:focus-visible {
	background-color: hsl(var(--hsl-white));
	color: hsl(var(--hsl-black));
}

@media (orientation: portrait) {
	.machine {
		grid-template-columns: 1fr;
	}

	.machine__image > img {
		width: 100%;
		height: 100%;
	}

	.machine > .reveal {
		grid-column: 1;
	}

	/* phones: the renderings are narrow, so let their area shrink to fit instead of a full screen */
	.machine__wrapper,
	.machine__images {
		height: auto;
	}

	.machine__images {
		padding-top: 0;
	}

	.machine__subscribe {
		grid-template-columns: 1fr;
	}

	.machine__subscribe > .subscribe {
		grid-column: 1;
		padding-inline: 0;
	}

	.machine > h2 + .reveal {
		margin-top: var(--margin-double);
	}
}