/* Nunito, the app's own font (a variable font: every weight from 200 to 1000). */
@font-face {
	font-family: "Nunito";
	src: url("fonts/Nunito/Nunito.ttf?v=bb55a5ca5c") format("truetype");
	font-weight: 200 1000;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: light;
	--bg: #fcf7ed;
	--text: #26211a;
	--muted: #6d6457;
	--line: #e8dcc8;
	--card: #fffdf7;
	--accent: #f2a93b;
	--accent-hover: #f7b957;
	--accent-text: #9a5508;
	--accent-ink: #2a2016;
	--accent-soft: rgba(242, 169, 59, 0.18);
	--accent-line: rgba(154, 85, 8, 0.32);
	--hand-right: #c9650c;
	--hand-left: #7140c4;
	--glow: rgba(242, 169, 59, 0.16);
	--header-bg: rgba(252, 247, 237, 0.88);
	--bar-track: rgba(38, 33, 26, 0.09);
	--footer-bg: #a8501f;
	--footer-text: #fff6ea;
	--footer-muted: #fbe7d3;
	--footer-border: rgba(255, 246, 234, 0.4);
	--footer-hover: rgba(255, 246, 234, 0.14);
	--shadow-card: 0 10px 26px rgba(74, 55, 28, 0.1);
	--shadow-image: 0 14px 22px rgba(74, 55, 28, 0.18);
	--shadow-soft: 0 12px 18px rgba(74, 55, 28, 0.14);
	--shadow-frame:
		0 2px 3px rgba(74, 55, 28, 0.12), 0 24px 60px rgba(74, 55, 28, 0.16);
	--shadow-number: 0 6px 14px rgba(74, 55, 28, 0.22);
	--shadow-icon: 0 14px 30px rgba(74, 55, 28, 0.18);
	--font:
		"Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
		Arial, sans-serif;
}

/* The original dark theme, in the game's colours. */
[data-theme="dark"] {
	color-scheme: dark;
	--bg: #121418;
	--text: #f2efe9;
	--muted: #a3a8b3;
	--line: #2c313b;
	--card: #1b1e25;
	--accent: #ffd166;
	--accent-hover: #ffdc8a;
	--accent-text: #ffd166;
	--accent-ink: #16181d;
	--accent-soft: rgba(255, 209, 102, 0.1);
	--accent-line: rgba(255, 209, 102, 0.45);
	--hand-right: #ff9f43;
	--hand-left: #b07cff;
	--glow: rgba(255, 159, 67, 0.12);
	--header-bg: rgba(18, 20, 24, 0.9);
	--bar-track: rgba(255, 255, 255, 0.08);
	--footer-bg: #0b0c0f;
	--footer-text: #f6efe4;
	--footer-muted: #b9ad9f;
	--footer-border: rgba(246, 239, 228, 0.28);
	--footer-hover: rgba(246, 239, 228, 0.08);
	--shadow-card: 0 10px 26px rgba(0, 0, 0, 0.25);
	--shadow-image: 0 14px 22px rgba(0, 0, 0, 0.5);
	--shadow-soft: 0 12px 18px rgba(0, 0, 0, 0.45);
	--shadow-frame:
		0 2px 3px rgba(0, 0, 0, 0.3), 0 24px 60px rgba(0, 0, 0, 0.45);
	--shadow-number: 0 6px 14px rgba(0, 0, 0, 0.4);
	--shadow-icon: 0 14px 30px rgba(0, 0, 0, 0.45);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 76px;
	/* Clip sideways overflow on the root. An overflow container on body can
	   stop the sticky header from sticking in some browsers. */
	overflow-x: clip;
}

body {
	margin: 0;
	background:
		radial-gradient(
			640px 320px at 50% -120px,
			var(--glow),
			transparent 70%
		),
		var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
}

a {
	color: inherit;
}

.sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* Lucide is drawn on a 24px grid. The app strokes it at 1.5 screen pixels:
   2 in the 24-unit viewBox at 18px, 1.5 at 24px. */
.icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.125em;
}

.icon.icon-fill {
	fill: currentColor;
	stroke: none;
}

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

/* Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	border-bottom: 1px solid var(--line);
	background: var(--header-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 12px;
	padding-bottom: 12px;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

/* Flips between the light and the dark theme; the icon shows what you get. */
.theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--card);
	color: var(--muted);
	cursor: pointer;
	transition:
		color 0.18s ease,
		background 0.18s ease,
		border-color 0.18s ease;
}

.theme-toggle:hover {
	border-color: var(--accent-line);
	background: var(--accent-soft);
	color: var(--text);
}

.theme-toggle .icon {
	width: 18px;
	height: 18px;
}

.theme-toggle .icon-sun {
	display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
	display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
	display: inline-block;
}

.app-name {
	font-weight: 800;
	letter-spacing: -0.02em;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 23px;
	line-height: 1;
	text-decoration: none;
}

.brand img {
	width: 30px;
	height: 30px;
	border-radius: 8px;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
}

.site-nav a {
	color: var(--muted);
	font-size: 16px;
	white-space: nowrap;
	text-decoration: none;
}

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

/* Hero */

.hero {
	position: relative;
	padding: 52px 0 56px;
	text-align: center;
}

/* Every button lifts on hover, like the sticker on lukaskrepel.nl. The
   individual translate/rotate/scale properties stack on top of any resting
   tilt an element already has in transform. */
.button,
.store-badge {
	transition:
		translate 0.2s cubic-bezier(0.5, 1.5, 0.5, 1),
		rotate 0.2s cubic-bezier(0.5, 1.5, 0.5, 1),
		scale 0.2s cubic-bezier(0.5, 1.5, 0.5, 1),
		background 0.18s ease;
}

.button:hover,
.button:focus-visible,
.store-badge:hover,
.store-badge:focus-visible {
	translate: 0 -4px;
	rotate: -2deg;
	scale: 1.03;
}

.hero-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin: 0 0 12px;
	font-size: clamp(52px, 7.2vw, 78px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1;
}

.hero-title img {
	width: 88px;
	height: 88px;
	border-radius: 22px;
	filter: drop-shadow(var(--shadow-soft));
}

.subtitle {
	max-width: 860px;
	margin: 0 auto;
	color: var(--muted);
	font-size: clamp(19px, 2.4vw, 24px);
	line-height: 1.6;
}

/* Sections */

.section {
	padding: 56px 0;
	border-top: 1px solid var(--line);
}

.section h2 {
	margin: 0 0 10px;
	font-size: clamp(29px, 3.5vw, 38px);
	font-weight: 750;
	line-height: 1.1;
}

.section-lead {
	max-width: 620px;
	margin: 0 0 26px;
	color: var(--muted);
	font-size: 16px;
}

/* App screenshots: the shared three-up fan (site-tooling README), as on
   clubbaboo.com and lukaskrepel.nl, a little larger so the menu reads well. */
.app-screens {
	width: min(760px, 100% - 48px);
	margin: 34px auto 0;
}

.app-screenshots {
	position: relative;
	margin: 0 auto;
}

.app-shot {
	--tilt: 0deg;
	position: relative;
	display: block;
	width: auto;
	max-width: 65%;
	height: auto;
	filter: drop-shadow(var(--shadow-image));
	transform: rotate(var(--tilt));
	transition: transform 0.3s ease;
}

.app-shot:first-child {
	--tilt: -5deg;
	z-index: 1;
}

.app-shot:nth-child(2) {
	--tilt: 6deg;
	max-width: 60%;
	margin-left: auto;
	margin-top: -180px;
	z-index: 2;
}

/* A fourth screen (the library), lower left: its song details and import show
   beside the menu. */
.app-shot-library {
	--tilt: 4deg;
	max-width: 56%;
	margin: -110px 0 0 -2%;
	z-index: 3;
}

/* The menu in front, a little to the right so the library shows on its left. */
.app-shot-wide {
	--tilt: -2deg;
	max-width: 72%;
	margin: -250px 0 0 auto;
	z-index: 4;
}

/* The caption tells about the screen under the pointer (the menu otherwise). All
   four sit in the same grid cell, so the caption keeps the height of the longest. */
.app-captions {
	display: grid;
}

.app-captions span {
	grid-area: 1 / 1;
	visibility: hidden;
}

/* Hover, or tap on a phone (the screens are focusable for that, and for the keyboard). */
.app-captions .cap-menu,
.app-screens:has(.app-shot:nth-child(1):is(:hover, :focus)) .cap-sheet,
.app-screens:has(.app-shot:nth-child(2):is(:hover, :focus)) .cap-falling,
.app-screens:has(.app-shot-library:is(:hover, :focus)) .cap-library {
	visibility: visible;
}

.app-screens:has(.app-shot:not(.app-shot-wide):is(:hover, :focus)) .cap-menu {
	visibility: hidden;
}

.app-shot:focus {
	z-index: 10;
	outline: none;
	transform: rotate(0deg) scale(1.05);
}

.app-shot:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
	border-radius: 24px;
}

/* The help screen under the FAQ. */
.faq-help {
	max-width: 500px;
	margin: 40px 0 0;
}

.faq-help img {
	width: 100%;
	height: auto;
	filter: drop-shadow(var(--shadow-soft));
	transform: rotate(-1.5deg);
}

.faq-help figcaption {
	margin-top: 14px;
	color: var(--muted);
	font-size: 14.5px;
}

.app-shot:hover {
	z-index: 10;
	transform: rotate(0deg) scale(1.05);
}

.app-screens .hero-caption {
	margin-top: 22px;
}

@media (max-width: 720px) {
	.app-screens {
		width: calc(100% - 36px);
	}

	.app-shot:nth-child(2) {
		margin-top: -22%;
	}

	.app-shot-library {
		margin-top: -14%;
	}

	.app-shot-wide {
		margin-top: -34%;
	}
}

/* Promises under the store buttons */
.promises {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 12px;
	margin: 14px 0 24px;
	padding: 0;
	list-style: none;
}

/* The promise pills stay dark in both themes, like the app's falling-notes
   stage. */
.promises li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px 7px 11px;
	border: 1px solid #2c313b;
	border-radius: 999px;
	background: #1b1e25;
	color: #f2efe9;
	font-size: 15px;
	font-weight: 650;
}

.promises li:nth-child(1) { transform: rotate(-1.2deg); }
.promises li:nth-child(2) { transform: rotate(0.9deg) translateY(2px); }
.promises li:nth-child(3) { transform: rotate(-0.6deg); }

.promises .icon {
	color: #ffd166;
	font-size: 19px;
	stroke-width: 2;
}

/* Songs card: your own songs first */
.songs-own {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 10px;
	margin: -4px 0 18px;
	padding: 12px 14px;
	border: 1px solid var(--accent-line);
	border-radius: 12px;
	background: var(--accent-soft);
	transform: rotate(-0.6deg);
}

.songs-own .icon {
	color: var(--accent-text);
	font-size: 26px;
	stroke-width: 1.75;
}

.feature-list-group .songs-own .feature-name {
	display: block;
}

.feature-list-group .songs-own .feature-desc {
	display: block;
	margin-top: 2px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.4;
}

/* Learn step by step */
.learn-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.learn-steps li {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--card);
	box-shadow: var(--shadow-card);
}

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

/* The step number: a sticker on the card's corner, each one put on a bit askew. */
.learn-number {
	position: absolute;
	top: -13px;
	left: -11px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: var(--shadow-number);
	color: var(--accent-ink);
	font-size: 19px;
	font-weight: 800;
	transform: rotate(-2.5deg);
}

.learn-steps li:nth-child(even) .learn-number {
	transform: rotate(2deg);
}

.learn-head {
	min-height: 26px;
	justify-content: flex-end;
}

.learn-icons {
	display: flex;
	gap: 2px;
	color: var(--accent-text);
	font-size: 24px;
	stroke-width: 1.5;
}

.learn-steps h3 {
	margin: 0 0 6px;
	font-size: 18px;
	font-weight: 750;
	line-height: 1.2;
}

.learn-steps p {
	margin: 0;
	color: var(--muted);
	font-size: 14.5px;
	line-height: 1.45;
}

.bar-strip {
	display: grid;
	grid-template-columns: repeat(16, minmax(0, 1fr));
	gap: 3px;
	margin-top: auto;
	padding-top: 16px;
}

.bar-strip span {
	height: 14px;
	border-radius: 3px;
	background: var(--bar-track);
}

.bar-strip .is-r {
	background: var(--hand-right);
}

.bar-strip .is-l {
	background: var(--hand-left);
}

.bar-strip .is-b {
	background: linear-gradient(var(--hand-right) 50%, var(--hand-left) 50%);
}

.learn-steps p.bar-strip-label {
	margin-top: 7px;
	font-size: 12.5px;
}

/* Like the feature cards: laid down loosely, each a little turned and set a few
   pixels up or down, lying over the one before it. */
@media (min-width: 821px) {
	.learn-steps {
		gap: 26px 6px;
		align-items: start;
	}

	.learn-steps li {
		margin: 0 -4px;
		transform-origin: 50% 0;
	}

	.learn-steps li:nth-child(1) { z-index: 1; transform: translateY(6px) rotate(-0.6deg); }
	.learn-steps li:nth-child(2) { z-index: 2; transform: rotate(0.5deg); }
	.learn-steps li:nth-child(3) { z-index: 3; transform: translateY(10px) rotate(-0.35deg); }
	.learn-steps li:nth-child(4) { z-index: 4; transform: translateY(2px) rotate(0.55deg); }
	.learn-steps li:nth-child(5) { z-index: 5; transform: translateY(4px) rotate(0.45deg); }
	.learn-steps li:nth-child(6) { z-index: 6; transform: translateY(12px) rotate(-0.5deg); }
	.learn-steps li:nth-child(7) { z-index: 7; transform: rotate(0.3deg); }
	.learn-steps li:nth-child(8) { z-index: 8; transform: translateY(8px) rotate(-0.55deg); }
}

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

@media (max-width: 560px) {
	.learn-steps {
		grid-template-columns: 1fr;
	}
}

/* Features */

.feature-lists {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
	margin-top: 28px;
}

.feature-list-group {
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--card);
	box-shadow: var(--shadow-card);
}

.feature-list-group h3 {
	margin: 0 0 16px;
	font-size: 25px;
	font-weight: 750;
	line-height: 1.1;
}

.feature-list-intro {
	margin: -6px 0 16px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.45;
}

.feature-list {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--line);
	list-style: none;
}

.feature-list li {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	gap: 9px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
}

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

.feature-list .icon {
	margin-top: 0;
	color: var(--accent-text);
	font-size: 24px;
	stroke-width: 1.5;
}

.feature-list .icon-stack {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 0;
	color: var(--accent-text);
	font-size: 24px;
}

.feature-list .icon-stack .icon {
	margin-top: 0;
}

.feature-list li.is-plain {
	grid-template-columns: 1fr;
}

.feature-name {
	font-weight: 650;
	display: block;
	font-size: 16px;
	line-height: 1.25;
}

.feature-shortcut {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: 6px;
	color: var(--muted);
	font-size: 12px;
	white-space: nowrap;
	vertical-align: 1px;
}

.key-combo {
	display: inline-flex;
	gap: 2px;
}

.feature-shortcut kbd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 21px;
	height: 21px;
	padding: 0 5px;
	border: 1px solid var(--line);
	border-bottom-width: 2px;
	border-radius: 5px;
	background: var(--bg);
	color: var(--text);
	font-family: inherit;
	font-size: 12px;
	line-height: 1;
}

/* Modifier keys as icons, a little larger than the letters so their thin
   strokes hold up inside the slightly turned feature cards. */
.feature-shortcut .key-mod {
	padding: 0 4px;
}

.feature-shortcut .key-mod .icon {
	color: inherit;
	font-size: 13px;
	stroke-width: 1.75;
}

.feature-desc {
	display: block;
	margin-top: 1px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.4;
}

/* Licenses page */

.licenses-page h1 {
	margin: 0 0 28px;
	font-size: 44px;
	font-weight: 750;
	line-height: 1.1;
}

.license-block {
	margin-bottom: 40px;
}

.license-block h2 {
	margin: 0 0 8px;
	font-size: 28px;
	font-weight: 750;
}

.license-block .section-lead {
	margin-bottom: 14px;
}

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

.license-block summary {
	cursor: pointer;
	color: var(--accent-text);
	font-size: 15px;
}

.license-text {
	overflow-x: auto;
	max-width: 100%;
	margin: 12px 0 0;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--card);
	color: var(--text);
	font-size: 12px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.faq-box {
	max-width: 800px;
	text-align: left;
}

.faq-item {
	padding: 18px 0;
}

.faq-item + .faq-item {
	border-top: 1px solid var(--line);
}

.faq-item dt {
	font-weight: 650;
	font-size: 17px;
	line-height: 1.3;
}

.faq-item dd {
	max-width: 64ch;
	margin: 7px 0 0;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.55;
}

/* Footer */

.site-footer {
	padding: 24px 0;
	background: var(--footer-bg);
	color: var(--footer-text);
}

.button {
	font-weight: 650;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 16px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
}

.button .icon {
	font-size: 18px;
}

.button-primary {
	background: var(--accent);
	color: var(--accent-ink);
}

.button-primary:hover {
	background: var(--accent-hover);
}

.button-secondary {
	border-color: var(--footer-border);
	color: var(--footer-text);
}

.button-secondary:hover {
	background: var(--footer-hover);
}

.footer-contact {
	margin: 0 0 12px;
	color: var(--footer-muted);
	font-size: 14px;
}

.footer-contact a {
	color: var(--footer-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.footer-contact a:hover {
	color: #ffffff;
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.footer-bottom p {
	margin: 0;
	color: var(--footer-muted);
	font-size: 14px;
}

.footer-bottom a {
	color: inherit;
	text-decoration: none;
}

.footer-bottom a:hover {
	color: var(--footer-text);
}

.footer-bottom .arrow {
	display: none;
}

.analytics-badge {
	flex: none;
}

.analytics-badge img {
	display: block;
	width: 140px;
	height: auto;
}

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

@media (max-width: 820px) {
	.feature-lists {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}

@media (max-width: 720px) {
	.header-inner {
		gap: 16px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.site-nav {
		flex-wrap: nowrap;
		gap: 16px;
	}

	.header-actions {
		gap: 12px;
	}

	.theme-toggle {
		width: 34px;
		height: 34px;
	}

	.hero {
		padding-top: 40px;
	}

	.hero-title {
		gap: 14px;
		font-size: 50px;
	}

	.hero-title img {
		width: 64px;
		height: 64px;
		border-radius: 16px;
	}

	.section {
		padding: 42px 0;
	}

	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 560px) {
	/* Only the sides: the shorthand would wipe the header's vertical padding. */
	.wrap {
		padding-right: 18px;
		padding-left: 18px;
	}

}

@media (max-width: 560px) {
	/* Only the icon beside the menu: the hero names the app just below. */
	.brand .app-name {
		display: none;
	}
}

@media (max-width: 400px) {
	.header-inner,
	.site-nav {
		gap: 12px;
	}

	.header-actions {
		gap: 8px;
	}

	.theme-toggle {
		width: 30px;
		height: 30px;
	}

	.site-nav a {
		font-size: 14px;
	}
}

@media (min-width: 821px) {
	/* Tools and Dockable Windows on either side, Workflow and Pipeline
	   stacked in the middle; each card only as tall as its list. */
	.feature-lists {
		grid-template-rows: auto auto;
		gap: 4px 0;
		align-items: start;
	}

	/* The cards overlap a little, like sheets laid side by side; less than
	   their padding, so no text is covered. */
	.feature-list-group {
		margin: 0 -8px;
		/* Turned around the middle of the top edge, and set a few pixels up or
		   down in turn: a loose row, without drifting one way. */
		transform-origin: 50% 0;
	}

	.feature-list-group:nth-child(1) {
		grid-column: 1;
		grid-row: 1 / span 2;
		transform: translateY(6px) rotate(-0.5deg);
	}

	.feature-list-group:nth-child(2) {
		grid-column: 2;
		grid-row: 1;
		transform: rotate(0.4deg);
	}

	.feature-list-group:nth-child(3) {
		grid-column: 2;
		grid-row: 2;
		transform: rotate(-0.3deg);
	}

	.feature-list-group:nth-child(4) {
		grid-column: 3;
		grid-row: 1 / span 2;
		transform: translateY(9px) rotate(-0.45deg);
	}
}

@media (min-width: 1280px) {
	/* Wide enough for four cards in a row: the lists reach past the page's
	   width, centered on it. Tools, Dockable Windows, Workflow, Pipeline. */
	.feature-lists {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		grid-template-rows: auto;
		width: min(1240px, 100vw - 48px);
		margin-left: calc(50% - min(620px, 50vw - 24px));
	}

	.feature-list-group:nth-child(n) {
		grid-row: 1;
	}

	/* Each card lies over the one to its left, so the icons along its left
	   edge stay in view. */
	.feature-list-group:nth-child(1) {
		z-index: 1;
		transform: translateY(6px) rotate(-0.5deg);
	}

	.feature-list-group:nth-child(2) {
		grid-column: 3;
		z-index: 3;
		transform: translateY(9px) rotate(-0.4deg);
	}

	.feature-list-group:nth-child(3) {
		grid-column: 4;
		z-index: 4;
		transform: translateY(3px) rotate(0.35deg);
	}

	.feature-list-group:nth-child(4) {
		grid-column: 2;
		z-index: 2;
		transform: rotate(0.45deg);
	}
}

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

		.button,
		.store-badge,
		.store-badges[data-coming-soon] .store-badge::after {
		transition: none;
	}
}

/* Hero stage: falling notes above a keyboard, drawn by scripts/build.py from
   source/hero.mid. */

/* The hero previews the app: the stage, keys and lines are fixed in both
   themes; only the notes and hands take colours. */
.hero-stage {
	--stage-bg: #16181d;
	--stage-bar: rgba(255, 255, 255, 0.14);
	--stage-guide: rgba(255, 255, 255, 0.06);
	--stage-line: #8a8b8e;
	--key-white: #f7f1e1;
	--key-black: #16181d;
	--chip-sheet-bg: #1c1c1c;
	--chip-fall-bg: rgba(255, 255, 255, 0.12);
	--chip-text: #f6f1e4;
	width: min(1100px, 100% - 48px);
	margin: 44px auto 0;
}

.hero-frame {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: var(--stage-bg);
	box-shadow: var(--shadow-frame);
	transform: rotate(-0.4deg);
}

.hero-piano {
	display: block;
	width: 100%;
	height: auto;
}

.hero-piano .hero-field {
	fill: var(--stage-bg);
}

.hero-piano .hero-bar {
	stroke: var(--stage-bar);
	stroke-width: 2;
}

.hero-piano .hero-key-label {
	fill: rgba(0, 0, 0, 0.35);
	font-family: inherit;
	font-weight: 650;
}

.hero-piano .hero-split line {
	stroke: var(--stage-bg);
	stroke-width: 4;
}

.hero-piano .hero-split .hero-split-shadow {
	stroke: rgba(0, 0, 0, 0.28);
	stroke-width: 16;
}

.hero-piano .hero-label text {
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 750;
}

.hero-piano .hero-label-sheet rect {
	fill: var(--chip-sheet-bg);
}

.hero-piano .hero-label-sheet text {
	fill: var(--chip-text);
}

.hero-piano .hero-label-fall rect {
	fill: var(--chip-fall-bg);
}

.hero-piano .hero-label-fall text {
	fill: var(--chip-text);
}

.hero-piano .hero-guide {
	stroke: var(--stage-guide);
	stroke-width: 1;
}

.hero-piano .hero-line {
	fill: var(--stage-line);
}

.hero-piano .hero-white {
	fill: var(--key-white);
}

.hero-piano .hero-black {
	fill: var(--key-black);
}

.hero-piano .hero-lit {
	opacity: 0;
	animation-duration: var(--loop);
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.hero-piano .hero-notes {
	animation: hero-fall var(--loop) linear infinite;
	will-change: transform;
}

.hero-piano .hero-sheet {
	animation: hero-scroll var(--loop) linear infinite;
	will-change: transform;
}

.hero-piano .hero-ink {
	/* Match the sheet ink so a reset at the loop point never flashes the
	   inherited page colour. */
	color: #1c1c1c;
	animation-duration: var(--loop);
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.hero-caption {
	margin-top: 14px;
	color: var(--muted);
	font-size: 14px;
}

/* Piano keys next to a feature name. */

.key-or {
	color: var(--muted);
}

/* The song list is long: one line per song, composer beside the title. */

.feature-list-group.is-songs .feature-list li {
	padding: 6px 0;
}

.feature-list-group.is-songs .feature-list .feature-name,
.feature-list-group.is-songs .feature-list .feature-desc {
	display: inline;
}

.feature-list-group.is-songs .feature-list .feature-desc {
	margin-left: 6px;
}

/* The song list scrolls inside its card and fades out at the bottom, so the card
   is about as tall as the others. Room at the end lets the last song scroll
   clear of the fade. */
.feature-list-group.is-songs .feature-list {
	max-height: 430px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-bottom: 56px;
	scrollbar-width: thin;
	scrollbar-color: var(--line) transparent;
	-webkit-mask-image: linear-gradient(#000 calc(100% - 80px), transparent);
	mask-image: linear-gradient(#000 calc(100% - 80px), transparent);
}

/* Licenses page: song credits */

.song-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--card);
}

.song-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-align: left;
}

.song-table th,
.song-table td {
	padding: 9px 14px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.song-table th {
	color: var(--muted);
	font-weight: 750;
}

.song-table tr:last-child td {
	border-bottom: 0;
}

.song-table a {
	text-decoration: none;
}

.song-table a:hover {
	text-decoration: underline;
}

.song-opus {
	color: var(--muted);
}

.faq-item dd a {
	color: var(--accent-text);
}

@media (max-width: 720px) {
	.hero-stage {
		width: calc(100% - 36px);
		margin-top: 32px;
	}

	.hero-frame {
		border-radius: 12px;
		transform: none;
	}
}

@media (min-width: 1280px) {
	/* Practise, piano controls, connect, songs: in the order they are written. */
	.feature-list-group:nth-child(2) {
		grid-column: 2;
		z-index: 2;
	}

	.feature-list-group:nth-child(3) {
		grid-column: 3;
		z-index: 3;
	}

	.feature-list-group:nth-child(4) {
		grid-column: 4;
		z-index: 4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-piano .hero-notes,
	.hero-piano .hero-sheet,
	.hero-piano .hero-ink,
	.hero-piano .hero-lit {
		animation-play-state: paused;
	}
}

/* Store badges: Apple's and Google's official artwork, at the same height. */

.store-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 28px;
}

.store-badge {
	display: block;
	border-radius: 9px;
}

.store-badge img {
	display: block;
	width: auto;
	height: 52px;
}

.store-badges-large .store-badge img {
	height: 60px;
}

/* Coming soon: a small tooltip on hover or focus until the app is live. */

.store-badges[data-coming-soon] .store-badge {
	position: relative;
}

.store-badges[data-coming-soon] .store-badge::after {
	content: "Coming soon";
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	z-index: 10;
	padding: 6px 10px;
	border-radius: 8px;
	background: var(--accent);
	color: var(--accent-ink);
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, -4px);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.store-badges[data-coming-soon] .store-badge:hover::after,
.store-badges[data-coming-soon] .store-badge:focus::after,
.store-badges[data-coming-soon] .store-badge:focus-visible::after {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* Get the app */

.get-box {
	text-align: center;
}

.get-icon {
	display: block;
	width: 96px;
	height: 96px;
	margin: 0 auto 18px;
	border-radius: 22px;
	box-shadow: var(--shadow-icon);
}

.get-lead {
	max-width: 560px;
	margin: 0 auto;
	color: var(--muted);
}

/* Difficulty legend above the song list: the app's note icons, easy to hard. */

.feature-list-group.is-songs .feature-list .icon {
	font-size: 20px;
}

.feature-list-group.is-songs .feature-list li {
	grid-template-columns: 20px minmax(0, 1fr);
	align-items: center;
}

/* Light layout: the app's colours. Edit static/colors.css for the palette;
the tints, hairlines and darker icon colours below are derived from it. */
html:not([data-theme="dark"]) {
	--bg: var(--paper);
	--text: var(--ink);
	--card: color-mix(in srgb, var(--paper) 25%, white);
	--line: color-mix(in srgb, var(--ink) 10%, var(--paper));
	--muted: color-mix(in srgb, var(--ink) 67%, var(--paper));
	--accent: var(--gold);
	--accent-hover: color-mix(in srgb, var(--gold) 82%, white);
	--accent-text: color-mix(in srgb, var(--gold) 45%, var(--ink));
	--accent-ink: var(--ink);
	--accent-soft: color-mix(in srgb, var(--gold) 22%, transparent);
	--accent-line: color-mix(in srgb, var(--gold) 55%, var(--ink));
	--hand-right: color-mix(in srgb, var(--orange) 75%, var(--ink));
	--footer-bg: var(--footer);
	--footer-text: var(--paper);
	--footer-muted: color-mix(in srgb, var(--paper) 78%, var(--green));
	--footer-border: color-mix(in srgb, var(--paper) 36%, transparent);
	--footer-hover: color-mix(in srgb, var(--paper) 12%, transparent);
}

html:not([data-theme="dark"]) body {
	background:
		radial-gradient(
			760px 380px at 16% -140px,
			color-mix(in srgb, var(--orange) 45%, transparent),
			transparent 70%
		),
		radial-gradient(
			760px 380px at 84% -140px,
			color-mix(in srgb, var(--blue) 40%, transparent),
			transparent 70%
		),
		var(--bg);
}

/* The top bar stays dark in both themes, like the app's falling-notes view.
   Scope the dark-theme header tokens so its links, brand and toggle keep their
   contrast on the light page. */
html:not([data-theme="dark"]) .site-header {
	--line: #2c313b;
	--card: #1b1e25;
	--text: #f2efe9;
	--muted: #a3a8b3;
	--accent-text: #ffd166;
	--accent-soft: rgba(255, 209, 102, 0.1);
	--accent-line: rgba(255, 209, 102, 0.45);
	--header-bg: rgba(18, 20, 24, 0.9);
	color: #f2efe9;
}

/* The hero and the get band carry the app icon, so they are dark in both
   themes; scope the dark-theme tokens so their text keeps its contrast. */
html:not([data-theme="dark"]) .hero,
html:not([data-theme="dark"]) #get {
	background: #121418;
	--text: #f2efe9;
	--muted: #a3a8b3;
	--line: #2c313b;
	--card: #1b1e25;
	--accent-text: #ffd166;
	--accent-soft: rgba(255, 209, 102, 0.1);
	--accent-line: rgba(255, 209, 102, 0.45);
	--shadow-frame:
		0 2px 3px rgba(0, 0, 0, 0.3), 0 24px 60px rgba(0, 0, 0, 0.45);
	color: #f2efe9;
}

/* Section bands, so the page is not one flat sheet. The cream sections
   (menu, features) take an orange heading; the green bands (learn, faq) a
   deeper green of their own, which their links and rules share. */
html:not([data-theme="dark"]) #menu h2,
html:not([data-theme="dark"]) #features h2 {
	color: color-mix(in srgb, var(--orange) 70%, var(--ink));
}

html:not([data-theme="dark"]) #learn,
html:not([data-theme="dark"]) #faq {
	border-top-color: var(--green);
	background: color-mix(in srgb, var(--green) 60%, var(--paper));
	--green-ink: color-mix(in srgb, var(--green) 70%, var(--ink));
	--muted: color-mix(in srgb, var(--ink) 80%, var(--green));
}

html:not([data-theme="dark"]) #learn h2,
html:not([data-theme="dark"]) #faq h2,
html:not([data-theme="dark"]) #learn a,
html:not([data-theme="dark"]) #faq a {
	color: var(--green-ink);
}

html:not([data-theme="dark"]) #faq .faq-item + .faq-item {
	border-top-color: var(--green-ink);
}

/* The step numbers and icons take the section green in the light theme. */
html:not([data-theme="dark"]) .learn-number {
	background: var(--green);
}

html:not([data-theme="dark"]) .learn-icons {
	color: var(--green-ink);
}

/* The feature cards are dark in both themes, like the app's screens; scope
   the dark-theme tokens so their text, keys and icons keep their contrast. */
html:not([data-theme="dark"]) .feature-list-group {
	--bg: #121418;
	--text: #f2efe9;
	--muted: #a3a8b3;
	--line: #2c313b;
	--card: #1b1e25;
	--accent-text: #ffd166;
	--accent-soft: rgba(255, 209, 102, 0.1);
	--accent-line: rgba(255, 209, 102, 0.45);
	color: #f2efe9;
}

/* Footer: deep green, cream text, gold links. */
html:not([data-theme="dark"]) .site-footer {
	background:
		radial-gradient(
			600px 220px at 12% 0%,
			color-mix(in srgb, var(--green) 30%, transparent),
			transparent 70%
		),
		var(--footer-bg);
}

html:not([data-theme="dark"]) .footer-contact a:hover,
html:not([data-theme="dark"]) .footer-bottom a:hover {
	color: var(--gold);
}
