/* RJ-2000 - painel no layout do SP-1200, em preto
 * As cores, o reset, teclas, LEDs, knobs, LCD e rack vem do core/css/base.css,
 * carregado antes deste. Aqui fica o que e do SP. O RJ-950 e o RJ-42 (e o CSS deles)
 * moram no rj-950 e no rj-42, e o rack completo no DCX Studio.
 */

/* ---------------------------------------------------------------- tela de ligar */
.power {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  transition: opacity .35s;
}
.power.off { opacity: 0; pointer-events: none; }
.power-btn {
  width: 128px; height: 128px; border-radius: 50%;
  border: 0; background: var(--key);
  box-shadow: 0 6px 0 var(--key-edge), 0 14px 30px rgba(0,0,0,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.power-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--key-edge), 0 8px 20px rgba(0,0,0,.5); }
.power-ring { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--key-red); border-top-color: transparent; }
.power-label { font-weight: 700; letter-spacing: .2em; font-size: 14px; color: #222; }
.power-hint { margin: 0; text-align: center; color: #ddd; font-size: 14px; line-height: 1.5; }

/* ---------------------------------------------------------------- gabinete */
.unit { max-width: 1240px; margin: 0 auto; padding: 24px 16px 16px; }
.case {
  background: var(--case);
  border-radius: 10px;
  padding: 26px 26px 22px;
  box-shadow: 0 1px 0 #2b2b2b inset, 0 24px 60px rgba(0,0,0,.45);
}
.strip {
  background: var(--strip); color: var(--strip-ink);
  border-radius: 4px;
}
.strip-top { display: flex; align-items: baseline; gap: 28px; padding: 16px 32px 12px; border-radius: 6px 6px 0 0; }
.logo { font-weight: 700; font-size: 38px; letter-spacing: -0.02em; transform: scaleY(1.08); }
.subtitle { font-size: 10px; letter-spacing: .62em; text-transform: uppercase; font-weight: 500; }
.strip-bottom { padding: 12px 32px; border-radius: 0 0 6px 6px; }
.maker { font-size: 28px; font-weight: 400; letter-spacing: -0.01em; }

.face {
  background: var(--face);
  padding: 22px 34px 26px;
  display: grid;
  grid-template-columns: 1.35fr 1.5fr 1.4fr 1.25fr;
  grid-template-areas:
    "setup disk sample master"
    "prog prog prog master"
    "perf perf perf master"
    "perf perf perf transport";
  column-gap: 28px;
  row-gap: 18px;
}
.mod-setup { grid-area: setup; } .mod-disk { grid-area: disk; }
.mod-sample { grid-area: sample; } .mod-master { grid-area: master; } .mod-prog { grid-area: prog; }
.mod-perf { grid-area: perf; } .mod-transport { grid-area: transport; align-self: end; }

.mod h2 {
  margin: 0 0 10px; padding-bottom: 5px;
  font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
  border-bottom: 3px solid var(--rule);
  transform: scaleY(1.06); transform-origin: bottom left;
}
.mod-body { display: flex; gap: 22px; align-items: flex-start; }
.mod-body.col, .col { flex-direction: column; display: flex; gap: 12px; }
.legend { list-style: none; margin: 0; padding: 0; font-size: 11px; line-height: 1.38; color: var(--ink); }
.legend li { white-space: nowrap; }
.legend b { display: inline-block; min-width: 18px; font-weight: 500; }
.mod-sample .mod-body { justify-content: space-between; }

/* ---------------------------------------------------------------- master control */
.mod-master { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }

.nav4 { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; }
.knobs { display: flex; justify-content: space-around; }
.keypad {
  display: grid; grid-template-columns: repeat(3, 56px); justify-content: center;
  row-gap: 10px; column-gap: 14px;
}
.keypad .kc { gap: 4px; }
.kc-zero { grid-column: 2; }

/* ---------------------------------------------------------------- programming */
.prog-row { display: grid; grid-template-columns: 150px repeat(8, 1fr); align-items: center; }
.selector { display: flex; align-items: center; gap: 12px; }
.ledbar {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  font-size: 11px; color: var(--ink);
  padding: 6px 0 6px 8px; border-left: 6px solid #0f0f0f; border-radius: 3px;
}
.ledbar span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.dual { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.dual .t, .dual .b { font-size: 11px; text-align: center; line-height: 1.15; min-height: 26px; display: flex; align-items: flex-end; }
.dual .b { align-items: flex-start; }

/* ---------------------------------------------------------------- performance */
.perf {
  display: grid;
  grid-template-columns: 150px 1fr;
  grid-template-areas: "mode faders" "bank pads";
  row-gap: 18px;
}
.sel-mode { grid-area: mode; align-self: center; }
.sel-bank { grid-area: bank; align-self: center; }
.faders {
  grid-area: faders;
  display: grid; grid-template-columns: repeat(8, 1fr);
  position: relative; padding-top: 4px;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, #8c8c86 25px, #8c8c86 26px);
  background-size: 100% 208px; background-repeat: no-repeat; background-position: 0 6px;
}
.fcol { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fader {
  position: relative; width: 44px; height: 220px; touch-action: none; cursor: ns-resize;
}
.fader::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 14px; width: 4px; margin-left: -2px;
  background: #050505; border-radius: 2px;
}
.fader .cap-f {
  position: absolute; left: 3px; right: 3px; height: 22px;
  bottom: calc(var(--v) * (100% - 22px));
  background: linear-gradient(#2a2a2a, #0a0a0a 60%);
  border-radius: 2px;
  box-shadow: 0 2px 0 #000, 0 4px 6px rgba(0,0,0,.6);
}
.fader .cap-f::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 3px; height: 3px; background: #e8e8e2; border-radius: 1px; }
.pads { grid-area: pads; display: grid; grid-template-columns: repeat(8, 1fr); column-gap: 12px; }
.pcol { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pad {
  width: 62px; height: 62px; padding: 0;
  border: 3px solid #3a3a3a; border-radius: 3px;
  background: linear-gradient(145deg, #262626, var(--pad) 55%);
  box-shadow: 0 0 0 2px #000, 0 6px 10px rgba(0,0,0,.6);
  touch-action: none;
  transition: transform .03s;
}
.pad:active, .pad.down { transform: translateY(2px); background: #070707; }
.pad.hit { border-color: #5a5a5a; }
.pad.drop { border-color: var(--rule); box-shadow: 0 0 0 2px #000, 0 0 14px 2px rgba(75, 138, 208, .7); }

/* ---------------------------------------------------------------- transporte */
.transport {
  display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; align-items: end; column-gap: 10px;
  border-top: 3px solid var(--rule); padding-top: 16px;
}
.pad-t { width: 62px; height: 62px; }
.key-rec { width: 40px; height: 40px; margin-bottom: 11px; }

/* ---------------------------------------------------------------- aviso no topo (o rack mudou para o DCX Studio) */
.moved { margin: 0 0 12px; text-align: center; font-size: 13px; color: var(--page-ink); }
.moved a { color: inherit; text-underline-offset: 3px; }
.moved a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- rodape */
.credit { text-align: center; font-size: 13px; color: var(--page-ink); margin: 14px 0 0; }
.credit a { color: inherit; }

/* ---------------------------------------------------------------- telas menores */
@media (max-width: 1100px) {
  .face { padding: 20px 22px 24px; column-gap: 20px; }
  .pad, .pad-t { width: 52px; height: 52px; }
  .fader { width: 38px; height: 190px; }
  .faders { background-size: 100% 182px; }
}

@media (max-width: 900px) {
  .unit { padding: 12px 8px; }
  .case { padding: 10px; border-radius: 8px; }
  .strip-top { padding: 12px 18px 10px; gap: 14px; flex-wrap: wrap; }
  .logo { font-size: 30px; }
  .subtitle { letter-spacing: .4em; font-size: 9px; }
  .maker { font-size: 22px; }
  .strip-bottom { padding: 10px 18px; }
  .face {
    padding: 16px 14px 20px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "master master"
      "transport transport"
      "perf perf"
      "prog prog"
      "setup disk"
      "sample sample";
    row-gap: 24px; column-gap: 16px;
  }
  .mod-transport { align-self: stretch; }
  .mod-master { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "h h" "lcd lcd" "nav nav" "pad knobs"; gap: 16px; }
  .mod-master h2 { grid-area: h; }
  .lcd-bezel { grid-area: lcd; }
  .nav4 { grid-area: nav; }
  .keypad { grid-area: pad; grid-template-columns: repeat(3, 44px); column-gap: 8px; }
  .knobs { grid-area: knobs; flex-direction: column; align-items: center; gap: 18px; }
  .lcd { font-size: 20px; padding: 5px 6px; }
  .lcd-row { height: 22px; }
  .perf { grid-template-columns: 1fr; grid-template-areas: "mode" "faders" "bank" "pads"; row-gap: 14px; }
  .selector { justify-content: flex-start; }
  .sel-mode .ledbar, .sel-bank .ledbar { flex-direction: row; gap: 14px; border-left: 0; border-bottom: 4px solid #0f0f0f; padding: 0 0 6px; }
  .fader { width: 34px; height: 170px; }
  .faders { background-size: 100% 156px; }
  .pad, .pad-t { width: 40px; height: 40px; border-width: 2px; }
  .prog-row { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
  .prog-row .selector { grid-column: 1 / -1; }
  .prog-row .selector .ledbar { flex-direction: row; gap: 14px; border-left: 0; border-bottom: 4px solid #0f0f0f; padding: 0 0 6px; }
  .mod-body { gap: 14px; }
  .mod-sample .mod-body { flex-direction: column; }
  .legend { font-size: 10.5px; }
}

@media (max-width: 420px) {
  .pad, .pad-t { width: 34px; height: 34px; }
  .fader { width: 30px; }
  .key { width: 36px; height: 34px; }
  .face { grid-template-areas: "master master" "transport transport" "perf perf" "prog prog" "setup setup" "disk disk" "sample sample"; }
}
