:root {
  --bg: #0d0d0d;
  --red: #bf564d;
  --ink: #141414;
  --fg: #ece9e6;
  --muted: #8b8884;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Archivo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* lock to the viewport, no scrolling */
}

/* background canvas */
#net-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* HUD labels, inserted by JS */
#hud {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
}

/* Individual HUD labels */
.hud-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 300ms ease;
  color: var(--red);
  font-size: clamp(9px, 1.2vw, 12px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hud-label.visible { opacity: 1; }

/* Inverted triangle marker (like Watch Dogs node indicators) */
.hud-label::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--marker-color, var(--red));
  flex-shrink: 0;
}

.hud-label .label-text {
  background: rgba(13,13,13,0.85);
  border: 1px solid var(--red);
  padding: 2px 6px;
  line-height: 1.4;
}
.hud-label .label-sub {
  display: block;
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* muted WARNING variant */
.hud-label.warning { color: var(--muted); }
.hud-label.warning::before { border-top-color: var(--marker-color, var(--muted)); }
.hud-label.warning .label-text { border-color: var(--muted); }

/* Main content stage */
.stage {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100dvh; /* dvh so mobile browser chrome doesn't clip it */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 56px);
  padding: 20px;
}

/* each part eases up into place on a slight stagger */
.plate,
.wordmark,
.tagline {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.stage.visible .plate,
.stage.visible .wordmark,
.stage.visible .tagline {
  opacity: 1;
  transform: translateY(0);
}
.stage.visible .plate    { transition-delay: 0ms; }
.stage.visible .wordmark { transition-delay: 150ms; }
.stage.visible .tagline  { transition-delay: 320ms; }

/* [410] plate */
.plate {
  --code: clamp(36px, 7.4vw, 76px);
  display: inline-flex;
  align-items: center;
  gap: calc(var(--code) * 0.2);
  background: var(--red);
  padding: calc(var(--code) * 0.26) calc(var(--code) * 0.34);
  border-radius: calc(var(--code) * 0.09);
}
.code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: var(--code);
  line-height: 0.8;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.bracket {
  width: calc(var(--code) * 0.17);
  height: calc(var(--code) * 0.74);
  border: calc(var(--code) * 0.12) solid var(--ink);
}
.bracket-l { border-right: 0; }
.bracket-r { border-left: 0; }

.wordmark-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.title {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
}
.wordmark {
  margin: 0;
  font-weight: 600;
  font-size: clamp(18px, 3.8vw, 40px);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  text-indent: 0.42em;
  color: var(--muted);
}

/* tagline / scramble */
.tagline {
  margin: 0;
  width: min(94vw, 560px);
  min-height: 1.6em;
  line-height: 1.6;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: clamp(12px, 2.3vw, 17px);
  color: var(--muted);
  cursor: default;
}
.tagline .line { display: inline-block; width: var(--line-w, auto); text-align: left; white-space: nowrap; }
.tagline .cell { position: relative; display: inline-block; text-align: center; }
.tagline .vc { width: 1ch; }
.tagline .vg { width: 2.4ch; }
.tagline .lb { display: inline-block; }
.tagline .la {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
}
.tagline .v-glyph { width: 0.92em; height: 0.92em; vertical-align: -0.14em; color: var(--red); }
.tagline .v-glyph.tg { width: 1.1ch; height: 1.1ch; }

/* prefers-reduced-motion: skip entire intro */
@media (prefers-reduced-motion: reduce) {
  .stage { opacity: 1; transition: none; }
  #hud { display: none; }
  .plate,
  .wordmark,
  .tagline {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
