/* The site, dartscore.org: the app's colours and fonts on plain pages.
   Every colour channel is one of the twelve steps (js/colors.js). */
:root {
	--page: #161616;
	--page-deep: #000000;
	--panel: linear-gradient(#323232, #161616);
	--line: #484848;
	--text: #fafafa;
	--text-soft: #c8c8c8;
	--text-muted: #969696;
	--green: #00c800;
	--green-soft: #48b248;
	--go-top: #328016;
	--go-bottom: #164816;
	--go-line: #00c800;
	--button-top: #808080;
	--button-bottom: #484848;
	--link: #48c8ff;
	--radius: 10px;
	--wide: 72rem;
	--font: 'Roboto Flex', sans-serif;
	--font-condensed: 'Roboto Condensed', sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 5rem;
}

body {
	margin: 0;
	background: linear-gradient(var(--page), var(--page-deep)) fixed;
	background-color: var(--page-deep);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}

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

a {
	color: var(--link);
}

h1,
h2,
h3 {
	font-family: var(--font-condensed);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5rem;
}

p {
	margin: 0 0 0.9rem;
}

/* ---- Buttons ---- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1.4rem;
	border: 2px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(var(--button-top), var(--button-bottom));
	color: var(--text);
	font-family: var(--font-condensed);
	font-size: 1.15rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.button.go {
	border-color: var(--go-line);
	background: linear-gradient(var(--go-top), var(--go-bottom));
}

.button.small {
	min-height: 42px;
	padding: 0 1rem;
	font-size: 1.05rem;
}

.button:hover {
	filter: brightness(1.12);
}

.button:focus-visible,
.top-links a:focus-visible,
.brand:focus-visible {
	outline: 3px solid var(--link);
	outline-offset: 2px;
}

/* ---- Header and footer ---- */

.top {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	max-width: var(--wide);
	margin: 0 auto;
	padding: 0.75rem 16px;
	background: var(--page);
	border-bottom: 1px solid var(--line);
}

@media (min-width: 72rem) {
	.top {
		max-width: none;
		padding-inline: calc((100% - var(--wide)) / 2 + 16px);
	}
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	border-radius: var(--radius);
}

.top .brand img:first-child {
	width: 40px;
}

.top .wordmark {
	width: 150px;
}

.top-links {
	display: flex;
	gap: 1.25rem;
	margin-left: auto;
}

.top-links a {
	color: var(--text-soft);
	text-decoration: none;
	font-weight: 500;
}

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

.bottom {
	display: grid;
	gap: 0.75rem;
	max-width: var(--wide);
	margin: 0 auto;
	padding: 2rem 16px 3rem;
	border-top: 1px solid var(--line);
	color: var(--text-muted);
	font-size: 0.95rem;
}

.bottom nav {
	display: flex;
	gap: 1.25rem;
}

.bottom .wordmark {
	width: 120px;
}

.bottom p {
	margin: 0;
}

/* ---- Sections ---- */

main > section {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 3.5rem 16px;
}

.section-title {
	font-size: 2rem;
	margin-bottom: 1.5rem;
}

.shot {
	border: 2px solid var(--line);
	border-radius: 14px;
	background: var(--page-deep);
}

.shot.phone {
	border-radius: 22px;
}

/* The first screen: what it is, and the way in. */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 3rem;
	align-items: center;
	padding-top: 4rem;
}

.hero h1 {
	font-size: clamp(2.4rem, 5vw, 3.6rem);
	letter-spacing: -0.01em;
	margin-bottom: 1rem;
}

.lead {
	color: var(--text-soft);
	font-size: 1.2rem;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.75rem 0 0.75rem;
}

.small-print {
	color: var(--text-muted);
	font-size: 0.95rem;
}

.hero-shots {
	position: relative;
	padding-right: 9%;
	padding-bottom: 6%;
}

.hero-shots .phone {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 22%;
	box-shadow: 0 0 0 6px var(--page-deep);
}

/* Four promises in a row. */
.promises {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
}

.promises > div {
	padding: 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.promises h2 {
	font-size: 1.3rem;
	color: var(--green);
}

.promises p {
	margin: 0;
	color: var(--text-soft);
}

/* The games, in the New game screen's three groups. */
.game-groups {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.game-group {
	padding: 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.game-group h3 {
	font-size: 1.6rem;
}

.game-group > p {
	color: var(--text-soft);
}

.game-group ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.game-group li {
	padding: 0.55rem 0;
	border-top: 1px solid var(--line);
	font-weight: 500;
}

.game-group li span {
	display: block;
	color: var(--text-muted);
	font-size: 0.92rem;
	font-weight: 400;
}

/* Pictures beside their words, taking turns. */
.feature {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 3rem;
	align-items: center;
}

.feature + .feature {
	margin-top: 4rem;
}

.feature:nth-child(even) > .shot {
	order: 2;
}

/* A phone's picture takes less room beside its words. */
.feature.narrow {
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
}

.feature.narrow .phone {
	max-width: 280px;
	justify-self: center;
}

.feature h2 {
	font-size: 2rem;
	margin-bottom: 1rem;
}

.feature p {
	color: var(--text-soft);
	font-size: 1.1rem;
}

.more-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.more-list h3 {
	font-size: 1.25rem;
	padding-left: 0.75rem;
	border-left: 3px solid var(--green-soft);
}

.more-list p {
	margin: 0;
	color: var(--text-soft);
}

.install > div {
	max-width: 44rem;
	padding: 2rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.install h2 {
	font-size: 2rem;
	margin-bottom: 1rem;
}

.install p,
.install li {
	color: var(--text-soft);
}

.install ul {
	margin: 0 0 1.75rem;
	padding-left: 1.2rem;
}

.install li {
	margin-bottom: 0.5rem;
}

.install strong {
	color: var(--text);
}

/* ---- Tablet and phone ---- */

@media (max-width: 960px) {
	.hero,
	.feature,
	.feature.narrow {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.feature:nth-child(even) > .shot {
		order: 0;
	}

	.promises,
	.more-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.game-groups {
		grid-template-columns: minmax(0, 1fr);
	}

	.feature.narrow .phone {
		max-width: 240px;
	}
}

@media (max-width: 600px) {
	body {
		font-size: 16px;
	}

	.top {
		gap: 0.75rem;
	}

	.top-links {
		display: none;
	}

	.top .button {
		margin-left: auto;
	}

	.top .wordmark {
		width: 120px;
	}

	.top .brand img:first-child {
		width: 34px;
	}

	main > section {
		padding-block: 2.5rem;
	}

	.hero {
		padding-top: 2rem;
	}

	.lead {
		font-size: 1.1rem;
	}

	.actions .button {
		flex: 1;
	}

	.promises,
	.more-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.install > div {
		padding: 1.25rem;
	}

	.section-title,
	.feature h2,
	.install h2 {
		font-size: 1.7rem;
	}
}
