:root {
  --night-top: #070b1a;
  --night-bottom: #1a2550;
  --text: #eef2ff;
  --muted: #a9b3d6;
  --accent: #7bd36a;
  --discord: #5865f2;
  --discord-dark: #3c45a5;
  --grass: #5fa83a;
  --grass-dark: #4a8a2c;
  --dirt: #7a5232;
  --dirt-dark: #5e3d24;
  --px: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--night-top) 0%, var(--night-bottom) 100%);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 8% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 22% 30%, #cfd8ff 50%, transparent 51%),
    radial-gradient(3px 3px at 35% 8%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 48% 22%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 62% 6%, #cfd8ff 50%, transparent 51%),
    radial-gradient(3px 3px at 74% 28%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 14%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 94% 40%, #cfd8ff 50%, transparent 51%),
    radial-gradient(2px 2px at 14% 48%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 82% 52%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 4% 70%, #cfd8ff 50%, transparent 51%),
    radial-gradient(2px 2px at 56% 44%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}

.moon {
  position: absolute;
  top: 9%; right: 12%;
  width: 72px; height: 72px;
  background: #f4f1de;
  box-shadow:
    inset -16px -8px 0 #d9d4b8,
    inset 16px 24px 0 -8px #e8e4c9,
    0 0 60px 10px rgba(244, 241, 222, .18);
  image-rendering: pixelated;
}

@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 56px 16px 64px;
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Globe ---------- */
.globe-wrap {
  position: relative;
  width: clamp(170px, 42vw, 250px);
  aspect-ratio: 1;
  margin-bottom: 28px;
}
.globe-wrap::before {
  content: "";
  position: absolute; inset: -20%;
  background: radial-gradient(circle, rgba(95, 168, 255, .28) 0%, rgba(95, 168, 255, .08) 45%, transparent 70%);
  pointer-events: none;
}
#globe {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  cursor: grab;
  touch-action: pan-y;
  animation: float 6s ease-in-out infinite;
}
#globe:active { cursor: grabbing; }

@keyframes float { 50% { transform: translateY(-8px); } }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  padding: 6px 14px;
  border: 2px solid rgba(169, 179, 214, .25);
  background: rgba(7, 11, 26, .5);
  margin-bottom: 24px;
}

.dot {
  width: 8px; height: 8px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: .35; } }

.logo {
  font-family: "Pixelify Sans", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 1;
  letter-spacing: .01em;
  text-shadow: 0 6px 0 #0b1020, 0 10px 30px rgba(0, 0, 0, .45);
}
.logo span { color: var(--accent); }

.status {
  font-family: "Pixelify Sans", "Inter", sans-serif;
  font-weight: 500;
  font-size: clamp(1.3rem, 4.5vw, 1.9rem);
  color: var(--accent);
  margin-top: 28px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
  margin-top: 12px;
}

/* ---------- Discord button ---------- */
.discord {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 36px;
  padding: 16px 30px;
  font-family: "Pixelify Sans", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  background: var(--discord);
  border: 3px solid #0b1020;
  box-shadow: inset 0 -6px 0 var(--discord-dark), inset 0 3px 0 rgba(255, 255, 255, .25), 0 6px 0 #0b1020;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.discord:hover { background: #6772f5; }
.discord:active {
  transform: translateY(4px);
  box-shadow: inset 0 -2px 0 var(--discord-dark), inset 0 3px 0 rgba(255, 255, 255, .25), 0 2px 0 #0b1020;
}
.discord:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.hint {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--muted);
  opacity: .7;
}

/* ---------- Ground ---------- */
.ground { position: relative; z-index: 1; }

.grass {
  height: calc(var(--px) * 3);
  background:
    linear-gradient(90deg, var(--grass) 0 50%, var(--grass-dark) 50% 100%) 0 0 / calc(var(--px) * 4) var(--px),
    linear-gradient(90deg, var(--grass-dark) 0 25%, var(--grass) 25% 75%, var(--grass-dark) 75%) 0 var(--px) / calc(var(--px) * 6) var(--px),
    var(--grass);
  background-repeat: repeat-x;
}

.dirt {
  height: calc(var(--px) * 8);
  background:
    linear-gradient(90deg, transparent 0 40%, var(--dirt-dark) 40% 55%, transparent 55%) 0 0 / calc(var(--px) * 7) calc(var(--px) * 3),
    linear-gradient(90deg, var(--dirt-dark) 0 15%, transparent 15% 70%, var(--dirt-dark) 70% 80%, transparent 80%) var(--px) calc(var(--px) * 2) / calc(var(--px) * 9) calc(var(--px) * 4),
    var(--dirt);
  /* little grass drips into the dirt */
  box-shadow: inset 0 var(--px) 0 var(--grass-dark);
}

.footer {
  position: relative; z-index: 1;
  background: var(--dirt-dark);
  color: #d9c3ad;
  text-align: center;
  font-size: .8rem;
  padding: 14px 16px;
}

@media (max-width: 480px) {
  .moon { width: 48px; height: 48px; top: 5%; right: 8%; }
  .discord { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .dot, #globe { animation: none; }
}
