/* DrapOTS prototype, direction "painted key art": colours are picked from the
   dragon illustration and the stone-and-ivy logo. See deploy/WEBSITE-REDESIGN.md. */

:root {
	--night: #130e0c;
	--card: rgb(255 240 215 / 0.045);
	--card-hover: rgb(255 240 215 / 0.07);
	--line: rgb(232 181 74 / 0.16);
	--line-strong: rgb(232 181 74 / 0.4);
	--text: #ece2cf;
	--text-soft: #d3c7b1;
	--text-faint: #a99b83;
	--gold: #e8b54a;
	--gold-hi: #f6d58a;
	--ember: #f07a2b;
	--emerald: #3cc073;
	--arcane: #5aa8ec;
	--blood: #e2574a;
	--display: "Rubik", "Segoe UI", sans-serif;
	--body: "Rubik", "Segoe UI", sans-serif;
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--night);
	color: var(--text);
	font: 16px/1.6 var(--body);
	-webkit-font-smoothing: antialiased;
}

/* The key art, blurred and dark, keeps the colour of the world behind the content. */
body::before {
	content: "";
	position: fixed;
	inset: -40px;
	z-index: -3;
	background: url(art/hero-1200.jpg) center / cover;
	filter: blur(48px) saturate(1.1);
	opacity: 0.22;
}

a {
	color: var(--gold-hi);
	text-decoration-color: rgb(246 213 138 / 0.4);
	text-underline-offset: 3px;
}

a:hover {
	text-decoration-color: currentColor;
}

a:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 3px;
	border-radius: 4px;
}

img {
	max-width: 100%;
}

/* Status strip */

.strip {
	background: rgb(8 5 4 / 0.85);
	color: var(--text-soft);
	font-size: 14px;
}

.strip-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 28px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 20px;
}

.live strong {
	color: #fff;
	font-weight: 600;
}

.dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--emerald);
	box-shadow: 0 0 0 3px rgb(60 192 115 / 0.22);
}

.strip-discord {
	margin-left: auto;
	font-weight: 600;
}

/* Hero */

.hero {
	position: relative;
	display: grid;
	min-height: min(82vh, 760px);
	overflow: hidden;
	isolation: isolate;
	background: var(--night);
}

.hero picture,
.hero-art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.hero-art {
	object-fit: cover;
	object-position: 50% 40%;
	z-index: -2;
}

/* Darken the middle and the bottom so the logo and the button read on the art. */
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(ellipse 60% 55% at 50% 42%, rgb(20 12 9 / 0.62), rgb(20 12 9 / 0) 70%),
		linear-gradient(to bottom, rgb(19 14 12 / 0) 55%, var(--night) 100%);
}

.embers {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

.hero-content {
	align-self: center;
	justify-self: center;
	max-width: 780px;
	padding: 48px 20px 72px;
	text-align: center;
}

.logo {
	margin: 0 auto 14px;
	max-width: 620px;
	filter: drop-shadow(0 0 28px rgb(232 181 74 / 0.45)) drop-shadow(0 6px 10px rgb(0 0 0 / 0.6));
}

.logo img {
	display: block;
	width: 100%;
	height: auto;
}

.pitch {
	max-width: 32em;
	margin: 0 auto 30px;
	font-size: 20px;
	line-height: 1.5;
	color: #f6ecd9;
	text-shadow: 0 2px 8px rgb(0 0 0 / 0.9);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 14px 22px;
	margin-bottom: 26px;
}

.btn-play {
	display: inline-block;
	padding: 17px 42px 16px;
	border-radius: 8px;
	background: linear-gradient(#f5cd6c, #db9630);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55), 0 0 0 1px #7a4314, 0 10px 28px rgb(240 122 43 / 0.35), 0 4px 10px rgb(0 0 0 / 0.5);
	color: #2b1608;
	font: 600 22px/1 var(--display);
	text-decoration: none;
	transition: transform 140ms ease-out, box-shadow 140ms ease-out;
}

.btn-play:hover {
	transform: translateY(-2px);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.55), 0 0 0 1px #7a4314, 0 14px 34px rgb(240 122 43 / 0.5), 0 6px 14px rgb(0 0 0 / 0.5);
}

.btn-play:active {
	transform: translateY(1px);
}

.btn-ghost {
	color: #fff;
	font-weight: 600;
	text-shadow: 0 2px 6px rgb(0 0 0 / 0.9);
}

.promises {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	color: #efe4cf;
	text-shadow: 0 1px 6px rgb(0 0 0 / 0.95);
}

.promises li::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin: 0 9px 2px 0;
	transform: rotate(45deg);
	background: var(--emerald);
}

/* Main navigation */

.mainnav {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgb(19 14 12 / 0.82);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.mainnav-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0 4px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 12px;
}

.mainnav a {
	padding: 15px 12px 13px;
	color: var(--text-soft);
	font: 600 15px/1 var(--body);
	text-decoration: none;
	box-shadow: inset 0 -2px 0 transparent;
	transition: color 120ms, box-shadow 120ms;
}

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

.mainnav a[aria-current="page"] {
	color: var(--gold-hi);
	box-shadow: inset 0 -2px 0 var(--gold);
}

.mainnav .nav-account {
	margin-left: auto;
	color: var(--gold-hi);
}

/* Content */

.page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 48px 32px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 20px 64px;
}

.col-main,
.col-side {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.col-side {
	gap: 20px;
}

/* Main column sections sit on the page; sidebar sections are cards. */
.col-main > .panel {
	padding: 0;
}

.col-side > .panel {
	padding: 20px 22px 22px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	backdrop-filter: blur(6px);
}

.panel-title {
	margin: 0 0 18px;
	font: 600 30px/1.15 var(--display);
	color: #f8eedb;
}

.col-side .panel-title {
	margin-bottom: 14px;
	font-size: 23px;
}

.sub-title {
	margin: 32px 0 14px;
	font: 600 15px/1.2 var(--body);
	color: var(--text-faint);
}

.panel-link {
	display: inline-block;
	margin-top: 14px;
	font-weight: 600;
	font-size: 15px;
}

/* Sprite slot: a trimmed pixel sprite, centred, scaled by whole factors in app.js */
.sprite {
	display: grid;
	place-items: center;
	flex: none;
}

.sprite img {
	image-rendering: pixelated;
}

/* Event cards: the glow behind the creature says what kind of event it is */

.events {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
}

.event {
	--tone: var(--gold);
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 2px 12px;
	align-items: center;
	padding: 14px 16px 14px 10px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
	backdrop-filter: blur(6px);
	transition: background 140ms, border-color 140ms;
}

.event:hover {
	background: var(--card-hover);
	border-color: color-mix(in srgb, var(--tone) 45%, transparent);
}

.event[data-kind="loot"] {
	--tone: var(--emerald);
}

.event[data-kind="boss"] {
	--tone: var(--blood);
}

.event[data-kind="task"] {
	--tone: var(--arcane);
}

.event .sprite {
	grid-row: span 3;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--tone) 38%, transparent) 0%, transparent 68%);
}

.event h4 {
	margin: 0;
	font: 700 17px/1.25 var(--body);
	color: #fff;
}

.event p {
	margin: 2px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--text-soft);
}

.event .when {
	justify-self: start;
	margin-top: 8px;
	padding: 2px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--tone) 16%, transparent);
	color: color-mix(in srgb, var(--tone) 80%, #fff);
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.meter {
	grid-column: 2;
	height: 6px;
	margin-top: 10px;
	border-radius: 999px;
	background: rgb(255 255 255 / 0.08);
	overflow: hidden;
}

.meter span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--tone);
	box-shadow: 0 0 12px var(--tone);
	transition: width 700ms ease-out;
}

/* Reasons */

.reasons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 28px 36px;
}

.reasons article {
	display: grid;
	grid-template-columns: 52px 1fr;
	gap: 4px 16px;
}

.reasons .sprite {
	grid-row: span 2;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: var(--card);
	border: 1px solid var(--line);
}

.reasons h3 {
	margin: 0;
	font: 600 19px/1.3 var(--display);
	color: #f8eedb;
}

.reasons p {
	margin: 0;
	font-size: 15px;
	color: var(--text-soft);
}

/* News */

.news {
	padding: 22px 24px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px;
}

.news h3 {
	margin: 0 0 6px;
	font: 600 23px/1.25 var(--display);
	color: #f8eedb;
}

.news p {
	margin: 0 0 10px;
	color: var(--text-soft);
}

.news .news-meta {
	margin-bottom: 4px;
	color: var(--text-faint);
	font-size: 14px;
}

/* Sidebar */

.boosted {
	display: grid;
	gap: 12px;
}

.boosted figure {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 14px;
	align-items: center;
	margin: 0;
}

.boosted .sprite {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: radial-gradient(circle, rgb(232 181 74 / 0.22), transparent 68%);
}

.boosted figcaption {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.boosted strong {
	font-weight: 700;
	color: #fff;
}

.boosted span {
	color: var(--text-soft);
	font-size: 14px;
}

.top {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: rank;
}

.top li {
	display: grid;
	grid-template-columns: 18px 40px 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 6px 0;
	border-top: 1px solid rgb(255 240 215 / 0.06);
	counter-increment: rank;
}

.top li:first-child {
	border-top: 0;
}

.top li::before {
	content: counter(rank);
	color: var(--text-faint);
	font-size: 14px;
	font-weight: 600;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.top .sprite {
	width: 40px;
	height: 40px;
}

.top .who {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	min-width: 0;
}

.top .who a {
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.top .who a:hover {
	text-decoration: underline;
}

.top .who span {
	color: var(--text-faint);
	font-size: 13px;
}

.top .lvl {
	color: var(--gold-hi);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.discord p {
	margin: 0 0 14px;
	color: var(--text-soft);
	font-size: 15px;
}

.btn-discord {
	display: block;
	padding: 11px 14px;
	border-radius: 8px;
	background: #5865f2;
	color: #fff;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background 120ms;
}

.btn-discord:hover {
	background: #4752c4;
}

/* Footer */

.footer {
	max-width: 1180px;
	margin: 0 auto;
	padding: 32px 20px 48px;
	border-top: 1px solid var(--line);
	color: var(--text-faint);
	font-size: 13px;
	text-align: center;
}

.footer img {
	display: block;
	margin: 0 auto 10px;
	opacity: 0.85;
}

/* Smaller screens */

@media (max-width: 960px) {
	.page {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 700px) {
	.hero {
		min-height: 0;
	}

	.hero-art {
		object-position: 30% 50%;
	}

	.hero-content {
		padding: 36px 16px 44px;
	}

	.pitch {
		font-size: 17px;
	}

	.btn-play {
		font-size: 21px;
		padding: 15px 30px 14px;
	}

	.strip-discord {
		margin-left: 0;
	}

	.mainnav-inner {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.mainnav-inner::-webkit-scrollbar {
		display: none;
	}

	.mainnav a {
		white-space: nowrap;
	}

	.mainnav .nav-account {
		margin-left: 0;
	}

	.page {
		padding: 32px 16px 48px;
		gap: 40px;
	}

	.panel-title {
		font-size: 27px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btn-play,
	.meter span,
	.event {
		transition: none;
	}

	.embers {
		display: none;
	}
}
