/*
 * The look of the game's main menu on a static page: the sky and the floor of the scene behind a dark panel, the Orbitron font, the
 * yellow raised "key" button. The colours are the ones of `src/constants/colors.ts` (COLORS.scene, COLORS.surface, COLORS.accent,
 * COLORS.button): keep them in sync by hand.
 */
@font-face {
  font-family: 'Orbitron Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('/fonts/orbitron-latin-wght-normal.woff2') format('woff2');
}

:root {
  --sky: #9fc5e8;
  --sky-zenith: #4f8fd6;
  --floor: #7fae6a;
  --grid: #4f7f4f;
  --panel: #141821;
  --vignette: #0a0e18;
  --divider: #4a5368;
  --text: #ffffff;
  --highlight: #ffd34e;
  --highlight-hover: #ffe07a;
  --on-highlight: #141821;
  --lip: #b8890f;
  --control: #2d3446;
  --control-hover: #3a4359;
  --control-lip: #10141c;
  --muted: 0.7;
  --horizon: 52%;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
  background: linear-gradient(180deg, var(--sky-zenith), var(--sky) var(--horizon), var(--floor) var(--horizon));
  color: var(--text);
  font-family: 'Orbitron Variable', system-ui, sans-serif;
  overflow-x: hidden;
}

/* ---- The scene: voxel clouds drifting over a floor with its grid ---- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.cloud {
  position: absolute;
  height: 28px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    28px -22px 0 -2px rgba(255, 255, 255, 0.85),
    -34px 14px 0 -4px rgba(255, 255, 255, 0.7);
  animation: drift 120s linear infinite;
}
.cloud-a {
  top: 12%;
  left: -20%;
  width: 150px;
}
.cloud-b {
  top: 28%;
  left: -35%;
  width: 220px;
  animation-duration: 170s;
  animation-delay: -60s;
}
.cloud-c {
  top: 40%;
  left: -10%;
  width: 110px;
  animation-duration: 140s;
  animation-delay: -100s;
}
@keyframes drift {
  to {
    transform: translateX(160vw);
  }
}
/* The floor: the game's green with its grid, laid back in perspective from the horizon. */
.floor {
  position: absolute;
  left: -50%;
  right: -50%;
  top: var(--horizon);
  height: 200%;
  background-color: var(--floor);
  background-image:
    linear-gradient(var(--grid) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid) 2px, transparent 2px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: 50% 0;
  opacity: 0.9;
}

/* ---- The panel ---- */
.card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 32px 40px 40px;
  background: rgba(20, 24, 33, 0.92);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
.logo {
  margin: 0 0 8px;
  line-height: 0;
}
.logo img {
  display: block;
  width: min(380px, 100%);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}
.tagline {
  margin: 0 0 24px;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.9;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 8px 16px;
  border: 2px solid var(--highlight);
  border-radius: 999px;
  color: var(--highlight);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--highlight);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.about,
.notice {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.7;
  opacity: var(--muted);
}
.notice {
  margin-bottom: 28px;
}

/* The raised key: a light sheen on top, a darker lip under it, lifts on hover and sinks on press (as the buttons of the game). */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 12px;
  background-color: var(--highlight);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 55%);
  color: var(--on-highlight);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 3px 0 var(--lip),
    0 6px 10px rgba(0, 0, 0, 0.28);
  transition:
    transform 150ms ease-out,
    box-shadow 150ms ease-out,
    background-color 150ms ease-out;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.button svg {
  width: 20px;
  height: 20px;
}
/* The Discord button: the grey key of the game's menu (COLORS.surface.control, COLORS.button.lip). */
.button.secondary {
  background-color: var(--control);
  color: var(--text);
  --lip: var(--control-lip);
}
.button.secondary:hover {
  background-color: var(--control-hover);
}
.button:hover {
  background-color: var(--highlight-hover);
  transform: translateY(-1px);
}
.button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 0 var(--lip),
    0 2px 6px rgba(0, 0, 0, 0.28);
}
.button:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
}

.credit {
  position: relative;
  z-index: 1;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text);
  opacity: 0.8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

@media (max-width: 480px) {
  .card {
    padding: 24px 20px 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cloud,
  .dot {
    animation: none;
  }
  .button {
    transition: none;
  }
}
