/**
 * Differentiators layout — navy, animated loan-lifecycle pipeline + cards.
 * Typography (font-size / weight / line-height / token colors) is applied via
 * utility classes in the markup (.fs-* / .fw-* / .lh-* / .text-*). This file
 * keeps only layout, animation, spacing, and non-token (rgba) colors.
 * NOTE: stages and arrows are all <div> siblings, so the staggered reveal
 * uses :nth-child() positions (stage=1,3,5,7 / arrow=2,4,6), not :nth-of-type.
 */

.flexible-section.diff {
	background: var(--gradient-navy);
}

/* Extra spacing below the (utility-styled) section title, unique to this section. */
.flexible-section.diff .section-ti {
	margin-bottom: clamp(30px, 2.419vw + 21.29px, 60px);
}

/* ── Pipeline ───────────────────────────────────── */
.uo-pipe-wrap {
	margin-bottom: clamp(19px, 0.95vw + 15.6px, 31.25px);
}

.uo-pipe {
	display: grid;
	grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
	align-items: stretch;
}

.uo-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 15px;
	color: var(--color-gold2);
	opacity: 0;
	animation: uoArrowIn 0.5s ease forwards;
}

.uo-arrow svg {
	width: 28px;
	height: 28px;
	display: block;
}

.uo-stage {
	position: relative;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	background-color: var(--color-navy-deep2);
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 15px;
	padding: clamp(25.57px, 1.265vw + 21.02px, 41.25px) clamp(21.7px, 1.073vw + 17.84px, 35px) clamp(23.25px, 1.149vw + 19.11px, 37.5px);
	opacity: 0;
	transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
	animation: uoStageIn 0.55s ease forwards;
}

.uo-stage:hover {
	transform: translateY(-5px);
	border-color: rgba(196, 154, 26, 0.55);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.uo-stage .num {
	letter-spacing: 0.18em;
	color: rgba(196, 154, 26, 0.7);
	margin-bottom: clamp(12px, 0.6vw + 9.6px, 18.75px);
}

.uo-stage .st-title {
	margin-bottom: clamp(15px, 0.75vw + 12px, 23.75px);
}

.uo-stage .st-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.uo-stage .st-list li {
	display: flex;
	align-items: center;
	gap: 11px;
	color: rgba(255, 255, 255, 0.52);
}

.uo-stage .st-list li::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--color-gold2);
	opacity: 0.85;
	flex-shrink: 0;
}

/* Close = gold end-cap */
.uo-stage.is-close {
	justify-content: center;
	background: linear-gradient(155deg, #d4a820, #b07f12);
	border-color: transparent;
}

.uo-stage.is-close .num {
	color: rgba(0, 21, 64, 0.5);
}

/* Navy title on the gold close card — overrides the .text-white utility. */
.uo-stage.is-close .st-title {
	color: var(--color-navy);
	margin-bottom: 8px;
}

.uo-stage.is-close .st-sub {
	color: rgba(0, 21, 64, 0.72);
}

.uo-stage.is-close:hover {
	box-shadow: 0 18px 43px rgba(196, 154, 26, 0.32);
}

/* Staggered reveal by position within .uo-pipe */
.uo-stage:nth-child(1) { animation-delay: 0.05s; }
.uo-arrow:nth-child(2) { animation-delay: 0.18s; }
.uo-stage:nth-child(3) { animation-delay: 0.22s; }
.uo-arrow:nth-child(4) { animation-delay: 0.35s; }
.uo-stage:nth-child(5) { animation-delay: 0.39s; }
.uo-arrow:nth-child(6) { animation-delay: 0.52s; }
.uo-stage:nth-child(7) { animation-delay: 0.56s; }

/* in-house bar */
.uo-inhouse {
	margin-top: clamp(17.82px, 0.881vw + 14.65px, 28.75px);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(14px, 0.7vw + 11.5px, 22.5px);
	background: rgba(0, 0, 0, 0.26);
	border: 1px solid rgba(196, 154, 26, 0.22);
	border-radius: 13px;
	padding: clamp(17.82px, 0.881vw + 14.65px, 28.75px) clamp(23.25px, 1.149vw + 19.11px, 37.5px);
}

.uo-inhouse .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-gold2);
	opacity: 0.85;
	flex-shrink: 0;
}

.uo-inhouse .tx {
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.uo-pipe-hint {
	text-align: center;
	margin-top: clamp(14px, 0.7vw + 11.5px, 22.5px);
	font-style: italic;
	color: rgba(255, 255, 255, 0.32);
}

/* ── 4 small cards below ────────────────────────── */
.diff-grid-below {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: var(--radius-card);
	overflow: hidden;
}

.diff-card-sm {
	background: var(--gradient-navy);
	padding: clamp(21.7px, 1.073vw + 17.84px, 35px) clamp(18.6px, 0.919vw + 15.29px, 30px);
	transition: background-color 0.22s ease;
}

.diff-card-sm:hover {
	background: rgba(255, 255, 255, 0.03);
}

.diff-num {
	letter-spacing: 0.14em;
	color: rgba(196, 154, 26, 0.5);
	margin-bottom: 12px;
}

.diff-title-sm {
	margin-bottom: 8px;
}

.diff-desc-sm {
	color: rgba(255, 255, 255, 0.38);
}

@keyframes uoStageIn { to { opacity: 1; transform: none; } }
@keyframes uoArrowIn { to { opacity: 1; } }

/* ── Responsive layout reflow ─────────────────────
   The horizontal 4-across flow diagram needs ~1360px to breathe; below that the
   stages cram and every title/list item wraps (the awkward 1200–1360 range).
   So keep 4-across + arrows only >= 1361px; from 1360→601 reflow the four
   stages into a roomy 2×2 grid and hide the arrows (the 01–04 numbers carry the
   sequence); single column below 600. Type/spacing stay fluid throughout. */
@media (max-width: 1360px) {
	.uo-pipe {
		grid-template-columns: 1fr 1fr;
		gap: clamp(16px, 1.6vw, 28px);
	}

	.uo-arrow { display: none; }
}

@media (max-width: 600px) {
	.uo-pipe {
		grid-template-columns: 1fr;
	}

	.uo-inhouse { flex-direction: column; text-align: center; }
}

/* Bottom proof cards: 4 → 2 → 1 */
@media (max-width: 1024px) {
	.diff-grid-below { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.diff-grid-below { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.uo-stage,
	.uo-arrow {
		animation: none;
		opacity: 1;
		transform: none;
	}
}
