:root {
	--bg: oklch(0.17 0.018 264);
	--bg-deep: oklch(0.135 0.015 264);
	--surface: oklch(0.215 0.02 264);
	--surface-2: oklch(0.25 0.021 264);
	--ink: oklch(0.95 0.008 264);
	--muted: oklch(0.72 0.02 264);
	--faint: oklch(0.56 0.02 264);
	--line: oklch(0.95 0.01 264 / 0.13);
	--line-soft: oklch(0.95 0.01 264 / 0.08);
	--accent: oklch(0.79 0.105 196);
	--accent-strong: oklch(0.72 0.115 196);
	--accent-ink: oklch(0.16 0.02 264);
	--font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
	--font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
	--radius: 0.8rem;
	--radius-lg: 1.25rem;
}

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

html {
	scroll-behavior: smooth;
}

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--accent);
	color: var(--accent-ink);
}

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

a {
	color: inherit;
	text-decoration: none;
}

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

h1,
h2,
h3 {
	font-family: var(--font-display);
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.7rem, 6vw, 4.6rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1.02;
	max-width: 44rem;
}

h2 {
	font-size: clamp(2rem, 4.2vw, 3.2rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.06;
	max-width: 34rem;
}

h3 {
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

p {
	max-width: 36rem;
}

/* ---------- shared pieces ---------- */

.eyebrow,
.section-label {
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.eyebrow {
	margin-bottom: 1.5rem;
}

.eyebrow span {
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-size: 0.65rem;
	letter-spacing: 0.1em;
	margin-left: 0.65rem;
	padding: 0.28rem 0.6rem;
	vertical-align: 0.1rem;
}

.section-label {
	margin-bottom: 1.1rem;
}

.intro {
	color: var(--muted);
	font-size: clamp(1.05rem, 2vw, 1.2rem);
	margin-top: 1.75rem;
}

.detail {
	border-left: 2px solid var(--accent);
	color: var(--faint);
	font-size: 0.92rem;
	margin-top: 1.25rem;
	padding-left: 1rem;
}

.primary-action {
	background: var(--accent);
	border-radius: 0.55rem;
	color: var(--accent-ink);
	display: inline-flex;
	align-items: center;
	font-size: 0.92rem;
	font-weight: 700;
	min-height: 3rem;
	padding: 0 1.4rem;
	transition: background-color 180ms ease, transform 180ms ease;
}

.primary-action:hover {
	background: oklch(0.85 0.09 196);
	transform: translateY(-1px);
}

.light-action {
	background: #fff;
	color: var(--bg-deep);
}

.light-action:hover {
	background: var(--accent-ink);
	color: #fff;
}

.ghost-action {
	border: 1px solid var(--line);
	border-radius: 0.55rem;
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	font-size: 0.92rem;
	font-weight: 600;
	min-height: 3rem;
	padding: 0 1.4rem;
	transition: border-color 180ms ease, color 180ms ease;
}

.ghost-action:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.text-action {
	color: var(--ink);
	font-size: 0.92rem;
	font-weight: 600;
}

.text-action span {
	color: var(--accent);
}

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

.inline-link {
	color: var(--ink);
	font-size: 0.92rem;
	font-weight: 600;
	display: inline-block;
	margin-top: 1.75rem;
}

.inline-link span {
	color: var(--accent);
}

.inline-link:hover {
	color: var(--accent);
}

/* ---------- nav ---------- */

.apps-nav {
	background: oklch(0.17 0.018 264 / 0.82);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line-soft);
	position: sticky;
	top: 0;
	z-index: 10;
}

.apps-nav nav {
	align-items: center;
	display: flex;
	gap: 2rem;
	margin-inline: auto;
	max-width: 72rem;
	padding: 0.9rem 1.5rem;
}

.nav-brand {
	align-items: center;
	display: flex;
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	gap: 0.6rem;
}

.brand-mark {
	align-items: center;
	background: var(--accent);
	border-radius: 0.4rem;
	color: var(--accent-ink);
	display: inline-flex;
	font-family: var(--font-mono);
	font-size: 0.95rem;
	font-weight: 600;
	height: 1.5rem;
	justify-content: center;
	width: 1.5rem;
}

.apps-nav ul {
	display: flex;
	gap: 1.6rem;
	list-style: none;
	margin-left: auto;
}

.apps-nav ul a {
	color: var(--muted);
	font-size: 0.88rem;
	font-weight: 500;
}

.apps-nav ul a:hover {
	color: var(--ink);
}

.nav-cta {
	border: 1px solid var(--accent-strong);
	border-radius: 0.5rem;
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 600;
	padding: 0.5rem 1rem;
	transition: background-color 180ms ease, color 180ms ease;
}

.nav-cta:hover {
	background: var(--accent);
	color: var(--accent-ink);
}

/* ---------- hero ---------- */

.hero {
	background:
		radial-gradient(circle at 78% -10%, oklch(0.72 0.115 196 / 0.14), transparent 46rem),
		var(--bg);
	padding: clamp(4.5rem, 9vw, 8rem) 1.5rem clamp(5rem, 10vw, 8.5rem);
}

.hero-solo {
	margin-inline: auto;
	max-width: 72rem;
}

/* worktreeview hero: copy left, thread shot right */

.wtw-hero {
	padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

.hero-split {
	align-items: center;
	display: grid;
	gap: clamp(2.5rem, 6vw, 4.5rem);
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	margin-inline: auto;
	max-width: 72rem;
}

.hero-shot {
	position: relative;
}

/* full-width screenshot below the fold */

.bigshot {
	padding: clamp(3.5rem, 7vw, 5.5rem) 1.5rem clamp(4rem, 8vw, 6rem);
}

.bigshot .shot {
	max-width: 90rem;
}

.hero-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	margin-top: 2.25rem;
}

.availability {
	align-items: center;
	color: var(--faint);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	gap: 0.55rem;
	margin-top: 1.75rem;
}

.availability span {
	background: var(--accent);
	border-radius: 50%;
	flex: 0 0 auto;
	height: 0.45rem;
	width: 0.45rem;
}

.availability-link {
	color: var(--muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.availability-link:hover {
	color: var(--ink);
}

/* showcase caption */

.showcase-caption {
	color: var(--faint);
	font-family: var(--font-mono);
	font-size: 0.78rem;
	margin: 2rem auto 0;
	max-width: 44rem;
	text-align: center;
}

.float-chip {
	backdrop-filter: blur(8px);
	background: oklch(0.215 0.02 264 / 0.92);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 1rem 2.5rem oklch(0 0 0 / 0.35);
	display: flex;
	flex-direction: column;
	font-family: var(--font-mono);
	padding: 0.85rem 1rem;
	position: absolute;
	z-index: 2;
}

.float-chip span {
	color: var(--faint);
	font-size: 0.62rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.float-chip strong {
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 600;
}

.chip-a {
	left: -4%;
	top: -4%;
}

.chip-b {
	right: -5%;
	top: 38%;
}

.chip-c {
	bottom: -4%;
	left: 6%;
}

/* chapters */

.chapter {
	border-top: 1px solid var(--line-soft);
	padding: clamp(5rem, 11vw, 9rem) 1.5rem;
}

.chapter-alt {
	background: var(--bg-deep);
}

.chapter-head,
.shot,
.shot-pair {
	margin-inline: auto;
	max-width: 72rem;
}

.chapter-head {
	margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.chapter-head h2 {
	max-width: 34rem;
}

.chapter-head > p:not(.section-label):not(.detail) {
	color: var(--muted);
	margin-top: 1.5rem;
}

.shot {
	margin: 0 auto;
	max-width: 72rem;
}

.shot img {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 2rem 4rem oklch(0 0 0 / 0.3);
	width: 100%;
}

.shot + .shot {
	margin-top: 2rem;
}

.shot figcaption {
	color: var(--faint);
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	margin-top: 1.1rem;
}

.shot-pair {
	align-items: center;
	display: grid;
	gap: clamp(1.5rem, 4vw, 3rem);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shot-pair .shot {
	align-items: center;
	display: flex;
	flex-direction: column;
}

.shot-pair .shot + .shot {
	margin-top: 0;
}

.shot-pair img {
	height: auto;
	max-height: 36rem;
	max-width: 100%;
	width: auto;
}

/* ---------- safety ---------- */

.safety {
	background: var(--bg-deep);
	border-top: 1px solid var(--line-soft);
	color: #fff;
	padding: clamp(5.5rem, 12vw, 10rem) 1.5rem;
}

.safety-grid {
	margin-inline: auto;
	max-width: 72rem;
}

.safety h2 {
	max-width: 42rem;
}

.safety p {
	color: var(--muted);
	margin-top: 1.5rem;
}

.safety .inline-link {
	color: #fff;
}

.safety .inline-link:hover {
	color: var(--accent);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin-top: 2.25rem;
}

.chips span {
	border: 1px solid oklch(0.95 0.01 264 / 0.22);
	border-radius: 999px;
	color: var(--ink);
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.55rem 0.95rem;
}

/* ---------- steps ---------- */

.steps {
	padding: clamp(5rem, 11vw, 9rem) 1.5rem;
}

.steps-heading {
	align-items: end;
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	margin-inline: auto;
	max-width: 72rem;
}

.steps ol {
	border-top: 1px solid var(--line);
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 3.5rem auto 0;
	max-width: 72rem;
}

.steps li {
	padding: 2rem 2rem 0 0;
}

.steps li + li {
	border-left: 1px solid var(--line);
	padding-left: 2rem;
}

.steps li > span {
	align-items: center;
	background: var(--accent);
	border-radius: 50%;
	color: var(--accent-ink);
	display: inline-grid;
	font-family: var(--font-mono);
	font-size: 0.78rem;
	font-weight: 700;
	height: 2.25rem;
	place-items: center;
	width: 2.25rem;
}

.steps h3 {
	font-family: var(--font-body);
	margin-top: 1.4rem;
}

.steps li p {
	color: var(--muted);
	font-size: 0.92rem;
	margin-top: 0.6rem;
}

/* ---------- closing ---------- */

.closing {
	background: var(--accent);
	color: var(--accent-ink);
	display: grid;
	gap: clamp(2.5rem, 8vw, 6rem);
	grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 0.7fr);
	padding: clamp(5.5rem, 12vw, 10rem) max(1.5rem, calc((100vw - 72rem) / 2));
}

.closing .section-label {
	color: oklch(0.3 0.03 264);
}

.closing h2 {
	max-width: 30rem;
}

.closing-copy p {
	color: oklch(0.25 0.03 264);
}

.closing-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 2rem;
}

.closing .ghost-action {
	border-color: oklch(0.16 0.02 264 / 0.4);
	color: var(--accent-ink);
}

.closing .ghost-action:hover {
	background: var(--accent-ink);
	color: #fff;
}

/* ---------- apps index ---------- */

.index-hero {
	padding-bottom: 0;
	text-align: center;
}

.index-intro {
	margin-inline: auto;
	max-width: 48rem;
}

.index-intro h1 {
	margin-inline: auto;
}

.index-intro .intro {
	margin-inline: auto;
}

.index-hero .eyebrow span {
	color: var(--muted);
}

.featured {
	padding: clamp(4rem, 8vw, 6.5rem) 1.5rem;
}

.featured-card {
	align-items: center;
	background: linear-gradient(160deg, var(--surface), var(--bg-deep));
	border: 1px solid var(--line);
	border-radius: calc(var(--radius-lg) + 0.5rem);
	display: grid;
	gap: clamp(2.5rem, 6vw, 4.5rem);
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	margin-inline: auto;
	max-width: 72rem;
	padding: clamp(1.75rem, 4vw, 3.25rem);
}

.featured-visual {
	display: block;
}

.featured-copy h2 {
	margin-top: 0.25rem;
}

.featured-copy > p:not(.section-label) {
	color: var(--muted);
	margin-top: 1.25rem;
}

.meta-row {
	display: flex;
	flex-wrap: wrap;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	gap: 0.5rem 1.25rem;
	margin-top: 1.5rem;
}

.meta-row span {
	color: var(--faint);
}

.featured-copy .primary-action {
	margin-top: 2rem;
}

.more-apps {
	border-top: 1px solid var(--line-soft);
	padding: clamp(5rem, 11vw, 9rem) 1.5rem;
}

.more-heading {
	margin-inline: auto;
	max-width: 72rem;
}

.app-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	list-style: none;
	margin: 3.5rem auto 0;
	max-width: 72rem;
}

.app-card a {
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 1.75rem;
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.app-card a:hover {
	background: var(--surface);
	border-color: oklch(0.95 0.01 264 / 0.22);
	transform: translateY(-3px);
}

.card-kind {
	color: var(--accent);
	font-family: var(--font-mono);
	font-size: 0.68rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.app-card h3 {
	font-size: 1.3rem;
	margin-top: 0.9rem;
}

.app-card p:not(.card-kind) {
	color: var(--muted);
	font-size: 0.92rem;
	margin-top: 0.6rem;
}

.card-link {
	color: var(--ink);
	font-size: 0.85rem;
	font-weight: 600;
	margin-top: auto;
	padding-top: 1.5rem;
}

.card-link em {
	color: var(--accent);
	font-style: normal;
}

.app-card a:hover .card-link {
	color: var(--accent);
}

.index-closing {
	border-top: 1px solid var(--line-soft);
	padding: clamp(4.5rem, 9vw, 7rem) 1.5rem;
	text-align: center;
}

.index-closing h2 {
	margin-inline: auto;
}

.index-closing .ghost-action {
	margin-top: 2.25rem;
}

/* ---------- footer ---------- */

.apps-footer {
	border-top: 1px solid var(--line-soft);
	padding: clamp(3rem, 6vw, 4.5rem) 1.5rem;
}

.footer-inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 3rem;
	margin-inline: auto;
	max-width: 72rem;
}

.footer-brand {
	align-items: center;
	display: flex;
	font-family: var(--font-display);
	font-weight: 600;
	gap: 0.6rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin-left: auto;
}

.footer-links a {
	color: var(--muted);
	font-size: 0.85rem;
}

.footer-links a:hover {
	color: var(--ink);
}

.footer-note {
	color: var(--faint);
	font-size: 0.8rem;
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
	.app-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.hero-split,
	.featured-card,
	.closing {
		grid-template-columns: minmax(0, 1fr);
	}

	.float-chip {
		display: none;
	}

	.shot-pair {
		grid-template-columns: minmax(0, 1fr);
	}

	.steps-heading {
		display: block;
	}

	.steps ol {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 2.5rem;
	}

	.steps li,
	.steps li + li {
		border-bottom: 1px solid var(--line);
		border-left: 0;
		padding: 1.5rem 0;
	}

	.steps li:last-child {
		border-bottom: 0;
	}

	.closing {
		align-items: start;
	}
}

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

	.apps-nav nav {
		gap: 1rem;
	}

	.apps-nav ul {
		gap: 1rem;
	}

	.nav-cta {
		display: none;
	}

	.hero {
		padding-top: 3.5rem;
	}

	.featured-card {
		padding: 1.25rem;
	}
}

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

	.primary-action,
	.ghost-action,
	.nav-cta,
	.app-card a {
		transition: none;
	}
}
