/**
 * Page Sections: Steps (how-it-works).
 *
 * Desktop: horizontal row of steps with a subtle connector line behind the marks.
 * Mobile: vertical stack with the line becoming a left-side guide.
 */

.ps-steps__head {
	max-width: 680px;
	margin: 0 auto 40px;
	text-align: center;
}

.ps-steps__head h2 { margin: 0 0 .35em; }

.ps-steps__intro {
	color: var(--grey-700);
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.55;
}

.ps-steps__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--ps-steps-cols, 3), minmax(0, 1fr));
	gap: 32px 28px;
	position: relative;
}

/* Connector line — sits behind the marks, hidden on stacked layouts. */
.ps-steps__list::before {
	content: "";
	position: absolute;
	left: 8%;
	right: 8%;
	top: 32px;            /* half of the 64px mark */
	height: 1px;
	background: var(--sand);
	z-index: 0;
	pointer-events: none;
}

.ps-step {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 0 8px;
}

.ps-step__mark {
	width: 64px;
	height: 64px;
	flex: 0 0 64px;
	border-radius: 50%;
	background: var(--cream);
	border: 1.5px solid var(--teal);
	color: var(--teal);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
	box-shadow: var(--shadow-card);
	position: relative;
}

.ps-step__num {
	font-family: var(--font-heading);
	font-size: 1.85rem;
	line-height: 1;
	color: var(--teal);
	font-weight: 400;
	letter-spacing: .01em;
	/* Optical centring — the serif numerals sit slightly low. */
	transform: translateY(-1px);
}

.ps-step__icon {
	width: 28px;
	height: 28px;
	color: var(--teal);
}

.ps-step__title {
	margin: 0 0 .35em;
	font-size: 1.1rem;
	color: var(--teal);
}

.ps-step__text {
	margin: 0;
	color: var(--grey-700);
	font-size: .97rem;
	line-height: 1.55;
	max-width: 28ch;
}

/* Numbered variant — a touch more presence on the numeral. */
.ps-steps--numbered .ps-step__num { font-size: 2rem; }

/* Iconed variant — fill behind the icon for a hair more emphasis. */
.ps-steps--iconed .ps-step__mark { background: #fff; }

/* ---- Responsive ---- */

@media (max-width: 1023px) {
	.ps-steps__list {
		/* Cap to 4 visible columns on tablet before wrapping. */
		grid-template-columns: repeat(min(var(--ps-steps-cols, 3), 4), minmax(0, 1fr));
		gap: 36px 24px;
	}
	.ps-steps__list::before { top: 30px; }
	/* 5+ steps wrap to a second row here — the single-row connector no longer lines up. */
	.ps-steps[data-count="5"] .ps-steps__list::before { display: none; }
}

/* Desktop — generous gaps, larger marks, longer connector line. */
@media (min-width: 1024px) {
	.ps-steps__head { margin-bottom: 40px; }
	.ps-steps__list { gap: 32px 28px; }
	.ps-step { padding: 0 10px; }
	.ps-step__mark {
		width: 64px;
		height: 64px;
		flex-basis: 64px;
		margin-bottom: 18px;
	}
	.ps-step__num { font-size: 1.9rem; }
	.ps-steps--numbered .ps-step__num { font-size: 2.05rem; }
	.ps-step__icon { width: 28px; height: 28px; }
	.ps-step__title { font-size: 1.12rem; }
	.ps-step__text { font-size: 0.98rem; max-width: 30ch; }
	.ps-steps__list::before { top: 32px; left: 7%; right: 7%; }
}

@media (min-width: 1280px) {
	.ps-steps__list { gap: 36px 32px; }
	.ps-steps__list::before { left: 8%; right: 8%; }
}

@media (max-width: 860px) {
	.ps-steps__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 20px;
	}
	.ps-steps__list::before { display: none; }
}

@media (max-width: 600px) {
	.ps-steps__head { margin-bottom: 28px; }
	.ps-steps__list {
		grid-template-columns: 1fr;
		gap: 28px;
		padding-left: 12px;
	}
	.ps-steps__list::before {
		display: block;
		left: 43.5px;      /* aligned with mark centre: 12px list pad + 32px (half of the 64px mark), minus half the 1px line */
		right: auto;
		top: 24px;
		bottom: 24px;
		width: 1px;
		height: auto;
		background: var(--sand);
	}
	.ps-step {
		flex-direction: row;
		align-items: flex-start;
		text-align: left;
		gap: 18px;
		padding: 0;
	}
	.ps-step__mark { margin-bottom: 0; }
	.ps-step__body { flex: 1; padding-top: 6px; }
	.ps-step__text { max-width: none; }
}
