/*
 * About timeline (prototype about.html "about-timeline"): four year columns, each with a dot on a line, then the
 * milestones. The row scrolls sideways below 1100px (the "Scroll" style, scroll.css). The dots, lines, years and
 * items animate in when the track scrolls into view: assets/js/timeline.js adds .tl-animate, the staggers are here.
 * Outer Group: section-about-timeline is-style-about-timeline, backing = off-white, surface = white.
 */
.section-about-timeline > * {
	border-bottom-left-radius: var(--wp--custom--radius--section);
	border-bottom-right-radius: var(--wp--custom--radius--section);
}

.about-timeline__head {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-bottom: 40px;
}

.about-timeline__title {
	max-width: 960px;
}

.tl-row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px;
}

.tl-col {
	display: flex;
	flex-direction: column;
}

.tl-col .tl-label {
	margin-top: 4px;
}

.wp-block-group.tl-dot-row {
	position: relative;
	height: 20px;
	margin-top: 20px;
}

.tl-dot-row::before {
	content: "";
	position: absolute;
	top: 10px;
	right: -42px;
	left: 10px;
	height: 1px;
	background: var(--wp--preset--color--greige);
}

.tl-col:last-child .tl-dot-row::before {
	display: none;
}

.tl-dot-row::after {
	content: "";
	position: relative;
	display: block;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wp--preset--color--charcoal);
}

.tl-col--coral .tl-dot-row::after {
	background: var(--wp--preset--color--coral);
}

.tl-items {
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding-top: 28px;
}

.tl-items .tl-item {
	margin: 0;
	line-height: 1.45;
}

/* Animation: hidden only when scroll animations run (as the prototype's html.js) */
.tl-col:nth-child(1) { --tl-base: 0ms; }
.tl-col:nth-child(2) { --tl-base: 200ms; }
.tl-col:nth-child(3) { --tl-base: 400ms; }
.tl-col:nth-child(4) { --tl-base: 600ms; }
.tl-item:nth-child(1) { --tl-i: 0; }
.tl-item:nth-child(2) { --tl-i: 1; }
.tl-item:nth-child(3) { --tl-i: 2; }
.tl-item:nth-child(4) { --tl-i: 3; }
.tl-item:nth-child(5) { --tl-i: 4; }
.tl-item:nth-child(6) { --tl-i: 5; }

.js-scrollspy .tl-dot-row::before { transform: scaleX(0); transform-origin: left; }
.js-scrollspy .tl-dot-row::after { transform: scale(0); opacity: 0; }
.js-scrollspy .tl-year,
.js-scrollspy .tl-label { opacity: 0; }
.js-scrollspy .tl-item { opacity: 0; transform: translateY(12px); }

.js-scrollspy .tl-animate .tl-dot-row::before { transform: none; transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1); }
.js-scrollspy .tl-animate .tl-dot-row::after {
	transform: none;
	opacity: 1;
	transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 400ms ease;
	transition-delay: calc(600ms + var(--tl-base));
}
.js-scrollspy .tl-animate .tl-year { opacity: 1; transition: opacity 500ms ease; transition-delay: calc(900ms + var(--tl-base)); }
.js-scrollspy .tl-animate .tl-label { opacity: 1; transition: opacity 400ms ease; transition-delay: calc(1100ms + var(--tl-base)); }
.js-scrollspy .tl-animate .tl-item {
	opacity: 1;
	transform: none;
	transition: opacity 400ms ease, transform 400ms var(--wp--custom--ease);
	transition-delay: calc(1400ms + var(--tl-base) + var(--tl-i) * 120ms);
}
