/* beatfusion.dev: the plaza at night. Headings in Comic Neue (OFL, assets/fonts/OFL.txt), the rest in the system's font. */
@font-face {
	font-family: "Comic Neue";
	src: url("/assets/fonts/ComicNeue-Bold.ttf") format("truetype");
	font-weight: 700;
	font-display: swap;
}

:root {
	--night: #0d0820;
	--night-2: #140c2e;
	--panel: #1b1240;
	--panel-2: #23185a;
	--line: #35276a;
	--text: #f5f0ff;
	--muted: #b8abdc;
	--pink: #ff3fa4;
	--cyan: #3fd8ff;
	--gold: #ffd34d;
	--display: "Comic Neue", "Comic Sans MS", "Chalkboard SE", system-ui, sans-serif;
	--body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--radius: 14px;
	--wrap: 1120px;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--night);
	color: var(--text);
	font: 17px/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #8be8ff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
	font-family: var(--display);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.01em;
	margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { --wrap: 760px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 5;
	background: rgba(13, 8, 32, 0.86);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.5rem/1 var(--display); }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; }
/* A game's site: its name, then the engine it runs on */
.brand-row { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.runs-on {
	font: 700 0.75rem/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
	color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
}
.runs-on:hover { color: var(--text); border-color: var(--cyan); }
.faq dt { font: 700 1.15rem/1.3 var(--display); margin: 28px 0 8px; }
.faq dd { margin: 0; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a:not(.button) { color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a:not(.button):hover, .site-nav a[aria-current="page"] { color: var(--gold); }

/* Buttons */
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px;
	border-radius: 999px;
	border: 2px solid var(--line);
	background: var(--panel);
	color: var(--text);
	font: 700 1.05rem/1 var(--body);
	text-decoration: none;
	transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.button:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-1px); }
.button.primary { background: var(--pink); border-color: var(--pink); color: #fff; box-shadow: 0 6px 24px rgba(255, 63, 164, 0.35); }
.button.primary:hover { background: #ff5cb2; border-color: #ff5cb2; }
.button.small { padding: 8px 16px; font-size: 0.95rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Home: the plaza */
.hero { position: relative; overflow: hidden; background: var(--night-2); }
.hero-art { width: 100%; height: clamp(300px, 46vw, 620px); object-fit: cover; object-position: 50% 70%; }
.hero::after {
	content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
	background: linear-gradient(to bottom, rgba(13, 8, 32, 0), var(--night));
	pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; margin-top: clamp(-150px, -9vw, -60px); padding-bottom: 24px; }
.hero h1 {
	font-size: clamp(3rem, 9vw, 6.2rem);
	text-shadow: 0 0 0 transparent, 3px 3px 0 var(--night), -2px -2px 0 var(--night), 2px -2px 0 var(--night), -2px 2px 0 var(--night), 0 0 32px rgba(255, 63, 164, 0.6);
	margin-bottom: 0.2em;
}
.tagline { font-size: clamp(1.15rem, 2.2vw, 1.45rem); max-width: 40ch; color: var(--text); }

/* Sections */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-alt { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 18%, var(--night-2) 82%, var(--night) 100%); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.eyebrow { font: 700 0.85rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 28px; }
.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
}
.card h3 { color: var(--cyan); }
.card:nth-child(2) h3 { color: var(--pink); }
.card:nth-child(3) h3 { color: var(--gold); }
.card p:last-child { margin-bottom: 0; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.split-art img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 12px; height: 12px; border-radius: 3px; background: var(--cyan); transform: rotate(45deg); }
.ticks li:nth-child(even)::before { background: var(--pink); }

.strip { margin-top: 36px; }
.strip img { border-radius: 10px; }
.strip figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 10px; text-align: center; }

.badge {
	display: inline-block; padding: 4px 10px; border-radius: 999px;
	font: 700 0.8rem/1.3 var(--body); letter-spacing: 0.04em; text-transform: uppercase;
	background: rgba(255, 211, 77, 0.14); color: var(--gold); border: 1px solid rgba(255, 211, 77, 0.4);
	vertical-align: middle;
}
.badge.live { background: rgba(63, 216, 255, 0.12); color: var(--cyan); border-color: rgba(63, 216, 255, 0.45); }

/* A game: its picture and what it is, the whole card a link */
.game-card {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	color: var(--text); text-decoration: none;
	transition: border-color 0.2s, transform 0.2s;
}
.game-card:hover, .game-card:focus-visible { border-color: var(--pink); transform: translateY(-2px); }
.game-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-body { padding: clamp(22px, 4vw, 40px); align-self: center; }
.game-body h2 { margin-bottom: 0.4em; }
.tags { margin: 0 0 14px; }
.game-more { margin: 18px 0 0; font-weight: 700; color: var(--cyan); }
.game-more::after { content: " 92"; }

.band {
	background: radial-gradient(120% 140% at 0% 0%, rgba(255, 63, 164, 0.28), transparent 55%), radial-gradient(120% 140% at 100% 100%, rgba(63, 216, 255, 0.22), transparent 55%), var(--panel);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 6px);
	padding: clamp(28px, 5vw, 52px);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.band h2 { margin: 0; }

/* News */
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.news-list a {
	display: grid; gap: 4px;
	padding: 18px 22px;
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	color: var(--text); text-decoration: none;
}
.news-list a:hover { border-color: var(--cyan); }
.news-date { color: var(--gold); font-size: 0.85rem; font-weight: 700; }
.news-title { font: 700 1.35rem/1.2 var(--display); }
.news-summary { color: var(--muted); }

.page-head { padding: clamp(40px, 6vw, 72px) 0 12px; }
.post { padding: clamp(40px, 6vw, 72px) 0; }
.post-date { color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.post h2 { font-size: 1.8rem; margin-top: 1.4em; }
.post img { border-radius: var(--radius); border: 1px solid var(--line); margin: 1.2em 0; }
.post-back { margin-top: 2em; }
.prose h2 { font-size: 1.7rem; margin-top: 1.5em; }
.prose li { margin-bottom: 6px; }

/* Download */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 68px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
	content: counter(step);
	position: absolute; left: 18px; top: 16px;
	width: 34px; height: 34px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--pink); color: #fff; font: 700 1.1rem/1 var(--display);
}
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.specs dt { color: var(--muted); font-weight: 600; }
.specs dd { margin: 0; }
.notice { border-left: 4px solid var(--gold); background: rgba(255, 211, 77, 0.07); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--night-2); padding: 36px 0 28px; margin-top: 40px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.footer-brand { margin: 0 0 6px; font-size: 1.3rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.disclaimer { color: #8d81b3; font-size: 0.85rem; margin: 24px 0 0; max-width: 90ch; }

@media (max-width: 820px) {
	.split { grid-template-columns: 1fr; }
	.game-card { grid-template-columns: 1fr; }
	.split-art { order: -1; }
	.site-nav a:not(.button):not([href="/download/"]) { display: none; }
}
@media (max-width: 480px) {
	body { font-size: 16px; }
	.site-nav .button { display: none; }
	.hero-art { object-position: 50% 80%; }
}
@media (prefers-reduced-motion: reduce) {
	.button, .game-card { transition: none; }
	.button:hover, .game-card:hover, .game-card:focus-visible { transform: none; }
}

/* Spacing helpers (the site's policy allows no inline styles) */
.flush { margin: 0; }
.gap-top { margin-top: 20px; }
.gap-top-lg { margin-top: 32px; }
.space-top { margin-top: 48px; }
.pad-bottom { padding-bottom: 72px; }
.band-note { margin: 8px 0 0; }

/* The live hero: the loop, or the still where motion is unwanted */
.hero-still { display: none; }
@media (prefers-reduced-motion: reduce) {
	.hero-live { display: none; }
	.hero-still { display: block; }
}
