/**
 * Module: Stage Section (Employment lifecycle explorer)
 * Loaded when a `stage_section` layout is present on the page.
 */

:root {
	--indigo: #002B5C;
	--crimson: #ED1C24;
	--slate: #060606;
	--mist: #A5A4A4;
	--frost: #EDEDED;
	--white: #FFFFFF;
	--indigo-deep: #001A3A;
	--indigo-tint: #F2F5F9;
	--ink: #1C2230;
	--ink-soft: #4A5568;
	--line: #D9DCE1;
	--display: 'Gotham', 'Montserrat', system-ui, sans-serif;
	--body: 'Open Sans', system-ui, sans-serif;
	--max: 1180px;
	--gutter: clamp(20px, 4vw, 48px);
	--radius: 6px;
}

/* Base Life Section */
.life {
	background: var(--indigo, #002B5C);
	color: #ffffff;
	padding: 72px 0 76px;
	position: relative;
	overflow: hidden;
}

.life.on-dark {
	color: #ffffff;
}

.life .wrap {
	max-width: var(--max, 1180px);
	margin: 0 auto;
	padding: 0 var(--gutter, clamp(20px, 4vw, 48px));
}

/* Head */
.life .head {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 40px;
	align-items: end;
	margin-bottom: 34px;
}

.life .eyebrow {
	font-family: var(--display);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
	margin-bottom: 12px;
}

.life h2 {
	font-family: var(--display);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	color: #ffffff;
	line-height: 1.15;
	letter-spacing: -.01em;
	margin: 0;
}

.life .head p {
	font-family: var(--body);
	color: rgba(255, 255, 255, .78);
	font-size: 17px;
	font-weight: 300;
	max-width: 560px;
	margin-top: 10px;
	margin-bottom: 0;
	line-height: 1.6;
}

/* Tally counters */
.tally {
	display: flex;
	gap: 28px;
	align-items: baseline;
	font-family: var(--display);
	white-space: nowrap;
}

.tally div {
	display: grid;
}

.tally b {
	font-size: 40px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.03em;
	color: #ffffff;
}

.tally b.c {
	color: var(--crimson, #ED1C24);
}

.tally span {
	font-family: var(--body);
	font-size: 12.5px;
	color: rgba(255, 255, 255, .7);
	margin-top: 6px;
}

/* Stages Tablist */
.stages {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0;
	position: relative;
	list-style: none;
	padding: 0;
	margin: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.stages::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 3px;
	width: calc(100% / 6);
	background: var(--crimson, #ED1C24);
	transform: translateX(calc(var(--i, 0) * 100%));
	transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.stage {
	background: none;
	border: 0;
	color: rgba(255, 255, 255, .62);
	font-family: var(--display);
	font-weight: 700;
	font-size: 13.5px;
	text-align: left;
	padding: 14px 12px 16px;
	cursor: pointer;
	display: grid;
	gap: 4px;
	transition: color .2s;
	position: relative;
	line-height: 1.25;
}

.stage small {
	font-family: var(--body);
	font-weight: 400;
	font-size: 12px;
	color: rgba(255, 255, 255, .5);
	display: block;
}

.stage .n {
	display: inline-block;
	font-size: 11px;
	letter-spacing: .12em;
	color: rgba(255, 255, 255, .45);
	text-transform: uppercase;
}

.stage:hover,
.stage[aria-selected="true"] {
	color: #ffffff;
}

.stage[aria-selected="true"] .n,
.stage[aria-selected="true"] small {
	color: rgba(255, 255, 255, .8);
}

.stage .bar {
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 3px;
	width: 0;
	background: rgba(255, 255, 255, .35);
}

.stage[aria-selected="true"] .bar {
	width: var(--p, 0%);
	transition: width .1s linear;
}

/* Panels */
.panels {
	position: relative;
	margin-top: 36px;
	min-height: 300px;
}

.life .panel,
.panel {
	display: grid !important;
	grid-template-columns: 5fr 7fr;
	gap: 56px;
	align-items: start;
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(10px);
	transition: opacity .35s ease, transform .35s ease, visibility 0s .35s;
}

.life .panel.on,
.panel.on {
	position: relative;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: none;
	transition-delay: 0s;
}

.life .panel[hidden],
.panel[hidden] {
	display: grid !important;
}

.panel h3 {
	font-family: var(--display);
	color: #ffffff;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

.panel .lede {
	font-family: var(--body);
	color: rgba(255, 255, 255, .78);
	font-size: 16px;
	margin-top: 12px;
	max-width: 440px;
	line-height: 1.6;
}

.panel .out {
	margin-top: 22px;
	display: inline-flex;
	gap: 10px;
	align-items: center;
	font-family: var(--body);
	font-size: 13.5px;
	color: rgba(255, 255, 255, .85);
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 8px;
	padding: 10px 14px;
}

.panel .out b {
	color: #ffffff;
	font-weight: 700;
}

.panel .out svg,
.panel .out img {
	width: 16px;
	height: 16px;
	flex: none;
	object-fit: contain;
}

/* Tasks / Items Grid */
.items {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 22px;
	padding: 0;
	margin: 0;
}

.items li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-family: var(--body);
	font-size: 15px;
	line-height: 1.45;
	padding: 12px 14px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 8px;
	opacity: 0;
	transform: translateY(8px);
	color: #ffffff;
}

.panel.on .items li {
	animation: pop .5s cubic-bezier(.2, .8, .2, 1) forwards;
	animation-delay: calc(var(--d) * 60ms + 120ms);
}

@keyframes pop {
	to {
		opacity: 1;
		transform: none;
	}
}

.items li svg,
.items li img {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	object-fit: contain;
}

.items li svg {
	stroke: var(--crimson, #ED1C24);
	fill: none;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.items li.ins {
	background: rgba(237, 28, 36, .16);
	border-color: rgba(237, 28, 36, .5);
}

.items li.ins em {
	font-style: normal;
	display: block;
	font-size: 12px;
	color: rgba(255, 255, 255, .75);
	margin-top: 3px;
}

/* Bottom CTAs */
.life .ctas {
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid rgba(255, 255, 255, .14);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.life .ctas p {
	font-family: var(--body);
	color: rgba(255, 255, 255, .78);
	font-size: 15px;
	max-width: 520px;
	margin: 0;
	line-height: 1.6;
}

.life .ctas .actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.life .actions .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--display);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .02em;
	padding: 14px 26px;
	border-radius: var(--radius, 6px);
	border: 2px solid transparent;
	transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none !important;
}

.life .actions .btn:hover {
	transform: translateY(-1px);
}

.life .actions .btn.btn-primary,
.life .actions .btn.primary {
	background: var(--crimson, #ED1C24);
	border-color: var(--crimson, #ED1C24);
	color: #ffffff;
}

.life .actions .btn.btn-primary:hover,
.life .actions .btn.primary:hover {
	background: #C9151C;
	border-color: #C9151C;
	color: #ffffff;
}

.life .actions .btn.btn-outline,
.life .actions .btn.outline {
	border-color: rgba(255, 255, 255, .7);
	color: #ffffff;
	background: transparent;
}

.life .actions .btn.btn-outline:hover,
.life .actions .btn.outline:hover {
	background: #ffffff;
	color: var(--indigo, #002B5C);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 980px) {
	.life .head {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.stages {
		grid-template-columns: repeat(3, 1fr);
	}

	.stages::after {
		display: none;
	}

	.stage {
		border-bottom: 1px solid rgba(255, 255, 255, .18);
	}

	.stage[aria-selected="true"] {
		box-shadow: inset 0 -3px 0 var(--crimson, #ED1C24);
	}

	.life .panel,
	.panel {
		grid-template-columns: 1fr;
		gap: 26px;
	}
}

@media (max-width: 720px) {
	.stages {
		grid-template-columns: 1fr 1fr;
	}

	.items {
		grid-template-columns: 1fr;
	}

	.life {
		padding: 52px 0;
	}

	.tally b {
		font-size: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.life .panel,
	.panel,
	.panel.on,
	.panel.on .items li {
		transition: none !important;
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.stage[aria-selected="true"] .bar {
		display: none;
	}
}
