/* ---------- Tokens ---------- */
:root {
	--bg: #f4efe6;
	--card: #fffaf2;
	--ink: #16130f;
	--muted: #6b645a;
	--line: rgba(22, 19, 15, 0.12);
	--accent: #2f45ff;
	--accent-ink: #ffffff;
	--live: #13814a;
	--test: #b26a00;
	--dev: #2f45ff;
	--display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
	--mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
	--radius: 22px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--bg: #14120f;
		--card: #1d1a16;
		--ink: #f2ede4;
		--muted: #a39b8f;
		--line: rgba(242, 237, 228, 0.12);
		--accent: #8f9cff;
		--accent-ink: #0d0f2a;
		--live: #4ccf8a;
		--test: #f0b04a;
		--dev: #8f9cff;
		color-scheme: dark;
	}
}

:root[data-theme='dark'] {
	--bg: #14120f;
	--card: #1d1a16;
	--ink: #f2ede4;
	--muted: #a39b8f;
	--line: rgba(242, 237, 228, 0.12);
	--accent: #8f9cff;
	--accent-ink: #0d0f2a;
	--live: #4ccf8a;
	--test: #f0b04a;
	--dev: #8f9cff;
	color-scheme: dark;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 72px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--display);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

p {
	margin: 0;
}

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

.mono {
	font-family: var(--mono);
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}

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

.skip {
	position: absolute;
	left: -999px;
}
.skip:focus {
	left: 16px;
	top: 16px;
	z-index: 10;
	background: var(--ink);
	color: var(--bg);
	padding: 8px 14px;
	border-radius: 999px;
}

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

.kicker {
	font-family: var(--mono);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}

/* ---------- Top bar ---------- */
.topbar {
	position: sticky;
	top: 0;
	z-index: 5;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
}

.brand {
	font-weight: 800;
	font-size: 1.15rem;
	text-decoration: none;
	letter-spacing: -0.02em;
}
.brand span {
	color: var(--accent);
}

.topbar nav {
	display: flex;
	gap: 4px;
}
.topbar nav a {
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	padding: 6px 12px;
	border-radius: 999px;
	color: var(--muted);
	transition: background 0.2s, color 0.2s;
}
.topbar nav a:hover {
	background: var(--line);
	color: var(--ink);
}

/* ---------- Listing header ---------- */
.listing {
	padding-top: 56px;
	padding-bottom: 72px;
}

.listing-head {
	display: flex;
	align-items: center;
	gap: 32px;
	margin-top: 24px;
}

.me {
	width: 160px;
	height: 160px;
	flex: none;
	border-radius: 36px;
	object-fit: cover;
	box-shadow: 0 1px 0 var(--line), 0 18px 40px -18px rgba(0, 0, 0, 0.45);
	transform: rotate(-3deg);
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.4);
}
.me:hover {
	transform: rotate(2deg) scale(1.04);
}

.listing h1 {
	font-size: clamp(2.6rem, 7.4vw, 5.6rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 0.95;
}

.subtitle {
	margin-top: 10px;
	font-size: 1.2rem;
	color: var(--muted);
	font-weight: 500;
}

.get-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 22px;
	flex-wrap: wrap;
}

.get {
	position: relative;
	height: 40px;
	min-width: 88px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font: 700 0.95rem/1 var(--display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: min-width 0.35s ease, padding 0.35s ease, background 0.3s, transform 0.15s;
}
.get:active {
	transform: scale(0.95);
}
.get .ring {
	position: absolute;
	inset: 2px;
	width: 36px;
	height: 36px;
	opacity: 0;
	transform: rotate(-90deg);
}
.get .ring circle {
	fill: none;
	stroke: var(--accent);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 94.25;
	stroke-dashoffset: 94.25;
}
.get.loading {
	min-width: 40px;
	width: 40px;
	padding: 0;
	background: var(--line);
	color: transparent;
}
.get.loading .ring {
	opacity: 1;
}
.get.loading .ring circle {
	animation: fill-ring 1.3s ease-in-out forwards;
}
@keyframes fill-ring {
	to {
		stroke-dashoffset: 0;
	}
}
.get.done {
	background: var(--ink);
	color: var(--bg);
}

.get-hint {
	font-size: 0.9rem;
	color: var(--muted);
}

/* Stats strip */
.stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	margin-top: 48px;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.stats li {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 2px;
	padding: 16px 8px;
}
.stats li + li {
	border-left: 1px solid var(--line);
}
.stats small {
	font-family: var(--mono);
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}
.stats strong {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.stats span {
	font-size: 0.82rem;
	color: var(--muted);
}

/* Pitch */
.pitch {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 48px;
	margin-top: 64px;
	align-items: end;
}
.pitch .big {
	font-size: clamp(1.9rem, 4.4vw, 3.3rem);
	font-weight: 700;
	line-height: 1.04;
	letter-spacing: -0.03em;
}
.pitch em {
	font-style: normal;
	color: var(--accent);
	text-decoration: underline wavy;
	text-decoration-thickness: 2px;
	text-underline-offset: 8px;
}
.pitch p:not(.big) {
	color: var(--muted);
}
.pitch a {
	color: var(--ink);
}

/* What's new */
.whatsnew {
	margin-top: 56px;
	padding: 24px 28px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.whatsnew-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.whatsnew h2 {
	font-size: 1.35rem;
}
.whatsnew .mono {
	color: var(--muted);
}
.whatsnew li {
	position: relative;
	padding-left: 22px;
	margin-top: 6px;
}
.whatsnew li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.62em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
}

/* ---------- Section heads ---------- */
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 32px;
}
.section-head h2 {
	font-size: clamp(2rem, 5vw, 3.4rem);
	font-weight: 800;
	letter-spacing: -0.035em;
}
.section-head p {
	color: var(--muted);
	max-width: 36ch;
}

/* ---------- Apps ---------- */
.apps {
	padding-top: 24px;
}
.apps > .section-head {
	margin-bottom: 40px;
}

.app {
	--tint: color-mix(in srgb, var(--app) 11%, var(--bg));
	background: var(--tint);
	border-top: 1px solid color-mix(in srgb, var(--app) 30%, var(--bg));
	padding: 64px 0;
}
.app:nth-of-type(even) .app-grid {
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.app:nth-of-type(even) .app-info {
	order: 2;
}

.app-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 48px;
	align-items: center;
}

.app-info > * + * {
	margin-top: 18px;
}

.app-head {
	display: flex;
	align-items: center;
	gap: 18px;
}
.app-head img {
	width: 88px;
	height: 88px;
	border-radius: 22px;
	flex: none;
	box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--app) 80%, black);
}
.app-head h3 {
	font-size: 2.2rem;
	font-weight: 800;
	letter-spacing: -0.03em;
}
.app-head p {
	margin-top: 4px;
	color: var(--muted);
	font-weight: 500;
	line-height: 1.35;
}

.meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--muted);
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-family: var(--mono);
	font-size: 0.72rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: 1px solid currentColor;
}
.pill::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}
.pill.live {
	color: var(--live);
}
.pill.live::before {
	animation: pulse 1.8s ease-in-out infinite;
}
.pill.test {
	color: var(--test);
}
.pill.dev {
	color: var(--dev);
}
@keyframes pulse {
	50% {
		opacity: 0.25;
	}
}

.highlights li {
	position: relative;
	padding-left: 24px;
	margin-top: 8px;
	font-size: 0.95rem;
}
.highlights li::before {
	content: '→';
	position: absolute;
	left: 0;
	color: var(--app);
	font-weight: 700;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.chips li {
	font-family: var(--mono);
	font-size: 0.72rem;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: color-mix(in srgb, var(--card) 70%, transparent);
}
.chips.big li {
	font-size: 0.85rem;
	padding: 7px 14px;
}

.links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding-top: 4px;
}
.btn {
	display: inline-flex;
	align-items: center;
	height: 42px;
	padding: 0 18px;
	border-radius: 999px;
	background: var(--app);
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	border: 1px solid var(--app);
	transition: transform 0.15s, filter 0.2s;
}
.btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}
.btn.ghost {
	background: transparent;
	color: var(--ink);
	border-color: color-mix(in srgb, var(--app) 55%, var(--ink));
}

/* Screenshot rail */
.shots {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 8px 4px 20px;
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--app) 50%, transparent) transparent;
}
.shots img {
	flex: none;
	width: 220px;
	aspect-ratio: 1170 / 2532;
	object-fit: cover;
	object-position: top;
	border-radius: 28px;
	scroll-snap-align: start;
	background: var(--card);
	border: 1px solid var(--line);
	box-shadow: 0 24px 40px -24px color-mix(in srgb, var(--app) 70%, black);
	transition: transform 0.3s ease;
}
.shots img:hover {
	transform: translateY(-6px) rotate(-1deg);
}

@media (min-width: 901px) {
	.shots {
		-webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
		mask-image: linear-gradient(to right, #000 82%, transparent);
	}
}

/* ---------- Version history ---------- */
.history {
	padding-top: 96px;
}

.versions > li {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 24px;
	padding: 22px 0;
	border-top: 1px solid var(--line);
}

.v span {
	display: block;
	font-size: 2.6rem;
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1;
}
.v span::before {
	content: 'v';
	font-size: 0.5em;
	color: var(--muted);
	margin-right: 2px;
	vertical-align: 0.5em;
}
.v time {
	display: block;
	margin-top: 6px;
	font-family: var(--mono);
	font-size: 0.75rem;
	color: var(--muted);
}

.current .v span {
	color: var(--accent);
}
.current .notes h3::after {
	content: 'Current';
	display: inline-block;
	margin-left: 10px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--accent);
	color: var(--accent-ink);
	font-family: var(--mono);
	font-size: 0.65rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	vertical-align: 0.35em;
}

.notes h3 {
	font-size: 1.35rem;
	font-weight: 700;
}
.notes h3 a {
	color: var(--accent);
	text-decoration: none;
}
.notes h3 a:hover {
	text-decoration: underline;
}
.notes p {
	margin-top: 6px;
	color: var(--muted);
	max-width: 60ch;
}

.older {
	border-top: 1px solid var(--line);
}
.older summary {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 20px 0;
	cursor: pointer;
	font-weight: 700;
	list-style: none;
}
.older summary::-webkit-details-marker {
	display: none;
}
.older summary::before {
	content: '+';
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid var(--line);
	transition: transform 0.25s;
}
.older[open] summary::before {
	transform: rotate(45deg);
}
.older summary .mono {
	color: var(--muted);
	font-weight: 400;
}

/* ---------- Compatibility ---------- */
.compat {
	padding-top: 96px;
}
.compat-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.compat-grid > .ai {
	grid-column: 1 / -1;
	background: color-mix(in srgb, var(--accent) 9%, var(--card));
	border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.compat-grid .ai p {
	margin-top: 16px;
	color: var(--muted);
}
.compat-grid .ai a {
	color: var(--accent);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.compat-grid .ai a:hover {
	text-decoration: underline;
}
.compat-grid > div {
	padding: 24px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.compat-grid h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.1rem;
	margin-bottom: 16px;
}
.dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--muted);
}
.dot.ok {
	background: var(--live);
}
.dot.ship {
	background: var(--accent);
}
.dot.ai-dot {
	background: conic-gradient(var(--accent), #ff6b57, var(--live), var(--accent));
	width: 12px;
	height: 12px;
}

/* ---------- Information ---------- */
.info {
	padding-top: 96px;
	padding-bottom: 120px;
}
.info-table > div {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 24px;
	padding: 14px 0;
	border-top: 1px solid var(--line);
}
.info-table > div:last-child {
	border-bottom: 1px solid var(--line);
}
.info-table dt {
	color: var(--muted);
}
.info-table dd {
	margin: 0;
	font-weight: 500;
}

/* ---------- Contact ---------- */
.contact {
	background: var(--ink);
	color: var(--bg);
	padding: 96px 0 40px;
}
.contact .kicker {
	color: color-mix(in srgb, var(--bg) 60%, var(--ink));
}
.contact h2 {
	margin-top: 12px;
	font-size: clamp(2.6rem, 9vw, 7rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 0.95;
}
.mail {
	display: inline-block;
	margin-top: 28px;
	font-size: clamp(1.25rem, 3.6vw, 2.2rem);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 3px solid var(--accent);
	overflow-wrap: anywhere;
	transition: color 0.2s;
}
.mail:hover {
	color: var(--accent);
}
.socials {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 40px;
}
.socials a {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent);
	text-decoration: none;
	font-weight: 500;
	transition: background 0.2s, color 0.2s;
}
.socials a:hover {
	background: var(--bg);
	color: var(--ink);
}
.fine {
	margin-top: 72px;
	color: color-mix(in srgb, var(--bg) 50%, var(--ink));
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .reveal.in {
	opacity: 1;
	transform: none;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.pitch,
	.app-grid,
	.app:nth-of-type(even) .app-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}
	.app:nth-of-type(even) .app-info {
		order: 0;
	}
	.compat-grid {
		grid-template-columns: 1fr;
	}
	.shots {
		margin: 0 -20px;
		padding-left: 20px;
		padding-right: 20px;
		scroll-padding-left: 20px;
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}
	.topbar nav a {
		padding: 6px 8px;
	}
	.listing {
		padding-top: 32px;
	}
	.listing-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}
	.me {
		width: 112px;
		height: 112px;
		border-radius: 26px;
	}
	.stats {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		margin-left: -20px;
		margin-right: -20px;
		padding: 0 12px;
	}
	.stats li {
		flex: 0 0 38%;
		scroll-snap-align: start;
	}
	.app {
		padding: 48px 0;
	}
	.app-head h3 {
		font-size: 1.8rem;
	}
	.app-head img {
		width: 72px;
		height: 72px;
		border-radius: 18px;
	}
	.shots img {
		width: 180px;
		border-radius: 24px;
	}
	.versions > li,
	.info-table > div {
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.v {
		display: flex;
		align-items: baseline;
		gap: 12px;
	}
	.v span {
		font-size: 2rem;
	}
	.whatsnew {
		padding: 20px;
	}
}
