/* ==========================================================================
   TextCRM Timeline Widget
   "Our Journey" milestone timeline for the About page. Centered spine with
   alternating cards on desktop; left spine with stacked cards on mobile.
   Card surface, type scale and hover treatment mirrored from the TextCRM
   Value Props cards; per-milestone accent via data-accent like the Roles widget.
   ========================================================================== */

.textcrm-timeline {
	position: relative;
	width: 100%;
	padding-top: 96px;                 /* py-24 */
	padding-bottom: 96px;
	background-color: #0f172a;
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: #f3f4f6;
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;

	/* Card tokens — copied from value-props-widget.css */
	--tl-card-bg: rgba(255, 255, 255, 0.03);
	--tl-card-border: rgba(255, 255, 255, 0.05);
	--tl-card-radius: 16px;
	--tl-card-padding: 28px;
	--tl-card-blur: 10px;
	--tl-transition: 250ms;

	/* Spine + node */
	--tl-line-color: rgba(255, 255, 255, 0.1);
	--tl-node-size: 16px;
	--tl-node-ring: #0f172a;
	--tl-spine: 8px;                   /* mobile spine offset from the left */
	--tl-gap: 44px;                    /* gap from spine to card on mobile */

	/* Brand accents (per-milestone override via data-accent stays available) */
	--tl-secondary: #00f5a0;
	--tl-primary: #00f5a0;
	--tl-tertiary: #00f5a0;
	--tl-accent: var(--tl-secondary);
}

.textcrm-timeline *,
.textcrm-timeline *::before,
.textcrm-timeline *::after {
	box-sizing: border-box;
}

.textcrm-timeline__container {
	width: 100%;
	max-width: 920px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.textcrm-timeline__header {
	text-align: center;
	margin-bottom: 56px;
}

.textcrm-timeline__eyebrow {
	display: inline-block;
	margin-bottom: 16px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #00f5a0;
}

.textcrm-timeline__title {
	margin: 0 0 16px;
	font-size: 36px;                   /* text-4xl */
	line-height: 1.1;
	font-weight: 700;
	color: #ffffff;
	letter-spacing: -0.01em;
}

.textcrm-timeline__title-accent {
	color: #00f5a0;
}

.textcrm-timeline__subtitle {
	margin: 0 auto;
	max-width: 42rem;
	font-size: 18px;                   /* body-lg — matches hero / pricing / integrations */
	line-height: 1.6;
	letter-spacing: 0.01em;
	color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Track + spine
   -------------------------------------------------------------------------- */
.textcrm-timeline__track {
	position: relative;
}

.textcrm-timeline__track::before {
	content: "";
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: var(--tl-spine, 8px);
	transform: translateX(-50%);
	width: 2px;
	background: var(--tl-line-color, rgba(255, 255, 255, 0.1));
}

/* --------------------------------------------------------------------------
   Item
   -------------------------------------------------------------------------- */
.textcrm-timeline__item {
	position: relative;
	margin-bottom: 40px;
	padding-left: var(--tl-gap, 44px);
}

.textcrm-timeline__item:last-child {
	margin-bottom: 0;
}

/* Per-milestone accent resolution (still customizable via inline --tl-accent) */
.textcrm-timeline__item[data-accent="secondary"] { --tl-accent: var(--tl-secondary); }
.textcrm-timeline__item[data-accent="primary"]   { --tl-accent: var(--tl-primary); }
.textcrm-timeline__item[data-accent="tertiary"]  { --tl-accent: var(--tl-tertiary); }

/* Node dot — centered on the spine */
.textcrm-timeline__node {
	position: absolute;
	top: 6px;
	left: var(--tl-spine, 8px);
	transform: translateX(-50%);
	width: var(--tl-node-size, 16px);
	height: var(--tl-node-size, 16px);
	border-radius: 9999px;
	background: var(--tl-accent);
	/* Ring first as a standalone rule so it survives if color-mix is unsupported,
	   then the enhanced ring + accent glow for modern browsers. */
	box-shadow: 0 0 0 4px var(--tl-node-ring, #0f172a);
	box-shadow: 0 0 0 4px var(--tl-node-ring, #0f172a), 0 0 14px color-mix(in srgb, var(--tl-accent) 55%, transparent);
}

/* --------------------------------------------------------------------------
   Card — surface copied from .textcrm-value-props__card
   -------------------------------------------------------------------------- */
.textcrm-timeline__card {
	padding: var(--tl-card-padding, 28px);
	background: var(--tl-card-bg, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--tl-card-border, rgba(255, 255, 255, 0.05));
	border-radius: var(--tl-card-radius, 16px);
	-webkit-backdrop-filter: blur(var(--tl-card-blur, 10px));
	backdrop-filter: blur(var(--tl-card-blur, 10px));
	transition:
		border-color var(--tl-transition, 250ms) ease,
		transform var(--tl-transition, 250ms) ease;
}

.textcrm-timeline__card:hover {
	border-color: var(--tl-accent);
	transform: translateY(-3px);
}

.textcrm-timeline__year {
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--tl-accent);
}

.textcrm-timeline__card-title {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: #ffffff;
}

.textcrm-timeline__card-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Desktop alternating spine (md+) — only when "Alternate Sides" is on
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
	.textcrm-timeline__title {
		font-size: 44px;
	}

	/* Centered spine; each milestone is a full-width row with its card on one
	   side. This stays robust no matter how tall any single card grows. */
	.textcrm-timeline--alt {
		--tl-spine: 50%;
	}

	.textcrm-timeline--alt .textcrm-timeline__item {
		padding-left: 0;
	}

	.textcrm-timeline--alt .textcrm-timeline__card {
		width: calc(50% - 40px);
	}

	/* Odd items → card on the left, text mirrored toward the spine */
	.textcrm-timeline--alt .textcrm-timeline__item:nth-child(odd) .textcrm-timeline__card {
		margin-right: auto;
		text-align: right;
	}

	/* Even items → card on the right */
	.textcrm-timeline--alt .textcrm-timeline__item:nth-child(even) .textcrm-timeline__card {
		margin-left: auto;
		text-align: left;
	}
}

@media (min-width: 1024px) {
	.textcrm-timeline__title {
		font-size: 48px;
	}
}

/* Phones — tighten padding + type */
@media (max-width: 480px) {
	.textcrm-timeline {
		padding-top: 64px;
		padding-bottom: 64px;
		--tl-card-padding: 22px;
		--tl-gap: 40px;
	}

	.textcrm-timeline__container {
		padding-left: 16px;
		padding-right: 16px;
	}

	.textcrm-timeline__title {
		font-size: 28px;
	}

	.textcrm-timeline__header {
		margin-bottom: 40px;
	}

	.textcrm-timeline__subtitle {
		font-size: 16px;
	}

	.textcrm-timeline__card-title {
		font-size: 18px;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.textcrm-timeline__card {
		transition: none;
	}

	.textcrm-timeline__card:hover {
		transform: none;
	}
}
