/* Western Games · shared design tokens, fonts and primitives.
   site.css (public website) and app.css (backoffice) build on this file. */

@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: "Zilla Slab";
	src: url("../fonts/zilla-slab-latin-500-normal.0f56d6e8b14f.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: "Zilla Slab";
	src: url("../fonts/zilla-slab-latin-700-normal.c91118820fe7.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: "Rye";
	src: url("../fonts/rye-latin-400-normal.2e05f51489b2.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

:root {
	/* Palette: saddle leather, sand, brass */
	--ink: #1f1a16;
	--ink-soft: #4a4038;
	--muted: #7a6d62;
	--line: #e4d9cb;
	--paper: #faf6f0;
	--surface: #ffffff;
	--sand: #f1e7d8;
	--leather: #7a3e1d;
	--leather-dark: #5a2c13;
	--brass: #c8912e;
	--brass-soft: #f4e3c2;
	--night: #191512;
	--night-2: #25201b;
	--success: #2f7d4f;
	--success-soft: #e3f2e8;
	--warning: #a86a0c;
	--warning-soft: #fbefd6;
	--danger: #b3261e;
	--danger-soft: #fbe4e2;
	--info: #2b5d8a;
	--info-soft: #e2edf7;

	--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-slab: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
	--font-western: "Rye", "Zilla Slab", Georgia, serif;

	--radius-sm: 6px;
	--radius: 10px;
	--radius-lg: 18px;
	--shadow-sm: 0 1px 2px rgb(31 26 22 / 0.06), 0 1px 3px rgb(31 26 22 / 0.08);
	--shadow: 0 4px 16px rgb(31 26 22 / 0.08), 0 1px 3px rgb(31 26 22 / 0.06);
	--shadow-lg: 0 20px 50px rgb(31 26 22 / 0.18);
	--focus: 0 0 0 3px rgb(200 145 46 / 0.45);

	--container: 1180px;
	color-scheme: light;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
	font-family: var(--font-slab);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 0.5em;
	color: var(--ink);
	text-wrap: balance;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--leather);
	text-underline-offset: 3px;
}
a:hover {
	color: var(--leather-dark);
}

:focus-visible {
	outline: none;
	box-shadow: var(--focus);
	border-radius: var(--radius-sm);
}

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 20px;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.7em 1.3em;
	border-radius: 999px;
	border: 1px solid transparent;
	font: 600 0.95rem/1.2 var(--font-sans);
	text-decoration: none;
	cursor: pointer;
	transition:
		background 0.15s,
		color 0.15s,
		border-color 0.15s,
		transform 0.15s;
	white-space: nowrap;
}
.btn:active {
	transform: translateY(1px);
}
.btn-primary {
	background: var(--brass);
	color: var(--night);
}
.btn-primary:hover {
	background: #d9a23d;
	color: var(--night);
}
.btn-dark {
	background: var(--leather);
	color: #fff;
}
.btn-dark:hover {
	background: var(--leather-dark);
	color: #fff;
}
.btn-outline {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}
.btn-outline:hover {
	background: rgb(255 255 255 / 0.08);
	color: inherit;
}
.btn-ghost {
	background: transparent;
	color: var(--ink-soft);
}
.btn-ghost:hover {
	background: var(--sand);
	color: var(--ink);
}
.btn-danger {
	background: var(--danger);
	color: #fff;
}
.btn-danger:hover {
	background: #8f1e18;
	color: #fff;
}
.btn-sm {
	padding: 0.45em 0.9em;
	font-size: 0.85rem;
}
.btn-lg {
	padding: 0.9em 1.7em;
	font-size: 1.05rem;
}

/* Forms */
label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.3em;
	color: var(--ink-soft);
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
input[type="url"],
input[type="search"],
select,
textarea {
	width: 100%;
	padding: 0.65em 0.8em;
	font: inherit;
	color: var(--ink);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	transition:
		border-color 0.15s,
		box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--brass);
	box-shadow: var(--focus);
}
textarea {
	min-height: 7em;
	resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
	width: 1.1em;
	height: 1.1em;
	accent-color: var(--leather);
}
.field {
	margin-bottom: 1rem;
}
.field .help {
	font-size: 0.82rem;
	color: var(--muted);
	margin-top: 0.25em;
}
.field .errors,
.errorlist {
	list-style: none;
	padding: 0;
	margin: 0.3em 0 0;
	color: var(--danger);
	font-size: 0.85rem;
}
.field-check {
	display: flex;
	gap: 0.6em;
	align-items: flex-start;
}
.field-check label {
	font-weight: 500;
	margin: 0;
}

/* Alerts / messages */
.alert {
	padding: 0.85em 1.1em;
	border-radius: var(--radius);
	border: 1px solid transparent;
	margin-bottom: 1rem;
}
.alert-success {
	background: var(--success-soft);
	color: var(--success);
	border-color: #bfe0cb;
}
.alert-error,
.alert-danger {
	background: var(--danger-soft);
	color: var(--danger);
	border-color: #f2c2be;
}
.alert-warning {
	background: var(--warning-soft);
	color: var(--warning);
	border-color: #f0d9a8;
}
.alert-info {
	background: var(--info-soft);
	color: var(--info);
	border-color: #c4d8ea;
}

/* Badges */
.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	background: var(--sand);
	color: var(--ink-soft);
	white-space: nowrap;
}

/* Tables */
.table-wrap {
	overflow-x: auto;
}
table.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}
.table th,
.table td {
	padding: 0.7em 0.8em;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: middle;
}
.table th {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	font-weight: 600;
}
.table .num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}
