/*
 * break.beat — shared tokens and bits used by the menu and every sub-page.
 *
 * Light is the white box void; dark is the same room with the lights off. Colors
 * live here as variables so the two themes stay in step; the 3D scene keeps its
 * own matching palette in js/scene.js.
 */
/* Orbitron, the game's own typeface: Regular for text, Medium for labels and buttons, Bold for titles. */
@font-face {
  font-family: "Orbitron";
  src: url("/fonts/Orbitron-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url("/fonts/Orbitron-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url("/fonts/Orbitron-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg-top:     #f8f9ff;   /* ghost white */
  --bg-bot:     #d6e6ff;   /* light blue */
  --ink:        #1b2a52;
  --ink-soft:   #5b6d97;
  --line:       #b7cbf1;
  --panel:      rgba(255, 255, 255, 0.82);
  --panel-edge: #c4d6f6;
  --accent:     #2e8bff;
  --on-accent:  #ffffff;
  --shadow:     0 2px 0 rgba(36, 72, 150, 0.10), 0 10px 28px rgba(36, 72, 150, 0.12);
  --flash:      #ffffff;

  --px:   "Orbitron", system-ui, sans-serif;
  --sans: "Orbitron", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg-top:     #04060d;
  --bg-bot:     #12204a;
  --ink:        #dce6ff;
  --ink-soft:   #8b9fd3;
  --line:       #2a3e78;
  --panel:      rgba(10, 17, 40, 0.80);
  --panel-edge: #2b3f7a;
  --accent:     #6db8ff;
  --on-accent:  #04101f;
  --shadow:     0 2px 0 rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.45);
  --flash:      #bfe0ff;

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: linear-gradient(var(--bg-top), var(--bg-bot)) fixed;
  background-color: var(--bg-top);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* A small square console-style button: 1px edge, hard 2px drop. */
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--shadow);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 16px; height: 16px; shape-rendering: crispEdges; fill: currentColor; }

/* Theme toggle shows the mode you'd switch to. */
.theme-toggle .moon { display: block; }
.theme-toggle .sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun  { display: block; }
