/*

	Site-wide styles: load before any page stylesheet.
	Change colours, fonts and shapes here rather than in page CSS.

*/
:root {
	/* Colours */
	--color-bg: #232630;
	--color-surface: #2b2f3a;
	--color-surface-glass: rgba(29, 33, 37, 0.3); /* frosted cards: over --color-bg brightened by the card's backdrop-filter, this comes out as --color-surface */
	--color-border: rgba(255, 255, 255, 0.08);
	--color-border-strong: rgba(255, 255, 255, 0.2);
	--color-text: rgb(200, 195, 188);
	--color-text-muted: rgb(160, 157, 153);
	--color-text-bright: white;
	--color-imprint: #33363f; /* faint background artwork, a step up from --color-bg */
	--color-accent: #de4500;
	--color-accent-light: #ed6000;
	--color-accent-dark: #c73f00;
	--color-on-accent: #05050d;
	--color-scrollbar: #435066;
	--color-scrollbar-hover: #4f566b;

	/* Type */
	--font-body: Cabin, Tahoma, Verdana, Arial, sans-serif;

	/* Shape: button corners are em-based so they scale with the button's text size */
	--radius: 0.2em;
	--radius-card: 8px;
	--shadow-text: 0 2px 1px rgba(0, 0, 0, 0.6), 0 0 2px rgba(0, 0, 0, 0.7);
	--shadow-raised: 0 4px 16px 2px rgba(0, 0, 0, 0.4);
	--shadow-pressed: 0 0 8px 4px rgba(0, 0, 0, 0.4);

	/* Layout */
	--content-width: 1100px;
}


/*

	Body

*/
html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	background-color: var(--color-bg);
	color: var(--color-text);
	margin: 0 auto;
	font-family: var(--font-body);
	/* Background artwork can spill past the sides; clip it rather than scrolling sideways */
	overflow-x: clip;
}

a {
	color: inherit;
}


/*

	Headings

*/
h1 {
	text-shadow: var(--shadow-text);
	word-spacing: 0.8vw;
	text-align: center;
}


/*

	Button: use on <a> or <button>
	Add buttonSmall for compact, flat buttons, and buttonSecondary for an outlined one

*/
.button {
	display: inline-block;
	background-color: var(--color-accent);
	color: var(--color-on-accent);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	font-family: inherit;
	font-weight: bold;
	text-decoration: none;
	box-shadow: var(--shadow-raised);
}

.button:hover,
.button:active {
	background-color: var(--color-accent-dark);
}

.button:active {
	box-shadow: var(--shadow-pressed);
}

.buttonSmall,
.buttonSmall:active {
	padding: 0.45em 1em;
	font-size: 0.95rem;
	box-shadow: none;
}

.buttonSecondary {
	background-color: transparent;
	color: var(--color-text);
	box-shadow: inset 0 0 0 1px var(--color-border-strong);
}

.buttonSecondary:hover,
.buttonSecondary:active {
	background-color: var(--color-border);
	box-shadow: inset 0 0 0 1px var(--color-border-strong);
}


/*

	Scrollbar
	Pages with the nav bar swap the page's own scrollbar for one drawn by nav.js (see layout.css)

*/
::-webkit-scrollbar {
	width: 1vmin;
}

::-webkit-scrollbar-track {
	background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
	background: var(--color-scrollbar);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--color-scrollbar-hover);
}
