:root {
  --bg: #07070a;
  --ink: #f2f2ef;
  --dim: #71717a;
  --lime: #c6ff3d;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  /* no scrolling anywhere: this is a space, not a document */
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* scanlines: the world is drawn as text, so it gets the CRT that text implies.
   Screen-blended and almost invisible, purely so the canvas reads as a screen
   and not as a gradient. */
.scan {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .032) 0 1px,
    rgba(0, 0, 0, 0) 1px 3px
  );
  mix-blend-mode: screen;
  opacity: .85;
}

@media (prefers-reduced-motion: reduce) {
  .scan { display: none; }
}

/* --- hud ------------------------------------------------------------ */

.hud {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: clamp(16px, 2.4vw, 30px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 4;
}

.hud__brand { display: flex; flex-direction: column; gap: 5px; }
.hud__mark { color: var(--lime); letter-spacing: .22em; font-weight: 600; }
.hud__sub { color: var(--dim); text-transform: none; letter-spacing: .01em; font-size: 10.5px; }

.hud__who {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  text-transform: none;
  letter-spacing: .01em;
  font-size: 11px;
}
.hud__dim { color: var(--dim); font-size: 10px; }

/* --- hint ----------------------------------------------------------- */

.hint {
  position: fixed;
  left: 50%;
  bottom: clamp(14px, 2.2vw, 26px);
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--dim);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .8s ease;
  z-index: 4;
}

.hint.is-gone { opacity: 0; }

kbd {
  font-family: inherit;
  font-size: inherit;
  border: 1px solid #2a2a31;
  border-radius: 3px;
  padding: 1px 5px;
  color: #a1a1aa;
}

/* --- links: real anchors, always readable --------------------------- */

.links {
  position: fixed;
  left: clamp(16px, 2.4vw, 30px);
  bottom: clamp(14px, 2.2vw, 26px);
  display: flex;
  gap: 16px;
  z-index: 5;
}

.links a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9a9aa3;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}

.links a:hover,
.links a:focus-visible {
  color: var(--lime);
  border-bottom-color: var(--lime);
  outline: none;
}

/* --- stats ---------------------------------------------------------- */

.stats {
  position: fixed;
  right: clamp(16px, 2.4vw, 30px);
  bottom: clamp(14px, 2.2vw, 26px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .05em;
  color: #4b4b54;
  text-align: right;
  white-space: pre;
  pointer-events: none;
  z-index: 4;
}

/* --- panel ---------------------------------------------------------- */

.panel {
  position: fixed;
  top: 50%;
  right: clamp(16px, 4vw, 56px);
  transform: translateY(-50%);
  width: min(330px, 78vw);
  padding: 22px 24px 24px;
  background: rgba(12, 12, 16, .82);
  border: 1px solid #24242c;
  border-radius: 2px;
  backdrop-filter: blur(14px);
  z-index: 6;
}

.panel[hidden] { display: none; }

.panel__row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}

.panel__tag { color: var(--lime); }

.panel__name {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}

.panel__desc {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #b4b4bc;
}

.panel__url {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 255, 61, .35);
}

.panel__url:hover { border-bottom-color: var(--lime); }

/* --- reduced motion: still a complete, readable page ---------------- */

@media (prefers-reduced-motion: reduce) {
  .hint { display: none; }
  body { cursor: default; }
}

/* --- narrow screens: the orbit becomes a row, so the chrome gets out
       of the way of the composition --------------------------------- */
@media (max-width: 760px) {
  .hint { display: none; }
  .stats { display: none; }
  .hud { padding: 14px 16px; }
  .hud__sub { display: none; }
  .links {
    left: 0;
    right: 0;
    bottom: 18px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 0 16px;
  }
  .links a { font-size: 10px; }
  .panel {
    left: 16px;
    right: 16px;
    width: auto;
    top: auto;
    bottom: 74px;
    transform: none;
  }
}
