/* Colors of a piano: black lacquer, white keys, red felt. Accents come from the app. */
@font-face { font-family: "Klimpa Text"; font-weight: 400; font-display: swap; src: url(fonts/klimpa-text-400.woff2) format("woff2"); }
@font-face { font-family: "Klimpa Text"; font-weight: 500; font-display: swap; src: url(fonts/klimpa-text-500.woff2) format("woff2"); }
@font-face { font-family: "Klimpa Text"; font-weight: 800; font-display: swap; src: url(fonts/klimpa-text-800.woff2) format("woff2"); }

:root {
  --lacquer: #0d0f16;
  --panel: #1b2030;
  --key: #f7f7f5;
  --ink: #14161f;
  --soft: #555b6b;
  --dim: #a3abbe;
  --felt: #8c2433;
  --orange: #f5a524;
  /* Left and right edge of everything; the content gets at most 1260px wide. */
  --pad: max(clamp(18px, 4.5vw, 72px), (100vw - 1260px) / 2);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--key); color: var(--ink); font: 400 1.125rem/1.55 "Klimpa Text", system-ui, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; z-index: 9; padding: 10px 16px; background: var(--orange); color: var(--ink); }
.skip:focus { left: 10px; top: 10px; }

/* ---------- Hero: laid out like the play page of the app */
.hero { position: relative; display: flex; flex-direction: column; min-height: max(100svh, 640px); background: var(--lacquer); color: #eef1f8; overflow: hidden; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad) 0; }
.logo img { width: 200px; }
.hero .bar { position: absolute; top: 0; right: 0; }
/* The negative margins cut off the empty border of the SVG, so that the icon itself lines up. */
.mark { --w: clamp(170px, min(28vw, 64vh - 216px), 440px); width: var(--w); margin: calc(var(--w) * -0.0306) 0 clamp(16px, 4vh, 44px) calc(var(--w) * -0.011); }
.bar nav { display: flex; gap: clamp(16px, 2.5vw, 34px); font-weight: 500; font-size: 1.05rem; }
.bar nav a { text-decoration: none; padding: 10px 0; }
.bar nav a:hover { text-decoration: underline; }
.intro { flex: 1; display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: end; gap: 24px; padding: 43px var(--pad) 0; }
.intro > div { align-self: start; max-width: 720px; }
h1 { font-size: clamp(2.2rem, min(4.5vw, 7.6vh), 4rem); }
.intro div p { margin-top: 1.25rem; max-width: 34em; color: #c6ccda; font-size: 1.2rem; }
.intro .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.9rem; }
.btn { padding: 12px 24px; border-radius: 99px; background: #8aa0e02b; color: #eef1f8; font-size: 1.1rem; font-weight: 500; text-decoration: none; }
.btn:hover { background: #8aa0e045; }
.btn.primary { background: var(--orange); color: var(--ink); }
.btn.primary:hover { background: #ffbb4a; }
.chord { display: flex; align-items: baseline; min-height: 1em; font-weight: 800; font-size: clamp(5rem, min(12vw, 20vh), 11rem); line-height: 0.95; white-space: nowrap; letter-spacing: -0.03em; }
.chord b { font-weight: inherit; }
.chord span { margin-left: 0.09em; font-size: 0.46em; letter-spacing: -0.01em; }
/* On tall screens the text grows with the free space above the staff. */
@media (min-width: 1000px) and (min-height: 1080px) {
  .intro { --u: clamp(1px, min(0.104vw, 1px + (100vh - 1080px) * 0.0019), 1.55px); }
  .intro > div { max-width: none; }
  .mark { --w: calc(440 * var(--u)); margin-bottom: calc(44 * var(--u)); }
  h1 { font-size: calc(64 * var(--u)); }
  .intro div p { margin-top: calc(22 * var(--u)); max-width: 30em; font-size: max(1.2rem, calc(17.5 * var(--u))); }
  .intro .actions { gap: calc(12 * var(--u)); margin-top: calc(32 * var(--u)); }
  .intro .btn { padding: calc(12 * var(--u)) calc(24 * var(--u)); font-size: calc(17.6 * var(--u)); }
}
.staff { position: relative; }
.staff svg { display: block; width: 100%; overflow: visible; }
.staff .col { transition: transform 0.2s ease-out; }
.staff text { font-family: inherit; font-weight: 800; }
.keys-hint { padding: 0 var(--pad) 10px; color: var(--dim); font-size: 1rem; }
.keys { position: relative; height: clamp(130px, 23vh, 220px); border-top: 6px solid var(--felt); background: #000; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.keys i { position: absolute; top: 0; height: 100%; border-radius: 0 0 5px 5px; background: linear-gradient(#e2e2e0, #fafaf8 70%, #fafaf8 96%, #c9c9c6 97%); }
.keys i.black { z-index: 1; height: 62%; background: linear-gradient(#111, #2b2b2e 88%, #48484c 89%); }
.keys i.on { background: linear-gradient(#ffd27a, var(--orange)); }
.keys i.black.on { background: linear-gradient(#ffcf6a, #c77c00); }
.keys i::after { content: attr(data-label); position: absolute; inset: auto 0 12px; text-align: center; font: 500 0.95rem/1 "Klimpa Text", sans-serif; color: #6d6d70; }
.keys i.on::after { color: var(--ink); }
@media (hover: none) { .keys i::after { content: none; } }

/* ---------- Features */
#features section { padding: clamp(48px, 7vw, 104px) var(--pad) 0; }
.tablet { width: 100%; border: clamp(6px, 0.9vw, 12px) solid #16181f; border-radius: clamp(14px, 1.8vw, 26px); background: var(--lacquer); box-shadow: 0 24px 50px -24px #14161f80; }
.text p { margin-top: 1rem; max-width: 36em; color: var(--soft); }
.lead .text { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px 48px; align-items: end; margin-bottom: clamp(24px, 3.5vw, 48px); }
.lead h2 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); }
.lead .text p { margin: 0; }
.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.split.flip { grid-template-columns: 1fr 1.55fr; }
.split.flip img { order: 2; }
.trainers h2 { max-width: 14em; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 36px); margin-top: clamp(24px, 3vw, 44px); }
figure { margin: 0; }
figure img { width: 100%; border-radius: 12px; }
h3 { font-size: 1.45rem; }
figcaption h3 { margin-top: 1.1rem; }
figcaption p { margin-top: 0.4rem; color: var(--soft); }

/* ---------- Install */
.install { margin-top: clamp(64px, 9vw, 130px); border-top: 6px solid var(--felt); background: var(--lacquer); color: #eef1f8; scroll-margin-top: -6px; }
.inner { padding: clamp(48px, 7vw, 96px) var(--pad); }
.inner > * { max-width: 860px; }
.inner > p, li > p { margin-top: 0.8rem; color: #c6ccda; }
ol { list-style: none; counter-reset: step; margin: 40px 0; padding: 0; display: grid; gap: 36px; }
li { counter-increment: step; min-width: 0; }
li h3::before { content: counter(step) ". "; color: var(--orange); }
pre { position: relative; margin: 14px 0 0; padding: 18px 20px; overflow-x: auto; border-radius: 12px; background: var(--panel); font: 0.92rem/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
pre code { font: inherit; }
.code { position: relative; }
.copy { position: absolute; top: 10px; right: 10px; padding: 7px 14px; border: 0; border-radius: 99px; background: #39425a; color: #eef1f8; font: 500 0.9rem/1.2 "Klimpa Text", sans-serif; cursor: pointer; }
.copy:hover { background: #4a5675; }
.distro { display: inline-flex; margin: 14px 0 0; padding: 4px; border: 0; border-radius: 99px; background: var(--panel); }
.distro legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.distro input { position: absolute; opacity: 0; }
.distro span { display: block; padding: 8px 18px; border-radius: 99px; font-weight: 500; font-size: 1rem; cursor: pointer; }
.distro input:checked + span { background: #4a5675; }
.distro input:focus-visible + span { outline: 3px solid var(--orange); }
.install:has([value="ubuntu"]:checked) .for-arch, .install:has([value="arch"]:checked) .for-ubuntu { display: none; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 40px; padding: 26px var(--pad); background: #07080c; color: var(--dim); font-size: 1rem; }
footer p:last-child { display: flex; flex-wrap: wrap; gap: 6px 24px; }

/* ---------- Legal notice */
.legal .bar { padding-bottom: 14px; border-bottom: 6px solid var(--felt); background: var(--lacquer); color: #eef1f8; }
.legal main { max-width: calc(42rem + 2 * var(--pad)); padding: clamp(36px, 5vw, 72px) var(--pad); }
.legal h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.legal h2 { margin-top: 2.2rem; font-size: 1.8rem; }
.legal h3 { margin-top: 1.6rem; font-size: 1.2rem; }
.legal main p, address { margin-top: 0.6rem; font-style: normal; }

@media (max-width: 860px) {
  .split, .split.flip, .lead .text { grid-template-columns: minmax(0, 1fr); }
  .split.flip img { order: 0; }
  .three { grid-template-columns: minmax(0, 30rem); gap: 36px; }
}
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .logo img { width: 160px; }
  .mark { --w: 160px; }
  .bar .wide { display: none; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .intro div p { font-size: 1.1rem; }
  .chord { font-size: 4.6rem; justify-self: end; }
  .code .copy { position: static; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .staff .col { transition: none; }
}
