:root {
  --bg: #030609;
  --panel: rgba(3, 9, 13, 0.64);
  --line: rgba(100, 232, 255, 0.24);
  --cyan: #57e8ff;
  --cyan-soft: #a8f6ff;
  --gold: #d9c08a;
  --gold-hot: #ffe6a8;
  --text: #f1efe7;
  --muted: #8fa0a1;
  --danger: #ff6d6d;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(90, 232, 255, 0.032) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(90deg, rgba(90, 232, 255, 0.026) 0 1px, transparent 1px 54px),
    radial-gradient(circle at 50% 45%, rgba(18, 78, 91, 0.28), transparent 36%),
    linear-gradient(180deg, #05080b 0%, #020407 100%);
  color: var(--text);
  font-family: var(--sans);
}

#constellation {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100vw;
  height: 100vh;
}

#handVideo {
  position: fixed;
  left: -1px;
  top: -1px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(217, 192, 138, 0.62);
  color: var(--gold-hot);
  font-size: 18px;
  font-weight: 600;
  box-shadow:
    inset 0 0 18px rgba(217, 192, 138, 0.15),
    0 0 30px rgba(217, 192, 138, 0.16);
}

.brand-copy,
.telemetry,
.kicker,
.zones,
.console dt {
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-copy {
  color: #ece4d1;
  font-size: 14px;
  font-weight: 600;
}

.telemetry {
  display: flex;
  gap: 22px;
  color: rgba(168, 246, 255, 0.76);
  font-size: 10px;
}

.telemetry span {
  position: relative;
}

.telemetry span + span::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 3px;
  transform: translateY(-50%);
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
}

.hero {
  position: absolute;
  left: 30px;
  bottom: 118px;
  width: min(470px, calc(100vw - 60px));
}

.kicker {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 11px;
}

h1 {
  max-width: 10.5em;
  margin: 0;
  color: #fffdf4;
  font-size: clamp(32px, 3.8vw, 58px);
  font-weight: 500;
  line-height: 0.98;
  text-shadow: 0 0 34px rgba(3, 6, 9, 0.92);
}

.lede {
  max-width: 36em;
  margin: 18px 0 0;
  color: rgba(230, 237, 231, 0.76);
  font-size: 15px;
  line-height: 1.6;
  text-shadow: 0 0 24px rgba(3, 6, 9, 0.95);
}

.mode-rail {
  position: absolute;
  left: 30px;
  bottom: 64px;
  display: flex;
  gap: 8px;
  width: min(560px, calc(100vw - 60px));
  pointer-events: auto;
}

.mode-button {
  min-width: 0;
  height: 38px;
  flex: 1 1 0;
  border: 1px solid rgba(87, 232, 255, 0.22);
  border-radius: 0;
  background: rgba(3, 9, 13, 0.56);
  color: rgba(241, 239, 231, 0.74);
  font: 600 10px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mode-button:hover,
.mode-button:focus-visible {
  border-color: rgba(168, 246, 255, 0.62);
  color: var(--cyan-soft);
  outline: none;
}

.mode-button.active {
  border-color: rgba(217, 192, 138, 0.72);
  background: rgba(217, 192, 138, 0.13);
  color: var(--gold-hot);
  box-shadow:
    inset 0 0 20px rgba(217, 192, 138, 0.08),
    0 0 26px rgba(217, 192, 138, 0.13);
}

.console {
  position: absolute;
  right: 30px;
  bottom: 94px;
  width: min(330px, calc(100vw - 60px));
  border: 1px solid rgba(87, 232, 255, 0.24);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.console-head {
  display: flex;
  gap: 8px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(87, 232, 255, 0.16);
}

.console-head span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.console-head span:nth-child(2) {
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
}

.console-head span:nth-child(3) {
  background: rgba(255, 255, 255, 0.38);
  box-shadow: none;
}

dl {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 16px 18px 18px;
}

dt {
  margin-bottom: 7px;
  color: rgba(168, 246, 255, 0.66);
  font-size: 10px;
}

dd {
  margin: 0;
  color: rgba(255, 253, 244, 0.9);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.zones {
  position: absolute;
  left: 50%;
  bottom: 20px;
  display: flex;
  width: min(900px, calc(100vw - 60px));
  transform: translateX(-50%);
  justify-content: space-between;
  gap: 14px;
  color: rgba(217, 192, 138, 0.78);
  font-size: 10px;
}

.zones span {
  padding-top: 12px;
  border-top: 1px solid rgba(217, 192, 138, 0.28);
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }

  .telemetry {
    display: none;
  }

  .hero {
    bottom: 260px;
  }

  h1 {
    font-size: clamp(30px, 9vw, 48px);
  }

  .console {
    left: 30px;
    right: auto;
    bottom: 86px;
  }

  .zones {
    display: none;
  }

  .mode-rail {
    bottom: 24px;
  }

  .mode-button {
    height: 40px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 520px) {
  .hero {
    bottom: 500px;
  }

  .kicker {
    margin-bottom: 10px;
  }

  h1 {
    font-size: clamp(30px, 12vw, 44px);
  }

  .lede {
    display: none;
  }

  .mode-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console {
    bottom: 118px;
  }
}
