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

:root {
  --green-900: #0a1a0d;
  --green-800: #0d2010;
  --green-700: #1a3a1a;
  --green-600: #2a5a2a;
  --green-400: #4ade80;
  --green-300: #86efac;
  --amber: #f59e0b;
  --red: #ef4444;
  --text: #c8e8c8;
  --muted: #6a9a6a;
}

html, body { height: 100%; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--green-900);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: url('images/spatial-map-bg.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 26, 13, 0.82);
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 20px;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Status badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--green-700);
  background: var(--green-800);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.3s ease;
}

.badge.live { border-color: var(--green-400); color: var(--green-400); }
.badge.offline { border-color: var(--amber); color: var(--amber); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 0.3s ease;
}

.badge.live .status-dot {
  background: var(--green-400);
  box-shadow: 0 0 6px var(--green-400);
  animation: pulse 2s infinite;
}

.badge.offline .status-dot { background: var(--amber); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Logo */
.logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--green-700);
  border: 1px solid var(--green-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 22px;
  color: var(--green-400);
  letter-spacing: 1px;
}

/* Headings */
h1 {
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
}

.tagline {
  font-size: 18px;
  color: var(--green-300);
  line-height: 1.6;
  font-weight: 500;
}

.description {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

/* CTA */
.cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--green-400);
  color: var(--green-900);
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary:hover { background: var(--green-300); transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border: 1px solid var(--green-600);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover { border-color: var(--green-400); color: var(--green-400); }

/* Offline message */
.offline-msg {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  font-size: 13px;
  color: #fbbf24;
  max-width: 480px;
  text-align: left;
}

.offline-msg.visible { display: flex; }
.offline-msg a { color: var(--green-400); text-decoration: underline; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
}

.feature {
  padding: 20px 16px;
  background: var(--green-800);
  border: 1px solid var(--green-700);
  border-radius: 12px;
  text-align: center;
  transition: border-color 0.2s;
}

.feature:hover { border-color: var(--green-600); }

.feature-icon { font-size: 24px; margin-bottom: 10px; }
.feature-label { font-size: 13px; font-weight: 600; color: var(--green-300); margin-bottom: 6px; }
.feature-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Footer */
.footer {
  font-size: 13px;
  color: var(--muted);
  padding-top: 8px;
}

.footer a { color: var(--green-400); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
