@font-face {
	font-family: "Chivo";
	src: url("fonts/chivo.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}

:root {
	--ink: #0a0b10;
	--ink-2: #10121a;
	--feed: #12141d;
	--edge: #262c3d;
	--edge-soft: #1b2030;
	--text: #ece9f7;
	--muted: #969db8;
	--dim: #6d7492;
	--lav: #b5a4ff;
	--gold: #f2c14e;
	--green: #57d98a;
	--btn: #2b3559;
	--btn-hi: #33406b;
	--btn-edge: #59689c;
	--body: "Chivo", "Segoe UI", sans-serif;
	/* One face for the whole site: the display rules keep their own name so nothing below
	   has to change, but they now draw in the same Chivo as the body text. */
	--pixel: var(--body);
	--nav-h: 64px;
}

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

html, body { margin: 0; }

body {
	background: var(--ink);
	color: var(--text);
	font-family: var(--body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: var(--lav); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #d3c8ff; }

:focus-visible {
	outline: 2px solid var(--lav);
	outline-offset: 3px;
	border-radius: 2px;
}

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 40;
	padding: 10px 14px;
	background: var(--gold);
	color: #1a1405;
	font-family: var(--pixel);
	font-size: 12px;
	text-decoration: none;
	transition: top .18s ease;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ nav */

.nav {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 30;
	height: var(--nav-h);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(14px, 4vw, 46px);
	padding: 0 18px;
	background: linear-gradient(180deg, rgba(9, 10, 16, .96) 0%, rgba(9, 10, 16, .72) 62%, rgba(9, 10, 16, 0) 100%);
	backdrop-filter: blur(3px);
	overflow-x: auto;
	scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav-link {
	position: relative;
	flex: none;
	padding: 6px 2px 10px;
	font-family: var(--pixel);
	font-size: 13px;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: #cfc9e6;
	text-decoration: none;
	transition: color .16s ease;
}
.nav-link:hover { color: #fff; }
.nav-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: var(--lav);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after { transform: scaleX(1); }

/* ------------------------------------------------------------------ shell */

.shell {
	display: grid;
	grid-template-columns: minmax(340px, 38fr) minmax(0, 62fr);
	min-height: 100dvh;
}

/* ------------------------------------------------------------------ hero */

.hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(120% 90% at 8% 6%, #1a2338 0%, rgba(16, 18, 26, 0) 58%),
		radial-gradient(90% 70% at 0% 100%, #10352a 0%, rgba(10, 11, 16, 0) 62%),
		linear-gradient(168deg, #141726 0%, #0a0b10 62%, #07080c 100%);
	border-right: 1px solid var(--edge-soft);
}

.hero-glow {
	position: absolute;
	width: 74%;
	aspect-ratio: 1;
	left: -22%;
	bottom: -34%;
	background: radial-gradient(circle at 50% 50%, rgba(87, 217, 138, .30) 0%, rgba(87, 217, 138, .08) 42%, transparent 68%);
	filter: blur(18px);
	animation: drift 18s ease-in-out infinite alternate;
	pointer-events: none;
}

.hero-grid {
	position: absolute;
	inset: 0;
	background-image:
		repeating-linear-gradient(90deg, rgba(181, 164, 255, .055) 0 1px, transparent 1px 34px),
		repeating-linear-gradient(0deg, rgba(181, 164, 255, .055) 0 1px, transparent 1px 34px);
	mask-image: radial-gradient(120% 90% at 22% 42%, #000 0%, transparent 78%);
	pointer-events: none;
}

.hero-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100dvh;
	padding: calc(var(--nav-h) + 34px) clamp(24px, 4.2vw, 62px) 64px;
}

.eyebrow {
	margin: 0 0 14px;
	font-family: var(--pixel);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--green);
}

.wordmark {
	margin: 0;
	font-family: var(--pixel);
	font-weight: 800;
	font-size: clamp(2rem, 4.2vw, 3.4rem);
	line-height: 1;
	letter-spacing: -.02em;
	color: #f6f3ff;
	text-shadow: 4px 4px 0 #14372a, 8px 8px 0 rgba(10, 11, 16, .9);
}

.requires {
	margin: 22px 0 0;
	font-family: var(--pixel);
	font-size: 12px;
	line-height: 1.9;
	color: #e8dfb9;
}
.requires strong { color: var(--gold); }
.requires a { color: var(--gold); }

@keyframes drift {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to { transform: translate3d(6%, -5%, 0) scale(1.08); }
}

/* ------------------------------------------------------------------ feed */

.feed {
	height: 100dvh;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
	background:
		radial-gradient(80% 50% at 100% 0%, rgba(181, 164, 255, .05) 0%, transparent 60%),
		var(--feed);
	padding: calc(var(--nav-h) + 26px) clamp(22px, 3.4vw, 54px) 72px;
	/* The page sits in the middle of its own half of the screen rather than against the left
	   edge of it: auto margins center it both ways and, unlike align-items, never clip a page
	   taller than the window. */
	display: flex;
}

.feed-inner {
	width: 100%;
	max-width: 780px;
	margin: auto;
}

.feed::-webkit-scrollbar { width: 10px; }
.feed::-webkit-scrollbar-track { background: #0d0f16; }
.feed::-webkit-scrollbar-thumb { background: #333a52; border: 2px solid #0d0f16; }
.feed::-webkit-scrollbar-thumb:hover { background: var(--lav); }

.section-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	font-family: var(--pixel);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--dim);
}
.section-label::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--edge), transparent);
}

/* ------------------------------------------------------------------ release */

.release + .release { margin-top: 40px; }
.release { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.release:nth-child(2) { animation-delay: .05s; }
.release:nth-child(3) { animation-delay: .1s; }
.release:nth-child(4) { animation-delay: .15s; }
.release:nth-child(5) { animation-delay: .2s; }

@keyframes rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.tag {
	margin: 0 0 6px;
	font-family: var(--pixel);
	font-size: 12px;
	letter-spacing: .16em;
	color: var(--gold);
}

.release-title {
	margin: 0;
	font-family: var(--pixel);
	font-weight: 700;
	font-size: clamp(1.3rem, 2.2vw, 1.85rem);
	line-height: 1.2;
	letter-spacing: -.01em;
	color: #fbf9ff;
}

.note {
	margin: 8px 0 18px;
	max-width: 104ch;
	font-size: 15px;
	color: var(--muted);
}

/* The builds the two channels are serving, under the download buttons: a fact about the file
   rather than a second headline, so it is small, quiet and in one line. */
.builds {
	margin: 14px 0 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	font-size: 13px;
	letter-spacing: .02em;
	color: var(--dim);
}
.builds strong { color: var(--text); font-weight: 600; }
.builds .dot { color: var(--edge); }

.buttons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
/* One button alone takes the whole row instead of leaving half of it empty. */
.buttons .btn:only-child { grid-column: 1 / -1; }

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid var(--btn-edge);
	border-radius: 3px;
	background: linear-gradient(180deg, var(--btn-hi) 0%, var(--btn) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 2px 0 #0b0d14;
	color: #eef1ff;
	font-family: var(--pixel);
	font-size: 12px;
	letter-spacing: .06em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	appearance: none;
	transition: border-color .16s ease, background .16s ease, transform .12s ease, box-shadow .16s ease;
}
.btn:hover {
	color: #fff;
	border-color: var(--lav);
	background: linear-gradient(180deg, #3d4b7c 0%, #33406b 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 2px 0 #0b0d14, 0 0 18px rgba(181, 164, 255, .22);
	transform: translateY(-1px);
}
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); }
.btn.is-quiet {
	background: transparent;
	border-color: var(--edge);
	color: var(--muted);
	box-shadow: none;
}
.btn.is-quiet:hover { color: #fff; border-color: var(--lav); background: rgba(181, 164, 255, .08); }

/* ------------------------------------------------------------------ the features sheet */

/* The features are a panel over the page rather than a page of their own: the download the
   player arrived for stays behind it, and the whole site is Home and Credits. */
.sheet {
	width: min(1080px, calc(100vw - 28px));
	max-width: none;
	max-height: calc(100dvh - 40px);
	margin: auto;
	padding: 0;
	border: 1px solid var(--edge);
	border-radius: 4px;
	background: var(--feed);
	color: var(--text);
	box-shadow: 0 40px 90px rgba(0, 0, 0, .6);
	overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; }
.sheet::backdrop { background: rgba(6, 8, 14, .74); }

.sheet-head {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px clamp(16px, 2.4vw, 26px);
	border-bottom: 1px solid var(--edge-soft);
	background: linear-gradient(180deg, rgba(255, 255, 255, .04) 0%, transparent 100%);
}

.sheet-title {
	margin: 0;
	font-family: var(--pixel);
	font-size: 12px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--gold);
}

.sheet-close {
	flex: none;
	min-height: 32px;
	padding: 6px 14px;
}

.sheet-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	padding: clamp(18px, 2.6vw, 30px) clamp(16px, 2.4vw, 26px) clamp(22px, 3vw, 34px);
}

/* ------------------------------------------------------------------ previews */

.preview + .preview { margin-top: 46px; }

.preview-title,
.groups-title {
	margin: 0;
	font-family: var(--pixel);
	font-weight: 700;
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	color: #fbf9ff;
}

.preview-note,
.preview-caption {
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 14.5px;
}

.preview-caption {
	margin-top: 14px;
	font-size: 12.5px;
	color: var(--dim);
}

.stage {
	position: relative;
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding: 22px clamp(14px, 2.4vw, 26px);
	border: 1px solid var(--edge-soft);
	background:
		radial-gradient(70% 90% at 20% 0%, rgba(87, 217, 138, .10) 0%, transparent 62%),
		#0a0c12;
	border-radius: 4px;
	overflow: hidden;
}

/* ---------- what is in it ---------- */

.groups { margin-top: 52px; }

.group-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.group {
	padding: 16px 18px;
	border: 1px solid var(--edge-soft);
	border-left: 3px solid var(--lav);
	background: rgba(255, 255, 255, .02);
}

.group h3 {
	margin: 0 0 8px;
	font-family: var(--pixel);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gold);
}

.group ul { margin: 0; padding-left: 18px; }
.group li { margin: 5px 0; color: var(--muted); font-size: 14px; }
.group li strong { color: #e7e3f7; font-weight: 600; }
.group code {
	font-family: var(--pixel);
	font-size: 12px;
	color: #cfc7ea;
}

/* ------------------------------------------------------------------ credits */

.credits-list { display: grid; gap: 16px; margin-top: 8px; }

.credit {
	padding: 18px 20px;
	border: 1px solid var(--edge-soft);
	border-left: 3px solid var(--lav);
	background: rgba(255, 255, 255, .02);
}
.credit h3 { margin: 0 0 4px; font-family: var(--pixel); font-size: 13px; letter-spacing: .1em; }
.credit .licence {
	margin: 0 0 10px;
	font-family: var(--pixel);
	font-size: 10px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold);
}
.credit p { margin: 0; color: var(--muted); font-size: 14.5px; }
.credit code {
	font-family: var(--pixel);
	font-size: 12px;
	color: #cfc7ea;
}

.licence-text {
	margin-top: 14px;
	padding: 14px 16px;
	border: 1px solid var(--edge-soft);
	background: #0b0d14;
	color: #9aa2bd;
	font-family: ui-monospace, "Cascadia Code", monospace;
	font-size: 12px;
	line-height: 1.7;
	white-space: pre-wrap;
	max-height: 260px;
	overflow: auto;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 900px) {
	.shell { grid-template-columns: 1fr; }
	.hero-inner { min-height: 62dvh; padding-top: calc(var(--nav-h) + 26px); }
	.feed { height: auto; overflow: visible; padding-bottom: 56px; }
	.buttons { grid-template-columns: 1fr; }
	.hero { border-right: 0; border-bottom: 1px solid var(--edge-soft); }
}

@media (max-width: 520px) {
	.nav { justify-content: flex-start; gap: 18px; }
	.nav-link { font-size: 11px; letter-spacing: .1em; }
	.wordmark { font-size: clamp(2.1rem, 11vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
