/*
	TCG Explorer -- the website, in the app's Collector design.

	Self-contained on purpose: the fonts are served from here, and nothing loads from anyone else --
	no font CDN, no analytics, no script. A privacy-respecting app with a site that phones home to a
	third party would be contradicting itself on the first page anyone reads.

	Colours and type follow `ui/theme/Theme.kt` and `ui/kit/Collector.kt`: near-black, hairline
	greys with no tint, one violet accent -- the app icon's -- Space Grotesk with JetBrains Mono for every number,
	code and label. The light scheme is the app's light scheme -- a deeper violet that reads on white.
*/

@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("fonts/space_grotesk_regular.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/space_grotesk_medium.ttf") format("truetype"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600 700; font-display: swap; src: url("fonts/space_grotesk_bold.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url("fonts/jetbrains_mono_regular.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600 700; font-display: swap; src: url("fonts/jetbrains_mono_semibold.ttf") format("truetype"); }

:root {
	color-scheme: dark light;
	--bg: #09090b;
	--s1: #131316;
	--s2: #18181c;
	--line: #26262c;
	--line-strong: #3a3a42;
	--fg: #f2f2f4;
	--mut: #8b8b94;
	--acc: #8b6cff;
	--on-acc: #0b0b0c;
	--acc-text: #8b6cff;
	--sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: #f6f6f4;
		--s1: #ececE9;
		--s2: #e6e6e2;
		--line: #deded9;
		--line-strong: #b9b9b4;
		--fg: #111113;
		--mut: #5e5e66;
		/* The deeper violet on light, as the app's light theme uses: it reads on off-white and under white. */
		--acc: #5a35d6;
		--on-acc: #ffffff;
		--acc-text: #5a35d6;
	}
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 16px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
}
a { color: var(--acc-text); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============ labels ============ */

.eyebrow {
	font: 600 11px/1.4 var(--mono);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--mut);
	margin: 0;
}
.section-label {
	font: 600 11px/1.4 var(--mono);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--mut);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--line);
	margin: 0 0 4px;
}
.mono { font-family: var(--mono); }

/* ============ header ============ */

.top {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px 0;
}
.top .brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.top .brand img { width: 34px; height: 34px; border-radius: 8px; }
.top .brand span { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.top nav { margin-left: auto; display: flex; gap: 22px; }
.top nav a { color: var(--mut); text-decoration: none; font: 500 14px var(--sans); }
.top nav a:hover { color: var(--fg); }
@media (max-width: 640px) { .top nav { display: none; } }

/* ============ hero ============ */

.hero { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.hero h1 {
	font-size: clamp(38px, 6vw, 68px);
	line-height: 1.02;
	letter-spacing: -.035em;
	font-weight: 700;
	margin: 14px 0 18px;
	max-width: 15ch;
}
.hero h1 em { font-style: normal; color: var(--acc-text); }
.hero p.lede { font-size: 19px; color: var(--mut); max-width: 56ch; margin: 0 0 30px; }

/* ============ store buttons ============ */

.stores { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.store {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 20px;
	border-radius: 7px;
	text-decoration: none;
	font: 600 13px var(--mono);
	letter-spacing: .08em;
	text-transform: uppercase;
}
.store svg { width: 20px; height: 20px; flex: none; }
.store.primary { background: var(--acc); color: var(--on-acc); }
.store.primary:hover { filter: brightness(1.05); }
.store.soon { border: 1px solid var(--line); color: var(--mut); cursor: default; opacity: .7; }
.store-col { display: flex; flex-direction: column; gap: 8px; }
.store-col .under { font: 500 13px var(--sans); padding-left: 2px; }

/* ============ screens ============ */

.screens {
	display: grid;
	/* `minmax(0, 1fr)`, not `1fr`: a plain fraction will not shrink below its content, and a 660 px
	   screenshot pushed the whole page wider than a phone. */
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	padding: 34px 0 64px;
}
@media (max-width: 900px) { .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.screens figure { margin: 0; min-width: 0; }
.phone {
	aspect-ratio: 9 / 18.5;
	border-radius: 26px;
	border: 1px solid var(--line-strong);
	background: #09090b;
	overflow: hidden;
	padding: 8px;
}
.phone img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	border-radius: 19px;
}
.screens figcaption { font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); margin-top: 10px; }

/* ============ sections ============ */

section.block { padding: 48px 0; border-top: 1px solid var(--line); }
section.block h2 {
	font-size: clamp(26px, 3.4vw, 36px);
	letter-spacing: -.025em;
	line-height: 1.1;
	margin: 10px 0 26px;
	max-width: 22ch;
}
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

/* A hairline group, as the app's settings draw one. */
.group { border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.group li { border-bottom: 1px solid var(--line); padding: 16px 0; display: flex; gap: 16px; align-items: baseline; }
.group li .n { font: 600 12px var(--mono); color: var(--acc-text); min-width: 26px; }
.group li strong { display: block; font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.group li span.d { color: var(--mut); font-size: 15px; }

/* The games, as the app's own list rows: a code-like tag, a name, its source. */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 640px) { .games { grid-template-columns: 1fr; } }
.game {
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 14px;
}
.game .name { font-weight: 600; font-size: 16px; }
.game .src { font: 500 12px var(--mono); color: var(--mut); }
.game .tag {
	margin-left: auto;
	font: 600 10px var(--mono);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--mut);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 2px 6px;
	white-space: nowrap;
}

.nots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.nots span {
	font: 600 12px var(--mono);
	letter-spacing: .06em;
	text-transform: uppercase;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 8px 12px;
	color: var(--mut);
}
.nots span::before { content: "\00D7  "; color: var(--fg); }

/* ============ prose (privacy) ============ */

.prose { max-width: 720px; padding: 40px 0 72px; border-top: 1px solid var(--line); }
.prose h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -.03em; line-height: 1.05; margin: 12px 0 8px; }
.prose h2 { font-size: 20px; letter-spacing: -.01em; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--fg); }
.prose .lead { border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin: 26px 0; }
.prose .lead p { margin: 6px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.prose td.mono, .prose code { font-family: var(--mono); font-size: 13px; }

/* ============ footer ============ */

footer.site { border-top: 1px solid var(--line); padding: 30px 0 56px; color: var(--mut); font-size: 14px; }
footer.site .row { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 18px; }
footer.site .row a { color: var(--fg); text-decoration: none; font-weight: 500; }
footer.site p { max-width: 80ch; margin: 8px 0; font-size: 13px; }
