/* reese-forge mockup kit: shared tokens and components for the three UI mockups.
   Layout sketches, not the final rendering. The real UI is egui (ADR 0004); these tokens are what
   reese-ui's theme will carry. Palette = Croky's own colour key (croky-voxel model sheet) on a warm
   near-black, so the bird and the interface share one set of colours. */

:root {
  /* surfaces, warm (cap-brown undertone, never blue-grey) */
  --bg: #11100e;
  --panel: #191815;
  --panel-2: #201f1b;
  --raise: #2a2823;
  --line: #34312b;
  --line-soft: #26241f;
  /* ink = Croky's cream chest */
  --ink: #efe8d6;
  --muted: #a39c8d;
  --dim: #6f695e;
  /* accents, straight from the colour key */
  --green: #6fb534;      /* active / LFO */
  --green-hi: #a3d94a;
  --green-lo: #2f5a1e;
  --yellow: #edca36;     /* the multiply stage, the one hot spot */
  --red: #d4404a;        /* clip, danger */
  --blue: #4f7fd0;       /* envelopes */
  --pink: #e8a8a0;       /* random / S&H */
  --brown: #7d5c42;      /* step / phrase */
  --cream: #f2e8cc;      /* macros */

  --r: 6px;              /* one radius for panels */
  --r-s: 3px;            /* chips, buttons */
  --label: "Nimbus Sans Narrow", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", sans-serif;
  --num: "JetBrainsMono NF", "JetBrains Mono", "iA Writer Mono S", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #0b0a09; }
body { font-family: var(--label); color: var(--ink); -webkit-font-smoothing: antialiased; }

/* the plugin window at 100 % scale; the real editor is resizable 75-200 % */
.win {
  width: 1600px; height: 1000px; background: var(--bg); position: relative; overflow: hidden;
  display: grid; grid-template-rows: 44px 1fr 28px;
}

/* --- top bar ------------------------------------------------------------------------------- */
.top {
  display: flex; align-items: center; gap: 18px; padding: 0 14px; flex-wrap: nowrap;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.brand canvas { image-rendering: pixelated; }
.brand b { font-size: 17px; letter-spacing: .02em; font-weight: 700; }
.brand i { font-style: normal; color: var(--dim); font-size: 12px; }
.tabs { display: flex; gap: 2px; }
.tab {
  white-space: nowrap; font: 600 12px var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding: 7px 14px; border-radius: var(--r-s); border: 1px solid transparent; background: none;
}
.tab.on { color: var(--ink); background: var(--raise); border-color: var(--line); }
.tab kbd { margin-left: 6px; }
.preset { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.preset .name {
  min-width: 260px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-s); font-size: 14px;
}
.preset .name small { color: var(--dim); margin-left: 8px; font-family: var(--num); font-size: 11px; }
.btn {
  font: 600 12px var(--label); letter-spacing: .06em; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 9px; white-space: nowrap;
}
.btn.on { color: #12110f; background: var(--green-hi); border-color: var(--green-hi); }
.btn.hot { color: #12110f; background: var(--yellow); border-color: var(--yellow); }
.ab { display: inline-flex; }
.ab .btn { border-radius: 0; }
.ab .btn:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.ab .btn:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; border-left: 0; }
.spacer { flex: 1; }
.readout {
  font: 12px var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted);
}
.readout b { color: var(--ink); font-weight: 500; display: inline-block; text-align: right; }
.w5 { width: 5ch; } .w7 { width: 7ch; } .w9 { width: 9ch; }

/* --- footer ------------------------------------------------------------------------------- */
.foot {
  display: flex; align-items: center; gap: 22px; padding: 0 14px; border-top: 1px solid var(--line);
  background: var(--panel); font-size: 12px; color: var(--dim); white-space: nowrap;
}
.foot .hint { color: var(--muted); }
kbd {
  font: 11px var(--num); color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 3px; padding: 0 4px; background: var(--panel-2);
}

/* --- panels ------------------------------------------------------------------------------- */
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r); position: relative; }
.ph {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 12px 0;
  font: 700 12px var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.ph .sub { font: 400 12px var(--label); letter-spacing: .02em; text-transform: none; color: var(--dim); }
.ph .r { margin-left: auto; }

/* --- knob (drawn by kit.js into an svg) ---------------------------------------------------- */
.knob { display: inline-flex; flex-direction: column; align-items: center; width: 64px; gap: 1px; }
.knob svg { display: block; }
.knob .kl { font: 600 11px var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.knob .kv { font: 11px var(--num); font-variant-numeric: tabular-nums; color: var(--ink); width: 8ch; text-align: center; white-space: nowrap; }
.knob.big { width: 84px; }

/* source chips (mod sources), coloured by kind */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--label); letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 7px; border-radius: var(--r-s); border: 1px solid var(--line);
  color: var(--ink); background: var(--panel-2); white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--green)); }
.lfo { --c: var(--green-hi); } .env { --c: var(--blue); } .rnd { --c: var(--pink); }
.stp { --c: var(--brown); } .mac { --c: var(--cream); } .mseg { --c: var(--green); }

canvas.px { image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) { .anim { animation: none !important; } }
