:root {
  --bg-1: #0f172a;
  --bg-2: #1d4ed8;
  --bg-3: #059669;
  --card: rgba(255, 255, 255, 0.14);
  --stroke: rgba(255, 255, 255, 0.32);
  --text: #eff6ff;
  --muted: #dbeafe;
  --accent: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(5, 150, 105, 0.45), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.35), transparent 30%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3));
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(#ffffff 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

.layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(800px, 100%);
  backdrop-filter: blur(8px);
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: clamp(20px, 5vw, 40px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--muted);
}

h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.1;
}

p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.stats {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats article {
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 12px;
}

.label {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.value {
  display: block;
  margin-top: 6px;
  font-weight: 600;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  word-break: break-word;
}

button {
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  color: #111827;
  background: linear-gradient(120deg, #facc15, var(--accent));
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.15);
}

#ping-result {
  margin-top: 12px;
  min-height: 1.4em;
}

.reveal {
  animation: rise-in 680ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 700px) {
  .stats {
    grid-template-columns: 1fr;
  }
}
