/* Brand colors are the same as in client/lib/theme.dart */
:root {
	--brand-orange: #E8742B;
	--brand-brown: #3A2A22;
	--brand-cream: #FFF4E6;
	--brand-dark-brown: #241A15;

	--bg: var(--brand-cream);
	--bg-alt: #FBE8D2;
	--surface: #FFFFFF;
	--text: var(--brand-brown);
	--text-muted: #7A6559;
	--border: rgba(58, 42, 34, 0.12);
	--accent: var(--brand-orange);
	--accent-text: #B8541A;
	--shadow: 0 20px 50px -20px rgba(58, 42, 34, 0.35);
	--heatmap-empty: rgba(58, 42, 34, 0.07);

	--radius: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	--font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: var(--brand-dark-brown);
		--bg-alt: #2C211B;
		--surface: #33271F;
		--text: var(--brand-cream);
		--text-muted: #C7B3A3;
		--border: rgba(255, 244, 230, 0.12);
		--accent-text: #F29B62;
		--shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
		--heatmap-empty: rgba(255, 244, 230, 0.06);
		color-scheme: dark;
	}
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font), serif;
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a {
	color: var(--accent-text);
}

h1, h2, h3 {
	font-family: var(--font-display), serif;
	line-height: 1.15;
	margin: 0;
}

/* ---------- Buttons ---------- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8em 1.5em;
	border-radius: 999px;
	background: var(--accent);
	color: #FFFFFF;
	font-weight: 600;
	text-decoration: none;
	border: 2px solid var(--accent);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -10px var(--accent);
}

/* Button that only shows a logo (the svg is used as mask, so it has the text color of the button) */
.button-icon {
	padding-left: 1.1em;
	padding-right: 1.1em;
}

.button-logo {
	width: 1.6em;
	height: 1.6em;
	margin: -0.3em 0;
	background: currentColor;
	-webkit-mask: var(--logo) center / contain no-repeat;
	mask: var(--logo) center / contain no-repeat;
}

.button-ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--border);
}

.button-ghost:hover {
	border-color: var(--text);
	box-shadow: none;
}

.button-small {
	padding: 0.5em 1.1em;
	font-size: 0.9rem;
}

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

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 12px max(16px, calc((100vw - 1180px) / 2));
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	text-decoration: none;
	font-family: var(--font-display), serif;
	font-weight: 700;
	font-size: 1.2rem;
}

.nav-links {
	display: flex;
	gap: 24px;
	margin-left: auto;
}

.nav-links a {
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 500;
}

.nav-links a:hover {
	color: var(--text);
}

.nav-links {
	align-items: center;
}

/* A logo instead of text (uses .button-logo, which has the text color of the link) */
.nav-logo-link {
	display: flex;
	font-size: 1.1rem;
}

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

.hero {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 56px;
	align-items: center;
	max-width: 1180px;
	margin: 0 auto;
	padding: 72px 16px 40px;
}

.eyebrow {
	margin: 0 0 16px;
	color: var(--accent-text);
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

h1 {
	font-size: clamp(2.4rem, 5vw, 3.8rem);
	letter-spacing: -0.02em;
}

.accent {
	background: linear-gradient(90deg, var(--brand-orange), #F2A65A);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.lead {
	margin: 24px 0 32px;
	font-size: 1.15rem;
	color: var(--text-muted);
	max-width: 34em;
}

.cta-row {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
}

.cta-center {
	justify-content: center;
}

/* ---------- Hero demo: plan vs. actual ---------- */

.hero-demo {
	--day-hours: 8;
	--hour-height: 40;
	--block-color: white;
	--title-width: 85;
	--cell-color: white;
	--level: 1;
	--ripple-delay: 0.1s;
	--card-color: white;
}

.demo-window {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.demo-titlebar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 12px 16px;
	background: var(--brand-brown);
	color: var(--brand-cream);
	font-size: 0.85rem;
}

.demo-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 244, 230, 0.25);
}

.demo-title {
	margin-left: 10px;
	font-weight: 600;
}

.demo-legend {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	opacity: 0.85;
}

.legend-planned, .legend-actual {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	margin-left: 8px;
}

.legend-planned {
	border: 1.5px dashed var(--brand-cream);
	opacity: 0.8;
}

.legend-actual {
	background: var(--brand-orange);
}

/* --hour-height and --day-hours are set by homepage.js */
.demo-calendar {
	display: grid;
	grid-template-columns: 40px 1fr;
	/* Room for the label of the last hour, which is centered on the last line */
	padding: 12px 16px 8px 4px;
}

.demo-hours {
	position: relative;
	/* Height of .demo-day-label plus the row gap of .demo-days */
	margin-top: 34px;
	height: calc(var(--day-hours) * var(--hour-height));
	font-size: 0.7rem;
	color: var(--text-muted);
	text-align: right;
}

.demo-hours span {
	position: absolute;
	right: 8px;
	transform: translateY(-50%);
}

.demo-days {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 6px;
}

.demo-day-label {
	height: 28px;
	font-size: 0.8rem;
	font-weight: 600;
	text-align: center;
	color: var(--text-muted);
}

.demo-day-column {
	position: relative;
	height: calc(var(--day-hours) * var(--hour-height));
	/* A line at every full hour, including the end of the day */
	background:
		repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px var(--hour-height));
	box-shadow: inset 0 -1px var(--border);
}

.demo-block {
	position: absolute;
	left: 2px;
	right: 2px;
	border-radius: 6px;
}

.demo-planned {
	border: 1.5px dashed var(--block-color);
	background: color-mix(in srgb, var(--block-color) 14%, transparent);
	opacity: 0;
	transform: scale(0.94);
}

.demo-actual {
	left: 30%;
	right: 6px;
	height: 0;
	background: var(--block-color);
	box-shadow: 0 4px 12px -4px var(--block-color);
}

.demo-actual.running::after {
	/* Glowing "now" edge of the recording that is currently growing */
	content: "";
	position: absolute;
	left: -4px;
	right: -4px;
	bottom: -2px;
	height: 4px;
	border-radius: 2px;
	background: #FFFFFF;
	box-shadow: 0 0 10px 2px var(--block-color);
}

.demo-progress {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 16px 20px 12px;
}

.demo-progress .progress-bar {
	flex: 1;
}

.adherence-value {
	display: block;
	font-family: var(--font-display), serif;
	font-size: 2.2rem;
	font-weight: 800;
	line-height: 1;
	color: var(--accent-text);
	font-variant-numeric: tabular-nums;
}

.adherence-label {
	font-size: 0.8rem;
	font-weight: bold;
	color: var(--text-muted);
}

.progress-bar {
	height: 10px;
	border-radius: 5px;
	background: var(--heatmap-empty);
	overflow: hidden;
}



.adherence-fill {
	width: 0;
	height: 100%;
	border-radius: 5px;
	background: linear-gradient(90deg, var(--brand-orange), #F2A65A);
}

.demo-projects {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 24px;
	padding: 12px 20px 20px;
	border-top: 1px solid var(--border);
}

.demo-project {
	--project-color: var(--brand-orange);
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 10px;
	align-items: center;
	min-width: 0;
}

.demo-project::before {
	content: "";
	grid-row: span 3;
	align-self: start;
	width: 12px;
	height: 12px;
	margin-top: 3px;
	border-radius: 50%;
	background: var(--project-color);
}

.demo-project-name {
	font-size: 0.85rem;
	font-weight: 600;
}

.demo-project-stats {
	font-size: 0.72rem;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.task-progress {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.task-progress .progress-bar {
	flex: 1;
	height: 6px;
}

.task-progress-fill {
	width: 0;
	height: 100%;
	border-radius: 3px;
	background: var(--project-color);
	transition: width 0.4s cubic-bezier(0.2, 1.2, 0.4, 1);
}

.task-progress-label {
	font-size: 0.72rem;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
}

/* Small task items inside a recording of the hero demo. They are revealed as the recording grows */
.mini-tasks {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	/* No vertical padding, so nothing is visible while the recording has not started (height 0) */
	padding: 0 6px;
	overflow: hidden;
	border-radius: inherit;
}

.mini-task:first-child {
	margin-top: 5px;
}

.mini-task {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
	height: 9px;
}

.mini-task-checkbox {
	flex: none;
	width: 8px;
	height: 8px;
	border: 1.5px solid rgba(255, 255, 255, 0.9);
	border-radius: 2px;
}

.mini-task-title {
	width: var(--title-width);
	height: 3px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.7);
	transition: opacity 0.3s ease;
}

.mini-task.done .mini-task-checkbox {
	background: #FFFFFF;
	animation: check-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.mini-task.done .mini-task-title {
	opacity: 0.4;
}

@keyframes check-pop {
	from { transform: scale(1.8); }
	to { transform: scale(1); }
}

/* ---------- Heatmap strip ---------- */

.heatmap-section {
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 16px;
}

.heatmap-caption {
	margin: 0 0 10px;
	text-align: right;
	font-size: 0.8rem;
	color: var(--text-muted);
}

.heatmap-row {
	display: flex;
	gap: 8px;
}

.heatmap-viewport {
	flex: 1;
	min-width: 0;
	/* The newest week is on the right (below the demo), older weeks fade out on the left */
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
	mask-image: linear-gradient(90deg, transparent, #000 30%);
}

.heatmap {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(7, 14px);
	grid-auto-columns: 14px;
	gap: 4px;
	justify-content: end;
	padding: 6px 0;
	will-change: transform;
}

/* Same rows as .heatmap */
.heatmap-weekdays {
	display: grid;
	grid-template-rows: repeat(7, 14px);
	gap: 4px;
	padding: 6px 0;
	font-size: 0.65rem;
	line-height: 14px;
	color: var(--text-muted);
}

.heatmap-cell {
	border-radius: 3px;
	background: var(--heatmap-empty);
}

.heatmap-cell[data-color] {
	background: color-mix(in srgb, var(--cell-color) var(--level), var(--heatmap-empty));
}

/* Cells of the week that is currently shown in the hero demo */
.heatmap-cell.pending {
	background: transparent;
	outline: 1.5px dashed color-mix(in srgb, var(--text-muted) 60%, transparent);
	outline-offset: -1.5px;
}

/* Runs through the heatmap from the newest week to the oldest when a week has landed */
.heatmap.ripple .heatmap-cell {
	animation: heatmap-ripple 0.9s ease-out var(--ripple-delay) both;
}

@keyframes heatmap-ripple {
	0%, 100% { transform: scale(1); filter: brightness(1); }
	30% { transform: scale(1.3); filter: brightness(1.35); }
}

/* A day that just landed (more specific than the ripple, which may still be running) */
.heatmap .heatmap-cell.landed {
	animation: cell-land 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes cell-land {
	from { transform: scale(1.8); filter: brightness(1.4); }
	to { transform: scale(1); filter: brightness(1); }
}

/* A day of the hero demo flying into the heatmap */
.flying-dot {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 15;
	border-radius: 3px;
	background: var(--cell-color);
	box-shadow: 0 0 14px 2px color-mix(in srgb, var(--cell-color) 60%, transparent);
	pointer-events: none;
	will-change: transform;
	visibility: hidden;
}

/* ---------- Your day at a glance (home screen of the app) ---------- */

.day-section {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 72px;
	align-items: center;
}

.day-text {
	order: 2;
}

.day-text h2,
.day-text .section-lead {
	text-align: left;
	margin-left: 0;
}

.day-text .section-lead {
	margin-bottom: 28px;
}

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

.day-points li {
	position: relative;
	padding: 8px 0 8px 32px;
	color: var(--text-muted);
}

.day-points li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--accent);
	font-weight: 800;
}

.day-points strong {
	color: var(--text);
}

/* The phone mockup. --day-* sizes are set by homepage.js */
.phone {
	--now-color: #D93025;
	width: 300px;
	padding: 10px;
	border-radius: 42px;
	background: var(--brand-brown);
	box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.phone-screen {
	overflow: hidden;
	border-radius: 32px;
	background: var(--bg);
}

.phone-appbar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 28px 12px 8px;
	background: var(--brand-brown);
	color: var(--brand-cream);
}

.phone-title {
	align-self: flex-start;
	font-size: 1.05rem;
	font-weight: 600;
}

.phone-summary {
	font-size: 0.7rem;
	color: rgba(255, 244, 230, 0.7);
	font-variant-numeric: tabular-nums;
}

.phone-summary strong {
	color: var(--brand-cream);
}

.phone-body {
	position: relative;
	height: 500px;
	overflow: hidden;
}

.day-content {
	position: absolute;
	inset: 0 0 auto;
	will-change: transform;
}

.day-hour-line {
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--border);
}

.day-spine {
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - 1px);
	width: 2px;
	background: color-mix(in srgb, var(--text-muted) 35%, transparent);
}

.day-half-tick {
	position: absolute;
	left: calc(50% - 6px);
	width: 12px;
	height: 1px;
	background: color-mix(in srgb, var(--text-muted) 45%, transparent);
}

.day-hour-badge {
	position: absolute;
	left: calc(50% - 21px);
	width: 42px;
	height: 18px;
	border-radius: 9px;
	border: 1px solid var(--border);
	background: var(--surface);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	font-size: 0.6rem;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
	color: var(--text-muted);
	transform: translateY(-50%);
}

/* Like EventCardTile of the app */
.day-card {
	position: absolute;
	overflow: hidden;
	padding: 2px 5px;
	border-radius: 6px;
	background: color-mix(in srgb, var(--card-color) 90%, transparent);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	color: #FFFFFF;
	font-size: 0.62rem;
	line-height: 1.25;
}

.day-card-plan {
	left: 6px;
	right: calc(50% + 26px);
}

.day-card-recording {
	left: calc(50% + 26px);
	right: 6px;
}

.day-card-title {
	display: flex;
	align-items: center;
	gap: 3px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.day-card.compact .day-card-description {
	display: none;
}

.day-card-description {
	opacity: 0.85;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Red dot of a running recording */
.day-card.running .day-card-title::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #FF5252;
	border: 1px solid rgba(255, 255, 255, 0.8)
}

.day-now {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg,
		color-mix(in srgb, var(--now-color) 10%, transparent), var(--now-color), var(--now-color),
		color-mix(in srgb, var(--now-color) 10%, transparent));
	box-shadow: 0 1px 4px color-mix(in srgb, var(--now-color) 35%, transparent);
}

.day-now-badge {
	position: absolute;
	top: -11px;
	left: calc(50% - 25px);
	width: 50px;
	height: 22px;
	border: 2px solid #FFFFFF;
	border-radius: 11px;
	background: var(--now-color);
	box-shadow: 0 0 6px 1px color-mix(in srgb, var(--now-color) 50%, transparent);
	color: #FFFFFF;
	font-size: 0.62rem;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Recording controls below the current time, like in the app */
.day-controls {
	--project-color: var(--brand-orange);
	position: absolute;
	left: calc(50% - 40px);
	right: 0;
	padding: 6px;
	border: 1.5px solid var(--border);
	border-right: none;
	border-radius: 16px 0 0 16px;
	background: color-mix(in srgb, var(--surface) 88%, transparent);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.day-controls-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.day-button {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 68px;
	height: 68px;
	border-radius: 12px;
	background: var(--project-color);
	transition: background 0.3s ease;
}

.day-button.tapped {
	animation: day-tap 0.45s ease-out;
}

/* Ripple of a tap on the button */
.day-button.tapped::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	animation: day-ripple 0.6s ease-out;
}

@keyframes day-tap {
	30% { transform: scale(0.88); }
}

@keyframes day-ripple {
	from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--project-color) 70%, transparent); }
	to { box-shadow: 0 0 0 16px transparent; }
}

/* Play triangle, or stop square while recording */
.day-button-icon {
	width: 0;
	height: 0;
	margin-left: 5px;
	border-style: solid;
	border-width: 13px 0 13px 22px;
	border-color: transparent transparent transparent #FFFFFF;
}

.day-controls.recording .day-button-icon {
	width: 22px;
	height: 22px;
	margin-left: 0;
	border: none;
	border-radius: 3px;
	background: #FFFFFF;
}

.day-fields {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	font-size: 0.68rem;
}

.day-project {
	overflow: hidden;
	padding-bottom: 3px;
	border-bottom: 1px solid var(--border);
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.day-project::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 5px;
	border-radius: 50%;
	background: var(--project-color);
}

.day-description {
	padding-bottom: 3px;
	border-bottom: 1px solid var(--border);
	color: var(--text-muted);
}

.day-duration {
	display: none;
	width: 68px;
	margin-top: 2px;
	border-radius: 10px;
	background: var(--project-color);
	color: #FFFFFF;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.day-controls.recording .day-duration {
	display: block;
}

.day-tasks {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.66rem;
}

.day-task {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 2px 0;
}

.day-task-checkbox {
	display: grid;
	flex: none;
	place-items: center;
	width: 12px;
	height: 12px;
	line-height: 9px;
	border: 1.5px solid var(--project-color);
	border-radius: 3px;
	color: transparent;
	font-size: 0.55rem;
	font-weight: 900;
}

.day-task.done {
	color: var(--text-muted);
}

.day-task.done .day-task-title {
	text-decoration: line-through;
}

.day-task.done .day-task-checkbox {
	background: var(--project-color);
	color: #FFFFFF;
	animation: check-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}

.day-fade {
	transition: opacity 0.5s ease;
}

/* ---------- Sections ---------- */

.section {
	max-width: 1180px;
	margin: 0 auto;
	padding: 96px 16px;
}
main > section:nth-child(even) {
	max-width: none;
	background: var(--bg-alt);
	padding-left: max(16px, calc((100vw - 1180px) / 2));
	padding-right: max(16px, calc((100vw - 1180px) / 2));
}

.section-alt {
	max-width: none;
	background: var(--bg-alt);
	padding-left: max(16px, calc((100vw - 1180px) / 2));
	padding-right: max(16px, calc((100vw - 1180px) / 2));
}

h2 {
	font-size: clamp(1.9rem, 3.5vw, 2.6rem);
	text-align: center;
	letter-spacing: -0.01em;
}

.section-lead {
	max-width: 40em;
	margin: 16px auto 56px;
	text-align: center;
	color: var(--text-muted);
	font-size: 1.1rem;
}

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

.feature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

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

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

.feature-icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-bottom: 16px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--brand-orange) 15%, transparent);
	font-size: 1.5rem;
}

.feature h3 {
	font-size: 1.2rem;
	margin-bottom: 8px;
}

.feature p {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.97rem;
}

.badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--accent);
	color: #FFFFFF;
	font-family: var(--font), serif;
	font-size: 0.7rem;
	font-weight: 700;
	vertical-align: middle;
}

/* ---------- Use it now (platforms) ---------- */

.platform-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}

.platform {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 24px 16px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	text-align: center;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.platform:hover {
	transform: translateY(-4px);
	border-color: var(--accent);
	box-shadow: var(--shadow);
}

.platform-icon {
	font-size: 2rem;
	line-height: 1.2;
}

/* Monochrome logo in the text color (the svg is only used as mask, so it follows the theme) */
.platform-logo {
	width: 40px;
	height: 40px;
	margin-bottom: 4px;
	background: var(--text);
	-webkit-mask: var(--logo) center / contain no-repeat;
	mask: var(--logo) center / contain no-repeat;
	transition: background 0.2s ease;
}

.platform:hover .platform-logo {
	background: var(--accent);
}

.platform-name {
	font-family: var(--font-display), serif;
	font-size: 1.15rem;
	font-weight: 700;
}

.platform-caption {
	font-size: 0.85rem;
	color: var(--text-muted);
}

/* The web version comes first and spans the whole row, as it can be used right away */
.platform-web {
	grid-column: 1 / -1;
	flex-direction: row;
	gap: 20px;
	padding: 28px 32px;
	text-align: left;
	border: 2px solid var(--accent);
	background:
		linear-gradient(120deg, color-mix(in srgb, var(--brand-orange) 14%, var(--surface)), var(--surface) 60%);
}

.platform-web .platform-logo {
	flex: none;
	width: 48px;
	height: 48px;
	margin-bottom: 0;
}

.platform-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
}

.platform-web .platform-name {
	font-size: 1.5rem;
}

.platform-web .platform-caption {
	font-size: 1rem;
}

.platform-cta {
	flex: none;
	padding: 0.7em 1.4em;
	border-radius: 999px;
	background: var(--accent);
	color: #FFFFFF;
	font-weight: 600;
}

/* ---------- Sync ---------- */

.steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin: 0 0 48px;
	padding: 0;
	list-style: none;
}

.step {
	position: relative;
	padding: 28px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
}

.step-number {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: var(--brand-brown);
	color: var(--brand-cream);
	font-weight: 700;
}

.step h3 {
	font-size: 1.15rem;
}

.step p {
	color: var(--text-muted);
	font-size: 0.95rem;
}

.code-display {
	display: flex;
	gap: 6px;
	font-family: var(--font-mono), serif;
	font-size: 1.4rem;
	font-weight: 700;
}

.code-display span {
	display: grid;
	place-items: center;
	width: 34px;
	height: 44px;
	border-radius: 8px;
	background: var(--bg);
	border: 1px solid var(--border);
	animation: code-type 4s ease infinite;
}

.code-display span:nth-child(4) {
	background: transparent;
	border: none;
	width: 12px;
}

.code-display span:nth-child(1) { animation-delay: 0s; }
.code-display span:nth-child(2) { animation-delay: 0.15s; }
.code-display span:nth-child(3) { animation-delay: 0.3s; }
.code-display span:nth-child(5) { animation-delay: 0.45s; }
.code-display span:nth-child(6) { animation-delay: 0.6s; }
.code-display span:nth-child(7) { animation-delay: 0.75s; }

@keyframes code-type {
	0%, 5% { color: transparent; }
	10%, 100% { color: var(--text); }
}

.allow-display {
	display: flex;
	height: 44px;
	align-items: center;
}

.pulse-button {
	padding: 8px 24px;
	border-radius: 999px;
	background: var(--accent);
	color: #FFFFFF;
	font-weight: 700;
	animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-orange) 60%, transparent); }
	100% { box-shadow: 0 0 0 16px transparent; }
}

.devices-display {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	font-size: 1.8rem;
}

.flow {
	position: relative;
	flex: 0 1 120px;
	height: 4px;
	border-radius: 2px;
	background:
		repeating-linear-gradient(90deg, var(--brand-orange) 0 8px, transparent 8px 16px);
	background-size: 32px 4px;
	animation: flow 0.8s linear infinite;
}

@keyframes flow {
	from { background-position: 0 0; }
	to { background-position: 32px 0; }
}

.hosting {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 20px;
}

.hosting-option {
	/* Lets the terminal scroll instead of widening the card */
	min-width: 0;
	padding: 28px;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--surface);
}

.hosting-option h3 {
	font-size: 1.2rem;
}

.hosting-option p {
	color: var(--text-muted);
}

.terminal {
	margin: 0;
	padding: 16px 20px;
	border-radius: 12px;
	background: #1B1410;
	color: #F4E3D0;
	font-family: var(--font-mono), serif;
	font-size: 0.85rem;
	line-height: 1.8;
	overflow-x: auto;
}

.prompt {
	color: var(--brand-orange);
	user-select: none;
}

/* ---------- Pricing ---------- */

.pricing-grid {
	display: grid;
	/* The free part takes most of the space, as it is most of the app */
	grid-template-columns: 2fr 1fr;
	gap: 32px;
	align-items: start;
}

.plan {
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
}

.plan-free {
	padding: 36px;
	border: 2px solid var(--accent);
	box-shadow: var(--shadow);
}

.plan-free h3 {
	font-size: 1.7rem;
}

.plan-tagline {
	margin: 8px 0 24px;
	color: var(--text-muted);
}

.plan-list-columns {
	columns: 2;
	column-gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.plan-list-columns li {
	position: relative;
	padding: 6px 0 6px 28px;
	break-inside: avoid;
}

.plan-list-columns li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--accent);
	font-weight: 800;
}

.support h3 {
	font-size: 1.15rem;
}

.support-text {
	margin: 8px 0 16px;
	color: var(--text-muted);
	font-size: 0.95rem;
}

.plan-extra {
	padding: 18px 20px;
	margin-bottom: 12px;
	background: transparent;
	border-style: dashed;
}

.plan-extra h4 {
	margin: 0 0 4px;
	font-family: var(--font-display), serif;
	font-size: 1rem;
}

.plan-extra p, .plan-extra ul {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.9rem;
}
.plan-extra ul {
	padding-left: 10px;
}

.fine-print {
	max-width: 46em;
	margin: 40px auto 0;
	text-align: center;
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* ---------- Open source & footer ---------- */

.open-source {
	text-align: center;
}

.tech {
	margin-top: 32px;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.footer {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 24px max(16px, calc((100vw - 1180px) / 2));
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 0.9rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
	.hero {
		grid-template-columns: 1fr;
		padding-top: 48px;
	}

	.feature-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.day-section {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: 40px;
	}

	.day-text {
		order: 0;
	}

	.platform-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.steps,
	.hosting,
	.pricing-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}
	
	.nav-links, .demo-legend, .demo-projects, .mini-task {
		display: none;
	}
	
	.nav {
		gap: 12px;
	}

	.nav .button-small {
		margin-left: auto;
	}

	.platform-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.platform-web {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px;
	}

	/* The last of the five store cards would be alone in its row */
	.platform:last-child {
		grid-column: 1 / -1;
	}

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

	.plan-free {
		padding: 28px 24px;
	}

	.plan-list-columns {
		columns: 1;
	}

	.section {
		padding: 64px 16px;
	}

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

	.heatmap {
		grid-template-rows: repeat(7, 10px);
		grid-auto-columns: 10px;
		gap: 3px;
	}

	.heatmap-weekdays {
		grid-template-rows: repeat(7, 10px);
		gap: 3px;
		font-size: 0.55rem;
		line-height: 10px;
	}

	.footer {
		flex-direction: column;
	}
}

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

	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
