/* ============================================================
 * Base — root variables, reset, typography, body, generic
 * animation keyframes. Loaded on every page.
 * ============================================================ */

:root {
	--ink: #1a0f0a;
	--ember: #d4521a;
	--gold: #c9883a;
	--dusk: #2c1810;
	--cream: #faf4ec;
	--parchment: #f2e8d8;
	--ash: #8a6e5a;
	--glow: rgba(212, 82, 26, 0.18);
}

*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Outfit', system-ui, -apple-system, sans-serif;
	background: var(--ink);
	color: var(--cream);
	overflow-x: hidden;
	cursor: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* When the visitor prefers reduced motion, restore the native cursor and
   tone down sweeping animations. */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	body { cursor: auto; }
	.cursor, .cursor-ring { display: none !important; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* Generic links inside content blocks */
a {
	color: var(--ember);
	text-decoration: none;
}
a:hover {
	color: var(--gold);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

button {
	font-family: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	cursor: pointer;
}

/* Generic shared utility classes that recur across sections */
.chapter-label {
	font-size: 0.7rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--ember);
	margin-bottom: 2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}
.chapter-label::before {
	content: '';
	width: 30px;
	height: 1px;
	background: var(--ember);
}

.story-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: clamp(2.8rem, 5vw, 4.5rem);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin-bottom: 2rem;
}
.story-title em {
	font-style: italic;
	color: var(--gold);
}

.story-body {
	font-size: 1.05rem;
	line-height: 1.9;
	color: rgba(250, 244, 236, 0.75);
	font-weight: 300;
}
.story-body p + p { margin-top: 1.2rem; }

.chapter {
	position: relative;
	overflow: hidden;
}

/* Fade-in keyframes used by opening copy */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal hooks (driven by reveal.js IntersectionObserver) */
.reveal {
	opacity: 0;
	transform: translateY(40px);
	transition:
		opacity 0.9s cubic-bezier(.22, 1, .36, 1),
		transform 0.9s cubic-bezier(.22, 1, .36, 1);
}
.reveal.visible {
	opacity: 1;
	transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
