/* what the demo's pages share, in the game's own faces and colours, which its `demo/landing.json`
   names. the fonts are the game's own files, served beside it; the colours are set on each page,
   as --background, --surface, --accent, --accent-deep, --text and --ink. */

@font-face {
	font-family: 'Game Display';
	src: url('/play/game/fonts/Limelight-Regular.ttf') format('truetype');
	font-display: swap;
}

@font-face {
	font-family: 'Game Text';
	font-weight: 100 900;
	src: url('/play/game/fonts/JosefinSans.ttf') format('truetype');
	font-display: swap;
}

:root {
	--text-soft: color-mix(in srgb, var(--text) 75%, transparent);
	--edge: color-mix(in srgb, var(--accent) 30%, transparent);
	--display: 'Game Display', Georgia, serif;
	--code: ui-monospace, 'Cascadia Mono', Consolas, monospace;

	color-scheme: dark;
	font-family: 'Game Text', system-ui, sans-serif;
	font-weight: 600;
	line-height: 1.45;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--background);
	color: var(--text);
	font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
}

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

h2,
h3 {
	margin: 0 0 0.5em;
	color: var(--accent);
	font-family: var(--display);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0.02em;
	text-wrap: balance;
}

h2 {
	font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
}

h3 {
	font-size: 1.3rem;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--accent);
}

/* the big button that opens the game, in the game's accent. */

.play {
	display: inline-block;
	padding: 0.6em 1.8em 0.55em;
	border: 0.16rem solid var(--ink);
	border-radius: 999px;
	background: linear-gradient(
		to bottom,
		color-mix(in srgb, var(--accent) 80%, white),
		var(--accent) 55%,
		var(--accent-deep)
	);
	box-shadow:
		inset 0 0.15rem 0 rgb(255 255 255 / 55%),
		0 0.35rem 0 var(--ink),
		0 0.6rem 2rem color-mix(in srgb, var(--accent) 40%, transparent);
	color: var(--ink);
	font-family: var(--display);
	font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2rem);
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		transform 120ms ease-out,
		box-shadow 120ms ease-out;
}

.play:hover {
	transform: translateY(-0.12rem);
}

.play:active {
	box-shadow:
		inset 0 0.15rem 0 rgb(255 255 255 / 55%),
		0 0.1rem 0 var(--ink);
	transform: translateY(0.25rem);
}

.play:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 0.2rem solid var(--text);
	outline-offset: 0.3rem;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
