/* ==========================================================================
   Piano Practice — landing page
   Palette derives from the instrument: aged key ivory, warm lacquer ebony,
   damper-felt crimson, hardware brass.
   ========================================================================== */

/* ---------- Tokens: light (default) ---------- */
:root {
	--ivory:        #F2EDE3;
	--ivory-raise:  #FBF8F2;
	--ivory-sink:   #E7E0D2;
	--ebony:        #16120F;
	--ebony-soft:   #241E1A;
	--ebony-line:   #372F29;
	/* Constant in both themes: the instrument's own black. Keys are keys. */
	--lacquer:      #16120F;
	--lacquer-2:    #2C2521;
	--felt:         #A8322C;
	--felt-bright:  #C4443C;
	--brass:        #9C7734;
	--brass-bright: #B08D4F;

	--ink:          #16120F;
	--ink-muted:    #6B615A;
	--ink-faint:    #9A8F85;
	--rule:         rgba(22, 18, 15, 0.14);
	--rule-soft:    rgba(22, 18, 15, 0.07);

	--surface:      var(--ivory);
	--surface-2:    var(--ivory-raise);
	--surface-3:    var(--ivory-sink);

	/* The device is lacquer black in both themes — it is an object, not a surface. */
	--device:       #16120F;
	--device-2:     #221C18;
	--device-line:  rgba(176, 141, 79, 0.30);
	--device-ink:   #EFE7D8;
	--device-muted: #8E8074;

	--shadow-lift:  0 1px 2px rgba(22,18,15,.05), 0 8px 24px -12px rgba(22,18,15,.22);
	--shadow-slab:  0 2px 4px rgba(22,18,15,.10), 0 24px 50px -20px rgba(22,18,15,.45), 0 60px 100px -60px rgba(22,18,15,.35);

	--font-display: "Bodoni Moda", "Noto Music", "Didot", Georgia, "Times New Roman", serif;
	--font-body:    "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

	--measure: 62ch;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--maxw: 1160px;
	--ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ivory:        #E9E1D2;
		--ivory-raise:  #1D1815;
		--ivory-sink:   #131010;
		--ebony:        #241D19;
		--felt:         #D3554C;
		--felt-bright:  #E4685E;
		--brass:        #C2A063;
		--brass-bright: #D8B87C;

		--ink:          #EDE5D6;
		--ink-muted:    #A2968A;
		--ink-faint:    #6E645C;
		--rule:         rgba(237, 229, 214, 0.16);
		--rule-soft:    rgba(237, 229, 214, 0.08);

		--surface:      #100D0B;
		--surface-2:    #191411;
		--surface-3:    #221C18;

		--device:       #1B1613;
		--device-2:     #2A2320;
		--device-line:  rgba(216, 184, 124, 0.26);
		--device-ink:   #F3ECDE;
		--device-muted: #9A8C7E;

		--shadow-lift:  0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
		--shadow-slab:  0 2px 4px rgba(0,0,0,.5), 0 24px 50px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(216,184,124,.06);
	}
}

:root[data-theme="dark"] {
	--ivory:        #E9E1D2;
	--ivory-raise:  #1D1815;
	--ivory-sink:   #131010;
	--ebony:        #241D19;
	--felt:         #D3554C;
	--felt-bright:  #E4685E;
	--brass:        #C2A063;
	--brass-bright: #D8B87C;

	--ink:          #EDE5D6;
	--ink-muted:    #A2968A;
	--ink-faint:    #6E645C;
	--rule:         rgba(237, 229, 214, 0.16);
	--rule-soft:    rgba(237, 229, 214, 0.08);

	--surface:      #100D0B;
	--surface-2:    #191411;
	--surface-3:    #221C18;

	--device:       #1B1613;
	--device-2:     #2A2320;
	--device-line:  rgba(216, 184, 124, 0.26);
	--device-ink:   #F3ECDE;
	--device-muted: #9A8C7E;

	--shadow-lift:  0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
	--shadow-slab:  0 2px 4px rgba(0,0,0,.5), 0 24px 50px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(216,184,124,.06);
}

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

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

/* Anchored sections land below the sticky header, not under it. */
:target, .section, .hero, .cta, [id] { scroll-margin-top: 96px; }

body {
	margin: 0;
	background: var(--surface);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	font-synthesis-weight: none;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 500; }

p { margin: 0; }

::selection { background: var(--felt); color: #FBF8F2; }

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

.wrap {
	width: 100%;
	max-width: var(--maxw);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 200;
	background: var(--ebony);
	color: #FBF8F2;
	padding: .75rem 1.25rem;
	font-size: .8125rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Shared type patterns ---------- */
.eyebrow {
	font-family: var(--font-body);
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--brass);
	display: flex;
	align-items: center;
	gap: .75rem;
	margin: 0;
}
.eyebrow::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(to right, var(--rule), transparent);
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { display: none; }
.eyebrow--center::before {
	content: "";
	width: 28px; height: 1px; background: var(--brass); opacity: .55;
}

.h2 {
	font-family: var(--font-display);
	font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	font-weight: 500;
}
.h3 {
	font-family: var(--font-display);
	font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem);
	line-height: 1.15;
	font-weight: 600;
}
.lede {
	font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem);
	line-height: 1.62;
	color: var(--ink-muted);
	max-width: var(--measure);
}
.body-text { color: var(--ink-muted); max-width: var(--measure); }
.body-text + .body-text { margin-top: 1rem; }
.body-text strong { color: var(--ink); font-weight: 600; }

.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section-head { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* Musical accidentals come from Noto Music, whose glyphs sit differently to the
   display face: the sharp straddles the baseline by .24em, the flat by .05em.
   Each is nudged back onto the letter's baseline so a name reads as one word. */
.acc {
	font-family: "Noto Music", var(--font-display);
	font-weight: 400;
	margin-left: -.02em;
	margin-right: -.02em;
}
/* Sized so both accidentals land at the same optical height beside the letter. */
.acc-s { font-size: .86em; vertical-align: .21em; }
.acc-f { font-size: .96em; vertical-align: .05em; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55rem;
	font-family: var(--font-body);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	text-decoration: none;
	padding: .95rem 1.6rem;
	border: 1px solid transparent;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color .25s var(--ease), color .25s var(--ease),
	            border-color .25s var(--ease), transform .25s var(--ease);
}
.btn--primary { background: var(--ebony); color: #FBF8F2; border-color: var(--ebony); }
.btn--primary:hover { background: var(--felt); border-color: var(--felt); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn .whatsapp-icon { width: 1.1em; height: 1.1em; flex: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--surface) 94%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(1.4);
	backdrop-filter: blur(14px) saturate(1.4);
	border-bottom: 1px solid var(--rule-soft);
	transition: border-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--rule); }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	height: 72px;
}

.brand {
	display: flex;
	align-items: center;
	gap: .7rem;
	text-decoration: none;
	flex-shrink: 0;
}
.brand-mark {
	width: 26px; height: 30px;
	flex-shrink: 0;
	border-radius: 1px 1px 3px 3px;
	background: var(--ebony);
	position: relative;
	overflow: hidden;
	box-shadow: inset 0 -6px 10px -6px rgba(255,255,255,.35);
}
.brand-mark::after {
	content: "";
	position: absolute;
	left: 50%; top: 0;
	width: 9px; height: 62%;
	transform: translateX(-50%);
	background: var(--brass-bright);
	border-radius: 0 0 2px 2px;
}
.brand-name {
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ink);
	white-space: nowrap;
}
.brand-name em { font-style: italic; font-weight: 400; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav a {
	font-size: .8125rem;
	font-weight: 500;
	letter-spacing: .04em;
	text-decoration: none;
	color: var(--ink-muted);
	position: relative;
	padding-block: .35rem;
	transition: color .2s var(--ease);
	white-space: nowrap;
}
.site-nav a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: var(--felt);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .75rem; }

.theme-toggle {
	width: 36px; height: 36px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: 2px;
	color: var(--ink-muted);
	cursor: pointer;
	transition: border-color .2s var(--ease), color .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.btn--header { padding: .7rem 1.15rem; font-size: .75rem; }

@media (max-width: 900px) { .site-nav { display: none; } }
@media (max-width: 560px) { .btn--header { display: none; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	padding-top: clamp(3rem, 7vw, 5.5rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
	overflow: hidden;
}
.hero::before {
	/* warm stage light pooling behind the instrument */
	content: "";
	position: absolute;
	left: 50%; top: -18%;
	width: min(1100px, 130vw);
	aspect-ratio: 1.6;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center,
		color-mix(in srgb, var(--brass) 16%, transparent) 0%,
		transparent 68%);
	pointer-events: none;
	z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1.5rem;
	max-width: 820px;
	margin-inline: auto;
	margin-bottom: clamp(2.75rem, 5vw, 4rem);
}

.hero-tag {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ink-muted);
	border: 1px solid var(--rule);
	border-radius: 100px;
	padding: .4rem 1rem .4rem .75rem;
}
.hero-tag .dot {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--felt);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--felt) 22%, transparent);
}

.hero h1 {
	font-family: var(--font-display);
	font-size: clamp(2.75rem, 1.4rem + 5.6vw, 5.25rem);
	line-height: 0.99;
	letter-spacing: -0.025em;
	font-weight: 500;
}
.hero h1 em {
	font-style: italic;
	font-weight: 400;
	color: var(--felt);
}

.hero-sub { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.6; color: var(--ink-muted); max-width: 54ch; }

/* ---------- The device ---------- */
.device {
	position: relative;
	max-width: 780px;
	margin-inline: auto;
	background: linear-gradient(168deg, var(--device-2) 0%, var(--device) 55%, #0D0A09 100%);
	border-radius: 4px;
	box-shadow: var(--shadow-slab);
	padding: 4px;
	isolation: isolate;
}
.device::after {
	/* brass inlay line, the way a fallboard is edged */
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px solid var(--device-line);
	border-radius: 2px;
	pointer-events: none;
	z-index: 3;
}
.device-inner {
	position: relative;
	border-radius: 2px;
	padding: clamp(1.25rem, 3vw, 1.75rem);
	display: flex;
	flex-direction: column;
	gap: clamp(1rem, 2.5vw, 1.5rem);
	min-height: 420px;
	overflow: hidden;
}
.device-inner::before {
	/* lacquer sheen */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, rgba(255,255,255,.055) 0%, transparent 38%, transparent 62%, rgba(255,255,255,.025) 100%);
	pointer-events: none;
}

/* Device top bar */
.device-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	position: relative;
	z-index: 2;
	flex-wrap: wrap;
}

.tempo {
	display: inline-flex;
	background: rgba(0,0,0,.34);
	border: 1px solid rgba(255,255,255,.07);
	border-radius: 2px;
	padding: 3px;
	gap: 2px;
}
.tempo button {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 1px;
	color: var(--device-muted);
	font-family: var(--font-body);
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .13em;
	text-transform: uppercase;
	padding: .5rem .85rem;
	cursor: pointer;
	transition: color .2s var(--ease), background-color .2s var(--ease);
}
.tempo button:hover { color: var(--device-ink); }
.tempo button[aria-pressed="true"] {
	background: var(--brass);
	color: #14100D;
}

.device-readout {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	font-family: var(--font-mono);
	font-size: .6875rem;
	letter-spacing: .08em;
	color: var(--device-muted);
	font-variant-numeric: tabular-nums;
}
.device-readout span b {
	color: var(--device-ink);
	font-weight: 500;
	margin-left: .4rem;
}
.status-led {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	text-transform: uppercase;
}
.status-led::before {
	content: "";
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--device-muted);
	transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.device.is-live .status-led::before {
	background: var(--felt-bright);
	box-shadow: 0 0 8px var(--felt-bright);
	animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .45; } }

/* Device display */
.device-display {
	flex: 1;
	display: grid;
	place-items: center;
	position: relative;
	z-index: 2;
	min-height: 190px;
	text-align: center;
}
.display-stack { display: flex; flex-direction: column; align-items: center; gap: .35rem; }

.note-big {
	font-family: var(--font-display);
	font-size: clamp(4.5rem, 3rem + 8vw, 8.5rem);
	line-height: 1;
	font-weight: 500;
	color: var(--device-ink);
	letter-spacing: -0.02em;
	text-shadow: 0 0 46px color-mix(in srgb, var(--brass-bright) 32%, transparent);
	display: block;
	min-height: 1em;
}
.note-big.is-idle { color: var(--device-muted); opacity: .3; text-shadow: none; }
.idle-glyph { font-family: "Noto Music", var(--font-display); font-size: .8em; }

.note-spoken {
	font-family: var(--font-body);
	white-space: nowrap;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .34em;
	text-transform: uppercase;
	color: var(--brass-bright);
	min-height: 1.2em;
}
.note-twin {
	font-family: var(--font-mono);
	white-space: nowrap;
	font-size: .6875rem;
	letter-spacing: .06em;
	color: var(--device-muted);
	min-height: 1.2em;
}

/* note entrance */
.note-anim { animation: note-in .42s var(--ease) both; }
@keyframes note-in {
	0%   { opacity: 0; transform: scale(.86); filter: blur(6px); }
	60%  { opacity: 1; filter: blur(0); }
	100% { opacity: 1; transform: scale(1); }
}

/* Waveform */
.wave {
	position: relative;
	z-index: 2;
	height: 52px;
	width: 100%;
	display: block;
	opacity: .85;
}

/* Device footer */
.device-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	position: relative;
	z-index: 2;
}

.transport {
	width: 68px; height: 68px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(0,0,0,.4);
	border: 1px solid var(--device-line);
	color: var(--device-ink);
	cursor: pointer;
	transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
	padding: 0;
	margin-inline: auto;
}
.transport svg { width: 34px; height: 34px; fill: currentColor; }
.transport:hover {
	border-color: var(--brass-bright);
	box-shadow: 0 0 0 6px color-mix(in srgb, var(--brass) 12%, transparent);
	transform: scale(1.05);
}
.device.is-live .transport { background: var(--felt); border-color: var(--felt-bright); color: #FBF8F2; }

.history {
	display: flex;
	align-items: center;
	gap: .4rem;
	flex: 1 1 0;
	min-height: 26px;
}
.history-chip {
	font-family: var(--font-display);
	font-size: .9375rem;
	color: var(--device-muted);
	background: rgba(255,255,255,.05);
	border-radius: 2px;
	padding: .15rem .45rem;
	animation: chip-in .3s var(--ease) both;
}
.history-chip:first-child { color: var(--brass-bright); background: rgba(176,141,79,.14); }
@keyframes chip-in { from { opacity: 0; transform: translateX(-6px); } }

.hint {
	font-family: var(--font-mono);
	font-size: .625rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--device-muted);
	text-align: right;
	flex: 1 1 0;
}
.hint kbd {
	font-family: inherit;
	border: 1px solid var(--device-line);
	border-radius: 2px;
	padding: .1rem .35rem;
	color: var(--device-ink);
}
@media (max-width: 620px) {
	.hint { display: none; }
	.device-foot { flex-direction: column; gap: 1.1rem; }
	.history { flex: 0 0 auto; justify-content: center; }
}

/* ---------- Keyboard ---------- */
.keyboard-shell {
	max-width: 780px;
	margin: clamp(1.5rem, 3vw, 2.25rem) auto 0;
	display: flex;
	flex-direction: column;
	gap: .85rem;
}
.keyboard {
	position: relative;
	height: clamp(96px, 15vw, 136px);
	display: flex;
	border-radius: 0 0 4px 4px;
	background: var(--lacquer);
	padding: 0 0 0 0;
	box-shadow: var(--shadow-lift);
	overflow: hidden;
	user-select: none;
}
.wkey {
	position: relative;
	flex: 1 1 0;
	background: linear-gradient(to bottom, #FDFBF6 0%, #F3EEE2 78%, #E2DACA 100%);
	border-right: 1px solid rgba(22,18,15,.16);
	border-radius: 0 0 3px 3px;
	transition: background .18s var(--ease);
}
.wkey:last-child { border-right: 0; }
.bkey {
	position: absolute;
	top: 0;
	height: 62%;
	background: linear-gradient(to bottom, #2C2521 0%, #16120F 72%, #241D18 100%);
	border-radius: 0 0 3px 3px;
	box-shadow: 0 3px 5px rgba(0,0,0,.5), inset 0 -3px 4px -2px rgba(255,255,255,.22);
	transition: background .18s var(--ease), box-shadow .3s var(--ease);
	z-index: 2;
}
.bkey.is-lit {
	background: linear-gradient(to bottom, var(--felt-bright) 0%, #8E241F 100%);
	box-shadow: 0 0 22px color-mix(in srgb, var(--felt-bright) 65%, transparent),
	            0 3px 5px rgba(0,0,0,.5),
	            inset 0 -3px 4px -2px rgba(255,255,255,.3);
}
.keyboard-caption {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	font-family: var(--font-mono);
	font-size: .6875rem;
	letter-spacing: .06em;
	color: var(--ink-faint);
}

@media (max-width: 620px) {
	.keyboard-caption { flex-direction: column; gap: .3rem; }
}

/* ---------- Key-band divider ---------- */
.keyband {
	height: 22px;
	background-color: #FBF8F2;
	background-image:
		repeating-linear-gradient(to right,
			transparent 0 13px, var(--lacquer) 13px 25px,
			transparent 25px 35px, var(--lacquer) 35px 47px,
			transparent 47px 72px, var(--lacquer) 72px 84px,
			transparent 84px 94px, var(--lacquer) 94px 106px,
			transparent 106px 116px, var(--lacquer) 116px 128px,
			transparent 128px 140px),
		repeating-linear-gradient(to right,
			rgba(22,18,15,.22) 0 1px, transparent 1px 20px);
	border-block: 1px solid var(--rule);
}

/* ==========================================================================
   Stat strip
   ========================================================================== */
.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-bottom: 1px solid var(--rule-soft);
}
.stat {
	padding: clamp(1.75rem, 3.5vw, 2.5rem) 1rem;
	display: flex;
	flex-direction: column;
	gap: .35rem;
	border-right: 1px solid var(--rule-soft);
	text-align: center;
	align-items: center;
}
.stat:last-child { border-right: 0; }
.stat-num {
	font-family: var(--font-display);
	font-size: clamp(1.85rem, 1.2rem + 2.2vw, 2.85rem);
	line-height: 1;
	font-weight: 500;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}
.stat-num small { font-size: .48em; color: var(--brass); margin-left: .12em; }
.stat-label {
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink-faint);
}
@media (max-width: 720px) {
	.stats { grid-template-columns: repeat(2, 1fr); }
	.stat:nth-child(2) { border-right: 0; }
	.stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
}

/* ==========================================================================
   Split sections
   ========================================================================== */
.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 5.5rem);
	align-items: center;
}
@media (max-width: 880px) { .split { grid-template-columns: minmax(0, 1fr); } }

.split-copy { display: flex; flex-direction: column; gap: 1.5rem; }

/* Enharmonic diagram */
.enharm {
	background: var(--surface-2);
	border: 1px solid var(--rule-soft);
	border-radius: 3px;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	box-shadow: var(--shadow-lift);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.enharm-row {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--rule-soft);
}
.enharm-row:last-child { padding-bottom: 0; border-bottom: 0; }
.enharm-name {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 500;
	color: var(--ink);
}
.enharm-name:last-child { text-align: right; }
.enharm-eq {
	font-family: var(--font-mono);
	font-size: .625rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--brass);
	border: 1px solid var(--rule);
	border-radius: 100px;
	padding: .3rem .7rem;
	white-space: nowrap;
}

/* ==========================================================================
   Steps
   ========================================================================== */
.steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
	counter-reset: step;
}
@media (max-width: 800px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.step {
	display: flex;
	flex-direction: column;
	gap: .85rem;
	padding-top: 1.5rem;
	border-top: 2px solid var(--ink);
	position: relative;
}
.step-num {
	font-family: var(--font-mono);
	font-size: .6875rem;
	letter-spacing: .12em;
	color: var(--brass);
	font-variant-numeric: tabular-nums;
}
.step p { color: var(--ink-muted); font-size: .9375rem; }

/* ==========================================================================
   Feature grid
   ========================================================================== */
.features {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	background: var(--rule-soft);
	border: 1px solid var(--rule-soft);
	border-radius: 3px;
	overflow: hidden;
}
@media (max-width: 940px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }

.feature {
	background: var(--surface);
	padding: clamp(1.5rem, 3vw, 2.25rem);
	display: flex;
	flex-direction: column;
	gap: .75rem;
	transition: background-color .3s var(--ease);
}
.feature:hover { background: var(--surface-2); }
.feature-icon {
	width: 34px; height: 34px;
	color: var(--felt);
	margin-bottom: .35rem;
}
.feature-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; color: var(--ink); }
.feature p { font-size: .9375rem; color: var(--ink-muted); }

/* ==========================================================================
   Under the hood
   ========================================================================== */
.hood {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: start;
}
@media (max-width: 940px) { .hood { grid-template-columns: minmax(0, 1fr); } }

.code-card {
	background: var(--device);
	border-radius: 3px;
	box-shadow: var(--shadow-slab);
	overflow: hidden;
	border: 1px solid rgba(255,255,255,.06);
}
.code-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .85rem 1.15rem;
	border-bottom: 1px solid rgba(255,255,255,.07);
	font-family: var(--font-mono);
	font-size: .6875rem;
	letter-spacing: .06em;
	color: var(--device-muted);
}
.code-head .dots { display: flex; gap: .35rem; }
.code-head .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.14); }
.code-card pre {
	margin: 0;
	padding: 1.25rem;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: .78125rem;
	line-height: 1.75;
	color: #D9CFBE;
	tab-size: 2;
}
.code-card code { font-family: inherit; }
.t-com { color: #6E655A; font-style: italic; }
.t-key { color: #C98F86; }
.t-fn  { color: #D8B87C; }
.t-str { color: #9BAE86; }
.t-num { color: #C9A566; }
.t-var { color: #D9CFBE; }

.notes-list { display: flex; flex-direction: column; gap: 1.75rem; }
.note-item { display: flex; flex-direction: column; gap: .5rem; }
.note-item h3 {
	font-family: var(--font-body);
	font-size: .9375rem;
	font-weight: 600;
	color: var(--ink);
	display: flex;
	align-items: baseline;
	gap: .65rem;
}
.note-item h3::before {
	content: "";
	width: 14px; height: 2px;
	background: var(--felt);
	flex-shrink: 0;
	transform: translateY(-4px);
}
.note-item p { font-size: .9375rem; color: var(--ink-muted); }
/* Inline code, wherever it appears in running text */
.note-item code,
.feature code,
.body-text code {
	font-family: var(--font-mono);
	font-size: .875em;
	background: var(--surface-3);
	border-radius: 2px;
	padding: .08em .34em;
	color: var(--ink);
}

/* ==========================================================================
   Note library
   ========================================================================== */
.library {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(.75rem, 1.6vw, 1.15rem);
}
@media (max-width: 900px) { .library { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .library { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lib-card {
	appearance: none;
	background: var(--device);
	border: 1px solid rgba(255,255,255,.07);
	border-radius: 3px;
	padding: 1.5rem 1rem 1.15rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .3rem;
	cursor: pointer;
	color: var(--device-ink);
	transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
	box-shadow: var(--shadow-lift);
	text-align: center;
}
.lib-card:hover { transform: translateY(-4px); border-color: var(--device-line); box-shadow: var(--shadow-slab); }
.lib-card.is-playing { border-color: var(--felt-bright); box-shadow: 0 0 24px -4px color-mix(in srgb, var(--felt-bright) 55%, transparent); }
.lib-glyph {
	font-family: var(--font-display);
	font-size: 2.25rem;
	line-height: 1;
	font-weight: 500;
}
.lib-spoken {
	font-size: .625rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--device-muted);
}
.lib-meta {
	font-family: var(--font-mono);
	font-size: .625rem;
	color: var(--brass-bright);
	font-variant-numeric: tabular-nums;
	opacity: .8;
}
.library-hint {
	margin-top: 1.5rem;
	font-family: var(--font-mono);
	font-size: .6875rem;
	letter-spacing: .06em;
	color: var(--ink-faint);
	text-align: center;
}

/* ==========================================================================
   Specs table
   ========================================================================== */
.specs-wrap { overflow-x: auto; border: 1px solid var(--rule-soft); border-radius: 3px; }
.specs { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 480px; }
.specs th, .specs td { text-align: left; padding: 1rem 1.35rem; border-bottom: 1px solid var(--rule-soft); }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.specs th {
	font-weight: 600;
	font-size: .6875rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink-faint);
	width: 34%;
	white-space: nowrap;
}
.specs td { color: var(--ink); font-family: var(--font-mono); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.specs tbody tr:nth-child(odd) { background: var(--surface-2); }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
	background: var(--ebony);
	color: #F2EDE3;
	position: relative;
	overflow: hidden;
}
.cta::before {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: min(900px, 120vw);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	background: radial-gradient(circle at center, rgba(176,141,79,.16) 0%, transparent 62%);
	pointer-events: none;
}
.cta-inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1.5rem;
	padding-block: clamp(4rem, 8vw, 6.5rem);
}
.cta h2 {
	font-family: var(--font-display);
	font-size: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
	line-height: 1.05;
	font-weight: 500;
	color: #FBF8F2;
	max-width: 18ch;
}
.cta h2 em { font-style: italic; color: var(--brass-bright); }
.cta p { color: #A99B8C; max-width: 52ch; }
.cta .eyebrow { color: var(--brass-bright); }
.cta .eyebrow--center::before { background: var(--brass-bright); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: .75rem; }
.cta .btn--primary { background: #FBF8F2; color: var(--ebony); border-color: #FBF8F2; }
.cta .btn--primary:hover { background: var(--felt-bright); border-color: var(--felt-bright); color: #FBF8F2; }
.cta .btn--ghost { color: #F2EDE3; border-color: rgba(242,237,227,.28); }
.cta .btn--ghost:hover { border-color: #F2EDE3; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--surface);
	border-top: 1px solid var(--rule-soft);
	padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.footer-links a {
	font-size: .8125rem;
	color: var(--ink-muted);
	text-decoration: none;
	transition: color .2s var(--ease);
}
.footer-links a:hover { color: var(--felt); }
.footer-note { font-size: .8125rem; color: var(--ink-faint); }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

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