/* The demo page around the board. Colours and fonts are Boardwise's own theme tokens (day.css,
   skins.css), so the whole page changes with the theme switch. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("boardwise/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("boardwise/fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) url("boardwise/skins/img/paper.svg");
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-text-size-adjust: 100%;
}
/* The themes' paper grain. Boardwise sets it as --grain, but a url() in a custom property resolves
   against the sheet that uses it, which is this one, so the paths are spelled out here. */
html[data-skin="night"] body,
html[data-skin="walnut"] body { background-image: url("boardwise/skins/img/paper-night.svg"); }

.demo {
  --board: min(600px, calc(100vh - 72px));
  display: grid;
  grid-template-columns: var(--board) minmax(250px, 340px);
  justify-content: center;
  align-items: center;
  gap: 28px 44px;
  min-height: 100vh;
  padding: 36px 32px;
  box-sizing: border-box;
}
.stage { width: var(--board); }
.board-box { width: 100%; }

.side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font: 700 12px/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  color: var(--strong);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--display-track);
  text-transform: var(--display-case);
  font-size: 34px;
  line-height: 1;
}
.lede { margin: 10px 0 0; color: var(--muted); }
.note { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font: 700 12px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.effects { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.settings { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.skins { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; }
.skins .btn + .btn { margin-left: calc(-1 * var(--rule)); }

.btn {
  min-height: 38px;
  padding: 7px 12px;
  border: var(--rule) solid var(--edge);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font: 600 14px/1.2 var(--font);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.skins .btn, .toggle { text-align: center; }
.toggle { min-width: 64px; }
.btn:hover { background: var(--feature); color: var(--on-feature); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; position: relative; }
.btn.is-on,
.btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.effects .btn.is-on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* phones and narrow frames: the board on top, the buttons under it */
@media (max-width: 760px) {
  .demo {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 26px;
    padding: 36px 22px 32px; /* room for the combo meter on the board's corner */
  }
  .stage { width: 100%; max-width: 520px; justify-self: center; }
  h1 { font-size: 28px; }
}
@media (max-width: 360px) {
  .settings { grid-template-columns: 1fr; }
}
