/* Audio Tools — the page is a front panel: charcoal anodized aluminum, white silkscreen,
   and the colors of patch cables used only where something is connected. */
:root {
  --panel: #2b2c2f;
  --panel-deep: #232427;
  --ink: #eceae3;
  --ink-muted: #a9a7a0;
  --rule: rgba(236, 234, 227, 0.85);
  --rule-soft: rgba(236, 234, 227, 0.18);
  --cable-red: #c33a2c;
  --cable-red-hover: #d64a3b;
  --cable-yellow: #e0a72a;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 56px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--cable-yellow); outline-offset: 3px; }

/* Headings: condensed, like the panel silkscreen, in sentence case. */
h1, h2, h3 {
  font-variation-settings: "wdth" 68;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0;
}
h1 { font-size: clamp(46px, 7.4vw, 112px); max-width: 13ch; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.6vw, 64px); max-width: 18ch; text-wrap: balance; }
h3 { font-size: 24px; line-height: 1.15; font-variation-settings: "wdth" 80; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--ink); }
.muted { color: var(--ink-muted); }

/* ── Top bar ── */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
}
.wordmark {
  display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none;
  border: 1.5px solid var(--rule); padding: 6px 12px 5px;
  font-variation-settings: "wdth" 72; font-weight: 600; font-size: 17px; letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lang { display: flex; gap: 14px; font-size: 15px; }
.lang a { text-decoration: none; color: var(--ink-muted); }
.lang a[aria-current="true"] { color: var(--ink); border-bottom: 1.5px solid var(--ink); }

/* ── Hero ── */
.hero { position: relative; min-height: min(92vh, 980px); display: grid; align-items: end; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20, 20, 22, 0.88) 0%, rgba(20, 20, 22, 0.55) 42%, rgba(20, 20, 22, 0) 72%),
              linear-gradient(0deg, rgba(43, 44, 47, 1) 0%, rgba(43, 44, 47, 0) 30%);
}
.hero-copy { position: relative; z-index: 2; padding: 140px var(--gutter) 72px; }
.hero-copy .lead { margin-top: 26px; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; text-decoration: none; font-weight: 600; font-size: 17px;
  border: 1.5px solid var(--rule); color: var(--ink); background: transparent;
}
.button.primary { background: var(--cable-red); border-color: var(--cable-red); color: #fff; }
.button.primary:hover { background: var(--cable-red-hover); border-color: var(--cable-red-hover); }
.button:not(.primary):hover { background: rgba(236, 234, 227, 0.08); }
.button .jack { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.35); }
.version { font-size: 15px; color: var(--ink-muted); }

/* ── Signal flow: the page index drawn like the MS-20 block diagram ── */
.flow { padding: 44px var(--gutter) 30px; border-top: 1.5px solid var(--rule-soft); }
.flow ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; row-gap: 22px; }
.flow li { display: flex; align-items: center; }
.flow li + li::before {
  content: ""; width: clamp(18px, 3vw, 44px); height: 1.5px; background: var(--rule);
  margin: 0 6px 0 2px; position: relative;
}
.flow li + li::after { content: none; }
.flow li + li { position: relative; }
.flow li + li > a::before {
  content: ""; position: absolute; left: clamp(12px, 3vw, 38px); top: 50%; transform: translateY(-50%);
  border-left: 7px solid var(--rule); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.flow a {
  display: block; padding: 9px 14px 8px; border: 1.5px solid var(--rule); text-decoration: none;
  font-variation-settings: "wdth" 70; font-weight: 500; font-size: 15px; letter-spacing: 0.07em; line-height: 1.15;
  text-transform: uppercase; white-space: nowrap;
}
.flow a:hover, .flow a:focus-visible { border-color: var(--cable-yellow); color: var(--cable-yellow); }
.flow small { display: block; text-transform: none; letter-spacing: 0; color: var(--ink-muted); font-size: 12px; font-variation-settings: "wdth" 85; margin-top: 2px; }

/* ── Sections ── */
section.block { padding: clamp(64px, 9vw, 120px) var(--gutter); border-top: 1.5px solid var(--rule-soft); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.reverse > :first-child { order: 2; }
.split h2 { margin-bottom: 26px; }
figure { margin: 0; }
figure.shot img, figure.shot video { border: 1.5px solid var(--rule-soft); background: var(--panel-deep); }
figcaption { font-size: 14px; color: var(--ink-muted); margin-top: 10px; max-width: 70ch; }
.wide { margin-top: clamp(36px, 5vw, 64px); }

/* Specification list: term on the left, value on the right, like a datasheet. */
dl.spec { margin: 26px 0 0; display: grid; grid-template-columns: minmax(130px, 34%) 1fr; border-top: 1.5px solid var(--rule-soft); max-width: 640px; }
dl.spec dt, dl.spec dd { margin: 0; padding: 12px 0; border-bottom: 1.5px solid var(--rule-soft); font-size: 16px; }
dl.spec dt { color: var(--ink-muted); padding-right: 16px; font-variation-settings: "wdth" 85; }

ul.facts { list-style: none; margin: 26px 0 0; padding: 0; max-width: var(--measure); }
ul.facts li { position: relative; padding: 0 0 14px 26px; }
ul.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 1.5px; background: var(--rule); }
ul.facts strong { font-weight: 600; }

/* Presets: a module box per category. */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; margin-top: 40px; border: 1.5px solid var(--rule); }
.presets > div { padding: 22px 20px 20px; border-right: 1.5px solid var(--rule-soft); border-bottom: 1.5px solid var(--rule-soft); }
.presets .count { font-variation-settings: "wdth" 64; font-weight: 600; font-size: 54px; line-height: 1; }
.presets h3 { margin: 8px 0 8px; font-size: 20px; }
.presets p { font-size: 15px; color: var(--ink-muted); margin: 0; }

/* Downloads. */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(28px, 4vw, 56px); margin-top: 40px; }
.downloads article { border-top: 3px solid var(--ink); padding-top: 22px; }
.downloads article h3 { font-size: 30px; font-variation-settings: "wdth" 68; }
.downloads .button { margin: 18px 0 20px; }
.downloads ol { margin: 0; padding-left: 20px; font-size: 16px; }
.downloads ol li { margin-bottom: 8px; }
.downloads code { font-size: 14px; background: var(--panel-deep); padding: 2px 6px; word-break: break-all; }
.note { margin-top: 30px; font-size: 15px; color: var(--ink-muted); max-width: 80ch; }

/* Open source. */
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px clamp(28px, 4vw, 56px); margin-top: 44px; }
.reasons h3 { margin-bottom: 10px; }
.reasons p { font-size: 16px; color: var(--ink-muted); }
.license { margin-top: 48px; padding: 24px 26px; border: 1.5px solid var(--rule); max-width: 820px; }
.license p:last-child { margin-bottom: 0; }

/* Footer. */
footer { padding: 44px var(--gutter) 56px; border-top: 1.5px solid var(--rule-soft); font-size: 14px; color: var(--ink-muted); }
footer p { max-width: 90ch; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-bottom: 18px; color: var(--ink); }

@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .hero::after { background: linear-gradient(0deg, rgba(30, 30, 33, 0.95) 0%, rgba(30, 30, 33, 0.7) 55%, rgba(30, 30, 33, 0.35) 100%); }
  .flow ol { flex-direction: column; align-items: flex-start; }
  .flow li + li { flex-direction: column; align-items: flex-start; }
  .flow li + li::before { width: 1.5px; height: 18px; margin: 0 0 0 22px; }
  .flow li + li > a::before { display: none; }
  dl.spec { grid-template-columns: 1fr; }
  dl.spec dt { border-bottom: 0; padding-bottom: 0; }
}
