:root {
  --bg: #000;
  --fg: #c9d1d9;
  --dim: #4a5562;
  --accent: #ff2d2d;
  --accent-soft: rgba(255, 45, 45, 0.35);
  --warn: #ffb000;
  --grid: rgba(255, 45, 45, 0.06);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Menlo", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font-family: var(--mono);
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 0.05em;
  position: relative;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(0, 0, 0, 0.88) 100%);
}

.hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  pointer-events: none;
  flex-wrap: nowrap;
}

.hud-top    { top: 0;    border-bottom: 1px solid rgba(255, 45, 45, 0.15); }
.hud-bottom { bottom: 0; border-top:    1px solid rgba(255, 45, 45, 0.15); }

.hud-cell {
  white-space: nowrap;
  letter-spacing: 0.15em;
}

.hud-cell::before {
  content: attr(data-label);
  color: var(--accent);
  margin-right: 0.6em;
  opacity: 0.85;
}

.stage {
  position: relative;
  z-index: 4;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 4.5rem 1.5rem;
}

.emblem {
  width: clamp(180px, 32vw, 360px);
  height: auto;
  filter:
    drop-shadow(0 0 28px var(--accent-soft))
    drop-shadow(0 0 4px rgba(255, 45, 45, 0.55));
  animation: pulse 4.2s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 24px var(--accent-soft))
      drop-shadow(0 0 4px rgba(255, 45, 45, 0.5));
    transform: scale(1);
  }
  50% {
    filter:
      drop-shadow(0 0 40px rgba(255, 45, 45, 0.65))
      drop-shadow(0 0 9px rgba(255, 45, 45, 0.85));
    transform: scale(1.012);
  }
}

.codename {
  position: relative;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  letter-spacing: 0.35em;
  color: var(--fg);
  text-shadow: 0 0 8px var(--accent-soft);
  font-weight: 500;
}

.codename::before,
.codename::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(100% 0 0 0);
  mix-blend-mode: screen;
  pointer-events: none;
}

.codename::before {
  color: #ff003c;
  text-shadow: 0 0 6px #ff003c;
  animation: glitch-a 4.6s infinite steps(1);
}

.codename::after {
  color: #00f0ff;
  text-shadow: 0 0 6px #00f0ff;
  animation: glitch-b 5.3s infinite steps(1);
}

@keyframes glitch-a {
  0%, 88%, 100% { clip-path: inset(100% 0 0 0); transform: translateX(0); }
  89%, 91%      { clip-path: inset(15% 0 65% 0); transform: translateX(-3px); }
  92%, 94%      { clip-path: inset(55% 0 25% 0); transform: translateX(2px); }
  95%, 97%      { clip-path: inset(35% 0 45% 0); transform: translateX(-1px); }
}

@keyframes glitch-b {
  0%, 86%, 100% { clip-path: inset(100% 0 0 0); transform: translateX(0); }
  88%, 90%      { clip-path: inset(40% 0 35% 0); transform: translateX(3px); }
  93%, 95%      { clip-path: inset(10% 0 70% 0); transform: translateX(-2px); }
  96%, 98%      { clip-path: inset(70% 0 15% 0); transform: translateX(2px); }
}

.tagline {
  font-size: 12px;
  color: var(--warn);
  letter-spacing: 0.3em;
  min-height: 1.4em;
  text-transform: uppercase;
}

.tagline::after {
  content: "\2590";
  margin-left: 0.4em;
  color: var(--accent);
  animation: blink 1.05s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 720px) {
  .hud {
    padding: 0.85rem 0.9rem;
    font-size: 10px;
    gap: 0.6rem;
  }
  .hud-cell { letter-spacing: 0.1em; }
  .hud-cell::before { margin-right: 0.35em; }
  .stage { gap: 1.25rem; padding: 4rem 1rem; }
  .codename { letter-spacing: 0.25em; }
}

@media (max-width: 420px) {
  .hud-top .hud-cell:nth-child(3),
  .hud-bottom .hud-cell:nth-child(3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emblem,
  .codename::before,
  .codename::after,
  .tagline::after { animation: none !important; }
  #rain { display: none; }
  .emblem { transform: none; }
}
