/* Copyright 2026 davenonymous
 *
 * The site's theme: design tokens and the components every page shares
 * (top bar, sections, panels, buttons, badges, team colours). Page styles
 * build on these and add no colours of their own.
 */

@font-face { font-family: "TF2 Build"; src: url("../game/tf2build.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "TF2 Secondary"; src: url("../game/tf2secondary.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "TF2 Professor"; src: url("../game/tf2professor.ttf") format("truetype"); font-display: swap; }

:root {
	color-scheme: dark;

	/* surfaces, darkest first */
	--surface-0: #15110f;
	--surface-1: #201b17;
	--surface-2: #2a231e;
	--surface-3: #362d26;
	--surface-4: #463a31;
	--edge: #57483c;
	--edge-soft: rgba(236, 227, 203, 0.08);

	/* text */
	--text: #ece3cb;
	--text-muted: #b9ac93;
	--text-dim: #8a7e6c;
	--text-on-accent: #fff6e4;

	/* the game's colours */
	--red: #b8383b;
	--red-bright: #e0585b;
	--red-soft: rgba(184, 56, 59, 0.16);
	--blu: #5885a2;
	--blu-bright: #7fb0d1;
	--blu-soft: rgba(88, 133, 162, 0.18);
	--accent: #cf6a32;
	--accent-bright: #e8834a;
	--accent-soft: rgba(207, 106, 50, 0.16);
	--gold: #e3b33e;
	--gold-soft: rgba(227, 179, 62, 0.15);
	--good: #7ea34d;
	--good-soft: rgba(126, 163, 77, 0.16);
	--bad: var(--red-bright);
	--paper: #f4eedf;
	--paper-ink: #2f2a24;

	/* type */
	--font-display: "TF2 Build", Impact, "Arial Black", sans-serif;
	--font-ui: "TF2 Secondary", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
	--font-hand: "TF2 Professor", "Segoe Print", "Comic Sans MS", cursive;
	--font-prose: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace;

	/* shape */
	--radius-s: 4px;
	--radius: 8px;
	--radius-l: 12px;
	--shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.45);
	--shadow-s: 0 2px 8px rgba(0, 0, 0, 0.4);
	--gutter: clamp(16px, 3vw, 32px);
	--content-width: 1440px;
	--topbar-height: 60px;

	--texture-wood: url("../img/wood.jpg");
	--texture-metal: url("../img/metal.jpg");
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-height) + 16px); }

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 1.5;
	background-color: var(--surface-0);
	background-image:
		linear-gradient(180deg, rgba(21, 17, 15, 0.86), rgba(21, 17, 15, 0.94) 40%, rgba(21, 17, 15, 0.97)),
		var(--texture-wood);
	background-size: auto, 384px 384px;
	background-attachment: fixed, fixed;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold); text-decoration-color: rgba(227, 179, 62, 0.35); text-underline-offset: 3px; }
a:hover { color: #f3cc6a; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--radius-s); }

img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: normal; line-height: 1.15; }

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

.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }

.container { width: min(100% - 2 * var(--gutter), var(--content-width)); margin-inline: auto; }

/* ------------------------------------------------------------------ top bar */

.topbar {
	position: sticky; top: 0; z-index: 50;
	height: var(--topbar-height);
	background:
		linear-gradient(180deg, rgba(54, 45, 38, 0.92), rgba(32, 27, 23, 0.96)),
		var(--texture-metal);
	background-size: auto, 256px 256px;
	border-bottom: 1px solid #0d0a08;
	box-shadow: 0 1px 0 rgba(236, 227, 203, 0.06) inset, 0 6px 18px rgba(0, 0, 0, 0.5);
}
.topbar__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--text); }
.brand__mark { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.brand__name { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__nav { display: flex; gap: 4px; margin-left: auto; }
.topbar__nav a {
	color: var(--text-muted); text-decoration: none; padding: 8px 14px; border-radius: var(--radius-s);
	font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.topbar__nav a:hover { color: var(--text); background: rgba(236, 227, 203, 0.06); }
.topbar__actions { display: flex; gap: 8px; align-items: center; }
.topbar__actions:empty { display: none; }

@media (max-width: 640px) {
	.topbar__nav a { padding: 8px 8px; font-size: 0.85rem; }
	.brand__name { font-size: 1.15rem; }
}
@media (max-width: 480px) {
	.brand__name { display: none; }
}

/* ----------------------------------------------------------------- sections */

.section { padding-block: clamp(32px, 5vw, 56px); }
.section__head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section__title {
	display: flex; align-items: center; gap: 14px;
	font-family: var(--font-display); font-size: clamp(1.7rem, 3.2vw, 2.4rem);
	letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.section__title::before {
	content: ""; width: 10px; height: 1.1em; background: var(--accent);
	border-radius: 2px; box-shadow: 0 0 0 3px rgba(207, 106, 50, 0.2);
}
.section__rule { flex: 1; height: 2px; min-width: 40px; background: linear-gradient(90deg, var(--edge), transparent); }
.section__note { color: var(--text-muted); font-size: 0.95rem; }

/* ------------------------------------------------------------------- panels */

.panel {
	position: relative;
	background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
	border: 1px solid var(--edge-soft);
	border-radius: var(--radius-l);
	box-shadow: var(--shadow);
}
.panel__head {
	display: flex; align-items: center; gap: 12px; padding: 14px 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.35);
	box-shadow: 0 1px 0 var(--edge-soft);
}
.panel__title { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase; }
.panel__body { padding: 18px; }
.panel__empty { color: var(--text-dim); font-style: italic; }

/* ------------------------------------------------------------------ buttons */

.btn {
	--btn-bg: var(--surface-4);
	--btn-fg: var(--text);
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 40px; padding: 8px 18px;
	font: inherit; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
	color: var(--btn-fg); background: var(--btn-bg);
	border: 1px solid rgba(0, 0, 0, 0.45); border-radius: var(--radius-s);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 0 rgba(0, 0, 0, 0.45);
	cursor: pointer; user-select: none; white-space: nowrap;
	transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { color: var(--btn-fg); filter: brightness(1.12); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset; }
.btn--primary { --btn-bg: linear-gradient(180deg, var(--accent-bright), var(--accent)); --btn-fg: var(--text-on-accent); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--edge); box-shadow: none; }
.btn--ghost:hover { background: rgba(236, 227, 203, 0.06); filter: none; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.45; pointer-events: none; }
.btn--icon { min-height: 34px; width: 34px; padding: 0; }
.btn--small { min-height: 32px; padding: 4px 12px; font-size: 0.82rem; }
.btn--large { min-height: 50px; padding: 12px 26px; font-size: 1.05rem; }
.btn--large .icon { width: 1.4em; height: 1.4em; }

/* ------------------------------------------------------------------- badges */

.badge {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 2px 9px; border-radius: 999px;
	font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.6;
	color: var(--text-muted); background: rgba(236, 227, 203, 0.07); border: 1px solid var(--edge-soft);
	white-space: nowrap;
}
.badge--gold { color: var(--gold); background: var(--gold-soft); border-color: rgba(227, 179, 62, 0.3); }
.badge--accent { color: var(--accent-bright); background: var(--accent-soft); border-color: rgba(207, 106, 50, 0.3); }
.badge--good { color: #a6cf6f; background: var(--good-soft); border-color: rgba(126, 163, 77, 0.35); }
.badge--bad { color: var(--red-bright); background: var(--red-soft); border-color: rgba(184, 56, 59, 0.4); }
.badge--red { color: #fff; background: var(--red); border-color: transparent; }
.badge--blu { color: #fff; background: var(--blu); border-color: transparent; }

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); flex: none; }
.status-dot--online { background: #8fd14f; box-shadow: 0 0 0 3px rgba(143, 209, 79, 0.18), 0 0 10px rgba(143, 209, 79, 0.6); }
.status-dot--offline { background: var(--red-bright); box-shadow: 0 0 0 3px rgba(224, 88, 91, 0.18); }

/* ------------------------------------------------------------------- footer */

.site-footer { padding: 32px 0 48px; color: var(--text-dim); font-size: 0.88rem; border-top: 1px solid var(--edge-soft); background: rgba(0, 0, 0, 0.25); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer a { color: var(--text-muted); }
