/* Monocraft (SIL Open Font License, see assets/fonts), the pixel font of the titles, is the only one downloaded, from the site itself; the text uses the system's own font */
@font-face {
	font-family: "Monocraft";
	src: url("../fonts/monocraft.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "Monocraft";
	src: url("../fonts/monocraft-bold.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

/* Colors from the mod's own interface (tools/gui_theme.py): a sepia wood, plum in the shadows, brown on the panels, golden on lit edges; cream text. Text and symbols take gold-light, gold only fills and borders, so one yellow reads everywhere. */
:root {
	--night: #170c0f;
	--card: #2e1d1c;
	--bg: #1d1012;
	--wood: #6e4838;
	--wood-light: #865e46;
	--wood-dark: #4d2e28;
	--outline: #160608;
	--leather: #5b3b2c;
	--line: rgba(236, 217, 178, .12);
	--cream: #f6e9cb;
	--muted: #c9b39d;
	--gold: #dea62b;
	--gold-light: #ffd76a;
	--gold-dark: #935f00;
	--pixel: "Monocraft", ui-monospace, monospace;
	--text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	--gutter: 16px;
	/* Three widths: the text column (.wrap), a wider one for showcases and screenshots (.wide), and the whole screen (.full) */
	--normal: 1140px;
	--wide: 1440px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--cream);
	font: 17px/1.6 var(--text);
	-webkit-font-smoothing: antialiased;
}

a { color: var(--gold-light); }
a:hover { color: #ffffff; }

h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.1rem; }

code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: rgba(0, 0, 0, .25); padding: .1em .35em; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--normal); margin: 0 auto; padding: 0 var(--gutter); }
/* Inside a .wrap, a block breaks out of the text column on both sides, centered on it */
.wide { --width: min(var(--wide) - 2 * var(--gutter), 100vw - 2 * var(--gutter)); width: var(--width); margin-inline: calc((100% - var(--width)) / 2); }
.full { width: 100vw; margin-inline: calc(50% - 50vw); }
/* 100vw counts the scrollbar where it takes room: never a sideways scroll for it */
body { overflow-x: clip; }
.narrow { max-width: 820px; }

/* Bevelled panels, like Minecraft's windows */
.panel {
	background: var(--wood);
	border: 3px solid var(--outline);
	box-shadow: inset 3px 3px 0 var(--wood-light), inset -3px -3px 0 var(--wood-dark);
	padding: 24px;
}
.panel p:last-child { margin-bottom: 0; }

.paper {
	background: var(--card);
	color: var(--cream);
	border: 3px solid var(--outline);
	box-shadow: 0 0 0 3px var(--wood), 0 14px 30px rgba(0, 0, 0, .35);
	overflow-x: auto;
}

/* Buttons */
.button {
	display: inline-block;
	font-family: var(--pixel);
	font-weight: 700;
	font-size: .95rem;
	text-decoration: none;
	color: var(--outline);
	background: var(--gold);
	border: 3px solid var(--outline);
	box-shadow: inset 3px 3px 0 var(--gold-light), inset -3px -3px 0 var(--gold-dark);
	padding: 10px 22px;
	transition: transform .08s;
}
.button:hover { color: var(--outline); background: var(--gold-light); transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.button-ghost { background: var(--wood); color: var(--cream); box-shadow: inset 3px 3px 0 var(--wood-light), inset -3px -3px 0 var(--wood-dark); }
.button-ghost:hover { background: var(--wood-light); color: #ffffff; }
.button-small { font-size: .8rem; padding: 6px 10px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }

/* Top bar: a dark band over the sky, its lower edge drawn like a window's frame */
.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(23, 12, 15, .86);
	backdrop-filter: blur(8px);
	border-bottom: 3px solid var(--outline);
	box-shadow: inset 0 -3px 0 rgba(134, 94, 70, .6);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-weight: 700; font-size: 1.3rem; color: var(--cream); text-decoration: none; }
.brand img { image-rendering: pixelated; }
.brand:hover { color: var(--gold-light); }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { position: relative; padding: 8px 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--cream); }
/* The section being read: a gold pixel bar under its link */
.nav a.current::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--gold); }
.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lang-switch { display: flex; font-family: var(--pixel); font-size: .8rem; border: 2px solid var(--outline); box-shadow: 0 0 0 2px var(--wood); }
.lang-switch > * { padding: 4px 8px; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--cream); background: var(--wood); }
.lang-switch [aria-current] { color: var(--outline); background: var(--gold); }
.topbar-download { display: inline-flex; align-items: center; gap: 8px; }
.menu { display: none; position: relative; }
.menu summary { display: grid; place-items: center; width: 44px; height: 40px; color: var(--cream); background: var(--wood); border: 3px solid var(--outline); box-shadow: inset 2px 2px 0 var(--wood-light), inset -2px -2px 0 var(--wood-dark); cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--wood-light); }
.menu nav { position: absolute; right: 0; top: calc(100% + 10px); display: flex; flex-direction: column; min-width: 220px; padding: 8px; background: var(--card); border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood), 0 18px 40px rgba(0, 0, 0, .5); }
.menu nav a { padding: 10px 12px; color: var(--cream); font-weight: 600; text-decoration: none; }
.menu nav a:hover { background: var(--wood); color: var(--gold-light); }

/* Hero */
.hero {
	background:
		radial-gradient(ellipse at 75% 30%, rgba(222, 166, 43, .12), transparent 60%),
		linear-gradient(180deg, var(--night), var(--bg));
	padding: 72px 0 80px;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.eyebrow { font-family: var(--pixel); color: var(--gold-light); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 12px; }
/* The mod's name and kind open the page's heading, in the eyebrow's small type */
h1 .eyebrow { display: block; font-size: .8rem; font-weight: 500; line-height: 1.6; }
.lead { font-size: 1.2rem; color: var(--cream); max-width: 34em; }
.note { color: var(--muted); font-size: .92rem; margin: 0; }
.note a { color: var(--muted); }
.note a:hover { color: var(--cream); }

/* Screenshots */
.shot {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border: 3px solid var(--outline);
	box-shadow: 0 0 0 3px var(--wood-dark), 0 18px 40px rgba(0, 0, 0, .45);
	image-rendering: auto;
}
.shot-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--muted);
	font-family: var(--pixel);
	text-align: center;
	padding: 16px;
	background:
		repeating-linear-gradient(45deg, rgba(255, 255, 255, .03) 0 12px, transparent 12px 24px),
		var(--wood-dark);
}
.shot-placeholder code { color: var(--gold-light); background: rgba(0, 0, 0, .3); }
.shot-link { position: relative; display: block; cursor: zoom-in; }
/* An ambience loop over its screenshot, shown once it plays: the same box and the same frame, which goes wherever the screenshot's goes */
.shot-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 3px solid var(--outline); opacity: 0; transition: opacity .4s; pointer-events: none; }
.shot-video.playing { opacity: 1; }
.shot-link:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 6px; }

/* Lightbox: a screenshot full size over the page */
.lightbox {
	/* Not 100vw/100vh: those count the scrollbar and the mobile address bar, which pushes the screenshot off center */
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 16px;
	border: 0;
	background: transparent;
	cursor: zoom-out;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(23, 12, 15, .92); }
.lightbox img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	border: 3px solid var(--outline);
	box-shadow: 0 0 0 3px var(--wood-dark), 0 18px 40px rgba(0, 0, 0, .45);
}
.lightbox-close {
	position: fixed;
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	font: 700 1.6rem/1 var(--pixel);
	color: var(--cream);
	background: var(--wood);
	border: 3px solid var(--outline);
	box-shadow: inset 3px 3px 0 var(--wood-light), inset -3px -3px 0 var(--wood-dark);
	cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible { background: var(--wood-light); }
.lightbox-arrow, .carousel-arrow {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: var(--cream);
	background: var(--wood);
	border: 3px solid var(--outline);
	box-shadow: inset 3px 3px 0 var(--wood-light), inset -3px -3px 0 var(--wood-dark);
	cursor: pointer;
}
/* A drawn chevron rather than a character, whose ink is not centered in its glyph box */
.lightbox-arrow::before, .carousel-arrow::before {
	content: "";
	width: 15px;
	height: 21px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 7' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h2v1h-1v1h-1v1h-1v1h1v1h1v1h1v1h-2v-1h-1v-1h-1v-1h-1v-1h1v-1h1v-1h1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lightbox-next::before, .carousel-next::before { transform: scaleX(-1); }
.lightbox-arrow { position: fixed; top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (min-width: 641px) {
	/* Room for the arrows on each side, so they never cover the screenshot */
	.lightbox { padding: 16px 76px; }
}
.lightbox-arrow:hover, .lightbox-arrow:focus-visible, .carousel-arrow:hover, .carousel-arrow:focus-visible { background: var(--wood-light); }

/* Several screenshots of one feature, one at a time: the frame goes around the track, not each image */
.carousel { position: relative; }
.carousel-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	border: 3px solid var(--outline);
	box-shadow: 0 0 0 3px var(--wood-dark), 0 18px 40px rgba(0, 0, 0, .45);
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel .shot, .carousel .shot-video { border: 0; box-shadow: none; }
.carousel .shot-link:focus-visible { outline-offset: -6px; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-dots { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.carousel-dots button {
	width: 14px;
	height: 14px;
	padding: 0;
	background: var(--wood-dark);
	border: 2px solid var(--outline);
	cursor: pointer;
}
.carousel-dots button[aria-current] { background: var(--gold); }

/* Sections */
.section { padding: 96px 0; }
.section h2 { position: relative; margin-bottom: .6em; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.section-intro { color: var(--muted); font-size: 1.1rem; max-width: 46em; margin: 0 0 36px; }
.small { color: var(--muted); font-size: .92rem; }


/* Vanilla vs Cassonade: tables on the card plum, rows told apart by a fine line and a gold hover */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 18px; vertical-align: top; }
thead th { font-family: var(--pixel); font-size: .95rem; font-weight: 400; color: var(--gold-light); text-transform: uppercase; letter-spacing: .03em; background: rgba(0, 0, 0, .22); border-bottom: 2px solid var(--wood-light); }
tbody tr + tr > * { border-top: 1px solid rgba(236, 217, 178, .12); }
tbody tr:hover > * { background: rgba(255, 215, 106, .05); }
tbody th { font-weight: 700; color: var(--cream); }
.compare .before { color: var(--muted); }
.compare .before::before { content: "✗ "; color: #9c7f6a; font-weight: 700; }
.after { font-weight: 700; color: var(--gold-light); }
.compare .after::before { content: "✓ "; color: var(--gold-light); }

/* Keys drawn as keycaps */
kbd {
	display: inline-block;
	min-width: 1.6em;
	font-family: var(--pixel);
	font-size: .95rem;
	text-align: center;
	color: var(--cream);
	background: var(--wood-light);
	border: 2px solid var(--outline);
	box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .18), inset -2px -2px 0 rgba(0, 0, 0, .3), 0 2px 0 var(--outline);
	padding: 1px 7px;
}

.feature-lead { font-size: 1.15rem; font-weight: 600; color: var(--cream); margin-top: 0; }
.points { padding-left: 1.2em; margin: 0 0 16px; }
.points li { margin-bottom: 8px; }
.points li::marker { color: var(--gold-light); content: "◆  "; font-size: .8em; }
.more { margin: 16px 0 0; font-weight: 700; }
.keys { display: inline-block; font-size: .95rem; background: var(--wood-dark); border: 2px solid var(--outline); padding: 4px 12px; margin: 0; }
.keys span { font-family: var(--pixel); color: var(--gold-light); margin-right: 6px; }
/* A craftable item, its pixel icon scaled up without smoothing, its recipe beside its name */
.item-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	margin: 0 0 16px;
	padding: 12px 14px;
	background: var(--wood);
	border: 2px solid var(--outline);
	box-shadow: inset 2px 2px 0 var(--wood-light), inset -2px -2px 0 var(--wood-dark);
}
.item-card img { image-rendering: pixelated; background: var(--wood-dark); border: 2px solid var(--outline); padding: 4px; box-sizing: content-box; }
.item-card p { margin: 0; }
.item-name { font-family: var(--pixel); font-weight: 700; color: var(--gold-light); margin-bottom: 4px !important; }
.item-name > span { display: block; font-family: var(--text); font-weight: 400; font-size: .9rem; color: var(--cream); }
.tag { display: inline-block; vertical-align: middle; font-size: .8rem; background: var(--leather); border: 2px solid var(--outline); padding: 2px 8px; color: var(--cream); }

/* The path back to the home page, above a feature's title */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 20px; font-size: .92rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cream); }
.breadcrumb [aria-current] { color: var(--gold-light); }

/* Crafting recipe, drawn as the crafting table's grid: dark slots, the item icons scaled up without smoothing */
.crafting { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 0 0 12px; }
.crafting-grid { display: grid; gap: 4px; }
.slot {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	background: #2e1d1c;
	border: 2px solid var(--outline);
	box-shadow: inset 2px 2px 0 #1e0d0e, inset -2px -2px 0 var(--wood-light);
}
.slot img { image-rendering: pixelated; }
.slot-result { width: 64px; height: 64px; }
.crafting-arrow { font-family: var(--pixel); font-size: 2rem; color: var(--cream); }
.recipe .small { color: #dcc9b0; margin: 0; }


/* The link to the content, first in the page, shown once it has the keyboard's focus */
.skip { position: absolute; z-index: 20; left: 16px; top: -100px; padding: 10px 16px; font-weight: 700; color: var(--outline); background: var(--gold-light); }
.skip:focus { top: 12px; }

/* Read by screen readers only */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { counter-increment: step; position: relative; padding: 10px 0 10px 52px; }
.steps li::before {
	content: counter(step);
	position: absolute; left: 0; top: 6px;
	width: 36px; height: 36px;
	display: grid; place-items: center;
	font-family: var(--pixel); font-weight: 700; color: var(--outline);
	background: var(--gold); border: 3px solid var(--outline);
}
.requires h3 { color: var(--gold-light); }
.requires dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; margin: 0; }
/* The muted beige is too faint on wood: a lighter one keeps 4.5:1 */
.requires dt { color: #dcc9b0; }
.requires dd { margin: 0; font-weight: 700; }
.requires .small { margin: 16px 0 0; }

/* FAQ */
.faq { background: var(--wood); border: 3px solid var(--outline); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 1.05rem; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-family: var(--pixel); font-size: 1.4rem; color: var(--gold-light); }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--cream); }

/* Footer */
.footer { background: var(--night); padding: 40px 0; color: var(--muted); font-size: .9rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; }
.footer p { margin: 0; }

:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

@media (max-width: 640px) {
	.brand span { display: none; }
	.topbar-actions { gap: 10px; }
	.compare thead { display: none; }
	.compare tr { display: block; padding: 14px 16px; }
	.compare th, .compare td { display: block; padding: 2px 0; }
	.compare tbody tr + tr > * { border-top: 0; }
	.compare tbody tr + tr { border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.carousel-track { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.shot-video { display: none; }
}

/* Shared by the pages: two columns, the main one wider */
.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.nav a.current { color: var(--gold-light); }

/* Home: the page is read as one Minecraft day, from the aurora of the hero to the night of the questions.
   The sky behind the sections follows the time (--daylight, --glow, set by the script at the end of home.html),
   in the mod's sepia: a warm brown by day, a gold glow on the horizon at sunrise and sunset, the plum night otherwise. */
:root { --daylight: 0; --glow: 0; }
.home { background: var(--night); }
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--night); }
.sky > div { position: absolute; inset: 0; }
.sky-day { background: linear-gradient(180deg, #2c1a1a 0%, #3b2420 65%, #4d3026 100%); opacity: calc(var(--daylight) * .9); }
.sky-glow { background: radial-gradient(ellipse 70% 50% at var(--sun-x, 50%) 105%, rgba(222, 166, 43, .32), rgba(222, 166, 43, .08) 55%, transparent 75%); opacity: var(--glow); }
.sky-stars {
	opacity: calc(1 - var(--daylight));
	background-image:
		radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, .7), transparent),
		radial-gradient(1px 1px at 120px 80px, rgba(255, 255, 255, .5), transparent),
		radial-gradient(2px 2px at 260px 160px, rgba(255, 255, 255, .8), transparent),
		radial-gradient(1px 1px at 340px 40px, rgba(255, 255, 255, .6), transparent),
		radial-gradient(1px 1px at 80px 220px, rgba(255, 255, 255, .5), transparent),
		radial-gradient(1.5px 1.5px at 200px 300px, rgba(255, 255, 255, .7), transparent);
	background-size: 400px 400px;
}

/* The clock of the mod's HUD, in the corner once the hero is left behind, where the margin beside the 1440-pixel .wide blocks holds it clear of their tabs */
.hud-clock {
	position: fixed;
	z-index: 9;
	left: 20px;
	bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px 8px 10px;
	font-family: var(--pixel);
	background: rgba(23, 12, 15, .9);
	border: 3px solid var(--outline);
	box-shadow: inset 0 0 0 3px var(--wood), 0 10px 24px rgba(0, 0, 0, .4);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .3s, transform .3s;
	pointer-events: none;
}
.hud-clock.shown { opacity: 1; transform: none; }
@media (max-width: 1779px) { .hud-clock { display: none; } }
.hud-clock svg { display: block; }
.hud-clock .hud-moon, .hud-clock.night .hud-sun { display: none; }
.hud-clock.night .hud-moon { display: block; }
.hud-clock span { display: flex; flex-direction: column; line-height: 1.1; }
.hud-clock b { font-size: 1.3rem; color: var(--cream); font-variant-numeric: tabular-nums; }
.hud-clock small { font-size: .75rem; color: var(--muted); }

/* Each section opens on its hour, in place of a chapter number */
.home .section { position: relative; padding: 96px 0; }
.home .section h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.home .section::before {
	content: attr(data-time);
	display: block;
	box-sizing: border-box;
	max-width: 1140px;
	margin: 0 auto 14px;
	padding: 0 var(--gutter);
	font-family: var(--pixel);
	font-size: .9rem;
	letter-spacing: .08em;
	color: var(--gold-light);
}
.section-head { max-width: 46em; margin-bottom: 44px; }
.section-head .section-intro { margin: 0; }

/* Hero: the aurora fills it, the text sits in the dark of the sky on the left, and its foot dissolves into the sky of the page, whatever its hour */
.hero-home { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(620px, 92vh, 920px); padding: 120px 0 clamp(56px, 8vw, 112px); overflow: hidden; background: transparent; }
.hero-backdrop { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.hero-home::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(0deg, transparent 0%, rgba(23, 12, 15, .5) 20%, transparent 55%),
		linear-gradient(90deg, rgba(23, 12, 15, .75) 0%, rgba(23, 12, 15, .3) 45%, transparent 70%);
}
.hero-home .hero-inner { display: block; }
.hero-home .hero-text { max-width: 720px; }
.hero-home h1 { font-size: clamp(2.2rem, 5.8vw, 4.6rem); text-shadow: 0 4px 0 var(--outline); }
.hero-home .lead { font-size: 1.2rem; max-width: 560px; text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.hero-home .note, .hero-home .note a { color: var(--cream); opacity: .8; }
.hero-actions { align-items: center; margin: 32px 0 16px; }
.hero-actions .button:first-child { padding: 16px 34px; font-size: 1.15rem; }
.hero-actions .button-ghost { background: rgba(23, 12, 15, .6); border-color: var(--outline); box-shadow: inset 0 0 0 2px rgba(246, 233, 203, .3); backdrop-filter: blur(4px); }
.hero-actions .button-ghost:hover { background: rgba(246, 233, 203, .16); color: #ffffff; }
.button-video { display: inline-flex; align-items: center; gap: 10px; }

/* The living world: the day as one panorama, a band per moment, the open one wide with its caption and subtitles */
.panorama { display: flex; height: clamp(420px, 42vw, 680px); background: var(--night); border-block: 3px solid var(--outline); box-shadow: 0 3px 0 var(--wood-dark), 0 -3px 0 var(--wood-dark), 0 24px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.strip { position: relative; flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; transition: flex-grow .6s ease; }
.strip + .strip { border-left: 3px solid var(--outline); }
/* The band under the pointer or holding the focus is open; with neither, the first one */
.strip:is(:hover, :focus-within) .shot, .panorama:not(:hover, :focus-within) .strip.active .shot { filter: none; }
.strip:is(:hover, :focus-within), .panorama:not(:hover, :focus-within) .strip.active { flex-grow: 4.5; }
.strip .shot-link, .strip .shot { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; border: 0; box-shadow: none; }
.strip .shot { filter: brightness(.7) saturate(.8); }
.strip .shot-video { border: 0; }
.strip .shot { transition: filter .6s; }
.strip figcaption { position: absolute; inset: auto 0 0 0; padding: 90px 20px 20px; background: linear-gradient(180deg, transparent, rgba(23, 12, 15, .65) 40%, rgba(23, 12, 15, .94)); pointer-events: none; }
.strip h3 { margin: 0; font-size: .85rem; color: var(--cream); transition: font-size .4s; }
.strip:is(:hover, :focus-within) h3, .panorama:not(:hover, :focus-within) .strip.active h3 { font-size: 1.5rem; color: var(--gold-light); }
/* The text keeps its width while the band opens, so it does not reflow on the way */
/* As wide as the open band will be, so that it does not reflow as it opens: its share of the width, less the first band's inset */
.strip figcaption p { width: min(32em, 100vw * 4.5 / (3.5 + var(--strips, 4)) - var(--inset) - 24px); max-height: 0; margin: 0; opacity: 0; overflow: hidden; transition: opacity .3s, max-height .4s, margin .4s; }
.strip:is(:hover, :focus-within) figcaption p, .panorama:not(:hover, :focus-within) .strip.active figcaption p { max-height: 8em; margin-top: 6px; opacity: 1; transition-delay: .3s; }
/* The bands at the screen's edges keep their texts in line with the text column, clear of the clock in the corner */
.panorama { --inset: max(18px, (100vw - var(--normal)) / 2 + var(--gutter)); }
.strip:first-child figcaption { padding-left: var(--inset); }
.strip:last-child .subtitles { right: var(--inset); }
/* What you hear, as the game's own subtitles: a dark box, an arrow on the side the sound comes from */
.subtitles { position: absolute; top: 14px; right: 14px; z-index: 1; list-style: none; margin: 0; padding: 6px 0; min-width: 220px; font-family: var(--pixel); font-size: .88rem; background: rgba(14, 6, 8, .8); pointer-events: none; opacity: 0; transition: opacity .3s; }
.strip:is(:hover, :focus-within) .subtitles, .panorama:not(:hover, :focus-within) .strip.active .subtitles { opacity: 1; transition-delay: .4s; }
.subtitles li { display: grid; grid-template-columns: 1.2em minmax(0, 1fr) 1.2em; gap: 8px; padding: 2px 12px; text-align: center; color: var(--cream); }
.subtitles li span { color: var(--muted); }
/* Everything the living world adds, in short */
/* Four themes on four columns, then two, then one, so no theme is ever left alone on its row; only the top margin, so .wide keeps it centered */
.catalogue { display: grid; grid-template-columns: repeat(var(--groups, 4), minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
@media (max-width: 1100px) { .catalogue { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .catalogue { grid-template-columns: 1fr; } }
.catalogue-group { padding: 18px 20px 20px; background: rgba(23, 12, 15, .55); border: 2px solid var(--wood); }
.catalogue-group h3 { font-size: 1rem; color: var(--gold-light); margin-bottom: 12px; }
.catalogue-group ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.catalogue-group li { padding: 3px 10px; font-size: .9rem; background: var(--card); border: 2px solid var(--outline); }
.section-living .more { margin: 24px 0 0; }

/* Why: the rule and what will never come stay in view on the left, the five principles pass on the right */
.why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.why-lead { position: sticky; top: 100px; }
.why-lead .section-intro { margin-bottom: 32px; }
.never { padding: 20px 22px; background: rgba(23, 12, 15, .55); border: 2px solid var(--wood); }
.never h3 { font-size: 1rem; color: var(--gold-light); margin-bottom: 10px; }
.never ul { list-style: none; padding: 0; margin: 0; }
.never li { position: relative; padding: 4px 0 4px 26px; color: var(--muted); }
.never li::before { content: "✗"; position: absolute; left: 2px; color: var(--gold-light); font-weight: 700; }
.principles { list-style: none; margin: 0; padding: 0; }
.principle { position: relative; padding: 28px 0 28px 88px; border-top: 2px solid rgba(236, 217, 178, .15); }
.principle:last-child { border-bottom: 2px solid rgba(236, 217, 178, .15); }
.principle-num {
	position: absolute;
	left: 0;
	top: 22px;
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
	font-family: var(--pixel);
	font-size: 1.5rem;
	color: var(--night);
	background: var(--gold-light);
	box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .25), inset 4px 4px 0 rgba(255, 255, 255, .35), 0 0 0 3px var(--outline);
}
.principle h3 { color: var(--gold-light); margin: 0 0 .4em; }
.principle p { margin: 0; color: var(--cream); opacity: .9; }

/* Features: one showcase per group, the list on the left, the selected feature large on the right */
.showcase { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; padding: 48px 0; scroll-margin-top: 72px; }
.showcase + .showcase { border-top: 3px solid; border-image: repeating-linear-gradient(90deg, var(--wood) 0 12px, transparent 12px 20px) 3; }
.showcase-side { position: sticky; top: 96px; }
.group-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; font-size: 1.35rem; color: var(--gold-light); }
.group-title small, .count { font-family: var(--pixel); font-size: .8rem; font-weight: 400; color: var(--muted); }
.showcase-tabs, .fixes-tabs { display: flex; flex-direction: column; gap: 4px; }
.showcase-tabs button, .fixes-tabs button {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 10px 14px;
	text-align: left;
	font: 600 1rem/1.35 var(--text);
	color: var(--muted);
	background: transparent;
	border: 0;
	border-left: 4px solid var(--wood);
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.showcase-tabs button:hover, .fixes-tabs button:hover { color: var(--cream); background: rgba(255, 255, 255, .04); }
.showcase-tabs button[aria-selected="true"], .fixes-tabs button[aria-selected="true"] { color: var(--gold-light); background: var(--card); border-left-color: var(--gold); }
.fixes-tabs small { font-family: var(--pixel); font-size: .8rem; opacity: .8; }
/* On a narrow screen every feature follows the other in this grid */
.showcase-panels { display: grid; }
/* The picked feature only, at its own height: the screenshot with its title and item beside it on a wide screen, the points underneath, on two columns */
.feature {
	display: none;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "shot" "head" "points";
	background: var(--card);
	border: 3px solid var(--outline);
	box-shadow: 0 0 0 3px var(--wood), 0 18px 40px rgba(0, 0, 0, .4);
	scroll-margin-top: 80px;
}
.feature.active { display: grid; animation: feature-in .3s; }
@keyframes feature-in { from { opacity: 0; } }
.feature-shot { grid-area: shot; position: relative; }
.feature .shot, .feature .shot-video, .feature .carousel-track { border: 0; box-shadow: none; }
.feature .carousel-dots { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; }
.feature-head { grid-area: head; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 28px 0; }
.feature-head h4 { font-family: var(--pixel); font-size: 1.5rem; line-height: 1.2; margin: 0; }
.feature-head h4 a { color: var(--cream); text-decoration: none; }
.feature-head h4 a:hover { color: var(--gold-light); }
.feature-head .feature-lead { font-size: 1.1rem; margin: 0 0 4px; }
.feature-head .item-card { margin: 0; align-items: center; }
.feature-head .item-card img { width: 32px; height: 32px; }
.feature-head .more { margin: 0; }
.feature-details { grid-area: points; padding: 20px 28px 26px; }
.feature-details summary { cursor: pointer; font-weight: 700; color: var(--gold-light); list-style: none; }
.feature-details summary::-webkit-details-marker { display: none; }
.feature-details[open] summary { margin-bottom: 10px; }
.feature-details .points { margin: 0; columns: 2 300px; column-gap: 40px; }
.feature-details .points li { margin-bottom: 8px; break-inside: avoid; }
@media (min-width: 1300px) {
	.feature { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "shot head" "points points"; }
	.feature-head { padding: 26px 28px; border-left: 3px solid var(--outline); }
	.feature-details { padding-top: 24px; border-top: 3px solid var(--outline); }
}

/* Fixes: a theme at a time, picked on the left */
.fixes { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.fixes-tabs { position: sticky; top: 96px; }
.fixes-panels { padding: 0; }
.compare-group summary { display: none; }
.compare-group:not(.active) { display: none; }

/* Keys, grouped by the item that unlocks them */
.key-groups { columns: 2 340px; column-gap: 24px; }
.key-group { break-inside: avoid; margin: 0 0 24px; padding: 20px 22px 14px; background: var(--card); border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood); }
.key-group h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: var(--gold-light); }
.key-group h3 img { image-rendering: pixelated; }
/* The rows share their columns (subgrid), so the actions line up after the widest key */
.key-group dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 20px; margin: 0; }
.key-group dl div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; padding: 10px 0; border-top: 1px solid rgba(236, 217, 178, .12); }
.key-group dt { font-weight: 700; }
.key-group dd { margin: 0; }

/* Fair recipes: a list on two columns, each line the item, what goes in, the vanilla count struck out and Cassonade's, large */
.yields { padding: 8px 28px 20px; background: var(--card); border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood), 0 18px 40px rgba(0, 0, 0, .35); }
.yields ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; list-style: none; margin: 0; padding: 0; }
/* Every line has the same columns, so they line up from one line to the next */
.yields li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 4.5em 6em; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid rgba(236, 217, 178, .12); }
.yields li.yields-head { padding: 12px 0 8px; border-top: 0; font-family: var(--pixel); font-size: .75rem; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; color: var(--gold-light); }
.yields li > :nth-child(3), .yields li > :nth-child(4) { text-align: right; }
.yields strong { color: var(--cream); }
.yield-input { color: var(--muted); font-size: .95rem; }
.yields s { color: var(--muted); font-size: 1rem; text-decoration-thickness: 2px; }
.yields b { font-family: var(--pixel); font-size: 1.6rem; line-height: 1; color: var(--gold-light); }
.yields .small { margin: 16px 0 0; }
@media (max-width: 760px) {
	.yields { padding: 4px 16px 16px; }
	.yields ul { grid-template-columns: 1fr; }
	.yields li.yields-head + .yields-head { display: none; }
	/* The ingredients under the name, the two counts beside them */
	.yields li { grid-template-columns: minmax(0, 1fr) 4.5em 5.5em; grid-template-areas: "item before after" "input before after"; row-gap: 2px; align-items: center; }
	.yields li > :nth-child(1) { grid-area: item; }
	.yields li > :nth-child(2) { grid-area: input; }
	.yields li > :nth-child(3) { grid-area: before; }
	.yields li > :nth-child(4) { grid-area: after; }
}

/* Install, and the support beside the requirements */
.install-aside { display: grid; gap: 24px; }
.support { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; align-items: center; padding: 20px 22px; background: var(--leather); border: 3px solid var(--outline); box-shadow: inset 3px 3px 0 #6e4838, inset -3px -3px 0 #2e1d1c; }
.support-cup { color: var(--cream); }
.support p { margin: 0; }
.support strong { color: var(--gold-light); }
.support-button { grid-column: 1 / -1; justify-self: start; }

.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: start; }
.faq-list .faq { margin: 0; }

/* Without the script, and on a narrow screen: everything follows on, the points and the themes fold */
html:not(.js) .showcase-tabs, html:not(.js) .fixes-tabs, html:not(.js) .hud-clock { display: none; }
html:not(.js) .feature { display: grid; }
html:not(.js) .showcase-panels { gap: 32px; }
html:not(.js) .fixes { display: block; }
html:not(.js) .compare-group { display: block; }
html:not(.js) .compare-group summary, .compare-group summary { cursor: pointer; list-style: none; position: relative; padding: 16px 48px 16px 18px; font-family: var(--pixel); font-size: 1.1rem; color: var(--cream); }
html:not(.js) .compare-group summary { display: block; }
.compare-group summary::-webkit-details-marker { display: none; }
.compare-group summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 1.5rem; color: var(--gold-light); }
.compare-group[open] summary::after { content: "−"; }
.compare-group + .compare-group { border-top: 2px solid var(--wood-light); }
.compare-group[open] summary { color: var(--gold-light); border-bottom: 2px solid var(--wood-light); }

@media (max-width: 960px) {
	.nav { display: none; }
	.menu { display: block; }
	.hero { padding: 48px 0 56px; }
	.hero-inner, .split { grid-template-columns: 1fr; gap: 28px; }
	.hero-home { min-height: 0; padding: 140px 0 48px; }
	.hero-home h1 { font-size: 1.9rem; }
	.hero-home::before { background: linear-gradient(180deg, rgba(23, 12, 15, .8) 0%, rgba(23, 12, 15, .55) 55%, transparent 100%); }
	.section, .home .section { padding: 72px 0; }
	.panorama { flex-direction: column; height: auto; --inset: 18px; }
	.strip, .strip:is(:hover, :focus-within), .panorama:not(:hover, :focus-within) .strip.active { flex: none; height: 260px; }
	.strip + .strip { border-left: 0; border-top: 3px solid var(--outline); }
	.strip .shot { filter: none; }
	.strip h3, .strip:is(:hover, :focus-within) h3, .panorama:not(:hover, :focus-within) .strip.active h3 { font-size: 1.2rem; color: var(--gold-light); }
	.strip figcaption p, .strip:is(:hover, :focus-within) figcaption p, .panorama:not(:hover, :focus-within) .strip.active figcaption p { width: auto; max-height: none; margin-top: 4px; opacity: 1; font-size: .95rem; }
	.subtitles { display: none; }
	.why { grid-template-columns: 1fr; gap: 32px; }
	.why-lead { position: static; }
	.principle { padding-left: 72px; }
	.principle-num { width: 46px; height: 46px; font-size: 1.2rem; }
	.showcase, .fixes { display: block; padding: 32px 0; }
	.showcase-side { position: static; }
	.showcase-tabs, .fixes-tabs { display: none; }
	.showcase-panels { gap: 28px; }
	.feature { display: grid; }
	.feature-head { padding: 18px 18px 0; }
	.feature-details { padding: 14px 18px 20px; }
	.compare-group, .compare-group:not(.active) { display: block; }
	.compare-group summary { display: block; }
	.faq-list { grid-template-columns: 1fr; }
}
/* On a phone the keys go above their action: a column as wide as « Ctrl / Cmd + click » would squeeze every action */
@media (max-width: 600px) {
	.key-group dl div { display: block; }
	.key-group dd { margin-top: 4px; }
}
@media (min-width: 961px) {
	/* The script keeps the points open on a wide screen: their « Read more » has nothing to do */
	html.js .feature-details summary { display: none; }
}

/* A feature's own page, under the same sky as the home page, held at late afternoon:
   its title and what it needs, its screenshots large, then its points in panels beside the recipe, which stays in view */
.feature-page { background: var(--night); }
.feature-page .section { padding: 72px 0; }
.feature-hero { padding: 48px 0 24px; }
.feature-hero-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; margin-bottom: 36px; }
/* Nothing to show beside the title: it takes the width it needs */
.feature-hero-head:not(:has(.feature-hero-meta)) { grid-template-columns: minmax(0, 52rem); }
.feature-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); text-shadow: 0 4px 0 var(--outline); }
.feature-hero .lead { margin-bottom: 0; }
.feature-hero-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.feature-hero-meta .item-card { margin: 0; }
.feature-hero .actions { margin: 24px 0 12px; }
.feature-screen { border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood-dark), 0 24px 60px rgba(0, 0, 0, .5); }
.feature-screen .shot, .feature-screen .shot-video, .feature-screen .carousel-track { border: 0; box-shadow: none; }
.feature-screen .carousel-dots { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; }
.feature-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.feature-text .feature-lead { margin-bottom: 8px; }
.chapter { margin-top: 20px; padding: 22px 26px 12px; background: var(--card); border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood); }
.chapter h3 { color: var(--gold-light); }
/* A chapter's table: the same as the fixes', tighter to fit beside the recipe */
.detail-table { margin: 4px 0 14px; font-size: .92rem; }
.detail-table th, .detail-table td { padding: 8px 10px; }
.detail-table td:nth-child(2) { white-space: nowrap; color: var(--gold-light); font-weight: 700; }
/* On a phone, each enchantment becomes a card of labeled lines */
@media (max-width: 640px) {
	.detail-table thead { display: none; }
	.detail-table tr { display: block; padding: 10px 0; }
	.detail-table th, .detail-table td { display: block; padding: 2px 0; }
	.detail-table tbody tr + tr > * { border-top: 0; }
	.detail-table tbody tr + tr { border-top: 1px solid var(--line); }
	.detail-table td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 400; }
	:lang(fr) .detail-table td::before { content: attr(data-label) " : "; }
}
.feature-side { position: sticky; top: 96px; display: grid; gap: 24px; }
.feature-side h3 { color: var(--gold-light); }

/* The features before and after this one, then every other one as a thumbnail */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 80px; }
.pager a { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: center; padding: 10px; color: var(--muted); text-decoration: none; background: var(--card); border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood); }
.pager-next { grid-column: 2; }
.pager a.pager-next { grid-template-columns: minmax(0, 1fr) 160px; text-align: right; }
.pager-next img { order: 2; }
.pager img, .feature-links img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.pager img { border: 2px solid var(--outline); }
.pager small { display: block; font-family: var(--pixel); font-size: 1.4rem; line-height: 1; color: var(--gold-light); }
.pager strong { display: block; font-family: var(--pixel); font-size: 1.15rem; color: var(--cream); margin-bottom: 2px; }
.pager a:hover, .feature-links a:hover { box-shadow: 0 0 0 3px var(--gold); }
.pager a:hover strong, .feature-links a:hover strong { color: var(--gold-light); }
.feature-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; list-style: none; padding: 0; margin-block: 0; }
.feature-links a { display: block; height: 100%; text-decoration: none; background: var(--card); border: 3px solid var(--outline); box-shadow: 0 0 0 3px var(--wood); }
.feature-links img { border-bottom: 3px solid var(--outline); }
.feature-links strong { display: block; padding: 10px 12px; font-family: var(--pixel); font-size: .92rem; line-height: 1.3; color: var(--cream); }

@media (max-width: 960px) {
	.feature-hero-head, .feature-layout, .pager { grid-template-columns: 1fr; }
	.feature-side { position: static; }
	.pager-next { grid-column: auto; }
	.pager a, .pager a.pager-next { grid-template-columns: 110px minmax(0, 1fr); text-align: left; }
	.pager-next img { order: 0; }
}

