:root {
	--canvas: #faf9f7;
	--surface: #ffffff;
	--sunken: #f1efeb;
	--line: #e6e3de;
	--ink: #1c1a17;
	--muted: #6f6a63;
	--faint: #b9b4ad;
	--accent: #4b55d6;
	--accent-2: #7a88ec;
	--accent-soft: #eceefe;
	--p1: #d9483b;
	--warn: #b7791f;
	--shadow: 0 1px 2px rgb(28 26 23 / 0.04), 0 12px 32px -12px rgb(28 26 23 / 0.18);
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--canvas: #141311;
		--surface: #1c1b19;
		--sunken: #252421;
		--line: #2f2d2a;
		--ink: #f1efec;
		--muted: #a7a19a;
		--faint: #5f5a54;
		--accent: #8f9ff6;
		--accent-2: #a6b4f6;
		--accent-soft: #262a4d;
		--p1: #ef7a6e;
		--warn: #e2b05a;
		--shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -12px rgb(0 0 0 / 0.6);
	}
}

* {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--canvas);
	color: var(--ink);
	font-family:
		'Inter',
		ui-sans-serif,
		system-ui,
		-apple-system,
		'Segoe UI',
		'Apple SD Gothic Neo',
		sans-serif;
	font-feature-settings: 'cv11', 'ss01';
	-webkit-font-smoothing: antialiased;
	line-height: 1.5;
}

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

img {
	display: block;
}

/* --- Navigation ------------------------------------------------------------------------- */

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1120px;
	margin: 0 auto;
	padding: 16px 24px;
	background: color-mix(in srgb, var(--canvas) 82%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

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

.nav nav {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: 14px;
}

.link {
	color: var(--muted);
	transition: color 0.15s;
}

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

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 22px;
	border-radius: 14px;
	background: var(--ink);
	color: var(--canvas);
	font-weight: 600;
	font-size: 15px;
	transition:
		transform 0.15s,
		box-shadow 0.15s;
	box-shadow: 0 6px 20px -8px rgb(28 26 23 / 0.5);
}

.button:hover {
	transform: translateY(-1px);
}

.button.small {
	height: 36px;
	padding: 0 14px;
	border-radius: 10px;
	font-size: 14px;
	box-shadow: none;
}

.button.ghost {
	background: transparent;
	color: var(--ink);
	box-shadow: inset 0 0 0 1px var(--line);
}

/* --- Hero ------------------------------------------------------------------------------- */

.hero {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	align-items: center;
	gap: 48px;
	max-width: 1120px;
	margin: 0 auto;
	padding: 72px 24px 96px;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
}

.eyebrow .dot,
.clock-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	animation: pulse 2s infinite;
}

h1 {
	margin: 0;
	font-size: clamp(44px, 7vw, 76px);
	line-height: 1;
	letter-spacing: -0.045em;
	font-weight: 700;
}

h1 br + * {
	display: inline;
}

.lede {
	max-width: 30em;
	margin: 24px 0 0;
	color: var(--muted);
	font-size: clamp(17px, 1.6vw, 19px);
}

.cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.fineprint {
	margin: 16px 0 0;
	color: var(--faint);
	font-size: 13px;
}

/* --- The day deck ----------------------------------------------------------------------- */

.stage {
	position: relative;
	height: 470px;
	/* The deck never spills into the sections below, whatever happens to the loop. */
	overflow: clip;
	overflow-clip-margin: 24px;
}

.stage::before {
	content: '';
	position: absolute;
	inset: 8% 4% 0 10%;
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		color-mix(in srgb, var(--accent) 22%, transparent),
		transparent
	);
	filter: blur(24px);
}

.clock {
	position: absolute;
	top: 0;
	right: 6%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--surface);
	box-shadow: var(--shadow);
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--ink);
	transition:
		background 0.3s,
		color 0.3s;
}

.clock .clock-dot {
	color: var(--accent);
}

.clock.midnight {
	background: var(--accent);
	color: #fff;
}

.clock.midnight .clock-dot {
	color: #fff;
}

.deck {
	position: absolute;
	inset: 44px 0 0;
	transition: opacity 0.5s;
}

.deck.fading {
	opacity: 0;
}

.day {
	position: absolute;
	top: 0;
	left: 50%;
	width: min(360px, 88%);
	padding: 20px 18px 18px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: var(--surface);
	box-shadow: var(--shadow);
	transform-origin: 50% 100%;
	transition:
		transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
		opacity 0.9s,
		filter 0.9s;
}

.day[data-pos='0'] {
	z-index: 3;
	transform: translateX(-46%) rotate(1.5deg);
}

.day[data-pos='1'] {
	z-index: 2;
	transform: translateX(-62%) translateY(14px) rotate(-5deg) scale(0.95);
	filter: saturate(0.6);
}

.day[data-pos='2'] {
	z-index: 1;
	transform: translateX(-74%) translateY(26px) rotate(-10deg) scale(0.9);
	filter: saturate(0.4);
	opacity: 0.8;
}

.day[data-pos='3'] {
	z-index: 0;
	transform: translateX(-84%) translateY(36px) rotate(-14deg) scale(0.86);
	opacity: 0;
}

.day[data-pos='new'] {
	z-index: 4;
	transform: translateX(10%) translateY(-12px) rotate(8deg);
	opacity: 0;
}

.day-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 12px;
}

.day-label {
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
}

.day-title {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.03em;
}

.stamp {
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--sunken);
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	opacity: 0;
	transform: scale(1.3);
	transition:
		opacity 0.4s 0.4s,
		transform 0.4s 0.4s;
}

.day[data-pos='1'] .stamp,
.day[data-pos='2'] .stamp,
.day[data-pos='3'] .stamp {
	opacity: 1;
	transform: scale(1);
}

.bar {
	height: 4px;
	margin-bottom: 10px;
	border-radius: 4px;
	background: var(--sunken);
	overflow: hidden;
}

.bar span {
	display: block;
	height: 100%;
	border-radius: 4px;
	background: var(--accent);
	transition: width 0.6s;
}

.tasks {
	margin: 0;
	padding: 0;
	list-style: none;
}

.task {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 9px 4px;
	animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.check {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border: 1.5px solid var(--faint);
	border-radius: 50%;
	transition:
		background 0.25s,
		border-color 0.25s;
}

.task.p1 .check {
	border-color: var(--p1);
	background: color-mix(in srgb, var(--p1) 12%, transparent);
}

.task.done .check {
	border-color: var(--accent);
	background: var(--accent);
}

.task.done .check::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 1.8px 1.8px 0;
	transform: rotate(45deg);
}

.task-body {
	min-width: 0;
	font-size: 15px;
}

.task.done .task-title {
	color: var(--muted);
	text-decoration: line-through;
	text-decoration-color: var(--faint);
}

.tag {
	display: block;
	margin-top: 2px;
	color: var(--muted);
	font-size: 12px;
}

.tag.rolled {
	color: var(--accent);
}

.tag.due {
	color: var(--warn);
}

/* --- Features --------------------------------------------------------------------------- */

.how {
	max-width: 1120px;
	margin: 0 auto;
	padding: 72px 24px;
	border-top: 1px solid var(--line);
}

h2 {
	margin: 0;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.1;
	letter-spacing: -0.035em;
	font-weight: 700;
}

.section-lede {
	max-width: 34em;
	margin: 16px 0 0;
	color: var(--muted);
	font-size: 17px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 48px;
}

.card-feature {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--surface);
	transition:
		transform 0.2s,
		box-shadow 0.2s;
}

.card-feature:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}

.card-feature .icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--accent-soft);
	color: var(--accent);
}

.card-feature .icon svg {
	width: 22px;
	height: 22px;
}

.card-feature h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 18px 0 6px;
	font-size: 17px;
	letter-spacing: -0.01em;
}

.card-feature p {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

.badge {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--sunken);
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
}

/* --- Closing ---------------------------------------------------------------------------- */

.closing {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 1120px;
	margin: 0 auto;
	padding: 96px 24px 112px;
	text-align: center;
}

.closing img {
	margin-bottom: 28px;
	filter: drop-shadow(0 16px 32px color-mix(in srgb, var(--accent) 35%, transparent));
	animation: float 6s ease-in-out infinite;
}

.closing .section-lede {
	margin-bottom: 32px;
}

.footer {
	display: flex;
	justify-content: space-between;
	max-width: 1120px;
	margin: 0 auto;
	padding: 24px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 13px;
}

/* --- Motion ----------------------------------------------------------------------------- */

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

@keyframes pulse {
	50% {
		opacity: 0.35;
	}
}

@keyframes float {
	50% {
		transform: translateY(-8px) rotate(2deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

/* --- Small screens ---------------------------------------------------------------------- */

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 40px 20px 64px;
	}

	.stage {
		height: 430px;
	}

	.grid {
		grid-template-columns: 1fr;
	}

	.nav {
		padding: 12px 20px;
	}

	.nav .link[href='#how'] {
		display: none;
	}

	.how,
	.closing {
		padding-left: 20px;
		padding-right: 20px;
	}
}

@media (min-width: 861px) and (max-width: 1040px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
