/*
 * sd/bento — owns the whole bento look: the uneven two-column grid, the numbered cards and the
 * fragments of work hanging off their edges. Moved here from src/css/primitives/bento.css so the
 * component carries its own styles; sd/bento-card renders only inside sd/bento.
 */
/*
 * Bento (`sd-bento`), after Ready.so: an uneven, flowing grid. The heading sits top left and the first
 * card rises beside it; the cards below are staggered, and each one has a numbered step, a heading, a
 * line of copy and a real fragment of the work that hangs off the card's edge (cropped by it), as if
 * the page were a desk of papers. Dark and warm cards alternate.
 */
.sd-bento {
	padding-block: clamp(72px, 8vw, 128px);
}

.sd-bento__inner {
	max-width: var(--wp--custom--size--content);
	margin-inline: auto;
	padding-inline: 24px;
}

.sd-bento__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 1.6vw, 24px);
	align-items: start;
}

/* The heading takes the top of the left column; the right column starts with a card beside it. */
.sd-bento__head {
	position: relative;
	align-self: end;
	padding-block-end: clamp(8px, 2vw, 32px);
}

.sd-bento__head h2 {
	margin: 0 0 16px;
	font-size: clamp(2.5rem, 4.4vw, 4.25rem);
	line-height: 0.95;
}

.sd-bento__head p {
	max-width: 30em;
	margin: 0;
	font-size: clamp(1.125rem, 1.35vw, 1.3125rem);
}

.sd-bento__burst {
	position: absolute;
	width: 44px;
	height: 40px;
	right: 4%;
	top: -36px;
}

/* The right column runs a step lower than the left from the second row, so the edges never line up. */
.sd-bento__card:nth-of-type(odd) {
	translate: 0 clamp(24px, 4vw, 64px);
}

.sd-bento__card {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: clamp(380px, 36vw, 470px);
	padding: clamp(28px, 2.6vw, 36px) clamp(28px, 2.6vw, 36px) 0;
	border-radius: 18px;
	background: var(--wp--preset--color--sd-deep-midnight);
	color: #fff;
}

.sd-bento__card--warm {
	background:
		radial-gradient(ellipse 70% 80% at 100% 0%, color-mix(in srgb, var(--wp--preset--color--sd-flamingo) 24%, transparent), transparent 70%),
		radial-gradient(ellipse 70% 70% at 0% 100%, #F6CFAE, transparent 70%),
		#F3E6DF;
	color: var(--wp--preset--color--sd-deep-midnight);
}

.sd-bento__num {
	display: block;
	margin-bottom: 14px;
	font-family: "LORE", var(--wp--preset--font-family--display);
	font-size: 1.375rem;
	line-height: 1;
	opacity: 0.7;
}

.sd-bento__card h3 {
	margin: 0 0 8px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.375rem, 1.8vw, 1.75rem);
	font-weight: 500;
	line-height: 1.2;
	color: inherit;
}

.sd-bento__card > p {
	max-width: 32em;
	margin: 0;
	font-size: clamp(1rem, 1.15vw, 1.0625rem);
	line-height: 1.6;
	opacity: 0.85;
}

/* The fragment: hangs from the copy down past the card's foot and off its right edge. */
.sd-bento__stage {
	position: relative;
	flex: 1;
	min-height: 200px;
	margin-top: 28px;
}

.sd-bento__paper {
	position: absolute;
	border: 1px solid rgb(1 29 43 / 0.08);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 0 0 1px rgb(1 29 43 / 0.06), 0 1px 2px rgb(1 29 43 / 0.08), 0 8px 16px -10px rgb(1 29 43 / 0.26);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 13px;
	color: var(--wp--preset--color--sd-deep-midnight);
}

.sd-bento__label {
	display: block;
	margin-bottom: 6px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.55;
}

/* 01: a playbook page, hanging off the bottom right. */
.sd-bento__page {
	left: 0;
	right: -16%;
	top: 0;
	bottom: -40px;
	padding: clamp(22px, 2.4vw, 32px);
	border-radius: 12px 12px 0 0;
	background: #FAF8F6;
}

.sd-bento__page h4 {
	margin: 0 0 18px;
	font-family: "National 2 Condensed", "National 2 Condensed Fallback", Impact, sans-serif;
	font-size: clamp(1.75rem, 2.6vw, 2.25rem);
	font-weight: 700;
	line-height: 0.95;
	text-transform: uppercase;
	letter-spacing: -0.01em;
}

.sd-bento__page p {
	max-width: 28em;
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 14px;
	line-height: 1.55;
}

/* 02: a design in progress, a framed screenshot hanging off the right. */
.sd-bento__shot {
	left: 0;
	right: -20%;
	top: 0;
	bottom: -40px;
	overflow: hidden;
	border-radius: 12px 0 0 0;
}

.sd-bento__shot :is(img, video) {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left top;
}

/* 03: the editor's block menu over a page. */
.sd-bento__menu {
	right: 8%;
	top: 6%;
	width: 220px;
	padding: 6px;
	background: #1D2D35;
	color: #fff;
	rotate: 3deg;
	z-index: 1;
}

.sd-bento__menu span {
	display: flex;
	gap: 10px;
	padding: 7px 10px;
	border-radius: 7px;
	font-size: 12.5px;
}

.sd-bento__menu span:first-child {
	background: rgb(255 255 255 / 0.1);
}

.sd-bento__menu em {
	width: 18px;
	font-style: normal;
	opacity: 0.6;
}

.sd-bento__blank {
	left: 0;
	right: 22%;
	top: 22%;
	bottom: -40px;
	padding: 18px;
	border-radius: 12px 12px 0 0;
	display: grid;
	align-content: start;
	gap: 9px;
}

.sd-bento__blank i {
	height: 10px;
	border-radius: 3px;
	background: rgb(1 29 43 / 0.09);
}

.sd-bento__blank i:first-child { height: 28px; width: 70%; background: rgb(1 29 43 / 0.14); }
.sd-bento__blank i:nth-child(3) { width: 82%; }
.sd-bento__blank i:nth-child(5) { width: 60%; }

/* 04: a request, handled, with a taped print. */
.sd-bento__thread {
	left: 0;
	right: 12%;
	top: 0;
	padding: 16px;
	display: grid;
	gap: 14px;
	rotate: -1.5deg;
	z-index: 1;
}

.sd-bento__msg {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: 10px;
	align-items: start;
}

.sd-bento__msg img,
.sd-bento__msg b {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.sd-bento__msg b {
	display: grid;
	place-items: center;
	background: #F3E6DF;
	font-size: 11px;
}

.sd-bento__msg strong {
	display: block;
	font-size: 12.5px;
}

.sd-bento__msg span {
	display: block;
	margin-top: 2px;
	line-height: 1.45;
	opacity: 0.85;
}

.sd-bento__msg span.sd-bento__done {
	display: inline-flex;
	width: fit-content;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 3px 10px 3px 8px;
	border-radius: 999px;
	background: #E7F3E6;
	color: #2F6B33;
	font-size: 11.5px;
	font-weight: 700;
	opacity: 1;
}

.sd-bento__done::before {
	content: "✓";
}

.sd-bento__photo {
	right: -6%;
	width: 62%;
	bottom: -50px;
	padding: 8px;
	rotate: 4deg;
}

.sd-bento__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
}

.sd-bento__photo::before {
	content: "";
	position: absolute;
	top: -11px;
	left: 50%;
	width: 84px;
	height: 24px;
	translate: -50% 0;
	rotate: -3deg;
	background:
		linear-gradient(180deg, rgb(255 255 255 / 0.4), rgb(255 255 255 / 0) 45%, rgb(0 0 0 / 0.06)),
		color-mix(in srgb, var(--wp--preset--color--highlighter) 92%, #e8c547);
	clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 2%, 88% 0, 92% 9%, 96% 1%, 100% 10%, 100% 92%, 96% 100%, 92% 90%, 88% 99%, 12% 100%, 8% 91%, 4% 99%, 0 90%);
	filter: drop-shadow(0 1px 1.5px rgb(1 29 43 / 0.2));
}

@media (width < 56rem) {
	.sd-bento__grid {
		grid-template-columns: 1fr;
	}

	.sd-bento__card:nth-of-type(odd) {
		translate: none;
	}

	.sd-bento__burst {
		display: none;
	}
}

/* Two independent columns, so the cards fall at their own heights: heading, 02, 04 on the left;
   01 (beside the heading) and 03, both taller, on the right. Each column ends near the other. */
.sd-bento__col {
	display: grid;
	gap: clamp(16px, 1.6vw, 24px);
	align-content: start;
}

.sd-bento__card:nth-of-type(odd) {
	translate: none;
}

.sd-bento__col:last-child .sd-bento__card {
	min-height: clamp(460px, 44vw, 600px);
}

.sd-bento__col:first-child .sd-bento__card:last-child {
	min-height: clamp(400px, 38vw, 500px);
}

/* On one column the two stacks merge back into step order: heading, 01, 02, 03, 04. */
@media (width < 56rem) {
	.sd-bento__grid,
	.sd-bento__col {
		display: contents;
	}

	.sd-bento__grid {
		display: flex;
		flex-direction: column;
	}

	.sd-bento__head { order: 0; }
	.sd-bento__col:last-child .sd-bento__card:first-child { order: 1; }
	.sd-bento__col:first-child .sd-bento__card:nth-of-type(1) { order: 2; }
	.sd-bento__col:last-child .sd-bento__card:last-child { order: 3; }
	.sd-bento__col:first-child .sd-bento__card:nth-of-type(2) { order: 4; }

	.sd-bento__col:last-child .sd-bento__card,
	.sd-bento__col:first-child .sd-bento__card:last-child {
		min-height: 400px;
	}
}

/*
 * Revision: the heading across the top with the hand-drawn tick above it (as on Superlist), then the
 * steps reading 01 to 04 left to right, the right column stepped down so the edges still never line
 * up. Every card is dark, like the process cards, and made a little more physical: a lit top edge, a
 * faint grain, and a layered shadow so it sits on the page like a board.
 */
.sd-bento__head {
	max-width: 44rem;
	margin: 0 0 clamp(32px, 4vw, 56px);
	padding: 0;
}

.sd-bento__head .sd-mark {
	margin-bottom: 14px;
}

.sd-bento__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sd-bento__col:last-child {
	padding-top: clamp(48px, 7vw, 120px);
}

.sd-bento__col:last-child .sd-bento__card,
.sd-bento__col:first-child .sd-bento__card:last-child,
.sd-bento__card {
	min-height: clamp(440px, 40vw, 540px);
}

.sd-bento__card,
.sd-bento__card--warm {
	isolation: isolate;
	border: 1px solid rgb(255 255 255 / 0.06);
	background:
		radial-gradient(ellipse 80% 60% at 100% 100%, color-mix(in srgb, var(--wp--preset--color--sd-flamingo) 22%, transparent), transparent 70%),
		linear-gradient(180deg, #26394300 0%, #0d1a2033 100%),
		linear-gradient(160deg, #2A3D47 0%, #1D2D35 55%, #172630 100%);
	color: #fff;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 1px 2px rgb(0 0 0 / 0.18), 0 12px 22px -16px rgb(0 0 0 / 0.4);
}

/* Fine grain over the card, under its contents. */
.sd-bento__card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMjAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDEgMCAwIDAgMCAxIDAgMCAwIDAgMSAwIDAgMCAxIDAiLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjYSkiLz48L3N2Zz4=) 0 0 / 200px;
	opacity: 0.06;
	mix-blend-mode: screen;
	pointer-events: none;
}

.sd-bento__num {
	color: var(--wp--preset--color--sd-flamingo);
	opacity: 1;
}

@media (width < 56rem) {
	.sd-bento__col:last-child {
		padding-top: 0;
	}

	.sd-bento__col:first-child .sd-bento__card:nth-of-type(1) { order: 1; }
	.sd-bento__col:last-child .sd-bento__card:first-child { order: 2; }
	.sd-bento__col:first-child .sd-bento__card:nth-of-type(2) { order: 3; }
	.sd-bento__col:last-child .sd-bento__card:last-child { order: 4; }
}

/*
 * The process as a bento (`sd-bento--process`), inside the existing section: its own heading keeps its
 * size and place above, so this is only the grid. Each step's real snippet hangs off the card's foot
 * and right edge. The right column is stepped down so the steps still read 01 to 04, left to right.
 */
.sd-bento--process {
	padding: 0;
}

.sd-bento--process .sd-bento__col:last-child {
	padding-top: clamp(56px, 8vw, 140px);
}

.sd-bento--process .sd-bento__card {
	min-height: clamp(460px, 42vw, 580px);
}

.sd-bento--process .sd-bento__card h3 {
	font-size: clamp(1.375rem, 1.8vw, 1.75rem);
}

.sd-bento--process .sd-bento__shot {
	right: -12%;
	bottom: -30px;
	border-radius: 12px 0 0 0;
	background: #fff;
}

.sd-bento--process .sd-bento__shot :is(img, video) {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left top;
}

/* Steps 02 and 03 lean the other way, so the papers aren't all hung the same. */
.sd-bento--process .sd-bento__col:last-child .sd-bento__card:first-child .sd-bento__shot,
.sd-bento--process .sd-bento__col:first-child .sd-bento__card:last-child .sd-bento__shot {
	left: -12%;
	right: 0;
	border-radius: 0 12px 0 0;
}

.sd-bento--process .sd-bento__col:last-child .sd-bento__card:first-child .sd-bento__shot :is(img, video),
.sd-bento--process .sd-bento__col:first-child .sd-bento__card:last-child .sd-bento__shot :is(img, video) {
	object-position: right top;
}

/* Step numbers as the Studio's rules tokens: a raised paper disc, the numeral handwritten in flamingo,
   each set at its own slight angle. */
.sd-bento__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 18px;
	padding-top: 3px;
	border: 1px solid #D5D2CB;
	border-radius: 50%;
	background: linear-gradient(180deg, #FFFFFF 0%, #F3F0EA 100%);
	box-shadow: inset 0 1px 0 var(--wp--preset--color--white), 0 1px 1px rgb(1 29 43 / 0.08);
	font-family: "LORE", var(--wp--preset--font-family--display);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--wp--preset--color--sd-flamingo);
	opacity: 1;
	rotate: -6deg;
}

.sd-bento__col:last-child .sd-bento__card:first-child .sd-bento__num { rotate: 4deg; }
.sd-bento__col:first-child .sd-bento__card:last-child .sd-bento__num { rotate: -2deg; }
.sd-bento__col:last-child .sd-bento__card:last-child .sd-bento__num { rotate: 5deg; }

/*
 * Cards in off-black with a flamingo tint (strongest low on the right) and the site's grain, and the
 * fragments without frames: no hairline, no white mat, just the image or paper sitting in the card.
 */
.sd-bento__card,
.sd-bento__card--warm {
	border: 0;
	background:
		radial-gradient(ellipse 90% 70% at 100% 100%, color-mix(in srgb, var(--wp--preset--color--sd-flamingo) 42%, transparent), transparent 72%),
		radial-gradient(ellipse 60% 50% at 0% 0%, color-mix(in srgb, var(--wp--preset--color--sd-flamingo) 8%, transparent), transparent 70%),
		var(--wp--preset--color--sd-off-black, #191617);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 1px 2px rgb(0 0 0 / 0.18), 0 12px 22px -16px rgb(0 0 0 / 0.4);
}

.sd-bento__card::before {
	opacity: 0.09;
}

.sd-bento__card .sd-bento__paper {
	border: 0;
}

.sd-bento--process .sd-bento__shot,
.sd-bento__shot {
	background: none;
	box-shadow: 0 18px 36px -18px rgb(0 0 0 / 0.6);
}

/*
 * Reveal variation (`sd-bento--reveal`): each card fades and slides up as it scrolls into view, so the
 * steps arrive in reading order (the right column's step down puts 2 after 1, 4 after 3), and the media
 * inside follows a beat behind its card. Scroll-driven, no JavaScript; the hidden starting state exists
 * only inside both guards, so reduced motion or an older browser simply shows the finished cards.
 */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.sd-bento--reveal .sd-bento__card {
			animation: sd-bento-rise linear both;
			animation-timeline: view();
			animation-range: entry 5% cover 30%;
		}

		.sd-bento--reveal .sd-bento__col:last-child .sd-bento__card {
			animation-range: entry 15% cover 34%;
		}

		.sd-bento--reveal :is(.sd-bento__shot, .sd-bento__stage) {
			animation: sd-bento-follow linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 30%;
		}
	}
}

@keyframes sd-bento-rise {
	from { opacity: 0; transform: translateY(2rem); }
}

@keyframes sd-bento-follow {
	from { opacity: 0; transform: translateY(1.25rem); }
}

/*
 * Process variant (`is-variant-process`): the steps of a process. More room between the cards, and a
 * dashed, looping line that joins each card to the next across the gap between the columns (1 to 2,
 * 2 down to 3, and so on). Each card arrives as it scrolls into view and its line draws itself on
 * towards the next, so the order is plain. Each card sits in a step wrapper that carries its line (the
 * card itself clips what hangs off it). Any number of cards; on one column they merge back into step
 * order and the lines go.
 */
.sd-bento.is-variant-process .sd-bento__grid {
	column-gap: clamp(64px, 9vw, 144px);
}

.sd-bento.is-variant-process .sd-bento__col {
	display: flex;
	flex-direction: column;
	gap: clamp(40px, 5vw, 80px);
}

.sd-bento.is-variant-process .sd-bento__step {
	position: relative;
}

.sd-bento.is-variant-process .sd-bento__grid {
	isolation: isolate;
	--sd-bento-dash-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120' preserveAspectRatio='none'%3E%3Cpath d='M4 20C50 14 70 40 82 62C96 88 120 96 156 98' fill='none' stroke='%23000' stroke-dasharray='7 7' stroke-width='2.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
	--sd-bento-dash-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120' preserveAspectRatio='none'%3E%3Cpath d='M4 24C40 18 70 34 80 56C88 74 70 84 64 70C58 54 82 46 100 62C118 78 134 92 156 94' fill='none' stroke='%23000' stroke-dasharray='7 7' stroke-width='2.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
	--sd-bento-dash-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 100' preserveAspectRatio='none'%3E%3Cpath d='M20 4C10 32 30 66 20 96' fill='none' stroke='%23000' stroke-dasharray='7 7' stroke-width='2.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
	--sd-bento-dash-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120' preserveAspectRatio='none'%3E%3Cpath d='M4 30C30 6 56 10 76 44C92 72 110 104 156 84' fill='none' stroke='%23000' stroke-dasharray='7 7' stroke-width='2.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

/* The line: pale grey dashes that are always there, tucked behind the cards at both ends so it runs
   out from under one and in under the next; and over them the same dashes in Flamingo, which fill in
   along the line as the step scrolls up the screen. Three shapes take turns, and only one loops. */
.sd-bento.is-variant-process .sd-bento__link {
	--dash: var(--sd-bento-dash-a);

	position: absolute;
	z-index: -1;
	width: calc(clamp(64px, 9vw, 144px) + 72px);
	height: clamp(96px, 10vw, 152px);
	pointer-events: none;
}

.sd-bento.is-variant-process .sd-bento__link::before,
.sd-bento.is-variant-process .sd-bento__link::after {
	content: "";
	position: absolute;
	inset: 0;
	-webkit-mask: var(--dash) center / 100% 100% no-repeat;
	mask: var(--dash) center / 100% 100% no-repeat;
}

.sd-bento.is-variant-process .sd-bento__link::before {
	background: color-mix(in srgb, var(--wp--preset--color--sd-deep-midnight) 16%, transparent);
}

.sd-bento.is-variant-process .sd-bento__link::after {
	background: var(--wp--preset--color--sd-flamingo);
}

/* The step's tag: a wide pill (the step's number, or its own words such as "Week 1") and beside it,
   when the card has one, a handwritten label. The card is a small grid here so the two share a row;
   everything under them runs the card's full width. */
.sd-bento.is-variant-process .sd-bento__card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-rows: auto auto auto minmax(0, 1fr);
	align-content: start;
}

.sd-bento.is-variant-process .sd-bento__card > :is(h3, p, .sd-bento__stage) {
	grid-column: 1 / -1;
}

.sd-bento.is-variant-process .sd-bento__col .sd-bento__step .sd-bento__num {
	width: auto;
	min-width: 3.25rem;
	height: 1.875rem;
	padding: 2px 0.75rem 0;
	border-radius: 999px;
	font-size: 1.0625rem;
	line-height: 1;
	letter-spacing: 0.03em;
	rotate: none;
	white-space: nowrap;
}

.sd-bento__kicker {
	align-self: center;
	margin: 0 0 18px 0.75rem;
	padding-block-start: 2px;
	font-family: var(--wp--preset--font-family--script);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgb(255 255 255 / 0.72);
}

/* From a left-hand card: out from under its right side, across and down to the next card. */
.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__link {
	inset: 28% auto auto calc(100% - 36px);
}

/* From a right-hand card: out from under its left side near the foot, back across and down. */
.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__link {
	inset: auto calc(100% - 36px) calc(clamp(24px, 3vw, 48px) * -1) auto;
	height: clamp(80px, 8vw, 120px);
	scale: -1 1;
}

.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__step:nth-child(3n + 2) .sd-bento__link,
.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__step:nth-child(3n) .sd-bento__link {
	--dash: var(--sd-bento-dash-b);
}

.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__step:nth-child(3n) .sd-bento__link,
.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__step:nth-child(3n + 1) .sd-bento__link {
	--dash: var(--sd-bento-dash-c);
}

@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		/* The cards slide up into place but stay solid, so the lines behind never show through them. */
		.sd-bento.is-variant-process .sd-bento__card {
			animation: sd-bento-slide linear both;
			animation-timeline: view();
			animation-range: entry 5% cover 30%;
		}

		.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__card {
			animation-range: entry 15% cover 34%;
		}

		.sd-bento.is-variant-process :is(.sd-bento__shot, .sd-bento__stage) {
			animation: sd-bento-follow linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 30%;
		}

		/* The Flamingo dashes fill in along the grey ones, from its card towards the next, as it comes up the screen. */
		.sd-bento.is-variant-process .sd-bento__link::after {
			animation: sd-bento-draw linear both;
			animation-timeline: view();
			animation-range: entry 80% cover 50%;
		}

		@media (width < 56rem) {
			.sd-bento.is-variant-process .sd-bento__link::after {
				animation-name: sd-bento-draw-down;
				animation-range: entry 40% cover 45%;
			}
		}
	}
}

@keyframes sd-bento-slide {
	from { transform: translateY(2rem); }
}

@keyframes sd-bento-draw-down {
	from { clip-path: inset(0 0 100% 0); }
	to { clip-path: inset(0); }
}

@keyframes sd-bento-draw {
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0); }
}

@media (width < 56rem) {
	.sd-bento.is-variant-process .sd-bento__grid {
		gap: 3.5rem;
	}

	/* Every step is the full width of the column, whatever its card holds. */
	.sd-bento.is-variant-process .sd-bento__step,
	.sd-bento.is-variant-process .sd-bento__step > .sd-bento__card {
		width: 100%;
		box-sizing: border-box;
	}

	/* The columns dissolve so the steps can merge back into one run, in step order. */
	.sd-bento.is-variant-process .sd-bento__col {
		display: contents;
	}

	/* One column: one gentle curve in the gap between each card and the next, down the left, drawing downwards. */
	.sd-bento.is-variant-process .sd-bento__col .sd-bento__step .sd-bento__link {
		--dash: var(--sd-bento-dash-v);

		inset: 100% auto auto 2.25rem;
		width: 2.5rem;
		height: 3.5rem;
		scale: none;
	}

	.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__step:nth-child(1) { order: 1; }
	.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__step:nth-child(1) { order: 2; }
	.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__step:nth-child(2) { order: 3; }
	.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__step:nth-child(2) { order: 4; }
	.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__step:nth-child(3) { order: 5; }
	.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__step:nth-child(3) { order: 6; }
	.sd-bento.is-variant-process .sd-bento__col:first-child .sd-bento__step:nth-child(4) { order: 7; }
	.sd-bento.is-variant-process .sd-bento__col:last-child .sd-bento__step:nth-child(4) { order: 8; }
}

/* Inside a section the process bento is only the cards: the section has the heading, the room and the
   width, so the bento's own are set aside. */
.wp-block-stronger-section .sd-bento.is-variant-process {
	padding-block: 0;
}

.wp-block-stronger-section .sd-bento.is-variant-process .sd-bento__inner {
	max-width: none;
	padding-inline: 0;
}

.wp-block-stronger-section .sd-bento.is-variant-process .sd-bento__head {
	display: none;
}
