/* K Instruments — "running order on a rack panel".
   Light brushed-aluminium panel, dark screens for the software, SoundDeck's signal colours
   (GO green, standby amber) used only as indicators. */

/* ---------- Fonts (self-hosted, SIL OFL) ---------- */
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("/assets/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("/assets/fonts/big-shoulders-display-latin-ext-800-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-display: swap; src: url("/assets/fonts/big-shoulders-display-vietnamese-800-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/instrument-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-mono-vietnamese-500-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

/* ---------- Tokens ---------- */
:root {
  --panel: #e3e5e2;      /* brushed aluminium */
  --recess: #cdd1ce;     /* milled recess / rules */
  --ink: #15171a;        /* engraving, text */
  --engrave: #5d6360;    /* secondary text */
  --go: #1fa857;         /* GO / released */
  --standby: #e39a14;    /* standby / in development */
  --screen: #0e1116;     /* the software's own dark UI */
  --screen-line: #232a34;
  --screen-text: #e6eaf0;
  --screen-dim: #98a2b3;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--panel);
  /* fine horizontal brushing */
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .22) 0 1px, transparent 1px 3px);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.screen :focus-visible { outline-color: var(--go); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 800; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--panel); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* Type roles */
.display { text-wrap: balance; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; line-height: .9; }
.label { font: 500 .75rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--engrave); }
.muted { color: var(--engrave); }
.lede { font-size: 1.2rem; line-height: 1.55; max-width: 34em; }

/* Status LED: green = released, amber = standby / in development */
.led { display: inline-flex; align-items: center; gap: 8px; font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.led::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 2px rgba(31, 168, 87, .18), 0 0 8px rgba(31, 168, 87, .55); }
.led.standby::before { background: var(--standby); box-shadow: 0 0 0 2px rgba(227, 154, 20, .2), 0 0 8px rgba(227, 154, 20, .6); }
.led.off::before { background: var(--recess); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25); }

/* ---------- Header / footer ---------- */
.site-header { border-bottom: 1px solid var(--recess); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 800 1.45rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.brand img { width: 34px; height: 26px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--recess); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
@media (max-width: 720px) { .site-header .wrap { padding-top: 12px; padding-bottom: 10px; } .nav { gap: 2px 16px; } .nav a { font-size: .9rem; } }

.site-footer { border-top: 1px solid var(--recess); padding: 36px 0 48px; margin-top: 24px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; align-items: baseline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { text-decoration: none; font-size: .95rem; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 6px; border: 1.5px solid var(--ink); font: 600 1rem/1.2 var(--body); text-decoration: none; color: var(--ink); background: transparent; cursor: pointer; transition: background .12s ease, transform .12s ease; }
.btn:hover { background: rgba(21, 23, 26, .06); }
.btn:active { transform: translateY(1px); }
.btn-go { background: var(--go); border-color: var(--go); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16); }
.btn-go:hover { background: #23b862; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.key { font: 500 .72rem/1 var(--mono); padding: 4px 6px; border-radius: 4px; border: 1px solid currentColor; opacity: .7; }

/* ---------- Screens: anything that is the software's own UI ---------- */
.screen { background: var(--screen); color: var(--screen-text); border-radius: 10px; padding: 10px; box-shadow: 0 0 0 1px #2b313a, 0 1px 0 1px rgba(255, 255, 255, .6), 0 24px 50px -24px rgba(0, 0, 0, .45); }
.screen img { border-radius: 5px; }
figure { margin: 0; }
figcaption { font: 500 .75rem/1.4 var(--mono); color: var(--engrave); margin-top: 12px; letter-spacing: .02em; }

/* ---------- Home hero: the running order ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(3.2rem, 6.6vw, 6.4rem); text-wrap: balance; }
.hero .lede { margin-top: 28px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

.cuelist { padding: 0; overflow: hidden; }
.cuelist-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--screen-line); font: 500 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--screen-dim); }
.cuelist-head .tc { color: var(--screen-text); font-variant-numeric: tabular-nums; }
.cues { list-style: none; margin: 0; padding: 6px 0; }
.cue a { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 12px; align-items: center; padding: 12px 18px; text-decoration: none; border-left: 3px solid transparent; transition: background .15s ease, opacity .2s ease; }
.cue a:hover { background: #151a22; }
.cue .no { font: 500 .85rem/1 var(--mono); color: var(--screen-dim); }
.cue .name { font-weight: 600; font-size: 1.02rem; line-height: 1.3; }
.cue .name small { display: block; font-weight: 400; font-size: .85rem; color: var(--screen-dim); }
.cue .state { font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--screen-dim); white-space: nowrap; }
.cue.done a { opacity: .8; }
.cue.done .state::before { content: "✓ "; }
.cue.standby a { background: #121a26; border-left-color: #4d8dff; }
.cue.standby .state { color: #fff; background: #2f62c4; padding: 4px 7px; border-radius: 4px; }
.cue.fired a { animation: fired .6s ease-out; }
@keyframes fired { from { background: rgba(31, 168, 87, .35); } to { background: transparent; } }
.cuelist-foot { padding: 12px 14px 14px; border-top: 1px solid var(--screen-line); }
.cuelist-foot .standby-line { font: 500 .75rem/1.3 var(--mono); color: var(--screen-dim); margin: 2px 4px 10px; min-height: 1.3em; }
.go { width: 100%; text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border: 0; border-radius: 8px; background: var(--go); color: var(--ink); cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); transition: background .12s ease, transform .08s ease; }
.go:hover { background: #23b862; }
.go:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.go .go-label { font: 800 2.6rem/1 var(--display); text-transform: uppercase; display: inline-flex; align-items: center; gap: 14px; }
.go .go-label::before { content: ""; border-left: 18px solid currentColor; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.go .key { opacity: .75; }
@media (prefers-reduced-motion: reduce) { .cue.fired a { animation: none; } }

/* ---------- Home: one block per cue ---------- */
.cue-block { border-top: 1px solid var(--recess); padding: clamp(48px, 7vw, 88px) 0; scroll-margin-top: 12px; }
.cue-block .wrap { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1.3fr); gap: 0 clamp(24px, 4vw, 56px); align-items: start; }
.cue-block .cue-no { font: 500 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--engrave); padding-top: .6rem; }
.cue-block h2 { font-size: clamp(2.8rem, 5.6vw, 4.6rem); margin: 14px 0 18px; }
.cue-block .media { grid-column: 3; }
.cue-block .more { margin-top: 20px; font-weight: 600; }
@media (max-width: 1000px) {
  .cue-block .wrap { grid-template-columns: 1fr; }
  .cue-block .media { grid-column: 1; margin-top: 28px; }
}

/* Placeholder screen for software that has no UI to show yet */
.screen-empty { aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 24px; border-radius: 5px; background: repeating-linear-gradient(90deg, #121821 0 2px, transparent 2px 22px), #0e1116; }
.screen-empty p { margin: 0; font: 500 .8rem/1.6 var(--mono); color: var(--screen-dim); letter-spacing: .06em; text-transform: uppercase; }
.screen-empty strong { display: block; font: 800 2.2rem/1 var(--display); color: var(--screen-text); margin-bottom: 8px; letter-spacing: .02em; }

/* ---------- Product pages ---------- */
.product-head { padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 48px); }
.product-head .meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 22px; }
.product-head h1 { font-size: clamp(3.6rem, 10vw, 8.5rem); display: flex; align-items: center; gap: .18em; flex-wrap: wrap; }
.product-head h1 img { width: .78em; height: .78em; border-radius: 18%; }
.product-head .lede { margin-top: 26px; }
.product-shot { padding-bottom: clamp(48px, 7vw, 88px); }

.section { border-top: 1px solid var(--recess); padding: clamp(48px, 7vw, 88px) 0; }
.section-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: 14px; }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 44px); }

.feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--recess); }
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature h3 { font: 800 clamp(1.9rem, 3.4vw, 2.6rem)/.95 var(--display); text-transform: uppercase; margin: 12px 0 16px; }
.feature ul { margin: 0; padding-left: 1.1em; }
.feature li { margin: .4em 0; }
.feature li::marker { color: var(--engrave); }
.feature .screen.narrow { max-width: 460px; justify-self: center; }
.feature-tag { display: inline-flex; align-items: center; gap: 10px; }
.feature-tag::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--ink)); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature .screen { order: 2; } }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--recess); border-left: 1px solid var(--recess); }
.grid-3 > div { padding: 26px 26px 28px; border-right: 1px solid var(--recess); border-bottom: 1px solid var(--recess); }
.grid-3 h3 { font: 600 1.1rem/1.3 var(--body); margin-bottom: 8px; }
.grid-3 p { margin: 0; color: var(--engrave); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(32px, 5vw, 64px); align-items: start; }

.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 13px 0; border-bottom: 1px solid var(--recess); }
.specs th { width: 36%; padding-right: 18px; font: 500 .75rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--engrave); }

/* Recessed box, e.g. the download slot */
.slot { background: var(--recess); border-radius: 10px; padding: clamp(24px, 4vw, 36px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .12), 0 1px 0 rgba(255, 255, 255, .7); }
.slot h2 { margin: 16px 0 12px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.6rem 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--recess); }
.steps li::before { content: counter(step); font: 500 .85rem/1.9 var(--mono); color: var(--engrave); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 .85rem/1 var(--mono); padding: 8px 11px; border-radius: 4px; background: var(--screen); color: var(--screen-text); }

/* Changelog: versions are a real sequence, newest first */
.changelog { list-style: none; margin: 0; padding: 0; }
.changelog li { display: grid; grid-template-columns: 11rem 1fr; gap: 6px 28px; padding: 20px 0; border-bottom: 1px solid var(--recess); }
.changelog .ver { font: 800 1.6rem/1 var(--display); text-transform: uppercase; }
.changelog .ver small { display: block; margin-top: 8px; font: 500 .72rem/1 var(--mono); letter-spacing: .08em; color: var(--engrave); }
.changelog p { margin: 0; }
@media (max-width: 640px) { .changelog li { grid-template-columns: 1fr; } }

code { font: 500 .88em var(--mono); background: rgba(21, 23, 26, .07); padding: 1px 5px; border-radius: 4px; }

/* 404 / about */
.plain { padding: clamp(48px, 8vw, 110px) 0; }
.plain h1 { font-size: clamp(3.2rem, 8vw, 6.6rem); margin: 18px 0 26px; }
.wrap.narrow { max-width: 820px; }

@media (max-width: 560px) {
  .specs tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--recess); }
  .specs th, .specs td { display: block; width: auto; padding: 0; border: 0; }
  .specs th { margin-bottom: 4px; }
}
@media (hover: none) { .go .key { display: none; } }
