/* Lexricity site foundations: self-hosted type, tokens, focus, actions and the wordmark. */

/* Nunito (SIL OFL 1.1, ../fonts/Nunito-OFL.txt): the game's self-hosted Latin subset, weights 400–800. */
@font-face {
	font-family: 'Nunito';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/nunito-latin-wght.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215,
		U+FEFF, U+FFFD;
}

:root {
	--lx-navy: #1e1236;
	--lx-navy-soft: #3b285a;
	--lx-purple: #6d2dff;
	--lx-purple-hover: #5a1ee6;
	--lx-yellow: #ffca3a;
	--lx-yellow-hover: #ffd766;
	--lx-paper: #f6f2ff;
	--lx-white: #ffffff;
	--lx-lavender: #e9deff;
	--lx-board: #e5dcf4;
	--lx-tile-edge: #c3b8dc;
	--lx-tile-ink: #302044;
	--lx-muted: #6d5a86;
	--lx-footer-ink: #5f5572;
	--lx-selection: #fff0b0;
	--lx-cream: #fffefa;
	--lx-fresh-start: #e9e0fd;
	--lx-fresh-end: #ddd0fb;
	--lx-teal: #32c7c0;
	--lx-teal-edge: #239b97;
	--lx-coral: #ff795c;
	--lx-coral-edge: #cf5f45;
	--lx-yellow-edge: #c59b25;
	--lx-swap-pick: linear-gradient(160deg, #d2f3f1, #b6eae6);
	--lx-gap-pick: linear-gradient(155deg, #ffe0d8, #ffcbbd);
	--lx-buster-pick: linear-gradient(145deg, #fff4d0, #ffe594);
	--lx-silver: linear-gradient(150deg, rgb(203, 204, 205) 13.177%, rgb(83, 89, 93) 71.742%, rgb(115, 115, 115) 86.384%);
	--lx-gold: linear-gradient(150deg, rgb(223, 188, 67) 13.177%, rgb(161, 111, 38) 64.422%, rgb(251, 235, 147) 86.384%);
	--lx-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--bde-body-font-family: var(--lx-font);
	--bde-heading-font-family: var(--lx-font);
	--bde-body-text-color: var(--lx-navy);
	--bde-headings-color: var(--lx-navy);
	--bde-background-color: var(--lx-paper);
	--bde-brand-primary-color: var(--lx-purple);
	--bde-brand-primary-color-hover: var(--lx-purple-hover);
}

body {
	font-family: var(--lx-font);
	color: var(--lx-navy);
	background-color: var(--lx-paper);
	-webkit-font-smoothing: antialiased;
}

:focus-visible {
	outline: 3px solid var(--lx-purple);
	outline-offset: 3px;
}

.surface-dark :focus-visible {
	outline-color: var(--lx-yellow);
}

/* Actions */

.button-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 198px;
	max-width: 100%;
	padding: 16px;
	border: 0;
	border-radius: 16px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.button-primary,
.button-primary:hover {
	background-color: var(--lx-purple);
	color: var(--lx-white);
}

.button-secondary,
.button-secondary:hover {
	background-color: var(--lx-yellow);
	color: var(--lx-navy);
}

.button-primary:not([aria-disabled='true']):hover {
	background-color: var(--lx-purple-hover);
}

.button-secondary:hover {
	background-color: var(--lx-yellow-hover);
}

.button[aria-disabled='true'] {
	cursor: not-allowed;
}

/* Visible companion to an unavailable button; the button's accessible name already carries the status. */
.availability-note {
	margin-top: -12px;
	color: var(--lx-muted);
	font-size: 14px;
	line-height: 1.4;
}

.surface-dark .availability-note {
	color: var(--lx-lavender);
}

/* Wordmark: "le", the approved geometric X image, "ricity". Every measure is in em of the wordmark size. */

.wordmark {
	position: relative;
	display: block;
	flex: none;
	width: 4.119em;
	height: 1.381em;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--lx-white);
	text-decoration: none;
}

.wordmark:hover {
	color: var(--lx-white);
}

.wordmark-start,
.wordmark-end {
	position: absolute;
	top: 0.0417em;
	white-space: nowrap;
}

.wordmark-start {
	left: 0.238em;
}

.wordmark-end {
	left: 1.738em;
}

.wordmark-mark {
	position: absolute;
	top: 0;
	left: 1em;
	width: 0.857em;
	height: 1.381em;
}

.wordmark-x {
	position: absolute;
	top: 0.7607em;
	left: 50%;
	display: block;
	width: 0.7719em;
	max-width: none;
	height: 0.7719em;
	transform: translate(-50%, -50%) rotate(44.83deg) skewX(-0.34deg);
}

/* Reduced motion */

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