:root {
  --bg: #04060a;
  --panel: rgba(4, 9, 14, 0.6);
  --steel: #9dbdca;
  --steel-soft: #cfe4ee;
  --gold: #d9c08a;
  --gold-hot: #ffe6a8;
  --text: #eef1ee;
  --muted: #8595a0;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

body {
  cursor: none; /* the in-scene focal glow becomes the cursor */
}

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

/* Moody vignette + a whisper of terminal grid, layered over the canvas. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(157, 189, 202, 0.022) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(90deg, rgba(157, 189, 202, 0.018) 0 1px, transparent 1px 58px),
    radial-gradient(circle at 50% 42%, transparent 34%, rgba(2, 4, 7, 0.72) 100%);
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none; /* clicks + moves pass through to the rainfield */
}

.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,
.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(207, 228, 238, 0.72);
  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);
}

#fpsReadout {
  color: var(--gold-hot);
}

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

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

h1 {
  max-width: 11em;
  margin: 0;
  color: #fffdf4;
  font-size: clamp(30px, 3.6vw, 54px);
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 0 34px rgba(2, 5, 9, 0.94);
}

.lede {
  max-width: 34em;
  margin: 16px 0 0;
  color: rgba(230, 237, 231, 0.74);
  font-size: 15px;
  line-height: 1.6;
  text-shadow: 0 0 24px rgba(2, 5, 9, 0.96);
}

.console {
  position: absolute;
  right: 30px;
  bottom: 30px;
  width: min(300px, calc(100vw - 60px));
  border: 1px solid rgba(157, 189, 202, 0.22);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.console-head {
  display: flex;
  gap: 8px;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(157, 189, 202, 0.16);
}

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

.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.34);
  box-shadow: none;
}

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

dt {
  margin-bottom: 6px;
  color: rgba(157, 189, 202, 0.66);
  font-size: 10px;
}

dd {
  margin: 0;
  color: rgba(255, 253, 244, 0.9);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  color: rgba(217, 192, 138, 0.66);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .telemetry {
    display: none;
  }

  .hero {
    bottom: 200px;
  }

  h1 {
    font-size: clamp(28px, 8vw, 44px);
  }

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

  .hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    cursor: auto;
  }
}
