/* The in-game look (resources/[addons]/dm_panel/ui_client.lua, the U menu's generation): the same
   colours, Rajdhani, square corners, thin dividers, capitals for labels, the accent square that
   marks where you are. Sizes are the game's at 1080p where it has one. */

@font-face {
	font-family: 'Rajdhani';
	src: url('fonts/Rajdhani-SemiBold.ttf') format('truetype');
	font-weight: 600;
	font-display: swap;
}
@font-face {
	font-family: 'Rajdhani';
	src: url('fonts/Rajdhani-Bold.ttf') format('truetype');
	font-weight: 700;
	font-display: swap;
}

:root {
	/* UI.colors */
	--panel: rgb(14 14 20);
	--panel2: rgb(30 30 40);
	--bar: rgb(20 20 27);
	--accent: rgb(255 145 30);
	--text: rgb(255 255 255);
	--muted: rgb(165 165 180);
	--grey: rgb(138 138 154);
	--ink: rgb(12 12 16);
	--good: rgb(90 215 120);
	--bad: rgb(240 75 70);
	--nitro: rgb(70 165 255);
	--gold: rgb(240 190 60);
	--line: rgb(255 255 255 / 0.07);
	--edge: rgb(255 255 255 / 0.08);
	--hover: rgb(255 255 255 / 0.06);
	/* The world behind the windows */
	--page: rgb(9 9 13);

	/* UI.BAR_H, ROW_H, FOOT_H, PAD */
	--bar-h: 64px;
	--row-h: 48px;
	--foot-h: 42px;
	--pad: 28px;
	--wide: 1180px;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--bar-h) + 16px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: 'Rajdhani', 'Arial Narrow', sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* The radar map faint behind everything, as the game world sits behind its menus */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgb(9 9 13 / 0.82), rgb(9 9 13 / 0.95) 60%),
		url('img/radar.webp') center 30% / cover no-repeat;
}

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

a {
	color: inherit;
	text-decoration: none;
}

p {
	margin: 0;
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: 700;
	line-height: 1;
}

.caps {
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.wrap {
	width: min(var(--wide), 100% - 32px);
	margin-inline: auto;
}

/* ---------------------------------------------------------------------------------------------
   The top bar: the U menu's bar, the name in the accent with its underline, word tabs
   --------------------------------------------------------------------------------------------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	height: var(--bar-h);
	background: var(--bar);
	border-bottom: 1px solid var(--edge);
}

.topbar .wrap {
	height: 100%;
	display: flex;
	align-items: center;
	gap: 32px;
}

.brand {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
	color: var(--accent);
	font-size: 22px;
	text-transform: uppercase;
	font-weight: 700;
	white-space: nowrap;
}

/* The mark for where you are: the active tab's underline, here under the name */
.brand::after {
	content: '';
	position: absolute;
	left: -8px;
	right: -8px;
	bottom: 0;
	height: 3px;
	background: var(--accent);
}

.tabs {
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* UI.wordTabs: grey capitals; the picked one white after a 6px accent square */
.tabs a {
	position: relative;
	display: block;
	padding-left: 14px;
	color: var(--grey);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	transition: color 0.12s;
}

.tabs a:hover,
.tabs a.on {
	color: var(--text);
}

.tabs a.on::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -3px;
	background: var(--accent);
}

.topbar .btn {
	margin-left: auto;
}

/* ---------------------------------------------------------------------------------------------
   Widgets
   --------------------------------------------------------------------------------------------- */

/* UI.button: square, capitals; primary in the accent with ink, the rest panel2, ghost an outline */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 52px;
	padding: 0 24px;
	border: 0;
	background: rgb(30 30 40 / 0.75);
	color: var(--text);
	font: inherit;
	font-size: 17px;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	position: relative;
	transition: background-color 0.12s;
}

.btn:hover {
	background: var(--panel2);
}

.btn::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgb(255 255 255 / 0.055);
	opacity: 0;
	transition: opacity 0.12s;
	pointer-events: none;
}

.btn:hover::after {
	opacity: 1;
}

.btn.primary {
	background: rgb(255 145 30 / 0.88);
	color: var(--ink);
}

.btn.primary:hover {
	background: var(--accent);
}

.btn.ghost {
	background: transparent;
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.btn.ghost:hover {
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.24);
}

.btn.ghost::after {
	display: none;
}

.btn.small {
	height: 40px;
	padding: 0 18px;
	font-size: 15px;
}

.btn .icon {
	width: 18px;
	height: 18px;
}

/* A white icon from the game (Material Design Icons, 64px PNGs) tinted with currentColor */
.icon {
	display: inline-block;
	flex: none;
	width: 26px;
	height: 26px;
	background: currentColor;
	-webkit-mask: var(--i) center / contain no-repeat;
	mask: var(--i) center / contain no-repeat;
}

/* UI.keyCap: a panel2 key with rounded 4px corners */
.key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	border-radius: 4px;
	background: var(--panel2);
	color: var(--text);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

/* UI.tag: capitals on a faint square of the colour, or solid with ink */
.tag {
	--c: var(--muted);
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 8px;
	background: color-mix(in srgb, var(--c) 16%, transparent);
	color: var(--c);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.tag.solid {
	background: var(--c);
	color: var(--ink);
}

.tag.good {
	--c: var(--good);
}

.tag.gold {
	--c: var(--gold);
}

.tag.nitro {
	--c: var(--nitro);
}

.tag.bad {
	--c: var(--bad);
}

.tag.accent {
	--c: var(--accent);
}

/* UI.sectionHead: a 6px accent square, the title in accent capitals, a divider under */
.section-head {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 36px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--line);
}

.section-head h2 {
	position: relative;
	padding-left: 14px;
	color: var(--accent);
	font-size: 15px;
	text-transform: uppercase;
}

.section-head h2::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -3px;
	background: currentColor;
}

.section-head .note {
	margin-left: auto;
	color: var(--muted);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	text-align: right;
}

/* UI.card: panel2, white over it under the mouse, a 3px stripe of a colour along the top */
.card {
	--stripe: transparent;
	position: relative;
	background: var(--panel2);
	box-shadow: inset 0 3px 0 var(--stripe);
	transition: background-color 0.12s;
}

.card:hover {
	background: color-mix(in srgb, var(--panel2), white 6%);
}

/* UI.blockBar: progress as square blocks with 3px gaps */
.blocks {
	display: grid;
	grid-template-columns: repeat(20, 1fr);
	gap: 3px;
	height: 8px;
}

.blocks i {
	background: var(--panel2);
}

.blocks i.on {
	background: var(--accent);
}

/* ---------------------------------------------------------------------------------------------
   The windows: UI.window, a panel with its bar on top and its keys in the footer
   --------------------------------------------------------------------------------------------- */
.window {
	background: rgb(14 14 20 / 0.94);
	box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
}

.window-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	height: var(--bar-h);
	padding: 0 var(--pad);
	background: var(--bar);
	border-bottom: 1px solid var(--edge);
}

.window-bar h3 {
	position: relative;
	align-self: stretch;
	display: flex;
	align-items: center;
	color: var(--accent);
	font-size: 22px;
	text-transform: uppercase;
}

.window-bar h3::after {
	content: '';
	position: absolute;
	left: -8px;
	right: -8px;
	bottom: -1px;
	height: 3px;
	background: var(--accent);
}

.window-bar .sub {
	color: var(--muted);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

.window-foot {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 26px;
	min-height: var(--foot-h);
	padding: 9px var(--pad);
	background: var(--bar);
	border-top: 1px solid rgb(255 255 255 / 0.055);
	color: var(--grey);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
}

.window-foot span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* ---------------------------------------------------------------------------------------------
   Hero: the login screen, the poster at the left and the form column at the right
   --------------------------------------------------------------------------------------------- */
.hero {
	padding: 56px 0 72px;
}

.hero .window {
	display: grid;
	grid-template-columns: 420fr 560fr;
}

.poster {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 600px;
	padding: 36px var(--pad) var(--pad);
	background: var(--bar);
	border-right: 1px solid rgb(255 255 255 / 0.055);
	overflow: hidden;
	isolation: isolate;
}

/* The poster's picture at the login screen's tint (alpha 74), fading into the bar from 42% down */
.poster::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, transparent 42%, var(--bar) 100%),
		linear-gradient(rgb(20 20 27 / 0.71), rgb(20 20 27 / 0.71)),
		url('img/poster.webp') center / cover;
}

.poster .welcome {
	font-size: 17px;
}

.poster .name {
	margin: 4px 0 0 -0.04em;
	color: var(--accent);
	font-size: clamp(72px, 9vw, 112px);
	line-height: 0.78;
	text-transform: uppercase;
}

.poster .name span {
	display: block;
}

.poster .tagline {
	margin-top: 22px;
	color: var(--muted);
}

.poster .keys {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 10px 14px;
	margin: auto 0 0;
	padding-top: 32px;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	color: rgb(255 255 255 / 0.85);
}

.poster .keys dt {
	justify-self: start;
}

.poster .keys dd {
	margin: 0;
}

.join {
	display: flex;
	flex-direction: column;
}

.join-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 24px var(--pad) 20px;
}

.join h1 {
	font-size: clamp(34px, 4vw, 48px);
	line-height: 1.02;
	text-transform: uppercase;
}

.join h1 em {
	font-style: normal;
	color: var(--accent);
}

.join .pitch {
	margin-top: 14px;
	color: var(--muted);
	font-size: 19px;
	max-width: 36em;
}

.label {
	display: block;
	margin: 26px 0 8px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

/* UI.field: a panel2 box 52 tall, the copy button docked at its right */
.field {
	display: flex;
	height: 52px;
	background: var(--panel2);
}

.field output {
	flex: 1;
	display: flex;
	align-items: center;
	min-width: 0;
	padding: 0 18px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.02em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	user-select: all;
}

.field .btn {
	height: 100%;
	background: rgb(255 255 255 / 0.05);
}

.field .btn.done {
	color: var(--good);
}

.join .actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 24px;
}

.join .hint {
	margin-top: 12px;
	color: var(--grey);
	font-size: 16px;
}

.join .hint a {
	color: var(--text);
	box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.3);
}

.join .facts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin-top: auto;
	padding-top: 28px;
}

.join .facts div {
	padding: 14px 0 0;
	border-top: 1px solid var(--line);
}

.join .facts div + div {
	padding-left: 18px;
	border-left: 1px solid var(--line);
}

.join .facts b {
	display: block;
	font-size: 30px;
	line-height: 1;
}

.join .facts small {
	color: var(--muted);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------------------------- */
section {
	padding: 48px 0;
}

.lead {
	max-width: 46em;
	margin: -8px 0 28px;
	color: var(--muted);
	font-size: 19px;
}

/* Freeroam: a big card beside its list of things to do */
.freeroam {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 16px;
}

.freeroam .feature {
	--stripe: var(--accent);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.shot {
	position: relative;
	aspect-ratio: 16 / 9;
	background:
		repeating-linear-gradient(135deg, rgb(255 255 255 / 0.025) 0 12px, transparent 12px 24px),
		var(--panel);
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--grey);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
}

.shot img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shot .icon {
	width: 34px;
	height: 34px;
	opacity: 0.6;
}

.shot small {
	color: rgb(138 138 154 / 0.7);
	font-size: 13px;
}

.feature .body {
	padding: 22px 24px 24px;
}

.feature h3 {
	font-size: 28px;
	text-transform: uppercase;
}

.feature p {
	margin-top: 10px;
	color: var(--muted);
}

.feature .tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 16px;
}

/* UI.listRow: rows with a 1px divider under, an icon, a title and a muted line */
.rows {
	display: flex;
	flex-direction: column;
	background: rgb(14 14 20 / 0.94);
}

.row {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 72px;
	padding: 12px 20px;
	border-bottom: 1px solid var(--line);
	transition: background-color 0.12s;
}

.row:last-child {
	border-bottom: 0;
}

.row:hover {
	background: var(--hover);
}

.row .icon {
	color: var(--accent);
}

.row b {
	display: block;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.1;
}

.row small {
	display: block;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.3;
}

.row .tag {
	margin-left: auto;
}

/* Events: a grid of cards, each an icon, a name and a line */
.events {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

.event {
	--stripe: var(--c, var(--accent));
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px 20px 20px;
}

.event .top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--c, var(--accent));
}

.event h3 {
	font-size: 22px;
	text-transform: uppercase;
}

.event p {
	color: var(--muted);
	font-size: 16px;
	line-height: 1.35;
}

/* Cities: the world picker's cards */
.worlds {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.world {
	overflow: hidden;
}

.world img {
	aspect-ratio: 2 / 1;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.world.locked img {
	filter: grayscale(0.7) brightness(0.55);
}

.world .body {
	padding: 16px 20px 20px;
}

.world .head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.world h3 {
	font-size: 24px;
	text-transform: uppercase;
}

.world p {
	margin-top: 8px;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.35;
}

/* Screenshots */
.shots {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.shots .shot:first-child {
	grid-column: span 2;
	grid-row: span 2;
}

/* Skins: a strip of the fitting room's pictures */
.skins {
	display: flex;
	gap: 6px;
	margin-top: 28px;
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.skins img {
	flex: none;
	width: 64px;
	height: 166px;
	object-fit: cover;
	background: var(--panel2);
}

/* How to join: numbered steps as keys */
.steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.step {
	padding: 22px 22px 24px;
}

.step .key {
	min-width: 30px;
	height: 30px;
	font-size: 18px;
	background: var(--accent);
	color: var(--ink);
}

.step h3 {
	margin-top: 16px;
	font-size: 22px;
	text-transform: uppercase;
}

.step p {
	margin-top: 8px;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.4;
}

.step p a {
	color: var(--text);
	box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.3);
}

.step code {
	font-family: inherit;
	font-weight: 700;
	color: var(--text);
}

/* The closing call: a wide bar like a window's footer, in the accent */
.cta {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 28px var(--pad);
	background: var(--bar);
	box-shadow: inset 3px 0 0 var(--accent);
}

.cta h2 {
	font-size: 30px;
	text-transform: uppercase;
}

.cta p {
	margin-top: 6px;
	color: var(--muted);
}

.cta .btns {
	display: flex;
	gap: 12px;
	margin-left: auto;
}

footer {
	margin-top: 48px;
	background: var(--bar);
	border-top: 1px solid var(--edge);
}

footer .wrap {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 26px;
	min-height: 72px;
	padding: 16px 0;
	color: var(--grey);
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
}

footer a:hover {
	color: var(--text);
}

footer .fine {
	margin-left: auto;
	color: rgb(138 138 154 / 0.7);
	font-size: 13px;
	text-transform: none;
	font-weight: 600;
}

/* ---------------------------------------------------------------------------------------------
   Narrow screens
   --------------------------------------------------------------------------------------------- */
@media (max-width: 980px) {
	.tabs {
		display: none;
	}

	.hero .window,
	.freeroam {
		grid-template-columns: 1fr;
	}

	.poster {
		min-height: 0;
		border-right: 0;
		border-bottom: 1px solid rgb(255 255 255 / 0.055);
	}

	.poster .keys {
		display: none;
	}

	.worlds,
	.steps {
		grid-template-columns: 1fr;
	}

	.shots {
		grid-template-columns: 1fr 1fr;
	}

	.cta {
		flex-direction: column;
		align-items: flex-start;
	}

	.cta .btns {
		margin-left: 0;
		flex-wrap: wrap;
	}
}

@media (max-width: 560px) {
	:root {
		--pad: 18px;
	}

	.hero {
		padding-top: 24px;
	}

	.topbar .wrap {
		gap: 16px;
	}

	.join .actions {
		grid-template-columns: 1fr;
	}

	.join .facts b {
		font-size: 24px;
	}

	.join .facts div + div {
		padding-left: 12px;
	}

	.shots {
		grid-template-columns: 1fr;
	}

	.shots .shot:first-child {
		grid-column: auto;
		grid-row: auto;
	}

	.window-bar .sub {
		display: none;
	}

	.row .tag {
		display: none;
	}

	footer .fine {
		margin-left: 0;
	}
}

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