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

:root {
	color-scheme: light dark;
	--bg: #ffffff;
	--fg-high: #21201c;
	--fg-mid: #63635e;
	--fg-low: #82827c;
	--surface: #f9f9f8;
	--border: rgba(0, 0, 0, 0.08);
	--logo: #facc15;
	--dots-opacity: 0.85;
	--accent-text: #9c7518;
	--nav-bg: rgba(253, 253, 252, 0.6);
	--nav-active: rgba(0, 0, 0, 0.06);
	--nav-shadow: 0 -1px 1px 0 rgba(255, 255, 255, 0.5) inset,
		0 1px 1px 0 rgba(255, 255, 255, 1) inset, 0 2px 4px 0 rgba(0, 0, 0, 0.1);
	--font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #1e1e1d;
		--fg-high: #eeeeec;
		--fg-mid: #b5b3ad;
		--fg-low: #7c7b74;
		--surface: #252524;
		--border: rgba(255, 255, 255, 0.08);
		--dots-opacity: 0.55;
		--accent-text: #dbb155;
		--nav-bg: rgba(42, 42, 40, 0.6);
		--nav-active: rgba(255, 255, 255, 0.08);
		--nav-shadow: 0 -1px 1px 0 rgba(255, 255, 255, 0.1) inset,
			0 1px 1px 0 rgba(255, 255, 255, 0.15) inset,
			0 2px 4px 0 rgba(0, 0, 0, 0.5);
	}
}

/* Column layout so the footer sits at the bottom of short pages */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--bg);
	color: var(--fg-high);
	font-family: var(--font);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

/* Logo rendered from the brand SVG so it can follow the text color */
.mark {
	display: block;
	background-color: currentColor;
	-webkit-mask: url("/assets/endeavor.svg") center / contain no-repeat;
	mask: url("/assets/endeavor.svg") center / contain no-repeat;
}

/* Floating pill nav */
.nav-wrap {
	position: fixed;
	inset: 16px 0 auto;
	z-index: 40;
	display: flex;
	justify-content: center;
	padding: 0 16px;
	pointer-events: none;
}

.nav {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 6px;
	border-radius: 9999px;
	background: var(--nav-bg);
	box-shadow: var(--nav-shadow);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	pointer-events: auto;
}

.nav-home {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 9999px;
	color: var(--fg-high);
	transition: opacity 0.15s ease;
}

.nav-home:hover {
	opacity: 0.7;
}

.nav-home .mark {
	width: 20px;
	height: 20px;
}

.nav-link {
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 500;
	color: var(--fg-mid);
	transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
	color: var(--fg-high);
}

.nav-link[aria-current="page"] {
	background: var(--nav-active);
}

/* Hero */
.hero {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 0 24px;
	overflow: hidden;
}

/* On touch screens the home page is one locked screen, so dragging moves
   the dots instead of scrolling or rubber-banding the page. */
@media (hover: none) and (pointer: coarse) {
	.home {
		position: fixed;
		inset: 0;
		overflow: hidden;
		overscroll-behavior: none;
		touch-action: none;
	}
}

.hero-content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	text-align: center;
}

.hero-content > .mark {
	width: 80px;
	height: 80px;
	color: var(--fg-high);
}

.hero h1 {
	max-width: 34rem;
	font-size: 24px;
	line-height: 32px;
	font-weight: 500;
	letter-spacing: 0.025em;
	color: var(--fg-mid);
	text-wrap: balance;
}

.hero h1 a {
	color: var(--fg-high);
	transition: color 0.15s ease;
}

.hero h1 a:hover {
	color: var(--accent-text);
}

.icon {
	width: 1em;
	height: 1em;
	margin-right: 6px;
	vertical-align: -0.125em;
}

/* Word-by-word reveal */
@keyframes reveal {
	from {
		opacity: 0;
		transform: translateY(100%);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.reveal {
	display: inline-block;
	animation: reveal 1.3s cubic-bezier(0.19, 1, 0.22, 1) backwards;
	animation-delay: calc(var(--i) * 60ms);
}

/* Halftone dot field */
.halftone {
	position: absolute;
	inset: auto 0 0;
	width: 100%;
	height: 60vh;
	color: var(--logo);
	opacity: var(--dots-opacity);
	pointer-events: none;
}

/* Subpages */
.page {
	flex: 1;
	width: 100%;
	max-width: 896px;
	margin: 0 auto;
	padding: 128px 24px 64px;
}

.page > * {
	animation: rise 0.8s cubic-bezier(0.19, 1, 0.22, 1) backwards;
}

.page > :nth-child(2) {
	animation-delay: 60ms;
}

.page > :nth-child(n + 3) {
	animation-delay: 120ms;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

.page-header {
	margin-bottom: 64px;
}

.page-header h1 {
	font-size: 40px;
	line-height: 1.15;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-bottom: 12px;
}

.lede {
	font-size: 20px;
	line-height: 1.5;
	color: var(--fg-mid);
	text-wrap: pretty;
}

.section + .section {
	margin-top: 56px;
}

.section h2 {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin-bottom: 12px;
}

.section p {
	color: var(--fg-mid);
	line-height: 1.65;
	text-wrap: pretty;
}

.section p + p {
	margin-top: 16px;
}

.prose a {
	color: var(--fg-high);
	text-decoration: underline;
	text-decoration-color: var(--border);
	text-underline-offset: 3px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.prose a:hover {
	color: var(--accent-text);
	text-decoration-color: currentColor;
}

.principles {
	list-style: none;
	display: grid;
	gap: 20px;
}

.principles li {
	padding-left: 20px;
	border-left: 2px solid var(--border);
	color: var(--fg-mid);
	line-height: 1.65;
}

.principles strong {
	display: block;
	color: var(--fg-high);
	font-weight: 600;
}

/* App card */
.app {
	border: 1px solid var(--border);
	border-radius: 20px;
	background: var(--surface);
	overflow: hidden;
}

.app-head {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px;
}

.app-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: #111110;
	color: #ffffff;
}

.app-icon svg {
	width: 26px;
	height: 26px;
}

.app-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.badge {
	padding: 2px 8px;
	border-radius: 9999px;
	border: 1px solid var(--border);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--fg-mid);
}

.app-tagline {
	color: var(--fg-mid);
}

.app-body {
	padding: 0 24px 24px;
	color: var(--fg-mid);
	line-height: 1.65;
}

.app-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-top: 1px solid var(--border);
	font-weight: 500;
	transition: color 0.15s ease;
}

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

.footer {
	width: 100%;
	max-width: 896px;
	margin: 0 auto;
	padding: 32px 24px 48px;
	color: var(--fg-low);
	font-size: 13px;
}

@media (max-width: 480px) {
	.page {
		padding-top: 104px;
	}

	.page-header h1 {
		font-size: 34px;
	}

	.lede {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.reveal,
	.page > * {
		animation: none;
	}
}

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