/* ============================================================
   Step Cards section ("Taking the First Step")
   Design ref: designs/Homepage Design Desktop.jpg y1630-2490,
   Mobile y2270-3550. Flat primary teal band (no pattern here),
   centred intro (left-aligned on mobile), cream cards with icon
   chip, serif heading, numbered steps, Learn More link.
   Hover: caramel bottom edge + underlined link.
   ============================================================ */

.step-cards {
	background: var(--color-teal);
	padding-block: var(--section-padding);
	color: var(--color-text-on-dark);
}

/* ---- Intro ---- */

.step-cards__heading {
	margin-bottom: var(--space-md);
	color: var(--color-text-on-dark);
}

.step-cards__text {
	margin-bottom: 0;
	max-width: 48rem;
}

/* ---- Cards ---- */

.step-cards__grid {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	margin-top: var(--space-lg);
}

.step-cards__card {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 2.5rem;
	background: var(--color-cream-light);
	border-radius: var(--radius-sm);
	color: var(--color-text);
}

/* Caramel bottom bar "loads" left to right on hover */
.step-cards__card::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: var(--color-caramel-light);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.step-cards__card:hover::after,
.step-cards__card:focus-within::after {
	transform: scaleX(1);
}

/* Icon: dark teal by default, caramel when the card is hovered (per design) */
.step-cards__chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: var(--space-md);
	background: var(--color-light-grey);
	border-radius: var(--radius-md);
	color: var(--color-heading);
	transition: color var(--transition);
}

.step-cards__card:hover .step-cards__chip,
.step-cards__card:focus-within .step-cards__chip {
	color: var(--color-caramel-light);
}

.step-cards__chip svg {
	width: 24px;
	height: 24px;
}

.step-cards__card-heading {
	margin-bottom: var(--space-md);
	font-size: 1.5rem;
}

.step-cards__steps {
	list-style: none;
	margin: 0 0 var(--space-md);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

.step-cards__step {
	position: relative;
	padding-left: 1.75rem;
}

.step-cards__num {
	position: absolute;
	left: 0;
	top: 0;
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-caramel-light);
}

.step-cards__step-text {
	margin-bottom: 0;
}

.step-cards__step-text strong {
	color: var(--color-heading);
}

/* ---- Learn More link ---- */

.step-cards__link {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--color-teal-dark);
}

/* Words stay dark teal on hover (beats the global a:hover caramel) -
   only the arrow takes the caramel accent */
.step-cards__link:hover,
.step-cards__link:focus-visible {
	color: var(--color-teal-dark);
}

/* Stretched link: the whole card is clickable and shows the pointer */
.step-cards__link::before {
	content: "";
	position: absolute;
	inset: 0;
	cursor: pointer;
}

/* Underline fades in softly under the words (opacity only, no wipe) */
.step-cards__link-label {
	position: relative;
}

.step-cards__link-label::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1px;
	height: 1.5px;
	background: currentColor;
	opacity: 0;
	transition: opacity 0.45s ease;
}

.step-cards__card:hover .step-cards__link-label::after,
.step-cards__link:focus-visible .step-cards__link-label::after {
	opacity: 1;
}

.step-cards__arrow {
	transition: transform 0.3s ease, color 0.3s ease;
}

.step-cards__arrow svg {
	display: block;
	width: 17px;
	height: 12px;
}

.step-cards__card:hover .step-cards__arrow,
.step-cards__link:focus-visible .step-cards__arrow {
	color: var(--color-caramel-light);
	transform: translateX(3px);
}

/* ---- Tablet and up: centred intro, cards side by side ---- */

@media (min-width: 768px) {
	.step-cards__intro {
		text-align: center;
		max-width: 48rem;
		margin-inline: auto;
	}

	.step-cards__text {
		margin-inline: auto;
	}

	.step-cards__grid {
		flex-direction: row;
		align-items: stretch;
		justify-content: center;
		margin-top: var(--space-xl);
	}

	.step-cards__card {
		flex: 1 1 0;
		max-width: 524px;
	}
}

@media (min-width: 1024px) {
	/* Cards row is inset from the container edges in the design (1072px) */
	.step-cards__grid {
		max-width: 1072px;
		margin-inline: auto;
		gap: var(--space-md);
	}
}
