/* Bibazavr — shared styles. Plain CSS, no build step. */

:root {
	color-scheme: light dark;

	--bg: #fafaf7;
	--surface: #ffffff;
	--surface-2: #f1f2ed;
	--text: #14171a;
	--muted: #5a6067;
	--border: #e2e4de;
	--accent: #7851a9;
	--link: #5e3a91;
	--on-accent: #ffffff;

	--love-1: #5c2a9a;
	--love-2: #6c3baa;
	--love-3: #aa79eb;

	--radius: 18px;
	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0e1110;
		--surface: #151918;
		--surface-2: #1c2120;
		--text: #e8ebe7;
		--muted: #9ea6a1;
		--border: #272d2a;
		--accent: #b796f0;
		--link: #c7aaff;
		--on-accent: #1e0f36;
	}
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.6 var(--font);
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

a {
	color: var(--link);
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 6px;
}

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

.wrap {
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px;
}

.wrap.narrow {
	max-width: 720px;
}

.skip {
	position: absolute;
	left: -9999px;
}

.skip:focus {
	left: 16px;
	top: 12px;
	background: var(--surface);
	padding: 8px 12px;
	z-index: 10;
}

/* ---------- Header ---------- */

.site-header {
	padding: 22px 0;
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.01em;
}

.brand svg {
	width: 34px;
	height: 34px;
	flex: none;
}

.crumb {
	color: var(--muted);
	font-size: 15px;
	text-decoration: none;
}

.crumb:hover {
	color: var(--text);
}

/* ---------- Home ---------- */

.hero {
	padding: 72px 0 56px;
}

.hero h1 {
	font-size: clamp(40px, 8vw, 72px);
	line-height: 1.02;
	letter-spacing: -0.035em;
	margin: 0 0 18px;
}

.hero .tagline {
	font-size: clamp(19px, 2.6vw, 23px);
	color: var(--muted);
	margin: 0;
	max-width: 34ch;
}

.eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 14px;
}

.section {
	padding: 24px 0 72px;
}

.app-card {
	display: grid;
	grid-template-columns: 112px 1fr;
	gap: 28px;
	align-items: start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 32px;
}

.app-card .icon {
	width: 112px;
	height: 112px;
	border-radius: 26px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgb(92 42 154 / 0.25);
}

.app-card h2 {
	font-size: 30px;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0 0 6px;
}

.app-card .lede {
	margin: 0 0 16px;
	color: var(--muted);
	font-size: 18px;
}

.features {
	list-style: none;
	padding: 0;
	margin: 0 0 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.features li {
	font-size: 14px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--text);
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	border: 1px solid transparent;
	line-height: 1.2;
}

.btn.primary {
	background: linear-gradient(135deg, var(--love-1), var(--love-2) 50%, var(--love-3));
	color: #fff;
}

.btn.primary:hover {
	filter: brightness(1.08);
}

.btn.ghost {
	border-color: var(--border);
	color: var(--muted);
	background: transparent;
	cursor: default;
}

.btn .soon {
	font-weight: 500;
	font-size: 13px;
	opacity: 0.8;
}

.app-links {
	margin: 20px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	font-size: 15px;
}

/* ---------- Legal documents ---------- */

.doc {
	padding: 40px 0 72px;
}

.doc h1 {
	font-size: clamp(32px, 6vw, 46px);
	line-height: 1.1;
	letter-spacing: -0.03em;
	margin: 0 0 10px;
}

.doc .meta {
	color: var(--muted);
	font-size: 15px;
	margin: 0 0 28px;
}

.doc .intro {
	font-size: 19px;
}

.doc h2 {
	font-size: 23px;
	letter-spacing: -0.015em;
	line-height: 1.25;
	margin: 44px 0 10px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
	scroll-margin-top: 16px;
}

.doc h3 {
	font-size: 18px;
	margin: 26px 0 6px;
}

.doc p,
.doc ul,
.doc ol {
	margin: 0 0 14px;
}

.doc ul,
.doc ol {
	padding-left: 22px;
}

.doc li {
	margin: 0 0 8px;
}

.doc li::marker {
	color: var(--muted);
}

.callout {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin: 24px 0;
}

.callout > :last-child {
	margin-bottom: 0;
}

.callout h2,
.callout h3 {
	border: 0;
	padding: 0;
	margin: 0 0 10px;
	font-size: 18px;
}

.toc {
	columns: 2;
	column-gap: 32px;
	font-size: 15px;
}

.toc li {
	break-inside: avoid;
}

.table-wrap {
	overflow-x: auto;
	margin: 0 0 16px;
	border: 1px solid var(--border);
	border-radius: 12px;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

th,
td {
	text-align: left;
	vertical-align: top;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border);
}

tr:last-child td {
	border-bottom: 0;
}

th {
	background: var(--surface-2);
	font-weight: 600;
}

.steps {
	counter-reset: step;
	list-style: none;
	padding: 0 !important;
}

.steps li {
	counter-increment: step;
	position: relative;
	padding-left: 44px;
	margin-bottom: 14px;
}

.steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent);
	color: var(--on-accent);
	font-weight: 700;
	font-size: 14px;
	display: grid;
	place-items: center;
}

address {
	font-style: normal;
}

/* ---------- Footer ---------- */

.site-footer {
	border-top: 1px solid var(--border);
	padding: 32px 0 40px;
	font-size: 15px;
	color: var(--muted);
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 20px 40px;
}

.site-footer p {
	margin: 0 0 4px;
}

.site-footer strong {
	color: var(--text);
	font-weight: 600;
}

.site-footer nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.site-footer a {
	color: var(--muted);
}

.site-footer a:hover {
	color: var(--text);
}

/* ---------- Small screens ---------- */

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

	.wrap {
		padding: 0 16px;
	}

	.hero {
		padding: 40px 0 36px;
	}

	.app-card {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 22px;
	}

	.app-card .icon {
		width: 80px;
		height: 80px;
		border-radius: 19px;
	}

	.toc {
		columns: 1;
	}

	th,
	td {
		padding: 10px;
		font-size: 14px;
	}

	.doc {
		padding-top: 20px;
	}
}
