:root {
  --bg-deep: #07131c;
  --bg-mid: #0d2433;
  --ink: #e8f4f2;
  --muted: #9bb8c4;
  --accent: #3ecfbf;
  --accent-2: #7ec8e3;
  --line: rgba(62, 207, 191, 0.28);
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg-deep);
  overflow-x: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 55% at 15% 20%, rgba(62, 207, 191, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(26, 111, 154, 0.28), transparent 50%),
    linear-gradient(165deg, #051018 0%, #0a1c28 45%, #07131c 100%);
}

.grid-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  opacity: 0.35;
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 56px 56px, 56px 56px; }
}

.hero {
  max-width: 40rem;
  padding: clamp(3.5rem, 10vh, 7rem) clamp(1.5rem, 5vw, 4rem) 2rem;
  animation: rise 0.9s ease-out both;
}

.brand {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  color: var(--accent);
  text-transform: none;
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lede {
  margin: 0 0 2rem;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.45;
  color: var(--muted);
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.55rem;
  border-radius: 0.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 0 0 0 rgba(62, 207, 191, 0.35);
  animation: glow 3.2s ease-in-out infinite;
}

.btn:hover {
  background: #6be0d2;
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.meta,
.status {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.status[data-error="true"] {
  color: #ff9b8a;
}

.platforms {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.server {
  margin-top: 2.5rem;
  max-width: 34rem;
  animation: rise 1s 0.25s ease-out both;
}

.server h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.server .hint,
.server .script-link {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.advanced {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.advanced summary {
  cursor: pointer;
  color: var(--accent-2);
  margin-bottom: 0.85rem;
}

.advanced[open] summary {
  margin-bottom: 0.85rem;
}

.server dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.server dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.server dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.server code {
  display: inline-block;
  max-width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 0.3rem;
  background: rgba(13, 36, 51, 0.85);
  border: 1px solid rgba(126, 200, 227, 0.2);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  color: var(--ink);
}

.copy {
  appearance: none;
  border: 1px solid rgba(126, 200, 227, 0.35);
  background: transparent;
  color: var(--accent-2);
  border-radius: 0.3rem;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.platforms a {
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.platforms a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent-2);
}

.visual {
  position: absolute;
  right: clamp(0rem, 4vw, 4rem);
  top: 50%;
  transform: translateY(-52%);
  width: min(46vw, 34rem);
  pointer-events: none;
  opacity: 0.95;
  animation: rise 1.1s 0.15s ease-out both;
}

.signal {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

.pulse {
  animation: pulse 2.4s ease-in-out infinite;
  transform-origin: center;
}

.pulse.delay,
.ring.delay {
  animation-delay: 1.1s;
}

.ring {
  animation: ring 2.4s ease-out infinite;
  transform-origin: center;
}

.link {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: draw 1.6s 0.4s ease forwards, shimmer 3s 2s ease-in-out infinite;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem clamp(1.5rem, 5vw, 4rem) 1.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid rgba(126, 200, 227, 0.12);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(62, 207, 191, 0.2); }
  50% { box-shadow: 0 0 28px 2px rgba(62, 207, 191, 0.28); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; r: 8; }
  50% { opacity: 1; r: 12; }
}

@keyframes ring {
  0% { opacity: 0.7; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (max-width: 900px) {
  .visual {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: min(92vw, 28rem);
    margin: 0.5rem auto 1.5rem;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    order: -1;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  .hero {
    padding-top: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
