/*
 * Timeline.
 *
 * "One row" (.syb-timeline--row): large milestone cards on one line. The row starts in
 * line with the content and runs off the right edge of the screen. builder.js pins the
 * block under the header (is-pinned) and turns the page scroll into sideways movement
 * until the last card is in view; a line along the dots fills up, the cards passed
 * light up and the counter above the row follows (is-live). Without script, for visitors
 * who ask for less motion, and when the block is too tall to pin, the row is swiped.
 *
 * "Grid" (.syb-timeline--grid): About Us "Milestones" design, four 310px columns with
 * 48px between rows; on mobile one column with the line running down the left.
 */

.syb-timeline__card {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.syb-timeline__year {
	color: var(--c-blue);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
}

.syb-timeline__title {
	font-size: 18px;
	line-height: 24px;
}

.syb-timeline__text {
	font-size: 16px;
	line-height: 24px;
}

/* ------------------------------------------------------------------------------------
 * One row
 * ---------------------------------------------------------------------------------- */

.syb-timeline--row {
	/* Space from the screen edge to the content, as .container has it (100% = the full-width strip). */
	--syb-edge: calc((100% - min(100% - 2 * var(--gutter), var(--container))) / 2);
	--syb-card-w: min(82vw, 340px);
	--syb-card-gap: 16px;
	/* Where the dot sits inside a card: the card's inner padding. */
	--syb-card-pad: 24px;
	overflow-x: clip;
}

.syb-timeline__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 48px;
	margin-bottom: 32px;
}

.syb-timeline--row .syb-head {
	max-width: 720px;
	margin-bottom: 0;
}

/* Counter: 01 ——— 08 */
.syb-timeline__meter {
	display: none;
	align-items: center;
	gap: 14px;
	color: var(--c-mute);
	font-size: 15px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.syb-timeline--row.is-live .syb-timeline__meter {
	display: flex;
}

.syb-timeline__now {
	color: var(--c-ink);
	font-size: 28px;
	letter-spacing: -0.02em;
}

.syb-timeline__bar {
	position: relative;
	width: 120px;
	height: 2px;
	overflow: hidden;
	border-radius: 2px;
	background: #d3e2fb;
}

.syb-timeline__bar i {
	position: absolute;
	inset: 0;
	background: var(--c-primary);
	transform: scaleX(var(--syb-progress, 0));
	transform-origin: left center;
}

/* The strip the row lives in: as wide as the screen, content-aligned at the start. */
.syb-timeline__viewport {
	padding: 8px var(--syb-edge) 28px;
	overflow-x: auto;
	scroll-padding-inline: var(--syb-edge);
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	outline: none;
}

.syb-timeline__viewport::-webkit-scrollbar {
	display: none;
}

.syb-timeline__viewport:focus-visible {
	box-shadow: inset 0 0 0 2px var(--c-primary);
}

.syb-timeline__track {
	position: relative;
	width: max-content;
}

.syb-timeline--row .syb-timeline__list {
	display: flex;
	gap: var(--syb-card-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.syb-timeline--row .syb-timeline__item {
	position: relative;
	flex: 0 0 var(--syb-card-w);
	padding-top: 44px;
	scroll-snap-align: start;
}

/* The line through the dots, from the first dot to the last one. */
.syb-timeline__line {
	position: absolute;
	top: 8px;
	right: calc(var(--syb-card-w) - var(--syb-card-pad) - 9px);
	left: calc(var(--syb-card-pad) + 9px);
	height: 2px;
	border-radius: 2px;
	background: #d3e2fb;
}

.syb-timeline__line i {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--c-cyan), var(--c-primary));
	transform: scaleX(1);
	transform-origin: left center;
}

.syb-timeline--row.is-live .syb-timeline__line i {
	transform: scaleX(var(--syb-progress, 0));
}

.syb-timeline__dot {
	position: absolute;
	top: 0;
	left: var(--syb-card-pad);
	width: 18px;
	height: 18px;
	border: 4px solid #cfe2ff;
	border-radius: 50%;
	background: var(--c-primary);
	transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.syb-timeline--row .syb-timeline__card {
	position: relative;
	gap: 10px;
	height: 100%;
	min-height: 280px;
	padding: var(--syb-card-pad);
	overflow: hidden;
	border: 1px solid #e1ebfb;
	border-radius: 20px;
	background: var(--c-white);
	box-shadow: 0 1px 2px rgba(16, 24, 64, 0.04), 0 12px 32px -18px rgba(16, 24, 64, 0.18);
	transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}

.syb-timeline__index {
	position: absolute;
	top: var(--syb-card-pad);
	right: var(--syb-card-pad);
	color: var(--c-mute);
	font-size: 14px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	line-height: 20px;
	transition: color 0.4s ease;
}

.syb-timeline--row .syb-timeline__year {
	margin: 8px 0 0;
	padding-bottom: 36px;
	background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-blue) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 56px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.04em;
	line-height: 1;
	transition: opacity 0.4s ease;
}

.syb-timeline--row .syb-timeline__title {
	color: var(--c-ink);
	font-size: 20px;
	line-height: 28px;
	transition: color 0.4s ease;
}

.syb-timeline--row .syb-timeline__text {
	color: var(--c-body);
	font-size: 16px;
	line-height: 26px;
	transition: color 0.4s ease;
}

/* Not reached yet by the line: quieter. */
.syb-timeline--row.is-live .syb-timeline__item:not(.is-reached) .syb-timeline__dot {
	border-color: #e6eefc;
	background: #c5d7f5;
}

.syb-timeline--row.is-live .syb-timeline__item:not(.is-reached) .syb-timeline__year {
	opacity: 0.35;
}

/* The milestone the line has just reached. */
.syb-timeline--row .syb-timeline__item.is-current .syb-timeline__dot {
	border-color: rgba(36, 124, 239, 0.22);
	transform: scale(1.25);
}

.syb-timeline--row .syb-timeline__item.is-current .syb-timeline__card {
	border-color: transparent;
	background: linear-gradient(150deg, var(--c-primary) 0%, var(--c-blue) 100%);
	box-shadow: 0 24px 48px -24px rgba(3, 105, 184, 0.6);
	color: var(--c-white);
}

.syb-timeline--row .syb-timeline__item.is-current .syb-timeline__year {
	background: none;
	color: var(--c-white);
}

.syb-timeline--row .syb-timeline__item.is-current .syb-timeline__title {
	color: var(--c-white);
}

.syb-timeline--row .syb-timeline__item.is-current .syb-timeline__text,
.syb-timeline--row .syb-timeline__item.is-current .syb-timeline__index {
	color: rgba(255, 255, 255, 0.82);
}

/* Pinned: the strip no longer scrolls by itself, the script moves the row. */
.syb-timeline--row.is-pinned .syb-timeline__stage {
	position: sticky;
	top: var(--syb-pin-top, calc(var(--header-h) + 20px));
}

.syb-timeline--row.is-pinned .syb-timeline__viewport {
	overflow: visible;
	scroll-snap-type: none;
}

.syb-timeline--row.is-pinned .syb-timeline__track {
	will-change: transform;
}

@media (min-width: 768px) {
	.syb-timeline--row {
		--syb-card-w: 380px;
		--syb-card-gap: 24px;
		--syb-card-pad: 32px;
	}

	.syb-timeline__top {
		margin-bottom: 48px;
	}

	.syb-timeline--row .syb-timeline__card {
		min-height: 340px;
		border-radius: 24px;
	}

	.syb-timeline--row .syb-timeline__year {
		font-size: 72px;
	}

	.syb-timeline--row .syb-timeline__title {
		font-size: 24px;
		line-height: 32px;
	}

	.syb-timeline--row .syb-timeline__text {
		font-size: 17px;
		line-height: 28px;
	}
}

@media (min-width: 1100px) {
	.syb-timeline--row {
		--syb-card-w: 420px;
		--syb-card-gap: 28px;
	}

	.syb-timeline--row .syb-timeline__card {
		min-height: 380px;
	}

	.syb-timeline--row .syb-timeline__year {
		font-size: 88px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.syb-timeline__dot,
	.syb-timeline--row .syb-timeline__card,
	.syb-timeline--row .syb-timeline__year,
	.syb-timeline--row .syb-timeline__title,
	.syb-timeline--row .syb-timeline__text,
	.syb-timeline__index {
		transition: none;
	}
}

/* ------------------------------------------------------------------------------------
 * Grid
 * ---------------------------------------------------------------------------------- */

.syb-timeline--grid .syb-timeline__list {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.syb-timeline--grid .syb-timeline__item {
	position: relative;
	padding: 0 0 28px 32px;
}

.syb-timeline--grid .syb-timeline__item:last-child {
	padding-bottom: 0;
}

.syb-timeline__rail {
	position: absolute;
	left: 0;
	top: 8px;
	bottom: -8px;
	width: 16px;
}

/* The line */
.syb-timeline__rail::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 16px;
	bottom: 0;
	width: 2px;
	background: #d3e2fb;
}

.syb-timeline--grid .syb-timeline__item:last-child .syb-timeline__rail::before {
	display: none;
}

/* The dot */
.syb-timeline__rail i {
	position: absolute;
	left: 0;
	top: 0;
	width: 16px;
	height: 16px;
	border: 3px solid #cfe2ff;
	border-radius: 50%;
	background: var(--c-primary);
}

@media (min-width: 768px) {
	.syb-timeline--grid .syb-head {
		gap: 14px;
		margin-bottom: 48px;
	}

	.syb-timeline--grid .syb-timeline__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 48px;
	}

	.syb-timeline--grid .syb-timeline__item {
		padding: 28px 24px 0 0;
	}

	.syb-timeline--grid .syb-timeline__card {
		gap: 12px;
	}

	.syb-timeline__rail {
		inset: 0 0 auto;
		width: auto;
		height: 16px;
	}

	.syb-timeline__rail::before,
	.syb-timeline--grid .syb-timeline__item:last-child .syb-timeline__rail::before {
		display: block;
		inset: 7px 0 auto 16px;
		width: auto;
		height: 2px;
	}

	.syb-timeline--grid .syb-timeline__year {
		font-size: 28px;
		line-height: 36px;
	}
}

@media (min-width: 1100px) {
	.syb-timeline--grid .syb-timeline__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
