/* Colours follow the app (src/routes/layout.css in the app repository), plus the coin gold. */
:root {
	color-scheme: light dark;
	--canvas: #f2f2f7;
	--surface: #ffffff;
	--ink: #0b0b0f;
	--ink-2: #5e5e64;
	--ink-3: #8e8e93;
	--sep: rgb(60 60 67 / 0.16);
	--fill: rgb(118 118 128 / 0.12);
	--primary: #0b0b0f;
	--on-primary: #ffffff;
	--gold: #ffcf3f;
	--gold-edge: #c98a12;
	--orange: #eb6834;
	--sky: linear-gradient(180deg, #dfeaff 0%, #fdf3df 100%);
	--ground: #e9dcc3;
	--shadow: 0 10px 30px rgb(0 0 0 / 0.12);
	--shadow-soft: 0 4px 14px rgb(0 0 0 / 0.08);
	--radius: 22px;
	--max: 1120px;
	--font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
		sans-serif;
	--font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue',
		Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--canvas: #000000;
		--surface: #1c1c1e;
		--ink: #ffffff;
		--ink-2: #aeaeb2;
		--ink-3: #8e8e93;
		--sep: rgb(84 84 88 / 0.6);
		--fill: rgb(118 118 128 / 0.24);
		--primary: #ffffff;
		--on-primary: #000000;
		--sky: linear-gradient(180deg, #16203a 0%, #2a2216 100%);
		--ground: #3a3020;
		--shadow: 0 10px 30px rgb(0 0 0 / 0.6);
		--shadow-soft: 0 4px 14px rgb(0 0 0 / 0.4);
	}
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 72px;
	-webkit-text-size-adjust: 100%;
}

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

body {
	margin: 0;
	background: var(--canvas);
	color: var(--ink);
	font: 17px/1.5 var(--font);
	-webkit-font-smoothing: antialiased;
}

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

canvas {
	image-rendering: pixelated;
}

a {
	color: inherit;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.1;
	text-wrap: balance;
}

p {
	margin: 0;
	text-wrap: pretty;
}

:focus-visible {
	outline: 3px solid var(--orange);
	outline-offset: 3px;
	border-radius: 8px;
}

/* ----- header ----- */

.top {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: var(--max);
	margin: 0 auto;
	padding: 14px max(16px, env(safe-area-inset-left)) 14px max(16px, env(safe-area-inset-right));
	background: color-mix(in srgb, var(--canvas) 80%, transparent);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.brand img {
	image-rendering: pixelated;
}

.top nav {
	display: flex;
	align-items: center;
	gap: 22px;
	font-size: 15px;
	font-weight: 500;
}

.top nav a {
	text-decoration: none;
	color: var(--ink-2);
}

.top nav a:hover {
	color: var(--ink);
}

.top nav a.pill {
	color: var(--on-primary);
	background: var(--primary);
	padding: 7px 14px;
	border-radius: 999px;
	white-space: nowrap;
}

@media (max-width: 640px) {
	.top nav a:not(.pill) {
		display: none;
	}
}

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

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: var(--fill);
	color: var(--ink);
	font: 600 17px/1 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease;
}

.button:active {
	transform: scale(0.97);
}

.button.primary {
	background: var(--primary);
	color: var(--on-primary);
}

.button.small {
	min-height: 38px;
	padding: 0 16px;
	font-size: 15px;
}

/* ----- hero ----- */

main {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 16px;
}

.hero {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	align-items: center;
	gap: 48px;
	padding: 56px 0 88px;
}

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 36px;
		padding: 28px 0 64px;
	}
}

.eyebrow {
	color: var(--orange);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	margin-bottom: 12px;
}

h1 {
	font-size: clamp(42px, 7vw, 72px);
	font-weight: 800;
	letter-spacing: -0.035em;
}

h1 .soft {
	color: var(--ink-3);
}

.lead {
	margin-top: 22px;
	font-size: clamp(18px, 2.2vw, 21px);
	color: var(--ink-2);
	max-width: 34em;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.fine {
	margin-top: 14px;
	font-size: 14px;
	color: var(--ink-3);
}

/* The mascot on its little stage, like the piggy bank page in the app */
.stage {
	position: relative;
	margin: 0;
	padding: 24px 24px 22px;
	border-radius: 32px;
	background: var(--surface);
	box-shadow: var(--shadow);
	overflow: hidden;
	text-align: center;
}

.stage-sky {
	position: absolute;
	inset: 0 0 34%;
	background: var(--sky);
}

.stage-sky::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 14px;
	background: var(--ground);
}

.stage-canvas,
.mascot-canvas {
	position: relative;
	display: block;
	margin: 0 auto;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.stage-canvas canvas {
	width: 384px;
	height: 288px;
	max-width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
}

.stage figcaption {
	position: relative;
	margin-top: 14px;
	font-size: 15px;
	color: var(--ink-2);
}

.stage figcaption strong {
	color: var(--ink);
}

.balance {
	display: block;
	margin-top: 4px;
	font-family: var(--font-display);
	font-size: clamp(34px, 5vw, 44px);
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.stage-actions {
	position: relative;
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}

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

.section-title {
	font-size: clamp(32px, 5vw, 48px);
	font-weight: 800;
	letter-spacing: -0.03em;
	text-align: center;
}

.section-lead {
	margin: 14px auto 0;
	max-width: 32em;
	text-align: center;
	color: var(--ink-2);
	font-size: 19px;
}

.features {
	padding: 24px 0 40px;
}

.feature {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 56px;
	padding: 56px 0;
}

.feature + .feature {
	border-top: 1px solid var(--sep);
}

.feature.flip .feature-text {
	order: 2;
}

.feature h3 {
	font-size: clamp(28px, 3.6vw, 38px);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.feature-text p:not(.eyebrow) {
	margin-top: 16px;
	color: var(--ink-2);
	font-size: 18px;
	max-width: 30em;
}

@media (max-width: 860px) {
	.feature {
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 44px 0;
	}

	.feature.flip .feature-text {
		order: 0;
	}
}

/* A phone-shaped frame around a screenshot */
.phone {
	display: block;
	justify-self: center;
	width: min(320px, 78vw);
	padding: 10px;
	border-radius: 54px;
	background: #1c1c1e;
	box-shadow: var(--shadow), inset 0 0 0 2px #3a3a3c;
}

.phone img {
	width: 100%;
	height: auto;
	border-radius: 44px;
}

.phone.small {
	width: 240px;
	padding: 8px;
	border-radius: 42px;
	flex: none;
	scroll-snap-align: center;
}

.phone.small img {
	border-radius: 34px;
}

@media (prefers-color-scheme: dark) {
	.phone {
		background: #2c2c2e;
		box-shadow: var(--shadow), inset 0 0 0 2px #48484a;
	}
}

/* ----- more ----- */

.more {
	padding: 48px 0 72px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 860px) {
	.grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.grid {
		grid-template-columns: 1fr;
	}
}

.grid li {
	padding: 22px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-soft);
}

.grid h3 {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.grid p {
	margin-top: 8px;
	color: var(--ink-2);
	font-size: 16px;
}

.strip {
	display: flex;
	justify-content: center;
	gap: 28px;
	margin: 48px -16px 0;
	padding: 8px 16px 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.strip::-webkit-scrollbar {
	display: none;
}

@media (max-width: 860px) {
	.strip {
		justify-content: flex-start;
	}
}

/* ----- mascots ----- */

.mascots {
	padding: 72px 0;
	border-top: 1px solid var(--sep);
}

.mascot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 16px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.mascot {
	padding: 18px 20px 22px;
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	text-align: center;
}

.mascot-canvas {
	width: 100%;
	border-radius: 16px;
	background: var(--sky);
	box-shadow: inset 0 -10px 0 var(--ground);
}

.mascot-canvas canvas {
	width: 192px;
	height: 144px;
	margin: 0 auto;
}

.mascot h3 {
	margin-top: 14px;
	font-size: 21px;
	font-weight: 800;
}

.mascot .species {
	margin-top: 2px;
	color: var(--orange);
	font-size: 14px;
	font-weight: 600;
}

.mascot p:last-child {
	margin-top: 10px;
	color: var(--ink-2);
	font-size: 15px;
	line-height: 1.45;
}

/* ----- call to action ----- */

.cta {
	margin: 0 0 72px;
	padding: 44px 24px 48px;
	border-radius: 32px;
	background: var(--surface);
	box-shadow: var(--shadow);
	text-align: center;
}

.cta canvas {
	width: 192px;
	height: 144px;
	margin: 0 auto;
}

.cta h2 {
	margin-top: 8px;
	font-size: clamp(32px, 5vw, 44px);
	font-weight: 800;
	letter-spacing: -0.03em;
}

.cta p {
	margin: 14px auto 28px;
	max-width: 30em;
	color: var(--ink-2);
	font-size: 18px;
}

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

.foot {
	max-width: var(--max);
	margin: 0 auto;
	padding: 24px 16px calc(40px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--sep);
	color: var(--ink-3);
	font-size: 14px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
}

/* ----- 404 ----- */

.lost {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 16px;
	min-height: 100vh;
	min-height: 100dvh;
	text-align: center;
}

.lost img {
	image-rendering: pixelated;
}

.lost h1 {
	font-size: clamp(32px, 6vw, 48px);
}

.lost p {
	color: var(--ink-2);
	margin-bottom: 12px;
}
