/* Huxley — usehuxley.io
   Colors and type follow the app's design system (packages/ui theme.css):
   graphite, robot-eye blue as the one accent, Hanken Grotesk + JetBrains Mono. */

@font-face {
	font-family: 'Hanken Grotesk';
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url('/assets/fonts/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
	font-family: 'JetBrains Mono';
	font-style: normal;
	font-display: swap;
	font-weight: 100 800;
	src: url('/assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
	/* Graphite */
	--g-950: #07090b;
	--g-900: #0e1114;
	--g-850: #14181d;
	--g-800: #1a1f25;
	--g-700: #2a3139;
	--g-600: #3b444e;
	--g-fg: #e9edf1;
	--g-muted: #aab3bd;
	--g-subtle: #8a949f;

	/* Light */
	--l-bg: #eef1f4;
	--l-surface: #ffffff;
	--l-sunken: #e6eaee;
	--l-fg: #13171c;
	--l-muted: #47505a;
	--l-subtle: #66707b;
	--l-border: #d8dee4;
	--l-border-strong: #b8c0c9;

	/* The eye */
	--eye: #1683f5;
	--eye-bright: #4ba6ff;
	--eye-deep: #0f6fd8;
	--eye-glow: rgb(22 131 245 / 0.45);

	--ok: #47c181;
	--warn: #f2a73b;

	--sans: 'Hanken Grotesk', ui-sans-serif, sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, monospace;

	--wrap: 1200px;
	--radius: 14px;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	color-scheme: light dark;
}

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

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

body {
	margin: 0;
	background: var(--g-900);
	color: var(--l-fg);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.05;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

p {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.wrap {
	width: min(100% - 32px, var(--wrap));
	margin-inline: auto;
}

.mono,
pre,
code {
	font-family: var(--mono);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--eye);
	color: #fff;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
}
.skip:focus {
	top: 12px;
}

/* ───────── Notice + nav ───────── */

.notice {
	position: relative;
	z-index: 3;
	padding: 8px 16px;
	background: var(--g-950);
	border-bottom: 1px solid var(--g-800);
	color: var(--g-muted);
	font-size: 13.5px;
	text-align: center;
}
.notice a {
	margin-left: 6px;
	white-space: nowrap;
	color: var(--eye-bright);
	text-underline-offset: 3px;
}
.notice-dot {
	display: inline-block;
	vertical-align: middle;
	margin: -2px 8px 0 0;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--warn);
	box-shadow: 0 0 0 4px rgb(242 167 59 / 0.15);
}

.nav {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgb(14 17 20 / 0.78);
	backdrop-filter: blur(14px) saturate(1.4);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	border-bottom: 1px solid rgb(255 255 255 / 0.06);
	color: var(--g-fg);
}
.nav-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	font-size: 19px;
	letter-spacing: -0.02em;
	text-decoration: none;
}
.brand img {
	border-radius: 50%;
	background: radial-gradient(circle at 50% 40%, #2a3139, #0e1114 70%);
}
.nav-links {
	display: flex;
	align-items: center;
	gap: 28px;
	font-size: 15px;
}
.nav-links a:not(.btn) {
	color: var(--g-muted);
	text-decoration: none;
	transition: color 0.2s;
}
.nav-links a:not(.btn):hover {
	color: var(--g-fg);
}

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 1px solid var(--g-700);
	border-radius: 10px;
	background: transparent;
	color: var(--g-fg);
	cursor: pointer;
}
.nav-toggle .bar,
.nav-toggle .bar::before,
.nav-toggle .bar::after {
	display: block;
	width: 18px;
	height: 2px;
	margin-inline: auto;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle .bar {
	position: relative;
}
.nav-toggle .bar::before,
.nav-toggle .bar::after {
	content: '';
	position: absolute;
	left: 0;
}
.nav-toggle .bar::before {
	top: -6px;
}
.nav-toggle .bar::after {
	top: 6px;
}
.nav-toggle[aria-expanded='true'] .bar {
	background: transparent;
}
.nav-toggle[aria-expanded='true'] .bar::before {
	transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .bar::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* ───────── Buttons ───────── */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.25s, border-color 0.2s;
}
.btn:hover {
	transform: translateY(-1px);
}
.btn-sm {
	min-height: 38px;
	padding: 0 16px;
	font-size: 14px;
}
.btn-primary {
	background: var(--eye);
	color: #fff;
	box-shadow: 0 0 0 1px rgb(75 166 255 / 0.5) inset, 0 8px 28px -8px var(--eye-glow);
}
.btn-primary:hover {
	background: #2b91ff;
	box-shadow: 0 0 0 1px rgb(124 188 255 / 0.7) inset, 0 10px 36px -6px var(--eye-glow);
}
.btn-ghost {
	border: 1px solid var(--g-600);
	color: var(--g-fg);
	background: rgb(255 255 255 / 0.02);
}
.btn-ghost:hover {
	border-color: var(--g-muted);
	background: rgb(255 255 255 / 0.06);
}

/* ───────── Shared section bits ───────── */

.dark {
	position: relative;
	background: var(--g-900);
	color: var(--g-fg);
	overflow: hidden;
}
.light {
	background: var(--l-bg);
}
.surface {
	background: var(--l-surface);
}
.section {
	padding: clamp(72px, 10vw, 128px) 0;
}

/* Blueprint grid, fading out from the top. */
.grid-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
}

.eyebrow,
.kicker {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.eyebrow {
	color: var(--eye-bright);
	margin-bottom: 22px;
}
.kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	color: var(--l-subtle);
}
.dark .kicker {
	color: var(--g-subtle);
}
.kicker .num {
	display: inline-grid;
	place-items: center;
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--eye-deep);
	color: #fff;
	letter-spacing: 0.04em;
}

h2 {
	font-size: clamp(34px, 4.6vw, 56px);
	font-weight: 750;
	margin-bottom: 22px;
}

.body-lg {
	font-size: 19px;
	line-height: 1.65;
	color: var(--l-muted);
	max-width: 60ch;
}
.dark .body-lg {
	color: var(--g-muted);
}
.body-lg + .body-lg {
	margin-top: 18px;
}
.body-lg.muted {
	color: var(--g-subtle);
	font-size: 17px;
}

.section-head {
	max-width: 760px;
	margin-bottom: 56px;
}

.split {
	display: grid;
	grid-template-columns: 1fr 1.05fr;
	gap: clamp(40px, 6vw, 88px);
	align-items: center;
}

.fine {
	font-size: 14px;
	color: var(--l-subtle);
	margin-top: 14px;
}

/* ───────── Hero ───────── */

.hero {
	padding: clamp(56px, 8vw, 104px) 0 0;
}
.hero::after {
	/* A low horizon of eye-blue light. */
	content: '';
	position: absolute;
	left: 50%;
	bottom: -320px;
	width: 1200px;
	height: 520px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgb(22 131 245 / 0.16), transparent);
	pointer-events: none;
}
.hero-inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 48px;
	align-items: center;
}

h1 {
	font-size: clamp(44px, 6.6vw, 84px);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 0.98;
	margin-bottom: 28px;
}
h1 em {
	font-style: normal;
	background: linear-gradient(100deg, #ffffff 0%, #dfe5ea 30%, #9eaab6 52%, #f4f6f8 72%, #b9c3cc 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero .lede {
	font-size: clamp(18px, 1.6vw, 21px);
	line-height: 1.6;
	color: var(--g-muted);
	max-width: 36em;
}

.cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 36px;
}

.hero-art {
	position: relative;
}
.butler {
	position: relative;
	width: min(100%, 470px);
	margin-left: auto;
}
.butler img {
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 40px 60px rgb(0 0 0 / 0.55));
	animation: float 9s ease-in-out infinite;
}
/* Sits behind the eyes (about 44% down, centered a little left). */
.eye-glow {
	position: absolute;
	left: 18%;
	top: 30%;
	width: 52%;
	height: 26%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(22 131 245 / 0.55), transparent);
	filter: blur(28px);
	animation: glow 4.5s ease-in-out infinite;
}

@keyframes float {
	50% {
		transform: translateY(-10px);
	}
}
@keyframes glow {
	50% {
		opacity: 0.55;
	}
}

/* The run card */
.run-card {
	position: relative;
	z-index: 2;
	width: min(92%, 360px);
	/* Overlaps the collar, below the face. */
	margin: -96px 0 0;
	padding: 16px 16px 14px;
	border-radius: var(--radius);
	background: rgb(20 24 29 / 0.82);
	border: 1px solid rgb(255 255 255 / 0.09);
	box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.7), 0 0 0 1px rgb(0 0 0 / 0.4);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	font-size: 14px;
}
.run-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 12px;
	margin-bottom: 6px;
	border-bottom: 1px solid var(--g-700);
	font-size: 13px;
	color: var(--g-fg);
}
.run-state {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--eye-bright);
}
.run-card.finished .run-state {
	color: var(--ok);
}
.pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 0 0 currentColor;
	animation: pulse 1.6s infinite;
}
.run-card.finished .pulse {
	animation: none;
}
@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgb(75 166 255 / 0.6);
	}
	100% {
		box-shadow: 0 0 0 9px rgb(75 166 255 / 0);
	}
}

.run-steps li {
	display: grid;
	grid-template-columns: 22px 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 7px 2px;
	color: var(--g-fg);
	transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.run-steps small {
	color: var(--g-subtle);
	font-size: 12.5px;
	margin-left: 4px;
}
.run-steps .t {
	font-size: 12px;
	color: var(--g-subtle);
}
.tick {
	position: relative;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid var(--g-600);
	transition: background 0.3s, border-color 0.3s;
}
.tick::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 5px;
	height: 9px;
	border: solid #04182c;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.3s var(--ease);
}
.run-steps li.done .tick {
	background: var(--eye-bright);
	border-color: var(--eye-bright);
}
.run-steps li.done .tick::after {
	transform: rotate(45deg) scale(1);
}
/* With the script running, steps wait their turn. */
.js .run-steps li:not(.done):not(.active) {
	opacity: 0.32;
}
.js .run-steps li:not(.done) .t {
	visibility: hidden;
}
.run-steps li.active .tick {
	border-color: var(--eye-bright);
	border-top-color: transparent;
	animation: spin 0.8s linear infinite;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.run-foot {
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--g-700);
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--g-subtle);
}

/* The "no" strip */
.nos {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-top: clamp(48px, 7vw, 80px);
	border-top: 1px solid var(--g-800);
}
.nos li {
	padding: 26px 24px 30px 0;
	font-size: 15px;
	color: var(--g-subtle);
	line-height: 1.5;
}
.nos li + li {
	padding-left: 24px;
	border-left: 1px solid var(--g-800);
}
.nos b {
	display: block;
	color: var(--g-fg);
	font-weight: 650;
	margin-bottom: 2px;
}

/* ───────── Engine ───────── */

.points {
	display: grid;
	gap: 22px;
	margin-top: 40px;
}
.points li {
	position: relative;
	padding-left: 26px;
}
.points li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 8px;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	background: var(--eye);
	box-shadow: 0 0 12px var(--eye-glow);
}
.points h3 {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 4px;
}
.points p {
	color: var(--l-muted);
}

.window {
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--g-850);
	color: var(--g-fg);
	box-shadow: 0 40px 80px -30px rgb(14 17 20 / 0.55), 0 0 0 1px rgb(14 17 20 / 0.9);
}
.window-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: var(--g-800);
	border-bottom: 1px solid var(--g-700);
	font-size: 13px;
	color: var(--g-muted);
}
.dots {
	display: inline-flex;
	gap: 6px;
}
.dots i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--g-600);
}
.pill {
	margin-left: auto;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgb(22 131 245 / 0.14);
	color: var(--eye-bright);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.code {
	margin: 0;
	/* Show code as typed: no ligatures (<= stays <=). */
	font-variant-ligatures: none;
	padding: 22px 22px 26px;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 13.5px;
	line-height: 1.75;
	color: #d5dbe1;
	tab-size: 2;
}
.code .k {
	color: #7cbcff;
}
.code .s {
	color: #a7e3c0;
}
.code .x {
	color: #fde68a;
}
.code .c {
	color: #7d8894;
	font-style: italic;
}

.editors {
	display: flex;
	gap: 8px;
	margin-top: 18px;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.editors span {
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--l-border-strong);
	font-family: var(--mono);
	font-size: 12.5px;
	color: var(--l-muted);
	background: var(--l-surface);
}

/* ───────── Modules ───────── */

.spaces {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}
.space {
	display: flex;
	flex-direction: column;
	border-radius: var(--radius);
	border: 1px solid var(--l-border);
	background: var(--l-bg);
	padding: 22px 20px 24px;
	transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.space:hover {
	border-color: var(--l-border-strong);
	transform: translateY(-3px);
	box-shadow: 0 24px 40px -28px rgb(14 17 20 / 0.35);
}
.space header {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-bottom: 16px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--l-border);
}
.space header .mono {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--l-fg);
}
.space .for {
	font-size: 13.5px;
	color: var(--l-subtle);
}
.space li {
	padding: 9px 0;
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--l-muted);
}
.space li + li {
	border-top: 1px dashed var(--l-border);
}
.space li b {
	display: block;
	color: var(--l-fg);
	font-weight: 650;
	font-size: 15.5px;
}
.space-engine {
	background: var(--g-900);
	border-color: var(--g-900);
}
.space-engine:hover {
	border-color: var(--eye-deep);
}
.space-engine header {
	border-color: var(--g-700);
}
.space-engine header .mono {
	color: var(--eye-bright);
}
.space-engine .for,
.space-engine li {
	color: var(--g-subtle);
}
.space-engine li + li {
	border-color: var(--g-700);
}
.space-engine li b {
	color: var(--g-fg);
}

/* ───────── Integrations ───────── */

#integrations .wrap {
	position: relative;
	z-index: 1;
}
.split-rev > :first-child {
	order: 2;
}
.chips-panel {
	padding: 28px;
	border-radius: 20px;
	border: 1px solid var(--g-700);
	background: linear-gradient(180deg, rgb(26 31 37 / 0.9), rgb(14 17 20 / 0.6));
}
.chips-label {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--g-subtle);
	margin-bottom: 18px;
}
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.chips li {
	padding: 10px 16px;
	border-radius: 12px;
	background: var(--g-800);
	border: 1px solid var(--g-700);
	font-weight: 600;
	font-size: 15px;
	transition: border-color 0.2s, transform 0.2s var(--ease);
}
.chips li:hover {
	border-color: var(--g-subtle);
	transform: translateY(-2px);
}
.chips small {
	font-weight: 400;
	color: var(--g-subtle);
	margin-left: 4px;
}
.chips .chip-yours {
	border: 1.5px dashed var(--eye-bright);
	background: rgb(22 131 245 / 0.08);
	color: var(--eye-bright);
}

.terminal {
	margin-top: 22px;
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--g-950);
	border: 1px solid var(--g-800);
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--g-muted);
	overflow-x: auto;
	white-space: nowrap;
}
.terminal .prompt {
	color: var(--eye-bright);
	margin-right: 6px;
}

/* ───────── Trust ───────── */

.facts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-top: 1px solid var(--l-border-strong);
}
.facts li {
	padding: 30px 28px 34px 0;
	border-bottom: 1px solid var(--l-border);
}
.facts li:not(:nth-child(3n + 1)) {
	padding-left: 28px;
	border-left: 1px solid var(--l-border);
}
.facts h3 {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.015em;
	margin-bottom: 8px;
}
.facts p {
	color: var(--l-muted);
	font-size: 16px;
}

/* ───────── Self-host ───────── */

.targets {
	margin-top: 36px;
	border-top: 1px solid var(--l-border);
}
.targets li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--l-border);
}
.targets b {
	font-weight: 700;
}
.targets span {
	color: var(--l-subtle);
}

.window-dark .code {
	font-size: 13px;
}
.copy {
	margin-left: auto;
	padding: 5px 12px;
	border: 1px solid var(--g-600);
	border-radius: 8px;
	background: transparent;
	color: var(--g-fg);
	font: 600 12px var(--sans);
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}
.copy:hover {
	background: rgb(255 255 255 / 0.06);
	border-color: var(--g-muted);
}
.copy.copied {
	border-color: var(--ok);
	color: var(--ok);
}

/* ───────── Closing ───────── */

.closing {
	padding: clamp(72px, 10vw, 120px) 0;
}
.closing::before {
	content: '';
	position: absolute;
	left: 8%;
	top: 50%;
	width: 520px;
	height: 520px;
	transform: translateY(-50%);
	background: radial-gradient(closest-side, rgb(22 131 245 / 0.18), transparent);
	pointer-events: none;
}
.closing-inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: clamp(32px, 6vw, 80px);
	align-items: center;
}
.closing-mark {
	width: 300px;
	filter: drop-shadow(0 30px 50px rgb(0 0 0 / 0.6));
	transform: scaleX(-1);
}

/* ───────── Footer ───────── */

.footer {
	background: var(--g-950);
	color: var(--g-muted);
	border-top: 1px solid var(--g-800);
	padding: 36px 0 44px;
	font-size: 14.5px;
}
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
}
.brand-foot {
	color: var(--g-fg);
	font-size: 17px;
}
.footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}
.footer nav a {
	text-decoration: none;
}
.footer nav a:hover {
	color: var(--g-fg);
}
.footer .fine {
	margin: 0;
	color: var(--g-subtle);
	font-size: 13.5px;
}

/* ───────── Reveal on scroll ───────── */

.js .reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js .reveal.in {
	opacity: 1;
	transform: none;
}

/* Hero entrance */
.hero-copy > * {
	animation: rise 0.9s var(--ease) both;
}
.hero-copy > :nth-child(2) {
	animation-delay: 0.08s;
}
.hero-copy > :nth-child(3) {
	animation-delay: 0.16s;
}
.hero-copy > :nth-child(4) {
	animation-delay: 0.24s;
}
.hero-art {
	animation: rise 1.1s 0.2s var(--ease) both;
}
@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
}

/* ───────── Responsive ───────── */

@media (max-width: 1060px) {
	.spaces {
		grid-template-columns: repeat(2, 1fr);
	}
	.nos {
		grid-template-columns: repeat(2, 1fr);
	}
	.nos li:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}
	.nos li:nth-child(n + 3) {
		border-top: 1px solid var(--g-800);
	}
}

@media (max-width: 900px) {
	.hero-inner,
	.split,
	.closing-inner {
		grid-template-columns: 1fr;
	}
	.split-rev > :first-child {
		order: 0;
	}
	.hero-art {
		max-width: 520px;
		margin-inline: auto;
		width: 100%;
	}
	.butler {
		width: min(78%, 400px);
	}
	.run-card {
		width: 100%;
		margin-top: -70px;
	}
	.facts {
		grid-template-columns: 1fr 1fr;
	}
	.facts li,
	.facts li:not(:nth-child(3n + 1)) {
		padding: 26px 20px 28px 0;
		border-left: 0;
	}
	.facts li:nth-child(even) {
		padding-left: 20px;
		border-left: 1px solid var(--l-border);
	}
	.closing-mark {
		width: 200px;
	}
}

@media (max-width: 760px) {
	.nav-toggle {
		display: block;
	}
	.nav-links {
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px 16px 20px;
		background: var(--g-900);
		border-bottom: 1px solid var(--g-800);
		display: none;
	}
	.nav-links.open {
		display: flex;
	}
	.nav-links a:not(.btn) {
		padding: 14px 4px;
		border-bottom: 1px solid var(--g-800);
		font-size: 17px;
	}
	.nav-links .btn {
		margin-top: 16px;
		justify-content: center;
	}
}

@media (max-width: 600px) {
	body {
		font-size: 16px;
	}
	.spaces,
	.nos,
	.facts {
		grid-template-columns: 1fr;
	}
	.nos li,
	.nos li + li {
		padding: 18px 0;
		border-left: 0;
	}
	.nos li + li {
		border-top: 1px solid var(--g-800);
	}
	.facts li:nth-child(even),
	.facts li {
		padding: 22px 0;
		border-left: 0;
	}
	.body-lg {
		font-size: 17px;
	}
	.window-bar .pill {
		display: none;
	}
	.code {
		font-size: 12px;
		padding: 18px 16px 20px;
	}
	.cta-row .btn {
		flex: 1 1 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
	html {
		scroll-behavior: auto;
	}
	.js .reveal {
		opacity: 1;
		transform: none;
	}
}

/* ───────── 404 ───────── */

.lost {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 48px 0;
}
.lost-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.lost-inner img {
	width: 220px;
	margin-bottom: 24px;
	filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.6));
}
.lost h1 {
	font-size: clamp(34px, 5vw, 56px);
	margin-bottom: 18px;
}
.lost .lede {
	color: var(--g-muted);
	font-size: 19px;
}
.lost .cta-row {
	justify-content: center;
}

/* Grid children may shrink below their content (code blocks scroll instead). */
.split > *,
.hero-inner > *,
.closing-inner > * {
	min-width: 0;
}

/* ───────── Code tabs ───────── */

.tabs {
	display: flex;
	gap: 4px;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.tabs [role='tab'] {
	padding: 5px 10px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--g-subtle);
	font: 500 12.5px var(--mono);
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.tabs [role='tab']:hover {
	color: var(--g-fg);
}
.tabs [role='tab'][aria-selected='true'] {
	background: var(--g-700);
	color: var(--g-fg);
}
.code[hidden] {
	display: none;
}
.points code {
	padding: 1px 6px;
	border-radius: 5px;
	background: var(--l-sunken);
	font-size: 0.88em;
	color: var(--l-fg);
}
