/**
 * Block: Process steps.
 *
 * Mobile: a vertical timeline. Desktop (960px+): steps in a row along a rule,
 * each marked by a large serif numeral.
 */

.ci-process__inner {
	display: grid;
	gap: 2.5rem;
}

.ci-process__list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ci-step;
}

.ci-process__step {
	position: relative;
	display: grid;
	grid-template-columns: 3.5rem 1fr;
	column-gap: 1.25rem;
	padding-bottom: 2rem;
	counter-increment: ci-step;
}

/* Numeral */
.ci-process__step::before {
	content: counter(ci-step, decimal-leading-zero);
	grid-row: 1 / span 2;
	color: var(--wp--preset--color--blue);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.25rem;
	font-variant-numeric: lining-nums;
	line-height: 1;
}

/* Timeline rule between numerals */
.ci-process__step:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 3rem;
	bottom: .75rem;
	left: 1.1rem;
	width: 1px;
	background-color: var(--wp--preset--color--line);
}

.ci-process__title {
	margin: .25rem 0 .5rem;
	font-size: 1.375rem;
	line-height: 1.2;
}

.ci-process__text {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.ci-on-dark .ci-process__step::before {
	color: var(--wp--preset--color--sky);
}

.ci-on-dark .ci-process__step::after {
	background-color: rgb(255 255 255 / .16);
}

@media (min-width: 960px) {
	.ci-process__inner {
		grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
		align-items: start;
		gap: 3rem;
	}

	.ci-process__list {
		grid-template-columns: repeat(var(--ci-process-count, 4), minmax(0, 1fr));
		gap: 2rem;
		border-top: 1px solid var(--wp--preset--color--line);
	}

	.ci-process__step {
		display: block;
		padding: 1.75rem 0 0;
	}

	/* A tick on the rule above each numeral. */
	.ci-process__step::after,
	.ci-process__step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: -1px;
		bottom: auto;
		left: 0;
		width: 2.5rem;
		height: 2px;
		background-color: var(--wp--preset--color--blue);
	}

	.ci-process__step::before {
		display: block;
		margin-bottom: 1.25rem;
		font-size: 2.75rem;
	}

	.ci-on-dark .ci-process__list {
		border-top-color: rgb(255 255 255 / .16);
	}

	.ci-on-dark .ci-process__step::after {
		background-color: var(--wp--preset--color--sky);
	}
}
