/* Into the Lightless: the cards' colours (scripts/rpg/ui/card_kit.gd), in Grenze.
   The fonts are the game's own (SIL OFL, fonts/OFL-*.txt), served from here: nothing is fetched elsewhere
   until the video's play is pressed (YouTube, privacy-enhanced). */
@font-face { font-family: "Grenze"; src: url("fonts/Grenze-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Grenze Gotisch"; src: url("fonts/GrenzeGotisch-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
	--soot: #0b0706;
	--face: #1f1814;
	--trim: #94733f;
	--gold: #f2bf52;
	--parchment: #e0cca8;
	--ash: #9e9180;
	--ember: #ff9c3d;
	color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--soot); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--soot);
	color: var(--parchment);
	font: 400 1.15rem/1.6 "Grenze", Georgia, serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--ember); }

h1, h2, h3 {
	font-family: "Grenze Gotisch", "Grenze", Georgia, serif;
	font-weight: 600;
	color: var(--gold);
	line-height: 1.1;
	margin: 0 0 0.5em;
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); text-align: center; }
h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }

/* The game's own pixels stay pixels at any size. */
.cast img, .boss img, .king-img, .parade img { image-rendering: pixelated; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* A gilt rule with a diamond, as on the title. */
.rule {
	height: 2px;
	margin: 0 auto 32px;
	max-width: 520px;
	background: linear-gradient(90deg, transparent, var(--trim), transparent);
	position: relative;
}
.rule::after {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: 12px; height: 12px;
	background: var(--gold);
	transform: translate(-50%, -50%) rotate(45deg);
}

.lead { max-width: 720px; margin: 0 auto 8px; text-align: center; font-size: clamp(1.15rem, 2.4vw, 1.35rem); }

.button {
	display: inline-block;
	padding: 14px 34px;
	border: 2px solid var(--gold);
	border-radius: 8px;
	background: #2b1c12;
	color: var(--gold);
	font: 600 1.3rem "Grenze", Georgia, serif;
	text-decoration: none;
	box-shadow: 0 0 22px rgba(255, 140, 50, 0.3);
	transition: box-shadow 0.25s, color 0.25s;
}
.button:hover { color: #ffe3a6; box-shadow: 0 0 36px rgba(255, 140, 50, 0.55); }

/* ---- The top: the title's fight, looping, behind the logo. ---- */
.hero {
	position: relative;
	min-height: 100svh;
	display: grid;
	place-items: center;
	text-align: center;
	padding: 48px 16px 96px;
	overflow: hidden;
	background: var(--soot) url("img/title-scene.jpg") center / cover no-repeat;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
.hero-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to bottom, rgba(11, 7, 6, 0.25) 0%, rgba(11, 7, 6, 0) 30%, rgba(11, 7, 6, 0) 55%, var(--soot) 100%),
		radial-gradient(ellipse at 50% 45%, rgba(11, 7, 6, 0.3), rgba(11, 7, 6, 0.85) 80%);
}
.hero-inner { position: relative; }
.hero .logo { width: min(700px, 92vw); height: auto; filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.9)); }
.tagline { font-size: clamp(1.1rem, 2.8vw, 1.55rem); margin: 18px 0 30px; letter-spacing: 0.02em; text-shadow: 0 2px 6px #000; }
.tagline span { color: var(--gold); margin: 0 0.45em; }
.more {
	display: block;
	margin-top: 26px;
	color: var(--parchment);
	text-decoration: none;
	font-size: 1.05rem;
	opacity: 0.85;
}
.more::after { content: ""; display: block; width: 10px; height: 10px; margin: 8px auto 0; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .more::after { animation: none; } }

/* ---- The pitch. ---- */
.pitch { padding: 24px 16px 40px; text-align: center; }
.facts {
	list-style: none;
	padding: 0;
	margin: 36px auto 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 14px;
	max-width: 820px;
}
.facts li {
	border: 1px solid rgba(148, 115, 63, 0.6);
	border-radius: 999px;
	padding: 6px 18px;
	background: rgba(31, 24, 20, 0.7);
	color: var(--parchment);
}
.facts b { color: var(--gold); font-family: "Grenze Gotisch", serif; font-size: 1.3em; margin-right: 0.15em; }

/* ---- The way down: a path drawn down the page (app.js), darkening as it goes. ---- */
.descent {
	position: relative;
	padding: 80px 0 120px;
	background: linear-gradient(to bottom, var(--soot) 0%, #1c110a 18%, #160d08 50%, #0d0806 80%, #050303 100%);
}
.descent .path {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	overflow: visible;
}
.descent .path path { fill: none; stroke-linecap: round; }
.descent .path .glow { stroke: rgba(255, 156, 61, 0.22); stroke-width: 18; filter: blur(6px); }
.descent .path .line { stroke: var(--gold); stroke-width: 3; }
.descent-head { position: relative; text-align: center; margin-bottom: 40px; }

.stop {
	position: relative;
	max-width: 1120px;
	margin: 0 auto;
	padding: 56px 16px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}
/* Where the path passes through a stop: a glowing ember. */
.marker {
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--gold);
	box-shadow: 0 0 0 5px rgba(242, 191, 82, 0.2), 0 0 26px 8px rgba(255, 156, 61, 0.55);
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
}
.stop-text { position: relative; z-index: 2; }
.stop:nth-of-type(even) .stop-text { order: 2; }
.depth {
	margin: 0 0 4px;
	color: var(--ember);
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.85rem;
}
.stop p { margin: 0 0 0.8em; }
.boss { display: flex; align-items: center; gap: 14px; margin-top: 18px !important; }
.boss img { height: 120px; width: auto; filter: drop-shadow(0 0 18px rgba(255, 120, 40, 0.35)); }
.boss span { color: var(--ash); font-size: 0.95rem; line-height: 1.3; }
.boss b { display: block; color: var(--gold); font-family: "Grenze Gotisch", serif; font-weight: 600; font-size: 1.45rem; }

.shots { position: relative; z-index: 2; display: grid; gap: 14px; }
.shots img {
	width: 100%;
	height: auto;
	display: block;
	border: 2px solid var(--trim);
	border-radius: 8px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, 0.75);
}
.shots img:first-child { transform: rotate(-1.5deg); }
.shots img:last-child { width: 78%; justify-self: end; margin-top: -60px; transform: rotate(2deg); border-color: var(--gold); }

.heroes { grid-template-columns: 1fr 1.3fr; }
.cast { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-end; gap: clamp(4px, 2vw, 26px); }
.cast figure { margin: 0; text-align: center; flex: none; }
/* All four at one height (the game draws them so), feet on one line: a wide hat doesn't make a hero smaller. */
.cast img { height: clamp(110px, 17vw, 230px); width: auto; display: block; margin: 0 auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 24px rgba(255, 140, 50, 0.25)); }
.cast figcaption { font-family: "Grenze Gotisch", serif; color: var(--gold); font-size: 1.2rem; }

/* Each biome's own light round its stop. */
.biome::before {
	content: "";
	position: absolute;
	inset: -10% -20%;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(ellipse at 70% 50%, var(--tint), transparent 60%);
	opacity: 0.55;
}
.stop:nth-of-type(even).biome::before { background: radial-gradient(ellipse at 30% 50%, var(--tint), transparent 60%); }
.crypt { --tint: rgba(255, 140, 50, 0.16); }
.grotto { --tint: rgba(70, 220, 130, 0.14); }
.drowned { --tint: rgba(70, 170, 255, 0.15); }
.ember { --tint: rgba(255, 70, 30, 0.2); }
.crystal { --tint: rgba(170, 100, 255, 0.17); }

.king { grid-template-columns: 1fr; text-align: center; justify-items: center; padding-top: 80px; }
.king .marker { top: 40px; }
.king-img {
	position: relative;
	z-index: 2;
	width: min(280px, 60vw);
	height: auto;
	filter: drop-shadow(0 0 40px rgba(170, 200, 255, 0.35)) drop-shadow(0 20px 30px #000);
}
.king .stop-text { max-width: 560px; }
.king .depth { color: #a8c4ff; }

/* Revealed as they're reached (app.js adds .seen). Without scripts, all is shown. */
.js .stop .stop-text, .js .stop .shots, .js .stop .cast, .js .king-img { opacity: 0; transform: translateY(24px); transition: opacity 0.45s ease-out, transform 0.45s ease-out; }
.js .stop.seen .stop-text, .js .stop.seen .shots, .js .stop.seen .cast, .js .stop.seen .king-img { opacity: 1; transform: none; }
.js .stop.seen .shots { transition-delay: 0.06s; }
@media (prefers-reduced-motion: reduce) {
	.js .stop .stop-text, .js .stop .shots, .js .stop .cast, .js .king-img { opacity: 1; transform: none; transition: none; }
}

/* ---- The video, on request. ---- */
.watch { padding-top: 96px; text-align: center; }
.player, .player-frame {
	display: block;
	width: 100%;
	max-width: 960px;
	aspect-ratio: 16 / 9;
	margin: 0 auto;
	border: 2px solid var(--trim);
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 140, 50, 0.15);
	background: #000;
}
.player { position: relative; padding: 0; overflow: hidden; cursor: pointer; }
.player img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s, filter 0.4s; filter: brightness(0.8); }
.player:hover img, .player:focus-visible img { transform: scale(1.02); filter: brightness(0.95); }
.play {
	position: absolute;
	left: 50%; top: 50%;
	width: 92px; height: 92px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 3px solid var(--gold);
	background: rgba(43, 28, 18, 0.85);
	box-shadow: 0 0 34px rgba(255, 140, 50, 0.5);
}
.play::after { content: ""; position: absolute; left: 36px; top: 26px; border-style: solid; border-width: 20px 0 20px 30px; border-color: transparent transparent transparent var(--gold); }
.watch .note { color: var(--ash); font-size: 0.95rem; margin-top: 12px; }

/* ---- The dead: a slow parade. ---- */
.dead { padding: 96px 0 40px; }
.parade { overflow: hidden; margin-top: 32px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.parade-track { display: flex; gap: 28px; width: max-content; animation: parade 90s linear infinite; }
.parade:hover .parade-track { animation-play-state: paused; }
.parade figure { margin: 0; text-align: center; width: 150px; }
.parade img { height: 150px; width: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.8)); }
.parade figcaption { color: var(--ash); font-size: 0.95rem; }
/* Not yet found: a shadow, as the bestiary's dark frame shows it. */
.parade .unknown img { filter: drop-shadow(0 0 1px rgba(255, 156, 61, 0.7)) drop-shadow(0 0 10px rgba(255, 120, 40, 0.35)); }  /* the picture is only its shadow (img/cast/shadow-*.webp) */
.parade .unknown figcaption { color: var(--trim); font-family: "Grenze Gotisch", serif; font-size: 1.2rem; }
@keyframes parade { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .parade-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }

/* ---- Features. ---- */
.features { padding-top: 96px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
	background: var(--face);
	border: 1px solid var(--trim);
	border-radius: 10px;
	padding: 22px 22px 20px;
	box-shadow: inset 0 0 0 4px var(--face), inset 0 0 0 5px rgba(148, 115, 63, 0.35);
}
.card img { width: 72px; height: 72px; float: right; margin: -4px -4px 8px 12px; border-radius: 50%; }
.card h3 { font-size: 1.5rem; margin-bottom: 0.3em; }
.card p { margin: 0; }

/* ---- The full game. ---- */
.full { padding: 96px 16px 24px; }
.full-box {
	text-align: center;
	background: radial-gradient(ellipse at 50% 0%, rgba(255, 140, 50, 0.16), transparent 70%), var(--face);
	border: 1px solid var(--trim);
	border-radius: 14px;
	padding: 44px 24px;
	max-width: 780px;
	margin: 0 auto;
}
.full-box p { margin: 0.4em 0; }
.full-box .small { color: var(--ash); font-size: 1rem; margin-bottom: 26px; }

/* ---- Phones: the path runs down the left, the stops stacked beside it. ---- */
@media (max-width: 760px) {
	.stop, .heroes { grid-template-columns: 1fr; gap: 22px; padding: 40px 16px 40px 44px; }
	.stop:nth-of-type(even) .stop-text { order: 0; }
	.marker { left: 20px; top: 58px; }
	.king { padding-left: 16px; }
	.king .marker { left: 50%; }
	.shots img:last-child { margin-top: -30px; }
	.boss img { height: 96px; }
	.biome::before { inset: 0; }
}

/* ---- The policy and support pages: plain reading. ---- */
.page { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.page header { text-align: center; padding: 24px 0 8px; }
.page header img { width: min(320px, 70vw); height: auto; }
.page h1 { font-size: clamp(2.2rem, 6vw, 3rem); text-align: center; margin-top: 12px; }
.page h2 { text-align: left; font-size: 1.7rem; margin-top: 1.6em; }
.page .updated { text-align: center; color: var(--ash); margin-top: -0.4em; }
.page li { margin: 0.3em 0; }

footer {
	border-top: 1px solid rgba(148, 115, 63, 0.4);
	margin-top: 80px;
	padding: 28px 16px 40px;
	text-align: center;
	color: var(--ash);
	font-size: 1rem;
}
footer nav a { margin: 0 0.7em; }
footer p { margin: 10px 0 0; }
