/* HDA Zeitleiste – front end. Everything is scoped to .hdatl so the theme is not affected (and vice versa). */

.hdatl {
	--hdatl-primary: #00986a;
	--hdatl-text: #3c3c3b;
	--hdatl-muted: #9d9d9c;
	--hdatl-accent: #f39462;
	--hdatl-line: #6f6f6e;
	--hdatl-light: #84c7ad;
	--hdatl-font: "HDATL Lato", Lato, "Helvetica Neue", Arial, sans-serif;
	--hdatl-display: "HDATL Oswald", Oswald, "Arial Narrow", sans-serif;
	--hdatl-ease-out: cubic-bezier(0.23, 1, 0.32, 1);

	position: relative;
	display: block;
	width: 100%;
	height: 400vh;
	margin: 0;
	padding: 0;
	background: #fff;
	color: var(--hdatl-text);
	font-family: var(--hdatl-font);
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	visibility: visible !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

/* Full-bleed breakout. !important because many themes force margins/max-width on content children. */
.hdatl.hdatl--full {
	width: var(--hdatl-vw, 100vw) !important;
	max-width: none !important;
	margin-left: calc(50% - var(--hdatl-vw, 100vw) / 2) !important;
	margin-right: 0 !important;
}

.hdatl__sticky {
	position: sticky;
	top: var(--hdatl-top, 0px);
	width: 100%;
	height: calc(100vh - var(--hdatl-top, 0px));
	overflow: hidden;
	background: #fff;
}

.hdatl__sheet {
	position: absolute;
	left: 0;
	top: 0;
	height: 1000px;
	transform-origin: 0 0;
	will-change: transform;
}

.hdatl__road {
	position: absolute;
	inset: 0;
	clip-path: inset(0 100% 0 0);
}

.hdatl__road svg {
	position: absolute;
	left: 0;
	top: 0;
	max-width: none;
	overflow: visible;
}

.hdatl-el {
	position: absolute;
	margin: 0;
}

/* ---------- Reveal animations (same timings as the original design) ---------- */

.hdatl-a-rise {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 700ms ease var(--d, 150ms), transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 150ms);
}

.hdatl-a-zoom {
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 700ms ease var(--d, 320ms), transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 320ms);
}

.hdatl-a-pop {
	opacity: 0;
	transform: scale(0.6);
	transform-origin: 50% 50%;
	transition: opacity 600ms ease var(--d, 300ms), transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 300ms);
}

.hdatl-a-fade {
	opacity: 0;
	transition: opacity 700ms ease var(--d, 400ms);
}

.hdatl-a-rise.is-on,
.hdatl-a-zoom.is-on,
.hdatl-a-pop.is-on,
.hdatl-a-fade.is-on {
	opacity: 1;
	transform: none;
}

.hdatl-line {
	width: 2px;
	background: var(--hdatl-line);
	transform: scaleY(0);
	transition: transform 600ms cubic-bezier(0.3, 0.7, 0.3, 1) var(--d, 0ms);
}

.hdatl-line--up {
	transform-origin: 50% 100%;
}

.hdatl-line--down {
	transform-origin: 50% 0;
}

.hdatl-line.is-on {
	transform: none;
}

/* ---------- Year marker ---------- */

.hdatl-dot {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 38%, #fff 58%, #dedede 100%);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.2);
	transition: opacity 350ms ease, transform 750ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hdatl-dot::before {
	content: "";
	position: absolute;
	inset: 12px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #94d4b6, #2da574 72%);
}

.hdatl-dot--dark::before {
	background: radial-gradient(circle at 35% 30%, #3fbf8f, #00986a 72%);
}

.hdatl-dot::after {
	content: "";
	position: absolute;
	left: 34px;
	top: 34px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
}

.hdatl-dot.is-on {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

.hdatl-year {
	width: 200px;
	text-align: center;
	line-height: 1;
}

.hdatl-year__label {
	font-weight: 300;
	font-size: 34px;
	letter-spacing: 0.02em;
	color: var(--hdatl-muted);
}

.hdatl-year__num {
	margin-top: 2px;
	font-weight: 700;
	font-size: 72px;
}

/* ---------- Phase label ---------- */

.hdatl-phase {
	font-size: 18px;
	line-height: 1.35;
	white-space: nowrap;
	color: #3a9d74;
}

.hdatl-phase--dark {
	color: #00845c;
}

/* ---------- Cards and their content blocks ---------- */

.hdatl-card--center { text-align: center; }
.hdatl-card--left { text-align: left; }
.hdatl-card--right { text-align: right; }

.hdatl-h {
	margin: 0;
	font-weight: 700;
	font-size: 25px;
	line-height: 1.3;
}

.hdatl-h--light {
	font-weight: 300;
	font-size: 26px;
}

.hdatl-h--accent {
	color: var(--hdatl-primary);
}

.hdatl-t {
	font-size: 20px;
	line-height: 1.4;
}

.hdatl .hdatl-img {
	display: block;
	max-width: none;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.hdatl .hdatl-img--rect,
.hdatl .hdatl-img--round {
	object-fit: cover;
}

.hdatl .hdatl-img--round {
	border-radius: 50%;
}

.hdatl .hdatl-img--doc {
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.hdatl .hdatl-img--float {
	position: absolute;
	margin: 0;
}

.hdatl-ring {
	position: relative;
	margin: 0 auto;
}

.hdatl .hdatl-ring img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 4px var(--hdatl-primary);
}

.hdatl-ring svg {
	position: absolute;
	left: -10%;
	top: -10%;
	width: 120%;
	height: 120%;
	overflow: visible;
}

.hdatl-card--left .hdatl-img,
.hdatl-card--left .hdatl-ring,
.hdatl-card--left .hdatl-div {
	margin-left: 0;
}

.hdatl-card--right .hdatl-img,
.hdatl-card--right .hdatl-ring,
.hdatl-card--right .hdatl-div {
	margin-right: 0;
}

.hdatl-grid {
	display: grid;
	gap: 0 24px;
	font-size: 20px;
	line-height: 1.4;
}

.hdatl-div {
	width: 2px;
	height: 32px;
	margin: 8px auto;
	background: var(--hdatl-line);
}

.hdatl-hash {
	font-family: var(--hdatl-display);
	font-weight: 700;
	font-size: 34px;
	line-height: 0.95;
	color: var(--hdatl-primary);
}

.hdatl-hash__box {
	display: inline-block;
	margin-top: 4px;
	padding: 4px 9px 5px;
	background: var(--hdatl-primary);
	color: #fff;
}

.hdatl-html {
	font-size: 20px;
	line-height: 1.4;
}

/* ---------- Decorative plus signs ---------- */

.hdatl-plus {
	position: absolute;
}

.hdatl-plus::before,
.hdatl-plus::after {
	content: "";
	position: absolute;
	background: var(--hdatl-primary);
}

.hdatl-plus::before {
	left: calc(50% - var(--t) / 2);
	top: 0;
	width: var(--t);
	height: 100%;
}

.hdatl-plus::after {
	left: 0;
	top: calc(50% - var(--t) / 2);
	width: 100%;
	height: var(--t);
}

.hdatl-plus--grad::before {
	background: linear-gradient(180deg, var(--hdatl-primary), var(--hdatl-light));
}

.hdatl-plus--grad::after {
	background: linear-gradient(90deg, var(--hdatl-primary), var(--hdatl-light));
}

/* ---------- Side labels, bottom navigation ---------- */

.hdatl__gutter {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 3;
	width: 80px;
	height: 1000px;
	transform-origin: 0 0;
	background: linear-gradient(90deg, #fff 82%, rgba(255, 255, 255, 0));
	pointer-events: none;
}

.hdatl__glabel {
	position: absolute;
	left: 36px;
	transform: translate(-50%, -50%) rotate(-90deg);
	font-weight: 300;
	font-size: 26px;
	line-height: 1.15;
	letter-spacing: 0.04em;
	text-align: center;
	white-space: nowrap;
	color: var(--hdatl-muted);
}

.hdatl__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 4;
	height: 84px;
	background: linear-gradient(0deg, rgba(255, 255, 255, 0.97) 45%, rgba(255, 255, 255, 0));
	pointer-events: none;
}

.hdatl__bar {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 14px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 18px;
}

.hdatl__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.hdatl__btns {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.hdatl .hdatl-chip,
.hdatl .hdatl-btn {
	width: auto;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	border-radius: 999px;
	font-family: var(--hdatl-font);
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, transform 160ms var(--hdatl-ease-out);
}

.hdatl .hdatl-chip {
	padding: 7px 11px;
	border: 1.5px solid #d6ebe1;
	background: #fff;
	color: #5d6b66;
	font-size: 13px;
	letter-spacing: 0.04em;
}

.hdatl .hdatl-chip.is-active {
	border-color: var(--hdatl-primary);
	background: var(--hdatl-primary);
	color: #fff;
}

.hdatl .hdatl-btn {
	padding: 8px 14px;
	border: 1.5px solid var(--hdatl-primary);
	background: #fff;
	color: var(--hdatl-primary);
	font-size: 12px;
	letter-spacing: 0.08em;
}

@media (hover: hover) {
	.hdatl .hdatl-btn:hover {
		background: var(--hdatl-primary);
		color: #fff;
	}

	.hdatl .hdatl-chip:hover:not(.is-active) {
		border-color: var(--hdatl-light);
	}
}

.hdatl .hdatl-chip:active,
.hdatl .hdatl-btn:active {
	transform: scale(0.97);
}

.hdatl .hdatl-chip:focus-visible,
.hdatl .hdatl-btn:focus-visible,
.hdatl-modal__close:focus-visible {
	outline: 2px solid var(--hdatl-primary);
	outline-offset: 2px;
}

/* ---------- List dialogs ---------- */

.hdatl-modal {
	position: fixed;
	width: calc(100% - 40px);
	max-width: 980px;
	max-height: calc(100% - 40px);
	margin: auto;
	padding: 32px 36px 36px;
	overflow: auto;
	border: 0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	color: var(--hdatl-text);
	font-family: var(--hdatl-font);
	font-size: 16px;
	line-height: 1.3;
}

.hdatl-modal[open] {
	animation: hdatl-modal-in 220ms var(--hdatl-ease-out);
}

.hdatl-modal::backdrop {
	background: rgba(255, 255, 255, 0.8);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

@keyframes hdatl-modal-in {
	from {
		opacity: 0;
		transform: scale(0.98);
	}
}

.hdatl .hdatl-modal__close {
	position: absolute;
	right: 16px;
	top: 14px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1.5px solid #cfe8dc;
	border-radius: 50%;
	background: #fff;
	color: var(--hdatl-primary);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: transform 160ms var(--hdatl-ease-out);
}

.hdatl .hdatl-modal__close:active {
	transform: scale(0.97);
}

.hdatl-modal__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-right: 40px;
}

.hdatl .hdatl-modal__plus {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
}

.hdatl .hdatl-modal__title {
	margin: 0;
	padding: 0;
	color: var(--hdatl-text);
	font-family: var(--hdatl-font);
	font-weight: 300;
	font-size: 30px;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: none;
	text-wrap: balance;
}

.hdatl-modal__rows {
	margin-top: 22px;
	column-gap: 32px;
}

.hdatl-row {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	font-size: 15px;
	line-height: 1.75;
	break-inside: avoid;
}

.hdatl-row__t {
	text-align: right;
	white-space: nowrap;
	color: #8a8a89;
}

@media (max-width: 600px) {
	.hdatl-modal {
		width: calc(100% - 24px);
		max-height: calc(100% - 24px);
		padding: 24px 18px 26px;
	}

	.hdatl .hdatl-modal__title {
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hdatl .hdatl-el,
	.hdatl .hdatl-chip,
	.hdatl .hdatl-btn,
	.hdatl-modal[open] {
		transition: none !important;
		animation: none !important;
	}
}
