/* OrbiTutor website. Colors: the Grove palette (issue 22, phase C). */

:root {
	--bg: #faf9f5;
	--panel: #f0eee6;
	--line: #e0ddd2;
	--text: #3d3d3a;
	--strong: #22221f;
	--muted: #67665f;
	--primary: #0b7a4b;
	--on-primary: #ffffff;
	--primary-hover: #096840;
	--accent: #0b7a4b;
	--orbit: rgba(11, 122, 75, 0.28);
	--badge-bg: #e2e0d8;
	--code-bg: #edece8;

	--serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
	--sans:
		-apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial,
		sans-serif;
	--radius: 14px;
	--wrap: 1080px;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141414;
		--panel: #1c1c1c;
		--line: #3a3a3a;
		--text: #e6e6e6;
		--strong: #f2f2f2;
		--muted: #9a9a9a;
		--primary: #2fd08a;
		--on-primary: #0b2117;
		--primary-hover: #4fdc9d;
		--accent: #38d892;
		--orbit: rgba(56, 216, 146, 0.3);
		--badge-bg: #2a2a2a;
		--code-bg: #0e0e0e;
	}
}

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

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
}

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

a {
	color: var(--accent);
	text-underline-offset: 3px;
}

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

h1,
h2,
h3 {
	color: var(--strong);
	margin: 0;
}

h1,
h2 {
	font-family: var(--serif);
	font-weight: 500;
	letter-spacing: -0.015em;
	line-height: 1.12;
}

h1 {
	font-size: clamp(2.3rem, 6.2vw, 4rem);
}

h2 {
	font-size: clamp(1.8rem, 4.2vw, 2.6rem);
}

h3 {
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.35;
}

p {
	margin: 0;
}

.wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 24px;
}

.skip {
	position: absolute;
	left: 12px;
	top: -48px;
	padding: 8px 12px;
	background: var(--primary);
	color: var(--on-primary);
	border-radius: 8px;
	z-index: 10;
}

.skip:focus {
	top: 12px;
}

/* Navigation */

.nav {
	position: sticky;
	top: 0;
	z-index: 5;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid var(--line);
}

.nav-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--strong);
	text-decoration: none;
	font-weight: 600;
	font-size: 1.05rem;
}

.brand img {
	border-radius: 8px;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 22px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.95rem;
}

.nav-links a {
	color: var(--text);
	text-decoration: none;
}

.nav-links a:hover {
	color: var(--strong);
}

.nav-links a.nav-cta {
	color: var(--on-primary);
	background: var(--primary);
	padding: 6px 14px;
	border-radius: 999px;
	font-weight: 600;
}

@media (max-width: 520px) {
	.nav-links li:not(:last-child) {
		display: none;
	}
}

/* Buttons and links */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

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

.btn-primary:hover {
	background: var(--primary-hover);
}

.btn-quiet {
	color: var(--strong);
	border: 1px solid var(--line);
}

.btn-quiet:hover {
	background: var(--panel);
}

.link {
	font-weight: 600;
	text-decoration: none;
}

.link::after {
	content: " →";
}

.link:hover {
	text-decoration: underline;
}

.eyebrow {
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

/* Hero */

.hero {
	padding: 72px 0 88px;
	overflow: hidden;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	align-items: center;
	gap: 48px;
}

.lede {
	font-size: 1.2rem;
	color: var(--muted);
	max-width: 34em;
	margin-top: 22px;
}

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

.hero-art {
	position: relative;
	aspect-ratio: 1;
	width: 100%;
	max-width: 400px;
	justify-self: center;
}

.orbits {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.orbits ellipse {
	fill: none;
	stroke: var(--orbit);
	stroke-width: 1.5;
}

.orbits .dot {
	fill: var(--accent);
}

.hero-logo {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 55%;
	height: auto;
	transform: translate(-50%, -50%);
	border-radius: 22%;
	box-shadow:
		0 30px 60px -20px rgba(8, 60, 36, 0.45),
		0 0 0 1px rgba(0, 0, 0, 0.04);
}

@media (prefers-reduced-motion: no-preference) {
	.orbits {
		animation: spin 120s linear infinite;
	}

	@keyframes spin {
		to {
			transform: rotate(360deg);
		}
	}
}

@media (max-width: 820px) {
	.hero {
		padding: 40px 0 64px;
	}

	.hero-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.hero-art {
		order: -1;
		max-width: 260px;
	}
}

/* Sections */

.section {
	padding: 88px 0;
	border-top: 1px solid var(--line);
}

.section-panel {
	background: var(--panel);
}

.section-lede {
	color: var(--muted);
	margin-top: 14px;
	max-width: 40em;
}

@media (max-width: 820px) {
	.section {
		padding: 64px 0;
	}
}

.steps {
	list-style: none;
	padding: 0;
	margin: 40px 0 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
}

.steps li {
	border-top: 2px solid var(--accent);
	padding-top: 18px;
}

.step-num {
	display: block;
	font-family: var(--serif);
	font-size: 1.6rem;
	color: var(--accent);
	line-height: 1;
	margin-bottom: 14px;
}

.steps p,
.facts p {
	color: var(--muted);
	margin-top: 8px;
	font-size: 0.97rem;
}

@media (max-width: 900px) {
	.steps {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

.split,
.about {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 56px;
	align-items: start;
}

@media (max-width: 820px) {
	.split,
	.about {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

.facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 28px;
}

/* Download cards */

.cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 36px;
}

@media (max-width: 700px) {
	.cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

.card {
	min-width: 0;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.card h3 {
	font-size: 1.2rem;
}

.card-meta {
	color: var(--muted);
	font-size: 0.92rem;
}

.badge {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text);
	background: var(--badge-bg);
	padding: 3px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.card-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	margin-top: 12px;
}

/* About */

.about-body {
	display: grid;
	gap: 16px;
	max-width: 38em;
}

.about-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin-top: 6px;
}

/* Footer */

.footer {
	border-top: 1px solid var(--line);
	padding: 48px 0 56px;
	font-size: 0.9rem;
	color: var(--muted);
}

.footer-grid {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 28px;
}

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

.footer-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--strong);
	font-weight: 600;
}

.footer-brand img {
	border-radius: 7px;
}

.footer-notice {
	display: grid;
	gap: 10px;
	max-width: 46em;
}

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

/* Build from source */

.source {
	border-top: 1px solid var(--line);
	padding-top: 12px;
	margin-top: 4px;
	font-size: 0.95rem;
}

.source summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--strong);
}

.source p {
	color: var(--muted);
	margin-top: 10px;
}

.source pre {
	margin: 10px 0 0;
	padding: 14px 16px;
	background: var(--code-bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	overflow-x: auto;
	font-size: 0.82rem;
	line-height: 1.55;
}

.source code {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	color: var(--text);
}

/* 404 page */

.not-found {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	text-align: center;
}

.not-found img {
	border-radius: 22%;
}

.not-found p {
	color: var(--muted);
}

/* Demo media: screenshots and short clips (docs/WEBSITE.md, "Demos") */

.demo {
	margin: 0;
}

.demo img,
.demo video {
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
}

.demo figcaption {
	color: var(--muted);
	font-size: 0.9rem;
	margin-top: 10px;
}
