.heritage {
	background: #faf8f5;
	color: var(--color-text-ink);
	padding-block: 3.75rem;
}

.heritage__inner {
	display: grid;
	grid-template-columns: minmax(16rem, 30.5rem) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 3.75rem);
	align-items: start;
}

.heritage__intro {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 1101px) {
	.heritage__intro {
		position: sticky;
		top: 1.5rem;
		padding-bottom: 2.25rem;
	}

	body.has-sticky-header .heritage__intro {
		top: calc(var(--header-height-compact) + 1.5rem);
	}

	body.admin-bar.has-sticky-header .heritage__intro {
		top: calc(var(--header-height-compact) + 1.5rem + 32px);
	}
}

.heritage__eyebrow {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-gold);
}

.heritage__heading {
	margin: 0 0 1.25rem;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: clamp(2.25rem, 4.5vw, 3.5rem);
	line-height: 1.14;
	color: var(--color-text-ink);
}

.heritage__body {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--color-text-ink);
}

.heritage__body p {
	margin: 0 0 1.15rem;
}

.heritage__body p:last-child {
	margin-bottom: 0;
}

.heritage__timeline {
	position: relative;
	min-width: 0;
	padding-top: 0.75rem;
	/* Extra scroll room so the last milestone can reach the ~45vh active snap zone */
	padding-bottom: clamp(6rem, 42vh, 22rem);
}

.heritage__line {
	position: absolute;
	left: 0;
	top: var(--timeline-line-top, 0.75rem);
	bottom: var(--timeline-line-bottom, 0);
	width: 10px;
	pointer-events: none;
	z-index: 1;
}

.heritage__line-track {
	position: absolute;
	left: 4px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #9e825b;
	opacity: 0.4;
}

.heritage__line-segments {
	position: absolute;
	inset: 0;
}

.heritage__line-segment {
	position: absolute;
	left: 4px;
	width: 2px;
	overflow: hidden;
}

.heritage__line-segment-fill {
	--segment-fill: 0;
	width: 100%;
	height: 100%;
	background: var(--color-gold);
	clip-path: inset(0 0 calc((1 - var(--segment-fill)) * 100%) 0);
	will-change: clip-path;
}

.heritage__indicator {
	position: absolute;
	top: 0;
	left: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-gold);
	box-shadow:
		0 0 0 4px #faf8f5,
		0 0 0 6px rgba(196, 160, 82, 0.28),
		0 0 16px rgba(196, 160, 82, 0.45);
	opacity: 0;
	will-change: transform, opacity;
	z-index: 4;
}

.heritage__list {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
	z-index: 2;
}

.heritage__item {
	position: relative;
	padding: 0 0 3rem 2.5rem;
}

.heritage__item:last-child {
	padding-bottom: 0;
}

.heritage__connector {
	position: absolute;
	left: 0;
	top: 0.75rem;
	width: 10px;
	height: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
}

.heritage__dot {
	display: block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-gold);
	box-shadow: 0 0 0 4px #faf8f5;
	transform: scale(1);
	transition:
		transform 0.25s ease,
		background 0.25s ease,
		box-shadow 0.25s ease;
}

.heritage__connector.is-passed .heritage__dot {
	background: var(--color-gold);
}

.heritage__connector.is-active .heritage__dot {
	background: var(--color-gold);
	transform: scale(1.35);
	box-shadow:
		0 0 0 4px #faf8f5,
		0 0 0 7px rgba(196, 160, 82, 0.28),
		0 0 18px rgba(196, 160, 82, 0.4);
}

.heritage__item-content {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.heritage__item.is-active .heritage__item-content {
	transform: translateX(4px);
}

.heritage__year {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.5rem;
	line-height: 1.03;
	color: var(--color-text-ink);
	transition: color 0.25s ease;
}

.heritage__item.is-active .heritage__year {
	color: var(--color-gold);
}

.heritage__item-body {
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.75;
	color: var(--color-text-ink);
	white-space: pre-line;
}

@media (max-width: 1100px) {
	.heritage {
		padding-block: 3rem 2.75rem;
	}

	.heritage__inner {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.heritage__heading {
		margin-bottom: 0.75rem;
	}

	.heritage__item {
		padding-bottom: 2.25rem;
	}

	.heritage__timeline {
		/*
		 * Last-item snap is completed at page-end in heritage.js.
		 * Keep only a short visual buffer so stacked layouts do not
		 * leave a large empty band above the footer.
		 */
		padding-bottom: clamp(1.75rem, 8vh, 3.25rem);
	}
}

@media (max-width: 700px) {
	.heritage {
		padding-block: 3rem 2.25rem;
	}

	.heritage__timeline {
		padding-bottom: 1.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.heritage__indicator {
		display: none;
	}

	.heritage__dot,
	.heritage__item-content,
	.heritage__year {
		transition: none;
	}
}
