/* Apogee Racer — page shell.
   The game renders into a canvas; this file only styles the page, the boot
   overlay and the canvas fit. */

:root {
  --bg: #0e0f14;
  --bg-2: #15171f;
  --ink: #e8e6df;
  --accent: #f2c14e;
  --accent-2: #e8453c;
  --muted: #8b90a0;
}

* {
  box-sizing: border-box;
}

/* Author `display` rules would otherwise beat the browser default for the
   `hidden` attribute. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

#screen {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  /* Keep the pixel art crisp when the internal resolution is scaled up. */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  cursor: default;
}

#screen.playing {
  cursor: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #1b1e28 0%, #0b0c11 70%);
  z-index: 5;
  transition: opacity 260ms ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-inner {
  text-align: center;
  padding: 24px;
}

.logo {
  margin: 0 0 12px;
  font-size: clamp(28px, 7vw, 56px);
  letter-spacing: 0.14em;
  color: var(--ink);
  text-shadow: 3px 3px 0 #000;
}

.logo span {
  display: block;
  font-size: 0.42em;
  letter-spacing: 0.5em;
  color: var(--accent);
  margin-top: 6px;
}

#boot-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.boot-error {
  color: #ff8a80 !important;
  max-width: 46ch;
  margin: 12px auto 0 !important;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .overlay {
    transition: none;
  }
}
