/* SPDX-License-Identifier: GPL-3.0-only */
/* ChoralRoot FM-1: the landing page. The device's MOD look: black ground, flat colour, heavy grotesk, the idle
   screen's three stripes. Colours sampled from the device renders (build/cr_screens). */

@font-face {
  font-family: "Inter Tight";
  src: url("InterTight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #080808;
  --cream: #F6F2EE;
  --red: #E63829;
  --orange: #F67918;
  --yellow: #F6B600;
  --blue: #2950CD;
  --green: #29B27B;
  --grey: #6A696A;
  --dark: #313031;
  --text: #D9D5D1;          /* body copy: the cream a step down, for long reading on black */
  --gutter: 16px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  font-weight: 450;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
@media (min-width: 900px) { body { font-size: 18px; } }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 900px) { :root { --gutter: 40px; } }

a { color: var(--cream); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--orange); }
a:hover { color: var(--orange); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
b, strong, th { color: var(--cream); font-weight: 700; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--cream);
  background: var(--dark);
  padding: 0.08em 0.35em;
  white-space: nowrap;
}
code.cmd { white-space: normal; }
code .nw { white-space: nowrap; }
p { margin: 0 0 1em; max-width: 46em; }

/* ---- type: huge headings ---- */
h1, h2, h3 { color: var(--cream); margin: 0; font-weight: 900; letter-spacing: -0.045em; }
h1 { font-size: clamp(56px, 17.5vw, 222px); line-height: 0.84; letter-spacing: -0.055em; }
h1 span { display: block; }
h2 { font-size: clamp(52px, 12vw, 148px); line-height: 0.88; margin: 0 0 0.32em; }
h3 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; margin: 1.5em 0 0.45em; }
h3 .sub { font-size: 0.5em; font-weight: 700; letter-spacing: 0; color: var(--grey); vertical-align: 0.25em; margin-left: 0.3em; white-space: nowrap; }
.intro { font-size: clamp(20px, 2.3vw, 26px); line-height: 1.35; color: var(--cream); font-weight: 500; max-width: 34em; letter-spacing: -0.01em; }
.small { font-size: 0.88em; color: var(--grey); }

section { padding: clamp(64px, 10vw, 140px) 0 0; }
main > section:last-child { padding-bottom: clamp(64px, 9vw, 120px); }

/* ---- colour rule: the colour of the control that moves it ---- */
.c-orange { color: var(--orange); }
.c-red { color: var(--red); }
.c-yellow { color: var(--yellow); }
.c-green { color: var(--green); }
.k-blue { background: var(--blue); color: var(--cream); padding: 0.05em 0.3em; }

/* ---- title block + the stripes ---- */
.title { padding-top: clamp(40px, 6vw, 76px); }
.title .lede { font-size: clamp(22px, 3.2vw, 38px); line-height: 1.2; color: var(--cream); font-weight: 600; letter-spacing: -0.025em; margin: 0.7em 0 0.35em; max-width: 22em; }
.title .ver { font-size: clamp(16px, 1.6vw, 20px); color: var(--grey); font-weight: 600; margin: 0; }

.stripes { --h: clamp(22px, 3.4vw, 48px); margin-top: clamp(36px, 4vw, 56px); display: grid; gap: calc(var(--h) * 0.45); overflow: hidden; }
.stripes i { display: block; height: var(--h); transform-origin: left center; }
.s-red { background: var(--red); }
.s-orange { background: var(--orange); }
.s-cream { background: var(--cream); }
@media (prefers-reduced-motion: no-preference) {
  .stripes i { animation: slide-in 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .stripes .s-orange { animation-delay: .12s; }
  .stripes .s-cream { animation-delay: .24s; }
}
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: none; } }
.stripes-thin { --h: 10px; margin: 0 0 40px; }
.stripes-thin i { animation: none !important; }

/* ---- screenshots: the device's 240x240 renders, 2x, pixelated ---- */
.shot { margin: 0; }
.shot img { display: block; width: 100%; max-width: 480px; height: auto; image-rendering: pixelated; background: #000; outline: 2px solid var(--dark); }
.shot figcaption { font-size: clamp(18px, 2vw, 24px); line-height: 1.35; color: var(--text); margin-top: 14px; max-width: 24em; }
.shots .shot { margin-top: clamp(36px, 5vw, 64px); }
@media (min-width: 900px) {
  .shots .shot { display: grid; grid-template-columns: 480px 1fr; gap: 48px; align-items: end; }
  .shots .shot figcaption { margin: 0 0 4px; font-size: 26px; }
  .shots .shot img { width: 480px; }
}

/* ---- the four buttons: big flat colour blocks ---- */
.buttons { display: grid; gap: 28px; margin: 0 0 44px; }
@media (min-width: 720px) { .buttons { grid-template-columns: 1fr 1fr; gap: 36px 24px; } }
.btn {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(112px, 15vw, 176px);
  padding: 18px 22px;
  border-radius: 3px;
  font-size: clamp(40px, 6vw, 72px); font-weight: 900; letter-spacing: -0.045em; line-height: 0.95;
  text-decoration: none;
}
.btn:hover { color: inherit; filter: brightness(1.08); }
.b-red { background: var(--red); color: #fff; }
.b-red:hover { color: #fff; }
.b-cream { background: var(--cream); color: #080808; }
.b-cream:hover { color: #080808; }
.b-blue { background: var(--blue); color: var(--cream); }
.b-blue:hover { color: var(--cream); }
.b-yellow { background: var(--yellow); color: #080808; }
.b-green { background: var(--green); color: #080808; }
.b-green:hover { color: #080808; }
.try { margin: 8px 0 36px; }
.try .btn { min-height: clamp(112px, 12vw, 156px); }
.b-yellow:hover { color: #080808; }
.btn .pkg { display: block; font-size: clamp(16px, 1.7vw, 21px); font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; overflow-wrap: anywhere; }
.note { margin: 12px 0 0; font-size: 0.95em; }
.note code { display: inline-block; margin-top: 6px; }

.toc { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; padding-top: 18px; border-top: 2px solid var(--dark); font-weight: 700; }
.toc a { text-decoration: none; color: var(--cream); }
.toc a:hover { color: var(--orange); }

/* ---- two columns of prose on wide screens ---- */
.cols { display: grid; gap: 0 48px; }
@media (min-width: 900px) {
  .cols { grid-template-columns: 1fr 1fr; }
  .cols-fig { grid-template-columns: 1fr 480px; align-items: start; }
  .cols-banks { grid-template-columns: 3fr 2fr; }
}
.cols > p, .cols > div > p { max-width: none; }

/* ---- the keybed ---- */
.keybed { margin: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 40px); }
.keybed svg { display: block; width: 100%; height: auto; }
.keybed text { font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif; text-anchor: middle; }
.keybed .kw { fill: #080808; font-weight: 800; letter-spacing: -0.02em; }
.keybed .kr { fill: var(--grey); font-weight: 700; }
.keybed .kbt { fill: var(--cream); font-weight: 800; }
.keybed .kh { fill: var(--cream); font-weight: 800; letter-spacing: 0.04em; text-anchor: start; }
.keybed .kn { fill: var(--grey); font-weight: 600; text-anchor: end; }
.kb-phone { display: none; }
.kb-cap { font-weight: 800; color: var(--cream); margin: 22px 0 10px; letter-spacing: 0.02em; }
.kb-phone .kb-cap:first-child { margin-top: 0; }
.kb-chord { max-width: 420px; }
@media (max-width: 859px) {
  .kb-wide { display: none !important; }
  .kb-phone { display: block; }
}

/* ---- LOCK example, the rule ---- */
.example { font-size: clamp(19px, 2vw, 23px); color: var(--cream); font-weight: 600; letter-spacing: -0.01em; }
.rule {
  display: inline-block; max-width: none;
  font-size: clamp(24px, 3.6vw, 42px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.1;
  color: #080808; background: var(--cream); padding: 0.18em 0.4em 0.22em;
}

/* ---- tables ---- */
.grid { width: 100%; border-collapse: collapse; margin: 18px 0 8px; font-size: 0.95em; line-height: 1.45; }
.grid th { text-align: left; font-size: 0.8em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); padding: 0 14px 10px 0; border-bottom: 3px solid var(--cream); }
.grid td { vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--dark); }
.grid td:nth-child(1) { color: var(--grey); font-weight: 700; white-space: nowrap; width: 8%; }
.grid td:nth-child(2) { color: var(--cream); font-weight: 800; white-space: nowrap; width: 12%; letter-spacing: -0.01em; }
.grid td:nth-child(3) { width: 30%; }
@media (max-width: 719px) {
  .grid thead { display: none; }
  .grid, .grid tbody, .grid tr, .grid td { display: block; width: auto !important; }
  .grid tr { padding: 14px 0 12px; border-bottom: 1px solid var(--dark); }
  .grid tr:first-child { border-top: 3px solid var(--cream); }
  .grid td { border: 0; padding: 2px 0; white-space: normal !important; }
  .grid td:nth-child(1), .grid td:nth-child(2) { display: inline; }
  .grid td:nth-child(2) { font-size: 1.35em; margin-left: 6px; }
  .grid td:nth-child(1)::after { content: " \2192"; color: var(--grey); }
  .grid td:nth-child(2)::after { content: ""; display: block; height: 6px; }
  .grid td:nth-child(n+3) { padding-left: 5.4em; text-indent: -5.4em; }
  .grid td:nth-child(n+3)::before { content: attr(data-l); display: inline-block; width: 6.6em; text-indent: 0; vertical-align: 0.1em; color: var(--grey); font-weight: 700; font-size: 0.8em; letter-spacing: 0.05em; text-transform: uppercase; }
}

/* ---- the editor: the knob colours ---- */
.knobs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 520px; margin: 18px 0 18px; }
.knobs div { padding: 26px 10px 10px; font-weight: 900; font-size: clamp(15px, 1.8vw, 19px); letter-spacing: -0.01em; border-radius: 3px; }
.knobs .k1 { background: var(--blue); color: var(--cream); }
.knobs .k2 { background: var(--orange); color: #080808; }
.knobs .k3 { background: var(--cream); color: #080808; }
.knobs .k4 { background: var(--green); color: #080808; }
.shot-side { margin-top: 28px; }
@media (min-width: 900px) { .shot-side { margin-top: 0.4em; } .shot-side img { width: 480px; } }

/* ---- the panel renders (designer, vector-like: no pixelated scaling) ---- */
.panel { margin: clamp(28px, 4vw, 48px) 0; }
.panel a { display: block; }
.panel img { display: block; width: 100%; max-width: var(--max); height: auto; outline: 2px solid var(--dark); }
.panel figcaption { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.45; margin-top: 14px; max-width: 46em; }

/* ---- sounds ---- */
.bank { columns: 2; column-gap: 28px; padding: 0; margin: 8px 0 10px; list-style: none; counter-reset: n; font-weight: 700; color: var(--cream); font-size: 0.95em; }
.bank li { counter-increment: n; break-inside: avoid; padding: 3px 0; letter-spacing: 0.01em; white-space: nowrap; }
@media (max-width: 419px) { .bank { column-gap: 14px; font-size: 0.86em; } .bank li::before { width: 1.8em; } }
.bank li::before { content: counter(n, decimal-leading-zero); display: inline-block; width: 2.1em; color: var(--grey); font-weight: 600; font-variant-numeric: tabular-nums; }
.bank li.va::before { color: var(--blue); filter: brightness(1.6); }
.bank-bass li::before { color: var(--orange); }

/* ---- recovery ---- */
.warn { background: var(--red); color: #fff; font-weight: 700; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.3; letter-spacing: -0.015em; padding: 20px 24px; max-width: 34em; margin: 1.4em 0; border-radius: 3px; }

/* ---- credits, footer ---- */
.credit-list { padding: 0; margin: 20px 0 0; list-style: none; max-width: 52em; }
.credit-list li { padding: 14px 0; border-top: 1px solid var(--dark); }
.foot { padding: 0 0 56px; color: var(--grey); font-size: 0.92em; }
.foot b { color: var(--cream); }
