/* diffra.dev: one stylesheet, light and dark from the desktop app's tokens. */
:root {
	--bg: #ffffff;
	--panel: #f7f7f9;
	--surface: #ffffff;
	--border: #e4e4ea;
	--border2: #cfcfd8;
	--text: #16171d;
	--muted: #555a66;
	--accent: #6d28d9;
	--accent-solid: #7c3aed;
	--accent-bg: rgba(124, 58, 237, 0.09);
	--code: #f2f2f5;
	--shadow: 0 24px 60px rgba(20, 20, 40, 0.14);
	--wordmark: #0e0f13;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0e0f13;
		--panel: #14151b;
		--surface: #1a1c23;
		--border: #2b2f3b;
		--border2: #3a3f4e;
		--text: #ecedf1;
		--muted: #a3a8b5;
		--accent: #a78bfa;
		--accent-bg: rgba(167, 139, 250, 0.14);
		--code: #1a1c23;
		--shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
		--wordmark: #ffffff;
	}
}

* {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font:
		16px / 1.6 Inter,
		system-ui,
		-apple-system,
		"Segoe UI",
		"PingFang SC",
		"Microsoft YaHei",
		sans-serif;
	-webkit-font-smoothing: antialiased;
}
a {
	color: inherit;
}
img {
	max-width: 100%;
	height: auto;
	display: block;
}
code {
	font:
		0.9em / 1.4 "JetBrains Mono",
		ui-monospace,
		"SFMono-Regular",
		Consolas,
		monospace;
	background: var(--code);
	border-radius: 6px;
	padding: 0.1em 0.35em;
}
h1,
h2,
h3 {
	line-height: 1.2;
	margin: 0;
	letter-spacing: -0.01em;
}
h1 {
	font-size: clamp(34px, 6vw, 60px);
	font-weight: 700;
}
h2 {
	font-size: clamp(24px, 3.4vw, 34px);
	font-weight: 680;
	margin-bottom: 24px;
}
h3 {
	font-size: 18px;
	font-weight: 640;
	margin-bottom: 8px;
}
p {
	margin: 0;
}

.wrap {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 20px;
}
section {
	padding: 72px 0;
}
.band {
	background: var(--panel);
	border-block: 1px solid var(--border);
}
.muted {
	color: var(--muted);
}
.small {
	font-size: 14px;
}
.col {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* header and footer */
.top {
	position: sticky;
	top: 0;
	z-index: 10;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
}
.top-row {
	display: flex;
	align-items: center;
	gap: 20px;
	height: 60px;
}
/* The logo's horizontal lockup, its wordmark in the kit's ink on light and in white on dark. */
.brand {
	display: inline-flex;
	color: var(--wordmark);
}
.logo-lockup {
	width: auto;
	height: 24px;
}
.nav {
	display: flex;
	gap: 4px;
	margin-left: auto;
}
.nav a,
.lang {
	text-decoration: none;
	color: var(--muted);
	font-size: 15px;
	padding: 6px 10px;
	border-radius: 8px;
	white-space: nowrap;
}
.nav a:hover,
.lang:hover {
	color: var(--text);
	background: var(--accent-bg);
}
body[data-page="index"] .nav a[data-nav="index"],
body[data-page="download"] .nav a[data-nav="download"],
body[data-page="changelog"] .nav a[data-nav="changelog"] {
	color: var(--text);
	font-weight: 600;
}
.foot {
	border-top: 1px solid var(--border);
	padding: 28px 0;
	color: var(--muted);
	font-size: 14px;
}
.foot-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
}
.foot a {
	text-decoration: none;
}
.foot a:hover {
	color: var(--text);
}

/* buttons and commands */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	padding: 0 22px;
	border-radius: 12px;
	border: 1px solid var(--border2);
	background: var(--surface);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.btn:hover {
	border-color: var(--accent);
}
.btn.primary {
	background: var(--accent-solid);
	border-color: var(--accent-solid);
	color: #fff;
}
.btn.primary:hover {
	filter: brightness(1.08);
}
.btn.disabled {
	color: var(--muted);
	background: var(--panel);
	cursor: default;
}
.btn.disabled:hover {
	border-color: var(--border2);
}
.cmd {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 6px 0 14px;
	max-width: 100%;
	border: 1px solid var(--border2);
	border-radius: 12px;
	background: var(--surface);
}
.cmd code {
	background: none;
	padding: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	flex: 1;
}
.copy {
	flex: none;
	height: 34px;
	padding: 0 12px;
	border-radius: 8px;
	border: 0;
	cursor: pointer;
	background: var(--accent-bg);
	color: var(--accent);
	font: 600 14px / 1 inherit;
}

/* home */
.hero {
	padding: 88px 0 72px;
	text-align: center;
	overflow: hidden;
}
.eyebrow {
	display: inline-block;
	color: var(--accent);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	margin-bottom: 18px;
}
.hero h1 {
	background: linear-gradient(180deg, var(--text) 30%, color-mix(in srgb, var(--text) 62%, var(--accent)));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.lede {
	font-size: clamp(17px, 2.2vw, 20px);
	color: var(--muted);
	max-width: 680px;
	margin: 20px auto 0;
}
.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 32px;
}
.hero-shot {
	margin-top: 56px;
}
.shot img {
	border-radius: 14px;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
}
.shot figcaption {
	font-size: 14px;
	color: var(--muted);
	margin-top: 12px;
	text-align: center;
}
.grid3,
.grid2,
.shots {
	display: grid;
	gap: 18px;
}
.grid3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.shots {
	grid-template-columns: 1fr;
	gap: 48px;
}
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 24px;
}
.card p {
	color: var(--muted);
	font-size: 15px;
}
.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	align-items: center;
}
.split h2 {
	margin-bottom: 12px;
}
.end {
	text-align: center;
}
.end h2 {
	margin-bottom: 12px;
}
.end .btn {
	margin-top: 24px;
}

/* inner pages */
.page-head {
	padding: 72px 0 24px;
}
.page-head .lede {
	margin: 14px 0 0;
}
.page-head.center {
	text-align: center;
	padding: 120px 0;
}
.page-head.center .lede {
	margin: 14px auto 28px;
}
.platform {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}
.platform h3 {
	margin: 0;
}
.release-line {
	margin: -12px 0 20px;
}
.choices {
	display: flex;
	flex: none;
	flex-wrap: wrap;
	gap: 10px;
}
.grid2 + .small {
	margin-top: 16px;
}
.steps {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 560px;
	margin-top: 20px;
}
.steps .small {
	margin-top: 8px;
}
.prose {
	max-width: 760px;
}
.prose h2 {
	font-size: 22px;
	margin: 36px 0 12px;
}
.prose h2:first-child {
	margin-top: 0;
}
.prose p,
.prose li {
	color: var(--muted);
}
.prose ul {
	padding-left: 20px;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.release + .release {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--border);
}
.release h2 {
	margin-top: 0;
	display: flex;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
}
.date {
	font-size: 15px;
	font-weight: 500;
	color: var(--muted);
}

@media (max-width: 860px) {
	.grid3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.split {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 600px) {
	section {
		padding: 56px 0;
	}
	.hero {
		padding-top: 56px;
	}
	.grid3,
	.grid2 {
		grid-template-columns: 1fr;
	}
	.top-row {
		gap: 8px;
	}
	.nav a,
	.lang {
		padding: 6px 7px;
		font-size: 14px;
	}
	.actions .btn,
	.actions .cmd {
		width: 100%;
	}
}
/* The footer links the changelog too, so narrow phones drop it from the header. */
@media (max-width: 430px) {
	body[data-page] .nav a[data-nav="changelog"] {
		display: none;
	}
}
