:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --bg-soft: #151515;
  --fg: #f5f5f5;
  --muted: #4f4f4f;
  --line: rgba(128, 128, 128, 0.35);
  --glow: rgba(255, 0, 0, 0.35);
  --panel: rgba(2, 2, 2, 0.85);
  --accent: #ff0000;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  --glass: rgba(0, 0, 0, 0.62);
  --glass-border: rgba(128, 128, 128, 0.3);
}

@font-face {
  font-family: "HS_LunaObscura";
  src: url("assets/fonts/HS_LunaObscura.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #101010 0%, #090909 55%, #050505 100%);
  color: var(--fg);
  font-family: "Martian Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: crosshair;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.02), transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(255, 255, 255, 0.015), transparent 50%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: 0.35;
  mix-blend-mode: screen;
  pointer-events: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover .g {
  color: var(--fg);
}

.menu a {
  cursor: default;
}

.menu a:hover .g {
  color: var(--muted);
}

span.g {
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.column {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

.menu-desktop {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 26px 28px 18px;
  height: auto;
}

.menu-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px 12px;
}

.menu-item {
  height: auto;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  align-items: center;
}

.menu-mobile-words {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.menu-mobile-words .nav-left,
.menu-mobile-words .nav-right {
  width: auto;
  justify-content: center;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.nav-left {
  color: var(--fg);
}

.nav-right {
  color: var(--accent);
}

.menu-desktop .nav-left {
  justify-self: start;
  width: 100%;
  justify-content: flex-start;
  grid-column: 1;
}

.menu-desktop .nav-right {
  justify-self: end;
  width: 100%;
  justify-content: flex-end;
  grid-column: 3;
}

.menu-logo {
  justify-content: center;
  flex: 0;
  justify-self: center;
  align-items: center;
}

.menu-desktop .menu-logo {
  grid-column: 2;
}

.eye-icon {
  width: clamp(52px, 6vw, 110px);
  height: auto;
  color: var(--fg);
}

.site-header-mobile {
  display: none;
}

.site-header-desktop {
  display: block;
}

.font-luna {
  font-family: "HS_LunaObscura", "Martian Mono", monospace;
  font-weight: 400;
  letter-spacing: 0.02em;
  display: inline-block;
  width: max-content;
  max-width: 100%;
}

.corner-emojis {
  position: fixed;
  left: 22px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(2, auto);
  grid-auto-rows: auto;
  gap: 10px 14px;
  z-index: 2;
  color: var(--fg);
  font-family: "HS_LunaObscura", "Martian Mono", monospace;
  font-size: 30px;
  line-height: 1;
  pointer-events: none;
}

.corner-links {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.about-trigger {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(8, 8, 8, 0.7);
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 16px;
  height: 32px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 2;
}

.about-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 6;
}

.about-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.about-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.about-card {
  position: relative;
  width: min(560px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: rgba(8, 8, 8, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 22px 22px 18px;
  color: var(--fg);
  z-index: 1;
}

.about-title {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.about-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg);
  margin-bottom: 12px;
}

.about-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.drag-hint {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.is-mobile .drag-hint {
  opacity: 1;
}

body.is-mobile .drag-hint.is-hidden {
  opacity: 0;
}

.loading-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.04), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.02), transparent 60%),
    #050505;
  z-index: 9;
  color: var(--fg);
  transition: opacity 0.5s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-core {
  display: grid;
  gap: 26px;
  justify-items: center;
  grid-template-rows: auto auto;
}

.loading-eye {
  width: 120px;
  height: 70px;
  color: var(--fg);
  animation: eye-spin 6s linear infinite;
  filter: drop-shadow(0 0 14px rgba(255, 0, 0, 0.4));
  margin-bottom: 6px;
}

.loading-eye svg {
  width: 100%;
  height: 100%;
  display: block;
}

.loading-text {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

@keyframes eye-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.twitter-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
}

.twitter-link svg {
  width: 16px;
  height: 16px;
}

.contract {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 8, 8, 0.6);
  color: var(--fg);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
}

.contract-label {
  color: var(--muted);
}

.contract-value {
  font-family: "Martian Mono", monospace;
  letter-spacing: 0.08em;
}

.contract-status {
  position: absolute;
  top: -18px;
  right: 0;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--fg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.contract.copied .contract-status {
  opacity: 1;
}

.corner-emojis span:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.corner-emojis span:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.corner-emojis span:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.page {
  min-height: 100vh;
  padding: 100px 32px 48px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}

.overlay {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: max-content minmax(220px, 300px);
  gap: 18px;
  align-items: start;
  pointer-events: none;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.hero {
  display: grid;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  padding: 16px 18px;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.hero-eyebrow {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.32em;
}

h1 {
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 400;
}

.hero p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg);
}

.map-frame {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 0;
  padding: 48px 24px;
  border: none;
  box-shadow: none;
  overflow: hidden;
  z-index: 1;
}

.map-frame-desktop {
  display: flex;
}

.map-frame-mobile {
  display: none;
  touch-action: none;
}

.map-canvas {
  position: relative;
  width: min(1300px, 92vw);
  display: inline-block;
  transform-origin: center;
  will-change: transform;
}

.map-frame-mobile .map-canvas {
  width: 96vw;
}

.map-frame-mobile .point {
  transform: translate(-50%, -50%) scale(var(--point-scale, 1));
}

.map-stack {
  position: relative;
  width: 100%;
  z-index: 0;
}

.world-map {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(1.05);
  pointer-events: none;
}

.world-map.glitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.6;
  filter:
    drop-shadow(-4px 0 rgba(255, 0, 0, 0.7))
    drop-shadow(4px 0 rgba(0, 255, 255, 0.55));
}

.world-map.glitch-a {
  animation: glitch-scan-a 2.6s infinite steps(2, end);
}

.world-map.glitch-b {
  animation: glitch-scan-b 3.1s infinite steps(2, end);
}

.points {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.connector {
  position: fixed;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  transform-origin: 0 0;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.connector.is-visible {
  opacity: 1;
}

.point {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.7);
  cursor: pointer;
  border: 1px solid rgba(255, 0, 0, 0.65);
  animation: flicker 1.2s ease-in-out infinite;
}

.point::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 0, 0.5);
  animation: pulse 1.9s ease-in-out infinite;
}

.point[data-tone="dim"] {
  opacity: 1;
}

.point[data-tone="bright"] {
  opacity: 1;
}

.point:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 6px;
}

body.reduce-motion .world-map.glitch,
body.reduce-motion .glitch-layer,
body.reduce-motion .glitch-scanlines,
body.reduce-motion .glitch-flicker {
  display: none;
}

body.reduce-motion .point {
  animation: none;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.45);
}

body.reduce-motion .point::after {
  display: none;
}

body.reduce-motion .loading-eye {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .world-map.glitch,
  .glitch-layer,
  .glitch-scanlines,
  .glitch-flicker {
    display: none;
  }

  .point {
    animation: none;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.45);
  }

  .point::after {
    display: none;
  }

  .loading-eye {
    animation: none;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.2;
  }
  50% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes flicker {
  0%, 100% {
    opacity: 0.35;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.35);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.85);
  }
}

@keyframes glitch-scan-a {
  0% {
    transform: translate(0, 0);
    clip-path: inset(0 0 80% 0);
    opacity: 0.35;
  }
  12% {
    transform: translate(-4px, -2px);
    clip-path: inset(6% 0 55% 0);
    opacity: 0.7;
  }
  24% {
    transform: translate(4px, 2px);
    clip-path: inset(32% 0 28% 0);
  }
  36% {
    transform: translate(-3px, 1px);
    clip-path: inset(66% 0 10% 0);
    opacity: 0.6;
  }
  48%,
  100% {
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
    opacity: 0.3;
  }
}

@keyframes glitch-scan-b {
  0% {
    transform: translate(0, 0);
    clip-path: inset(55% 0 8% 0);
    opacity: 0.3;
  }
  16% {
    transform: translate(4px, 0);
    clip-path: inset(14% 0 50% 0);
    opacity: 0.65;
  }
  28% {
    transform: translate(-5px, 2px);
    clip-path: inset(4% 0 68% 0);
  }
  40% {
    transform: translate(3px, -2px);
    clip-path: inset(72% 0 4% 0);
  }
  52%,
  100% {
    transform: translate(0, 0);
    clip-path: inset(0 0 0 0);
    opacity: 0.25;
  }
}

.info-panel {
  position: fixed;
  top: 0;
  left: 0;
  background: var(--panel);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 16px;
  min-height: 220px;
  width: min(320px, 86vw);
  max-width: 320px;
  box-shadow: none;
  transform: translate(-10px, -10px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(12px);
  z-index: 3;
}

.info-panel.is-open {
  transform: translate(0, 0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.info-panel[data-side="left"] {
  transform-origin: right top;
}

.info-panel[data-side="right"] {
  transform-origin: left top;
}

.point.is-selected {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 6px;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.7);
}

.edit-panel {
  position: fixed;
  left: 18px;
  bottom: 16px;
  width: min(340px, 92vw);
  padding: 14px 14px 12px;
  z-index: 5;
  pointer-events: auto;
}

.edit-title {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.edit-label {
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 0.12em;
  text-align: center;
  flex: 1;
}

.edit-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.edit-coords {
  width: 100%;
  min-height: 110px;
  background: rgba(6, 6, 6, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--fg);
  padding: 10px;
  font-family: "Martian Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
}

.edit-btn {
  background: transparent;
  color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.edit-btn.primary {
  background: rgba(255, 255, 255, 0.08);
}

.edit-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.panel-head {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.panel-eyebrow {
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.panel-head h2 {
  font-family: "HS_LunaObscura", "Martian Mono", monospace;
  font-weight: 400;
}

.panel-media {
  display: grid;
  gap: 12px;
}

.panel-media img,
.panel-media video,
.panel-media .video-fallback {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  box-shadow: none;
}

.video-fallback {
  background: var(--bg-soft);
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.28em;
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.close:hover {
  background: rgba(255, 0, 0, 0.12);
  color: var(--accent);
}

.map-attrib {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(5, 5, 5, 0.65);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.map-attrib a {
  color: var(--fg);
  text-decoration: none;
}

.map-attrib a:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .overlay {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .menu-item {
    height: auto;
    font-size: 10px;
    letter-spacing: 0.2em;
  }
}

@media (max-width: 700px) {
  .site-header-desktop {
    display: none;
  }

  .site-header-mobile {
    display: block;
  }

  .map-frame-desktop {
    display: none;
  }

  .map-frame-mobile {
    display: flex;
  }

  .page {
    padding: 160px 16px 48px;
  }

  .hero {
    padding: 14px 16px;
    transform: translateY(-30px);
  }

  .overlay {
    gap: 32px;
  }

  .corner-emojis {
    display: none;
  }

  .corner-links {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }

  .about-trigger {
    left: 12px;
    bottom: 12px;
    transform: none;
  }

  .contract {
    font-size: 9px;
    letter-spacing: 0.12em;
  }
}
