:root {
	--bg: #0b1120;
	--bg-soft: #111a2e;
	--glass: rgba(15, 23, 42, 0.55);
	--border: rgba(255, 255, 255, 0.08);
	--text: #f8fafc;
	--text-soft: #cbd5e1;
	--text-muted: #94a3b8;
	--accent: #22d3ee;
	--accent-2: #6366f1;
	--gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
	--radius: 22px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background:
		radial-gradient(60rem 30rem at 85% -10%, rgba(99, 102, 241, 0.22), transparent 70%),
		radial-gradient(50rem 28rem at 0% 10%, rgba(34, 211, 238, 0.14), transparent 70%),
		var(--bg);
	color: var(--text);
	font-family: Manrope, system-ui, sans-serif;
	line-height: 1.6;
}

a {
	color: #a5b4fc;
	text-decoration: none;
}

a:hover {
	color: #c7d2fe;
}

kbd,
code {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 0.85em;
}

kbd {
	padding: 0.1rem 0.4rem;
	border-radius: 0.375rem;
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
}

.wrap {
	width: min(72rem, 100% - 2rem);
	margin-inline: auto;
}

/* Navigation */
.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	padding: 0.75rem 0;
	background: rgba(11, 17, 32, 0.7);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
}

.nav-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--text);
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

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

.nav nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.nav nav a {
	padding: 0.5rem 0.85rem;
	border-radius: 0.75rem;
	color: var(--text-soft);
	font-weight: 600;
	font-size: 0.95rem;
}

.nav nav a:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text);
}

.nav nav .nav-github {
	border: 1px solid var(--border);
}

/* Hero */
.hero {
	padding: 4.5rem 0 2rem;
	text-align: center;
}

.eyebrow {
	margin: 0 0 1rem;
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

h1 {
	margin: 0 auto;
	max-width: 16ch;
	font-size: clamp(2.4rem, 6vw, 4.2rem);
	line-height: 1.05;
	letter-spacing: -0.035em;
}

.lead {
	margin: 1.5rem auto 0;
	max-width: 44rem;
	color: var(--text-soft);
	font-size: 1.15rem;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin: 2rem 0 3rem;
}

.button {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	padding: 0 1.4rem;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 0.9rem;
	background: rgba(255, 255, 255, 0.06);
	color: var(--text);
	font-weight: 700;
}

.button:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--text);
}

.button.primary {
	border-color: transparent;
	background: var(--text);
	color: var(--bg);
}

.button.primary:hover {
	background: #e2e8f0;
	color: var(--bg);
}

/* Screenshots */
.shot {
	margin: 0;
}

.shot img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius);
	box-shadow: 0 0 0 1px var(--border), 0 30px 80px rgba(0, 0, 0, 0.45);
}

.shot figcaption {
	margin-top: 0.75rem;
	color: var(--text-muted);
	font-size: 0.95rem;
	text-align: center;
}

/* Before / after comparison: the CasaOS image is clipped at --pos over the Atrio one */
.compare {
	position: relative;
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: 0 0 0 1px var(--border), 0 30px 80px rgba(0, 0, 0, 0.45);
	user-select: none;
}

.compare img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
	box-shadow: none;
}

.compare .compare-before {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
	clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.compare-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 2px;
	transform: translateX(-1px);
	background: var(--text);
	box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.compare-handle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1120' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 1.4rem no-repeat,
		var(--text);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.compare-label {
	position: absolute;
	top: 1rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: rgba(11, 17, 32, 0.75);
	backdrop-filter: blur(8px);
	color: var(--text);
	font-size: 0.85rem;
	font-weight: 700;
	pointer-events: none;
}

.compare-label.is-before {
	left: 1rem;
}

.compare-label.is-after {
	right: 1rem;
}

/* The range input covers the whole picture: drag anywhere, or use the arrow keys */
.compare input[type="range"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
}

.compare:has(input:focus-visible) .compare-handle::after {
	outline: 3px solid var(--accent);
	outline-offset: 3px;
}

/* Notice */
.notice p {
	margin: 1rem auto 0;
	max-width: 52rem;
	padding: 1.1rem 1.4rem;
	border: 1px solid var(--border);
	border-radius: 1rem;
	background: var(--glass);
	color: var(--text-soft);
	text-align: center;
}

/* Sections */
section h2 {
	margin: 0 0 2rem;
	font-size: clamp(1.7rem, 3.5vw, 2.4rem);
	letter-spacing: -0.025em;
	line-height: 1.15;
	text-align: center;
}

.features,
.gallery,
.install,
.faq {
	padding: 5rem 0 0;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 1rem;
}

/* Nine features: three by three on wide screens */
.features .grid {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.card {
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--glass);
}

.card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}

.card p {
	margin: 0;
	color: var(--text-soft);
}

.gallery {
	display: grid;
	gap: 3rem;
}

/* Phone screenshot next to its text */
.shot-phone {
	display: grid;
	grid-template-columns: minmax(0, 20rem) 1fr;
	gap: 3rem;
	align-items: center;
	max-width: 52rem;
	margin: 0 auto;
}

.shot-phone img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2rem;
	box-shadow: 0 0 0 1px var(--border), 0 30px 80px rgba(0, 0, 0, 0.45);
}

.shot-phone h3 {
	margin: 0 0 0.75rem;
	font-size: 1.5rem;
}

.shot-phone p {
	margin: 0;
	color: var(--text-soft);
	font-size: 1.05rem;
}

@media (max-width: 640px) {
	.shot-phone {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.5rem;
		max-width: 22rem;
		text-align: center;
	}
}

/* Install */
.install {
	max-width: 52rem;
}

.install h3 {
	margin: 2.5rem 0 0.5rem;
}

.install p,
.install li {
	color: var(--text-soft);
}

.code {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.9rem 0.9rem 0.9rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: 1rem;
	background: rgba(2, 6, 23, 0.7);
}

.code code {
	flex: 1;
	color: #e2e8f0;
	word-break: break-all;
}

.copy {
	flex-shrink: 0;
	min-height: 2.5rem;
	padding: 0 1rem;
	border: 0;
	border-radius: 0.7rem;
	background: var(--gradient);
	color: var(--bg);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

/* FAQ */
.faq {
	max-width: 52rem;
}

details {
	margin-bottom: 0.75rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--border);
	border-radius: 1rem;
	background: var(--glass);
}

summary {
	font-weight: 700;
	cursor: pointer;
}

details p {
	margin: 0.75rem 0 0;
	color: var(--text-soft);
}

/* Footer */
.footer {
	margin-top: 6rem;
	padding: 2rem 0 3rem;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.95rem;
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
}

.footer p {
	margin: 0;
}

@media (max-width: 40rem) {
	.hero {
		padding-top: 3rem;
	}

	.code {
		flex-direction: column;
		align-items: stretch;
	}
}
