/* Route 177 — Sweetie 16 palette, same as the sprites (scripts/sprites.mjs). */
:root {
  --ink: #1a1c2c;
  --navy: #29366f;
  --blue: #3b5dc9;
  --red: #b13e53;
  --orange: #ef7d57;
  --yellow: #ffcd75;
  --lime: #a7f070;
  --cyan: #73eff7;
  --white: #f4f4f4;
  --gray: #94b0c2;
  --slate: #333c57;
  --pixel: 4px;
  --font: 'Press Start 2P', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  line-height: 1.8;
}

img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

h1,
h2 {
  font-weight: normal;
  margin: 0;
}

body > main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- HUD */
.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gray);
  background: var(--ink);
  border-bottom: var(--pixel) solid var(--slate);
}

.hud b {
  font-weight: normal;
  color: var(--white);
}

.hud-coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--yellow);
  background: none;
  border: 0;
  cursor: pointer;
}

.hud-coins.bump img {
  animation: coin-hop 0.25s steps(3, end);
}

@keyframes coin-hop {
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud-coins.bump img {
    animation: none;
  }
}

/* ---------------------------------------------------------------- hero */
/* The scene is 2:1 and is never cropped top or bottom: at 50vw tall it fits
   exactly, and on narrow screens the 340px floor makes it taller than 2:1,
   so `cover` trims only the sides and the gantry sign always stays whole. */
.hero {
  position: relative;
  overflow: hidden;
  height: max(50vw, 340px);
  background: var(--navy);
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* The name and shield logo are painted on the gantry sign; the heading stays
   for screen readers and search engines. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tagline {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  font-size: clamp(10px, 1.8vw, 14px);
  line-height: 1.8;
  color: var(--yellow);
}

/* ---------------------------------------------------------------- footer */
footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 16px;
  font-size: 10px;
  color: var(--gray);
  border-top: var(--pixel) solid var(--slate);
}

footer p {
  margin: 0;
}

.copyright {
  display: flex;
  align-items: center;
  gap: 12px;
}

footer a {
  color: var(--cyan);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- 404 */
.lost main {
  flex: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 32px 16px;
  text-align: center;
}

.lost h1 {
  color: var(--red);
  text-shadow: var(--pixel) var(--pixel) 0 var(--ink);
}

.lost p {
  margin: 0;
  font-size: 10px;
  color: var(--gray);
}

.faded {
  width: 72px;
  height: auto;
  filter: grayscale(1) brightness(0.7);
}

.button {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--ink);
  background: var(--yellow);
  text-decoration: none;
  box-shadow: var(--pixel) var(--pixel) 0 var(--orange);
}

.button:hover,
.button:focus-visible {
  background: var(--white);
}

.button:active {
  transform: translate(var(--pixel), var(--pixel));
  box-shadow: none;
}

:focus-visible {
  outline: var(--pixel) solid var(--cyan);
  outline-offset: var(--pixel);
}

