/* ==========================================================================
   OIB Timeline — vertical center-line with alternating cards + icon nodes
   ========================================================================== */

.oib-tl {
	--oib-tl-pt: 96px;
	--oib-tl-pb: 96px;

	position: relative;
	padding: var(--oib-tl-pt) 24px var(--oib-tl-pb);
	background: #eef2fb;
	font-family: var(--oib-font, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	-webkit-font-smoothing: antialiased;
}

.oib-tl__inner {
	margin: 0 auto;
}

.oib-tl__inner--narrow { max-width: 1080px; }
.oib-tl__inner--wide   { max-width: 1280px; }
.oib-tl__inner--full   { max-width: calc(100% - 32px); }

/* ==========================================================================
   Header
   ========================================================================== */

.oib-tl__header {
	text-align: center;
	margin: 0 auto 64px;
	max-width: 760px;
}

.oib-tl__heading {
	margin: 0 0 16px;
	color: #0f172a;
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.oib-tl__subtitle {
	margin: 0;
	color: #475569;
	font-size: clamp(15px, 1.1vw, 17px);
	line-height: 1.6;
}

/* ==========================================================================
   Steps wrapper — center vertical line
   ========================================================================== */

.oib-tl__steps {
	--oib-tl-line: #cbd5e1;
	--oib-tl-icon-size: 60px;

	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 32px;
	counter-reset: oib-tl;
}

/* Center vertical line (the static track).
   `--oib-tl-line-top` / `--oib-tl-line-height` are measured by JS so the line
   runs exactly from the first icon to the last — never overflowing past them.
   Before JS runs it falls back to the full height of the steps block. */
.oib-tl__steps::before {
	content: "";
	position: absolute;
	left: 50%;
	top: var(--oib-tl-line-top, 0);
	height: var(--oib-tl-line-height, 100%);
	width: 2px;
	background: var(--oib-tl-line);
	transform: translateX(-0.5px);
	pointer-events: none;
	z-index: 0;          /* sits below the steps / icons */
}

/* Progress fill — grows down the center line as the visitor scrolls.
   `--oib-tl-progress` is a unitless 0–1 fraction updated by JS. */
.oib-tl--progress .oib-tl__steps::after {
	content: "";
	position: absolute;
	left: 50%;
	top: var(--oib-tl-line-top, 0);
	height: calc(var(--oib-tl-line-height, 100%) * var(--oib-tl-progress, 0));
	width: 2px;
	background: var(--oib-tl-line-fill, #7E5D74);
	transform: translateX(-0.5px);
	pointer-events: none;
	z-index: 0;          /* sits below the steps / icons */
	transition: height 0.15s linear;
}

/* ==========================================================================
   Scroll-reveal — steps fade + slide up as they enter the viewport.
   The `oib-tl--animate` class is added by JS, so without JS every step
   stays fully visible.
   ========================================================================== */

.oib-tl--animate .oib-tl__step {
	opacity: 0;
	transform: translateY(36px);
	transition:
		opacity 0.6s ease,
		transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.oib-tl--animate .oib-tl__step.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Icon pops in once its step is revealed */
.oib-tl--animate .oib-tl__icon {
	opacity: 0;
	transform: scale(0.4);
	transition:
		opacity 0.35s ease 0.1s,
		transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
}

.oib-tl--animate .oib-tl__step.is-visible .oib-tl__icon {
	opacity: 1;
	transform: scale(1);
}

/* ==========================================================================
   Single step row — grid: card | icon | card
   ========================================================================== */

.oib-tl__step {
	position: relative;
	z-index: 1;                  /* lifts the step (and its icon) above the line */
	display: grid;
	grid-template-columns: 1fr var(--oib-tl-icon-size) 1fr;
	grid-template-rows: 1fr;     /* single row so the icon cell matches card height */
	align-items: center;
	gap: 0;
}

/* Left-side step: card in column 1, icon in column 2, empty column 3 */
.oib-tl__step--left .oib-tl__card { grid-column: 1; grid-row: 1; margin-right: 36px; text-align: right; }
.oib-tl__step--left .oib-tl__icon { grid-column: 2; grid-row: 1; }

/* Right-side step: empty column 1, icon in column 2, card in column 3 */
.oib-tl__step--right .oib-tl__card { grid-column: 3; grid-row: 1; margin-left: 36px; text-align: left; }
.oib-tl__step--right .oib-tl__icon { grid-column: 2; grid-row: 1; }

/* ==========================================================================
   Card
   ========================================================================== */

.oib-tl__card {
	background: #ffffff;
	border-radius: 14px;
	padding: 32px;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 12px 28px -18px rgba(15, 23, 42, 0.12);
	transition:
		transform 0.28s ease,
		box-shadow 0.28s ease;
}

.oib-tl__card:hover {
	transform: translateY(-5px);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.05),
		0 24px 44px -22px rgba(15, 23, 42, 0.26);
}

.oib-tl__step-label {
	margin: 0 0 12px;
	color: #7E5D74;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.3;
}

.oib-tl__title {
	margin: 0 0 16px;
	color: #0f172a;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.oib-tl__desc {
	margin: 0 0 22px;
	color: #475569;
	font-size: 14.5px;
	line-height: 1.65;
}

/* ---- Deliverable callout ---- */
.oib-tl__callout {
	background: #eff6ff;
	border-left: 3px solid #7E5D74;
	border-radius: 8px;
	padding: 14px 16px;
	text-align: left;  /* always left-aligned regardless of side */
}

.oib-tl__callout-label {
	margin: 0 0 4px;
	color: #0284c7;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
}

.oib-tl__callout-text {
	margin: 0;
	color: #0f172a;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.4;
}

/* ==========================================================================
   Icon node — sits on top of the center line
   ========================================================================== */

.oib-tl__icon {
	--oib-tl-icon-color: #7E5D74;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--oib-tl-icon-size);
	height: var(--oib-tl-icon-size);
	border-radius: 999px;
	background: #ffffff;
	border: 4px solid var(--oib-tl-icon-color);
	color: var(--oib-tl-icon-color);
	font-size: 22px;
	line-height: 1;
	flex-shrink: 0;
	position: relative;  /* required for z-index to take effect */
	z-index: 1;          /* sit above the line */
	box-shadow: 0 4px 12px -6px rgba(15, 23, 42, 0.18);
}

/* High-specificity vertical/horizontal centering so the icon sits at the
   exact middle of each card on every breakpoint. Beats any theme rule. */
.oib-tl .oib-tl__steps .oib-tl__step .oib-tl__icon {
	place-self: center;       /* shorthand for align-self + justify-self */
	align-self: center;       /* fallback for browsers that miss `place-self` */
	justify-self: center;
	margin: 0;                /* reset any inherited margin that could push it off-center */
}

.oib-tl__icon svg {
	width: 1em;
	height: 1em;
	display: block;
	fill: currentColor;
}

.oib-tl__icon i {
	font-size: inherit;
	line-height: 1;
}

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

/* Tablet — keep alternating but tighter */
@media (max-width: 1024px) {
	.oib-tl__card {
		padding: 24px;
	}

	.oib-tl__title {
		font-size: 22px;
	}

	.oib-tl__step--left .oib-tl__card  { margin-right: 24px; }
	.oib-tl__step--right .oib-tl__card { margin-left: 24px; }
}

/* Phone landscape / small tablet — collapse to single column on the right
   of a left-aligned center line for a cleaner read. */
@media (max-width: 768px) {
	.oib-tl__steps {
		--oib-tl-icon-size: 48px;
		gap: 24px;
	}

	.oib-tl__steps::before,
	.oib-tl--progress .oib-tl__steps::after {
		left: calc(var(--oib-tl-icon-size) / 2);
		transform: none;
	}

	.oib-tl__step,
	.oib-tl__step--left,
	.oib-tl__step--right {
		grid-template-columns: var(--oib-tl-icon-size) 1fr;
		gap: 0;
		align-items: center;        /* keep icon at vertical middle of card */
	}

	.oib-tl__step--left .oib-tl__icon,
	.oib-tl__step--right .oib-tl__icon {
		grid-column: 1;
		grid-row: 1;
	}

	.oib-tl__step--left .oib-tl__card,
	.oib-tl__step--right .oib-tl__card {
		grid-column: 2;
		grid-row: 1;
		margin: 0 0 0 20px;
		text-align: left;
	}

	.oib-tl__icon {
		font-size: 18px;
	}

	.oib-tl__card {
		padding: 22px;
	}

	.oib-tl__title {
		font-size: 20px;
		margin-bottom: 12px;
	}

	.oib-tl__desc {
		font-size: 14px;
		margin-bottom: 18px;
	}

	.oib-tl__callout {
		padding: 12px 14px;
	}
}

@media (max-width: 480px) {
	.oib-tl {
		padding: clamp(64px, 12vw, 80px) 16px clamp(64px, 12vw, 80px);
	}

	.oib-tl__header {
		margin-bottom: 40px;
	}

	.oib-tl__card {
		padding: 18px;
	}

	.oib-tl__title {
		font-size: 18px;
	}

	.oib-tl__step--left .oib-tl__card,
	.oib-tl__step--right .oib-tl__card {
		margin-left: 14px;
	}
}

/* ==========================================================================
   A11y / motion — show everything at rest, no movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.oib-tl--animate .oib-tl__step,
	.oib-tl--animate .oib-tl__step.is-visible,
	.oib-tl--animate .oib-tl__icon,
	.oib-tl--animate .oib-tl__step.is-visible .oib-tl__icon {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.oib-tl__card { transition: none !important; }
	.oib-tl__card:hover { transform: none; }
	.oib-tl--progress .oib-tl__steps::after { transition: none !important; }
}
