/* The Spinoff home page: a gallery wall with three framed worlds. Pixel art is scaled by whole numbers only. */
:root {
  --wall: #1a0f0b;
  --wall-2: #2b1a13;
  --wood: #6e4a2a;
  --wood-hi: #8f6438;
  --wood-lo: #3b2415;
  --brass: #e0b030;
  --brass-lo: #9a7418;
  --paper: #f6f1e4;
  --muted: #b9a58a;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --sans: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  --serif: Literata, "Iowan Old Style", Georgia, serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font: 15px/1.5 var(--sans);
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 190, 110, 0.20), transparent 70%),
    linear-gradient(var(--wall-2), var(--wall) 70%);
  background-color: var(--wall);
  background-attachment: fixed;
}
a { color: inherit; }

.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 12px var(--pixel); color: var(--brass); }
.brand img { image-rendering: pixelated; }
.signin { text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border: 2px solid var(--wood); border-radius: 6px; background: rgba(0, 0, 0, 0.25); }
.signin:hover { border-color: var(--brass); }

/* ---- the wall: one big Steel Ball Run frame, two smaller frames under it ---- */
.wall {
  width: min(1080px, calc(100% - 32px));
  margin: 8px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.world { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.world.playable { grid-column: 1 / -1; order: -1; }
/* the set: Steel Ball Run, the one playable game, first and alone on its row; the two coming soon cards side by side under it */
.wall[data-layout="set"] { grid-template-columns: 1fr 1fr; align-items: start; gap: 24px 20px; }
.wall[data-layout="set"] .world.playable { grid-column: 1 / -1; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* a walnut frame with a brass plate under the picture */
.frame {
  position: relative;
  padding: 6px 6px 0;
  background: linear-gradient(135deg, var(--wood-hi), var(--wood) 40%, var(--wood-lo));
  border: 2px solid #1a0f0b;
  box-shadow: 0 0 0 2px var(--wood-lo), 0 14px 30px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 220, 160, 0.18);
}
.world.playable .frame { box-shadow: 0 0 0 2px var(--brass-lo), 0 0 40px rgba(224, 176, 48, 0.28), 0 14px 30px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 220, 160, 0.25); }
.stagebox { background: #000; overflow: hidden; }
.stagebox canvas { image-rendering: pixelated; }
.stagebox.down canvas { image-rendering: auto !important; }
.stagebox[data-kind="logo"] { background: #c6e5f8; } /* the logo sprites paint their own pale sky; this shows until they do */


.plate {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 6px -6px 0; padding: 12px 16px;
  background: linear-gradient(#3a2316, #26150e); border-top: 3px solid var(--brass-lo);
}
.names { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plate h2 { margin: 0; font: 400 12px/1.3 var(--pixel); color: var(--brass); text-shadow: 0 2px 0 #000; }
.plate .tag { font: 13px var(--serif); color: var(--paper); opacity: 0.85; }
.world.playable .plate h2 { font-size: 16px; }
.soon {
  flex: none; font: 9px var(--pixel); padding: 7px 9px; color: #2a1a05;
  background: linear-gradient(var(--brass), var(--brass-lo)); border: 2px solid #3b2415; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}

.play {
  flex: none; display: inline-block; text-decoration: none; text-align: center;
  font: 14px var(--pixel); color: #1b1405; background: var(--brass);
  padding: 12px 26px; border: 3px solid #3b2415; box-shadow: 0 4px 0 var(--brass-lo), 0 8px 18px rgba(0, 0, 0, 0.5);
}
.play:hover { background: #f3c744; transform: translateY(-1px); }
.play:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brass-lo); }
.play:focus-visible, .signin:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

/* the closed site (site.js CLOSED): PLAY NOW and Sign in are buttons that open the note below */
button.play, button.signin { cursor: pointer; appearance: none; }
button.signin { font-family: inherit; color: inherit; }

/* the "Opening soon" note (soon.js): a small panel like the cards' brass plates in a walnut frame */
.note {
  width: min(420px, calc(100% - 32px)); padding: 0; border: 0; background: transparent; color: var(--paper);
  overflow: visible;
}
.note::backdrop { background: rgba(12, 7, 4, 0.74); }
.note-box {
  margin: 8px; padding: 22px 22px 20px; text-align: center;
  background: linear-gradient(#3a2316, #26150e);
  border: 2px solid #1a0f0b; border-top: 3px solid var(--brass-lo);
  box-shadow: 0 0 0 4px var(--wood), 0 0 0 6px var(--wood-lo), 0 0 30px rgba(224, 176, 48, 0.22), 0 18px 40px rgba(0, 0, 0, 0.6);
}
.note h2 { margin: 0 0 12px; font: 400 16px/1.4 var(--pixel); color: var(--brass); text-shadow: 0 2px 0 #000; }
.note p { margin: 0 0 18px; font: 16px/1.5 var(--serif); color: var(--paper); }
.note p span { display: block; }
.note-close {
  font: 12px var(--pixel); color: #1b1405; background: var(--brass); cursor: pointer;
  padding: 10px 20px; border: 3px solid #3b2415; box-shadow: 0 4px 0 var(--brass-lo);
}
.note-close:hover { background: #f3c744; }
.note-close:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--brass-lo); }
.note-close:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.note[open] { animation: note-in 160ms steps(4) both; }
@keyframes note-in { from { opacity: 0; transform: translateY(8px); } }

.tagline { text-align: center; margin: 30px 24px 6px; font: 400 17px/1.5 var(--serif); color: var(--paper); }
.fine { text-align: center; padding: 6px 24px 40px; font-size: 12px; color: var(--muted); }

/* narrow: one column */
@media (max-width: 760px) {
  .wall, .wall[data-layout="set"] { grid-template-columns: 1fr; gap: 24px; }
  .wall[data-layout="set"] .world.playable { grid-column: 1; }
  .bar { padding: 12px 16px; }
  .plate { flex-wrap: wrap; }
  .world.playable .plate h2 { font-size: 13px; }
}
@media (max-width: 480px) {
  .names { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .play:hover { transform: none; }
  .note[open] { animation: none; }
}
