:root {
  color-scheme: dark;
  background: #070708;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 47%, rgba(255, 65, 24, 0.08), transparent 16rem),
    radial-gradient(circle at 50% 50%, #111115 0, #09090b 32rem, #060607 72rem);
  color: #f5f5f7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: radial-gradient(circle at center, black, transparent 68%);
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0,
    rgba(255, 255, 255, 0.012) 50%,
    transparent 100%
  );
  background-size: 100% 7px;
  content: "";
  opacity: 0.35;
  pointer-events: none;
}

.hud {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  color: #ff4b20;
  pointer-events: none;
}

.hud::before {
  position: absolute;
  top: -30%;
  left: 0;
  width: 100%;
  height: 22%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 75, 32, 0.025) 70%,
    rgba(255, 75, 32, 0.11)
  );
  content: "";
  filter: blur(1px);
  animation: hud-scanline 11s linear infinite;
}

.hud-radar {
  position: absolute;
  top: 50%;
  left: clamp(-12rem, 3vw, 4rem);
  width: min(72vmin, 46rem);
  aspect-ratio: 1;
  transform: translateY(-50%);
}

.hud-ring,
.hud-sweep,
.hud-reticle {
  position: absolute;
  border-radius: 50%;
}

.hud-ring {
  inset: 0;
  opacity: 0.36;
}

.hud-ring-alpha {
  background: repeating-conic-gradient(
    from 8deg,
    rgba(255, 75, 32, 0.48) 0 0.7deg,
    transparent 0.7deg 8deg
  );
  mask: radial-gradient(transparent 68%, black 68.3% 69%, transparent 69.3%);
  animation: hud-rotate 54s linear infinite;
}

.hud-ring-beta {
  inset: 12%;
  background: repeating-conic-gradient(
    from 34deg,
    rgba(255, 255, 255, 0.21) 0 0.25deg,
    transparent 0.25deg 4deg
  );
  mask: radial-gradient(transparent 73%, black 73.4% 74%, transparent 74.4%);
  animation: hud-rotate-reverse 38s linear infinite;
}

.hud-ring-gamma {
  inset: 26%;
  border: 1px dashed rgba(255, 75, 32, 0.18);
  animation: hud-rotate 30s linear infinite;
}

.hud-sweep {
  inset: 8%;
  background: conic-gradient(
    from 0deg,
    transparent 0 308deg,
    rgba(255, 75, 32, 0.015) 324deg,
    rgba(255, 75, 32, 0.12) 355deg,
    rgba(255, 75, 32, 0.45) 359deg,
    transparent 360deg
  );
  mask: radial-gradient(circle, transparent 0 21%, black 34% 74%, transparent 75%);
  animation: hud-rotate 9s linear infinite;
}

.hud-reticle {
  inset: 42%;
  border: 1px solid rgba(255, 75, 32, 0.22);
  box-shadow: 0 0 28px rgba(255, 75, 32, 0.05);
  animation: hud-reticle-pulse 3.5s ease-in-out infinite;
}

.hud-reticle::before,
.hud-reticle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 75, 32, 0.42), transparent);
  content: "";
  transform: translate(-50%, -50%);
}

.hud-reticle::before {
  width: 230%;
  height: 1px;
}

.hud-reticle::after {
  width: 1px;
  height: 230%;
  background: linear-gradient(transparent, rgba(255, 75, 32, 0.42), transparent);
}

.hud-trace {
  position: absolute;
  top: 50%;
  width: 28vw;
  height: 1px;
  opacity: 0.4;
}

.hud-trace::after {
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 13px currentcolor;
  content: "";
}

.hud-trace-left {
  left: 0;
  background: linear-gradient(90deg, transparent, currentcolor);
}

.hud-trace-left::after {
  right: 0;
}

.hud-trace-right {
  right: 0;
  background: linear-gradient(90deg, currentcolor, transparent);
}

.hud-trace-right::after {
  left: 0;
}

.hud-readout {
  position: absolute;
  color: rgba(255, 255, 255, 0.19);
  font-family: "Zen Dots", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hud-readout-top {
  top: clamp(1.5rem, 4vw, 3.5rem);
  left: clamp(1.5rem, 5vw, 5rem);
}

.hud-readout-side {
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 50%;
  transform: translateX(45%) rotate(90deg);
  transform-origin: center;
}

.hud-pulse {
  position: absolute;
  right: 7vw;
  bottom: 12vh;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 16px currentcolor;
}

.hud-pulse::before,
.hud-pulse::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(255, 75, 32, 0.7);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
  animation: hud-ping 3s ease-out infinite;
}

.hud-pulse::after {
  animation-delay: 1.5s;
}

.stage {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(2rem, 6vw, 5rem);
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
}

.portal {
  display: grid;
  width: min(100%, 62rem);
  margin: auto;
  align-items: center;
  grid-template-columns: minmax(15rem, 21rem) minmax(0, 32rem);
  justify-content: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}

.identity {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
}

.wordmark {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #f7f7f8;
  font-family: "Zen Dots", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.08);
}

.wordmark-accent {
  color: #ff4b20;
  text-shadow:
    0 0 18px rgba(255, 75, 32, 0.28),
    0 0 48px rgba(255, 49, 20, 0.12);
}

.signal {
  position: absolute;
  inset: 0;
  width: 100%;
  aspect-ratio: 1;
  opacity: 0.82;
  animation: signal-breathe 6s ease-in-out infinite;
}

.signal-ring,
.signal-axis,
.signal-node {
  position: absolute;
  display: block;
}

.signal-ring {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 50%;
}

.signal-ring-outer {
  border-top-color: rgba(255, 75, 32, 0.34);
  border-right-color: rgba(255, 255, 255, 0.035);
  animation: orbit 18s linear infinite;
}

.signal-ring-inner {
  inset: 13%;
  border-color: rgba(255, 255, 255, 0.045);
  border-bottom-color: rgba(255, 75, 32, 0.24);
  animation: orbit-reverse 14s linear infinite;
}

.signal-axis-horizontal {
  top: 50%;
  left: -14%;
  width: 128%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.signal-axis-vertical {
  top: -14%;
  left: 50%;
  width: 1px;
  height: 128%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.08), transparent);
}

.signal-node {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff4b20;
  box-shadow: 0 0 12px rgba(255, 75, 32, 0.8);
}

.signal-node-top,
.signal-node-bottom {
  left: calc(50% - 2px);
}

.signal-node-left,
.signal-node-right {
  top: calc(50% - 2px);
}

.signal-node-top {
  top: -2px;
}

.signal-node-right {
  right: -2px;
}

.signal-node-bottom {
  bottom: -2px;
}

.signal-node-left {
  left: -2px;
}

.message {
  position: relative;
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-left: 1px solid rgba(255, 75, 32, 0.34);
  background: linear-gradient(90deg, rgba(255, 75, 32, 0.045), transparent 72%);
}

.message::before,
.message::after {
  position: absolute;
  left: -1px;
  width: 2.75rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 75, 32, 0.72), transparent);
  content: "";
}

.message::before {
  top: 0;
}

.message::after {
  bottom: 0;
}

.message-label {
  margin: 0 0 1.15rem;
  color: #ff4b20;
  font-family: "Zen Dots", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message h2 {
  margin: 0 0 1.5rem;
  color: #f5f5f7;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.message h2 span {
  display: block;
  color: #b4b4bb;
}

.message > p:not(.message-label) {
  max-width: 52ch;
  margin: 0;
  color: #888891;
  font-size: clamp(0.82rem, 1.5vw, 0.92rem);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.message > p + p {
  margin-top: 1rem;
}

.message strong {
  color: #ff4b20;
  font-family: "Zen Dots", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92em;
  font-weight: 400;
  letter-spacing: 0.06em;
}

footer {
  width: 100%;
  padding-top: 2rem;
  color: #48484f;
  font-family: "Zen Dots", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit-reverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes signal-breathe {
  0%,
  100% {
    opacity: 0.64;
    transform: scale(0.985);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.015);
  }
}

@keyframes hud-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hud-rotate-reverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes hud-scanline {
  from {
    transform: translateY(-10vh);
  }
  to {
    transform: translateY(150vh);
  }
}

@keyframes hud-reticle-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.04);
  }
}

@keyframes hud-ping {
  from {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(12);
  }
}

@media (max-width: 520px) {
  body::before {
    background-size: 36px 36px;
  }

  .hud-radar {
    top: 26%;
    left: 50%;
    width: min(118vw, 32rem);
    transform: translate(-50%, -50%);
  }

  .hud-readout-top {
    top: 1rem;
    left: 1.25rem;
  }

  .hud-readout-side,
  .hud-trace-right {
    display: none;
  }

  .hud-trace-left {
    top: 26%;
    width: 18vw;
  }

  .stage {
    padding: 2rem 1.25rem 1.5rem;
  }

  .portal {
    width: calc(100vw - 2.5rem);
    max-width: 24rem;
    grid-template-columns: minmax(0, 1fr);
    justify-self: center;
    gap: 1.25rem;
  }

  .identity {
    width: 12rem;
    margin-inline: auto;
  }

  .message {
    width: 100%;
    padding: 1.35rem 1.25rem;
  }

  .message h2 {
    margin-bottom: 1.1rem;
  }

  footer {
    padding-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hud::before,
  .hud-ring,
  .hud-sweep,
  .hud-reticle,
  .hud-pulse::before,
  .hud-pulse::after,
  .signal,
  .signal-ring {
    animation: none;
  }
}
