:root {
	--bg: #fff;
	--text: oklch(0.232 0.004 286);
	--muted: oklch(0.47 0.01 286);
	--surface: rgba(0, 0, 0, 0.035);
	--surface-hover: rgba(0, 0, 0, 0.06);
	--ring: rgba(0, 0, 0, 0.04);
	--glow-a: rgba(120, 140, 255, 0.28);
	--glow-b: rgba(200, 120, 255, 0.22);
	--radius-card: 24px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: oklch(0.18 0.004 286);
		--text: oklch(0.96 0.002 286);
		--muted: oklch(0.72 0.01 286);
		--surface: rgba(255, 255, 255, 0.05);
		--surface-hover: rgba(255, 255, 255, 0.085);
		--ring: rgba(255, 255, 255, 0.06);
		--glow-a: rgba(110, 130, 255, 0.22);
		--glow-b: rgba(190, 110, 255, 0.16);
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

.site-header,
main,
.site-footer {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding-inline: 20px;
}

/* Header */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 16px;
	position: relative;
	z-index: 1;
}

.brand {
	display: inline-flex;
	color: var(--text);
}

.logo {
	display: block;
	height: 22px;
	width: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
}

.site-nav a {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 9999px;
	color: var(--muted);
	transition: background-color 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
	background: var(--surface-hover);
	color: var(--text);
}

/* Hero */
.hero {
	position: relative;
	text-align: center;
	padding: 56px 0 40px;
}

.glow {
	position: absolute;
	inset: -40px 5% 0;
	z-index: -1;
	background:
		radial-gradient(40% 60% at 35% 45%, var(--glow-a), transparent 70%),
		radial-gradient(40% 60% at 65% 50%, var(--glow-b), transparent 70%);
	filter: blur(30px);
	pointer-events: none;
}

.hero h1 {
	margin: 0;
	/* SF Pro Display on Apple devices; Inter Tight everywhere else */
	font-family: -apple-system, BlinkMacSystemFont, "Inter Tight", "Segoe UI", system-ui, sans-serif;
	font-weight: 700;
	font-size: clamp(34px, 9vw, 76px);
	line-height: 1.04;
	letter-spacing: -0.035em;
}

.stats {
	margin: 20px 0 0;
	color: var(--muted);
	font-size: 14px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.stats span + span::before {
	content: "·";
	margin-inline: 10px;
}

/* Apps */
.apps h2 {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 24px 0 20px;
}

.app-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
	gap: 16px;
}

.app-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	border-radius: var(--radius-card);
	background: var(--surface);
	box-shadow: inset 0 0 0 1px var(--ring);
	transition: background-color 0.15s, transform 0.15s;
}

.app-card:hover {
	background: var(--surface-hover);
}

.app-card:has(.app-link:focus-visible) {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.app-icon {
	flex: none;
	width: 80px;
	height: 80px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.app-text {
	min-width: 0;
}

.app-text h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Whole card is clickable */
.app-link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.app-link:focus-visible {
	outline: none;
}

.app-text p {
	margin: 2px 0 8px;
	font-size: 15px;
	color: var(--muted);
}

.details {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
}

.badge {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--surface-hover);
}

/* Footer */
.site-footer {
	margin-top: auto;
	padding-block: 48px 24px;
	font-size: 13px;
	color: var(--muted);
	text-align: center;
}

.site-footer p {
	margin: 0;
}

.site-footer .made {
	margin-top: 4px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.flag {
	border-radius: 2px;
	box-shadow: 0 0 0 1px var(--ring);
}

@media (max-width: 480px) {
	.site-header,
	main,
	.site-footer {
		padding-inline: 16px;
	}

	.logo {
		height: 20px;
	}

	.hero {
		padding-top: 36px;
	}

	.app-icon {
		width: 64px;
		height: 64px;
	}
}
