/* -- Chapter Nav -- */

.chapter-nav {
	position: fixed;
	top: 0;
	width: 100%;
	padding: var(--space-3) var(--space-3) 0;
	z-index: 100;
	pointer-events: none;
	transition: opacity var(--duration-base) var(--ease), visibility var(--duration-base) var(--ease);
}
.chapter-nav.is-hidden {
	opacity: 0;
	visibility: hidden;
}
.chapter-nav__list {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
}
.chapter-nav__button {
	pointer-events: auto;
}
.chapter-nav__button[data-chapter-target="birthright"] { --chapter-tone: var(--birthright-color); }
.chapter-nav__button[data-chapter-target="limbo"]      { --chapter-tone: var(--limbo-color); }
.chapter-nav__button[data-chapter-target="daylight"]   { --chapter-tone: var(--daylight-color); }
.chapter-nav__button.is-highlighted {
	--btn-color: rgb(var(--secondary-foreground-color) / 0.95);
	--btn-border: rgb(var(--chapter-tone) / 0.4);
}
.chapter-nav__button.is-active {
	--btn-color: rgb(var(--foreground-color));
	--btn-border: rgb(var(--chapter-tone) / 0.75);
	--btn-bg: rgb(var(--chapter-tone) / 0.5);
	box-shadow: 0 0 18px rgb(var(--chapter-tone) / 0.22);
}
/* -- Splash -- */

@keyframes splashDriftOut {
	from { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
	to   { opacity: 0; transform: scale(1.12) translateY(-14px); filter: blur(8px); }
}
@keyframes splashDriftIn {
	from { opacity: 0; transform: scale(1.12) translateY(-14px); filter: blur(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
.splash {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgb(var(--background-color));
	transition: opacity var(--duration-slow) var(--ease) var(--duration-base), visibility 0s linear calc(var(--duration-base) + var(--duration-base));
}
.splash.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.splash:not(.is-hidden) {
	transition-delay: 0ms, 0ms;
}
.splash__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(var(--space-4), 4vh, var(--space-6));
	text-align: center;
	padding: var(--space-4);
	animation: splashDriftIn var(--duration-slow) var(--ease) var(--duration-base) both;
	animation-delay: var(--duration-base);
}
.splash.is-hidden .splash__inner {
	animation: splashDriftOut var(--duration-slow) var(--ease) forwards;
}
.splash__title {
	font-family: var(--font-display);
	font-size: var(--text-4xl);
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-wide);
}
.splash__instruction {
	font-size: var(--text-sm);
	font-weight: var(--weight-light);
	line-height: var(--leading-normal);
	color: rgb(var(--foreground-color) / 0.75);
}
.splash__nav-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-2);
	list-style: none;
	padding: 0;
}
/* -- Exit Button -- */

.exit-button {
	position: fixed;
	bottom: var(--space-3);
	left: var(--space-3);
	z-index: 200;
	transition: opacity var(--duration-base) var(--ease), visibility var(--duration-base) var(--ease);
}
.exit-button.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
