/* what the demo's pages share, in the game's own faces and colours (art/DIRECTION.md): Bowlby
   One for display, Barlow Condensed for text, gold on the deep teal of the reel bed. the fonts
   are the game's own files, served beside it. */

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

@font-face {
	font-family: 'Barlow Condensed';
	font-weight: 600;
	src: url('/play/game/fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
	font-display: swap;
}

:root {
	--gold-light: #ffe27a;
	--gold: #f2a81e;
	--gold-deep: #b4530a;
	--outline: #3a1a0a;
	--cream: #fffbe0;
	--teal: #0a3a4a;
	--teal-deep: #03191d;
	--dusk: #5a2a8a;

	/* the faces by role: Bowlby One for headings and the big buttons, Barlow Condensed for
	   everything that is read. the game ships Barlow Condensed in its SemiBold weight alone. */
	--display: 'Bowlby One', 'Arial Black', sans-serif;
	--text: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--code: ui-monospace, 'Cascadia Mono', Consolas, monospace;

	/* text on the deep teal: the body in near-full cream, labels and small print a step quieter,
	   both well clear of the background. */
	--text-soft: rgb(255 251 224 / 92%);
	--text-quiet: rgb(255 251 224 / 80%);

	color-scheme: dark;
	font-family: var(--text);
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.01em;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--teal-deep);
	color: var(--cream);
	font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.25rem);
}

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

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

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

h3 {
	font-size: 1.35rem;
}

p {
	margin: 0 0 1em;
}

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

/* the gold button, cast like the game's own controls. */

.play {
	display: inline-block;
	padding: 0.55em 1.6em 0.5em;
	border: 0.18rem solid var(--outline);
	border-radius: 999px;
	background: linear-gradient(to bottom, var(--gold-light), var(--gold) 55%, var(--gold-deep));
	box-shadow:
		inset 0 0.15rem 0 rgb(255 251 230 / 70%),
		0 0.35rem 0 var(--outline),
		0 0.6rem 2rem rgb(242 168 30 / 45%);
	color: var(--outline);
	font-family: var(--display);
	font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
	letter-spacing: 0.03em;
	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 251 230 / 70%),
		0 0.1rem 0 var(--outline);
	transform: translateY(0.25rem);
}

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

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