/* ═════════════════════════════════════════════════════════════════
   COMPONENT: Journey Steps
   "Client journey — step by step" block (BAO & CAO pages).

   Shimmer model:
   --shimmer-pos is a registered custom property (<percentage>) set
   by product-opening.js. Scroll moves the band across all cards in
   sync; mousemove overrides it per-card so the band follows the cursor.
   @property enables CSS transitions on the custom property so both
   motions ease smoothly.
   ═════════════════════════════════════════════════════════════════ */

@property --shimmer-pos {
	syntax: '<percentage>';
	inherits: true;
	initial-value: 120%;
}


/* ─────────────────────────────────────────────────────────────────
   SECTION SHELL
   ───────────────────────────────────────────────────────────────── */
.po-journey {
	background: var(--cream);
	position: relative;
	padding-top: 40px;
}

.po-journey-head {
	max-width: 1280px;
	margin-bottom: clamp(48px, 5vw, 80px);
}

.po-journey-head .display {
	text-transform: uppercase;
}


/* ─────────────────────────────────────────────────────────────────
   STEPS WRAP — stacked grid: header → cards → footer
   ───────────────────────────────────────────────────────────────── */
.po-steps-wrap {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(12px, 1.2vw, 16px);
}


/* ─────────────────────────────────────────────────────────────────
   HEADER CARD
   ───────────────────────────────────────────────────────────────── */
.po-steps-header {
	background: rgba(255, 255, 255, 0.60);
	border: 1px solid var(--rule);
	border-radius: 20px;
	padding: clamp(16px, 1.6vw, 22px) clamp(24px, 2.5vw, 36px);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	align-items: baseline;
	gap: clamp(12px, 2vw, 28px);
}

.po-steps-header-eyebrow {
	font-family: var(--f-sans);
	font-weight: 600;
	font-size: var(--fs-label-md);
	color: var(--green);
	text-transform: uppercase;
	margin: 0;
}

.po-steps-header-body {
	font-size: var(--fs-card-body);
	color: rgba(26, 26, 26, 0.56);
	line-height: 1.5;
	margin: 0;
	text-align: right;
}


/* ─────────────────────────────────────────────────────────────────
   STEP CARDS GRID
   ───────────────────────────────────────────────────────────────── */
.po-steps {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: clamp(10px, 1.2vw, 16px);
}

/* ── Individual step card ── */
.po-step {
	--shimmer-pos: 120%;        /* off-screen right; JS updates this */

	height: clamp(200px, 22vw, 316px);
	position: relative;
	overflow: hidden;           /* clips shimmer to rounded corners */
	background: var(--cream);
	border: 1px solid #d7d5d0;
	border-radius: 20px;
	padding: clamp(20px, 2vw, 30px) clamp(16px, 1.6vw, 24px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	text-align: left;
	font: inherit;
	color: inherit;
	cursor: pointer;

	/* Smooth scroll-driven shimmer; fast border + lift transitions. */
	transition:
		--shimmer-pos 0.55s ease,
		border-color  0.25s ease,
		transform     0.25s ease,
		box-shadow    0.25s ease;
}

/* ── Shimmer band ──
   ::after sits in front of the cream base. Its background is a
   narrow white highlight centred at var(--shimmer-pos). When
   --shimmer-pos is outside 0-100% the band is invisible; as JS
   moves it into range the highlight sweeps across the card. */
.po-step::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		110deg,
		transparent                       0%,
		transparent                       calc(var(--shimmer-pos) - 28%),
		rgba(255, 255, 255, 0.18)         calc(var(--shimmer-pos) - 12%),
		rgba(255, 255, 255, 0.45)         var(--shimmer-pos),
		rgba(255, 255, 255, 0.18)         calc(var(--shimmer-pos) + 12%),
		transparent                       calc(var(--shimmer-pos) + 28%),
		transparent                       100%
	);
}

/* ── Hover: fast-follow cursor, green outline, subtle lift ── */
.po-step:hover {
	border-color: var(--green);
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
	/* Tighten --shimmer-pos transition so the band tracks the mouse
	   in near real-time instead of lagging behind. */
	transition:
		--shimmer-pos 0.06s linear,
		border-color  0.25s ease,
		transform     0.25s ease,
		box-shadow    0.25s ease;
}

/* ── Active / open: green outline only, no fill change ── */
.po-step.is-open {
	border-color: var(--green);
}

/* ── Step card internals ── */
.po-step-num {
	font-family: var(--f-sans);
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	color: var(--green);
	letter-spacing: -.01em;
	line-height: 1;
	position: absolute;
	top: clamp(18px, 1.8vw, 26px);
	left: clamp(16px, 1.6vw, 24px);
}

.po-step-num::after {
	content: ' /';
}

.po-step-title {
	font-family: var(--f-sans);
	font-size: var(--fs-card-title);
	font-weight: 500;
	color: var(--ink);
	line-height: 1.05;
	letter-spacing: -.03em;
}

.po-step-sub {
	font-family: var(--f-sans);
	font-style: normal;
	font-size: var(--fs-card-body);
	font-weight: 400;
	color: var(--ink-soft);
	line-height: 1.3;
}

@media (prefers-reduced-motion: reduce) {
	.po-step {
		transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
	}
	.po-step::after {
		display: none;
	}
}


/* ─────────────────────────────────────────────────────────────────
   FOOTER PANEL — crossfading bullet list
   Single-cell CSS grid so panels stack in the same spot; only
   .is-active is visible. Three bullets always on one row:
   flex-wrap: nowrap + flex: 1 1 0 on each li so they share width
   equally regardless of text length.
   ───────────────────────────────────────────────────────────────── */
.po-steps-footer {
	background: rgba(11, 102, 35, 0.16);
	border: 1px solid var(--rule);
	border-radius: 20px;
	padding: clamp(20px, 2vw, 30px) clamp(28px, 3vw, 48px);
	display: grid;
	grid-template-areas: 'stack';
}

.po-steps-footer-panel {
	grid-area: stack;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;          /* all bullets on one row */
	gap: clamp(16px, 2.5vw, 40px);
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition:
		opacity    0.25s ease,
		transform  0.25s ease,
		visibility 0s linear 0.35s;
	pointer-events: none;
}

.po-steps-footer-panel.is-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
	z-index: 1;
	transition:
		opacity    0.25s ease,
		transform  0.25s ease,
		visibility 0s linear 0s;
}

.po-steps-footer li {
	flex: 1 1 0;                /* equal-width columns; text wraps within */
	display: flex;
	align-items: center;
	gap: 0.6em;
	font-family: var(--f-sans);
	font-size: clamp(10px, 0.85vw, 12px);
	color: var(--ink-soft);
	line-height: 1;
	white-space: nowrap;
}

.po-steps-footer li::before {
	content: '';
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--green);
}

@media (prefers-reduced-motion: reduce) {
	.po-steps-footer-panel,
	.po-steps-footer-panel.is-active {
		transition: none;
		transform: none;
	}
}


/* ─────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.po-steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.po-steps-footer-panel {
		flex-wrap: wrap;        /* allow bullet wrap on tablet/mobile */
	}

	.po-steps-footer li {
		flex: 0 1 auto;
	}
}

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

/* ─────────────────────────────────────────────────────────────────
   MOBILE ACCORDION — mirrors ops-view-mob; hidden on desktop
   ───────────────────────────────────────────────────────────────── */
.po-steps-mob { display: none; }

@media (max-width: 768px) {
	.po-steps,
	.po-steps-footer { display: none; }

	.po-steps-mob {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

		.po-steps-header-body {
		text-align: left;
	}
	
	.po-steps-mob-item {
		border-radius: 14px;
		overflow: hidden;
		border: 1px solid rgba(26, 26, 26, 0.18);
		background: rgba(255, 255, 255, 0.75);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
		transition: background 0.3s ease, border-color 0.3s ease;
	}

	.po-steps-mob-item.is-open {
		background: rgba(11, 102, 35, 0.09);
		border-color: rgba(11, 102, 35, 0.22);
	}

	.po-steps-mob-trigger {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 20px 24px;
		background: none;
		border: none;
		cursor: pointer;
		text-align: left;
	}

	.po-steps-mob-trigger-body {
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.po-steps-mob-trigger-inner {
		display: flex;
		align-items: baseline;
		gap: 6px;
	}

	.po-steps-mob-trigger .po-step-sub {
		font-size: 14px;
		color: var(--ink-soft);
		line-height: 1.4;
	}

	.po-steps-mob-trigger .po-step-num {
		position: static;
		font-size: var(--fs-eyebrow);
		font-weight: 600;
		color: var(--green);
		line-height: 1;
	}


	.po-steps-mob-trigger .po-step-num::after { content: ' /'; }

	.po-steps-mob-trigger .po-step-title {
		font-size: 20px;
		font-weight: 500;
		color: var(--ink);
		line-height: 1.1;
		letter-spacing: -.03em;
	}

	.po-steps-mob-chevron {
		flex-shrink: 0;
		width: 24px;
		height: 24px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.po-steps-mob-chevron::before {
		content: '';
		display: block;
		width: 9px;
		height: 9px;
		border-right: 2px solid rgba(26, 26, 26, 0.55);
		border-bottom: 2px solid rgba(26, 26, 26, 0.55);
		transform: rotate(45deg) translate(-2px, -2px);
		transition: transform 0.3s ease;
	}

	.po-steps-mob-item.is-open .po-steps-mob-chevron::before {
		transform: rotate(-135deg) translate(-2px, -2px);
	}

	.po-steps-mob-panel {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease;
	}

	.po-steps-mob-item.is-open .po-steps-mob-panel { max-height: 600px; }

	.po-steps-mob-bullets {
		list-style: none;
		margin: 0;
		padding: 4px 24px 20px;
	}

	.po-steps-mob-bullets li {
		display: flex;
		align-items: center;
		gap: 0.6em;
		font-size: 14px;
		color: var(--ink-soft);
		line-height: 1.4;
		padding: 5px 0;
	}

	.po-steps-mob-bullets li::before {
		content: '';
		flex-shrink: 0;
		width: 7px;
		height: 7px;
		border-radius: 50%;
		background: var(--green);
	}
}
