/* Process Cards — static layout (no CSS custom properties yet) */

.process-cards {
	width: 100%;
	padding-top: 24px;
	padding-bottom: 24px;
}

.process-cards__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0 16px;
	align-items: start;
}

.process-cards__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	min-width: 0;
	padding: 0 4px 8px;
}

/* Dotted connector between marker icons */
.process-cards__item:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 43px;
	left: calc(50% + 46px);
	width: calc(100% - 72px);
	border-top: 2px dotted #c8cdd8;
	z-index: 0;
	pointer-events: none;
}

/* Blue midpoint dots on the connector */
.process-cards__item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 38px;
	left: 100%;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	border-radius: 50%;
	background: #385fdd;
	z-index: 2;
	pointer-events: none;
}

.process-cards__item > * {
    position: relative;
    z-index: 1;
}

.process-cards__marker {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 88px;
	height: 88px;
	margin-bottom: 20px;
}

/* White track ring under the progress arc */
.process-cards__marker-track {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #ffffff;
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}

/*
 * Progress arc: masks a spinning gradient ring to --process-progress.
 * item/5 → 20%, 40%, 60%, 80%, 100% (Evolve forced to 100%).
 */
.process-cards__marker-progress {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	-webkit-mask: conic-gradient(#000 0deg, #000 var(--process-progress, 20%), transparent 0);
	mask: conic-gradient(#000 0deg, #000 var(--process-progress, 20%), transparent 0);
	overflow: hidden;
}

.process-cards__marker-progress-glow {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	/* Steps 1–5: primary-only gradient + spin */
	background: conic-gradient(
		from 0deg,
		#c5d2fd 0deg,
		#98aef9 70deg,
		#5074e9 140deg,
		#274ecd 210deg,
		#1334a0 280deg,
		#98aef9 330deg,
		#c5d2fd 360deg
	);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
	animation: process-cards-loading 1.8s linear infinite;
}

/*
 * Evolve (phase 6): seamless long-wave blend + stronger outer bloom.
 * Identical start/end + oklch interpolation = soft fade with no hard seam.
 */
.process-cards__marker--evolve {
	isolation: isolate;
}

.process-cards__marker--evolve::before {
	content: "";
	position: absolute;
	inset: -14px;
	border-radius: 50%;
	background: radial-gradient(
		circle,
		rgba(255, 230, 100, 0.7) 0%,
		rgba(255, 200, 40, 0.4) 32%,
		rgba(255, 176, 0, 0.18) 52%,
		transparent 72%
	);
	z-index: 0;
	pointer-events: none;
	animation: process-cards-evolve-bloom 2.8s ease-in-out infinite;
}

.process-cards__marker--evolve .process-cards__marker-track {
	box-shadow:
		0 0 0 1px rgba(255, 220, 80, 0.55),
		0 0 18px rgba(255, 210, 40, 0.65),
		0 0 36px rgba(255, 190, 0, 0.4),
		0 0 56px rgba(255, 176, 0, 0.22);
}

.process-cards__marker--evolve .process-cards__marker-progress-glow {
	background: conic-gradient(
		in oklch,
		#ffe566 0deg,
		#ffd21a 40deg,
		#ffb800 70deg,
		#f5a623 100deg,
		#ffe566 130deg,
		#fff3a0 155deg,
		#ffd21a 180deg,
		#ffc107 210deg,
		#ffb300 245deg,
		#ffe566 280deg,
		#fff59d 310deg,
		#ffd21a 335deg,
		#ffe566 360deg
	);
	animation-duration: 3.2s;
	filter: drop-shadow(0 0 6px rgba(255, 220, 60, 0.9)) drop-shadow(0 0 16px rgba(255, 190, 0, 0.55));
}

.process-cards__marker--evolve .process-cards__marker-core {
	box-shadow:
		0 0 0 1px rgba(255, 220, 100, 0.6),
		0 0 16px rgba(255, 200, 40, 0.45),
		inset 0 0 12px rgba(255, 236, 150, 0.2);
}

@keyframes process-cards-loading {
	to {
		transform: rotate(360deg);
	}
}

@keyframes process-cards-evolve-bloom {
	0%,
	100% {
		opacity: 0.7;
		transform: scale(0.94);
	}
	50% {
		opacity: 1;
		transform: scale(1.08);
	}
}

@media (prefers-reduced-motion: reduce) {
	.process-cards__marker-progress-glow {
		animation: none;
		background: conic-gradient(
			from -90deg,
			#c5d2fd 0%,
			#5074e9 40%,
			#274ecd 70%,
			#1334a0 100%
		);
	}

	.process-cards__marker--evolve::before {
		animation: none;
		opacity: 0.85;
		transform: none;
	}

	.process-cards__marker--evolve .process-cards__marker-progress-glow {
		filter: drop-shadow(0 0 8px rgba(255, 210, 40, 0.7));
		background: conic-gradient(
			in oklch,
			#ffe566 0%,
			#ffb800 25%,
			#fff3a0 50%,
			#ffc107 75%,
			#ffe566 100%
		);
	}
}

/* Inner icon disc with white border sitting inside the progress ring */
.process-cards__marker-core {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid #ffffff;
	box-shadow: 0 6px 18px rgba(56, 95, 221, 0.18);
}

.process-cards__marker-icon {
	display: inline-flex;
	color: #385fdd;
	line-height: 0;
}

.process-cards__marker-icon svg {
	display: block;
	width: 38px;
	height: 38px;
}

.process-cards__number {
	display: block;
	margin: 0 0 4px;
    font-size: 130px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #f0f2f3;
    user-select: none;
    pointer-events: none;
    position: absolute;
    top: 120px;
    z-index: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
}

.process-cards__title {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: #385fdd;
	text-transform: none;
}

.process-cards__desc {
	margin: 0 0 20px;
	max-width: 180px;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #5a6270;
}

.process-cards__visual {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 160px;
	height: 140px;
	margin-top: auto;
	display: grid;
	place-items: end center;
}

.process-cards__visual svg,
.process-cards__visual img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
	max-height: 140px;
	object-fit: contain;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.process-cards__item:hover .process-cards__visual svg,
.process-cards__item:hover .process-cards__visual img {
	transform: translateY(-6px);
}

/* —— Tablet: 3 columns —— */
@media (max-width: 1023px) {
	.process-cards__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 48px;
		column-gap: 20px;
	}

	/* Hide horizontal connectors that would wrongly span wrapping rows */
	.process-cards__item::before,
	.process-cards__item::after {
		display: none;
	}

	/* Re-draw connectors only within each row of 3 */
	.process-cards__item:nth-child(3n + 1)::before,
	.process-cards__item:nth-child(3n + 2)::before {
		display: block;
		left: calc(50% + 46px);
		width: calc(100% - 72px);
	}

	.process-cards__item:nth-child(3n + 1)::after,
	.process-cards__item:nth-child(3n + 2)::after {
		display: block;
	}

	.process-cards__desc {
		max-width: 220px;
	}
}

/* —— Mobile: vertical timeline —— */
@media (max-width: 639px) {
	.process-cards__list {
		grid-template-columns: 1fr;
		row-gap: 0;
		padding-left: 12px;
	}

	.process-cards__item {
		align-items: flex-start;
		text-align: left;
		padding: 0 0 36px 108px;
	}

	.process-cards__item:last-child {
		padding-bottom: 0;
	}

	/* Vertical dotted line */
	.process-cards__item:not(:last-child)::before {
		display: block;
		top: 88px;
		left: 43px;
		width: 0;
		height: calc(100% - 56px);
		border-top: 0;
		border-left: 2px dotted #c8cdd8;
	}

	.process-cards__item:not(:last-child)::after {
		display: block;
		top: auto;
		bottom: 10px;
		left: 38px;
		margin-left: 0;
	}

	.process-cards__marker {
		position: absolute;
		top: 0;
		left: 0;
		margin-bottom: 0;
	}

	.process-cards__number {
		margin-top: 8px;
	}

	.process-cards__title {
		margin-top: 0;
	}

	.process-cards__desc {
		max-width: none;
		margin-bottom: 16px;
	}

	.process-cards__visual {
		justify-self: start;
		place-items: end start;
		margin-inline: 0;
		height: 128px;
		max-width: 148px;
	}
}
