:root {
  color-scheme: dark;
  --bg: #040109;
  --fg: #f8fbff;
  --muted: #9aa5c7;
  --accent: #ff2d78;
  --accent-2: #ffb347;
  --glass: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  font-family:
    "Space Grotesk",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

.grid-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 45, 120, 0.25),
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 10%,
      rgba(255, 179, 71, 0.25),
      transparent 45%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(39, 161, 255, 0.15),
      transparent 50%
    );
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5vw;
  backdrop-filter: blur(20px);
  background: rgba(4, 1, 9, 0.7);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.3em;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.85rem;
}

nav a:hover,
nav a:focus-visible {
  color: var(--fg);
}

.merchant-link {
  color: var(--accent);
}

main {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding-bottom: 5rem;
}

section {
  margin-top: 4rem;
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.5);
}

.hero {
  margin-top: 2rem;
  background: linear-gradient(
    135deg,
    rgba(255, 45, 120, 0.2),
    rgba(4, 1, 9, 0.9)
  );
}

.eyebrow {
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-size: 0.8rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin: 1rem 0;
}

.lead {
  color: var(--muted);
  max-width: 720px;
}

.postal-form {
  margin-top: 1.5rem;
}

.postal-form label {
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}

.input-wrap {
  display: flex;
  gap: 1rem;
}

input,
button,
textarea {
  font-family: inherit;
}

input,
textarea {
  flex: 1;
  padding: 1rem 1.4rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.5);
  color: var(--fg);
}

.postal-form button {
  background: var(--accent);
  color: var(--fg);
  border: none;
  border-radius: 16px;
  padding: 0 2rem;
  font-weight: 600;
  cursor: pointer;
}

.postal-form .hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.map-lab {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.map-copy {
  max-width: 520px;
}

.legend {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.legend span,
.legend i {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  display: inline-block;
}

.dot.gold {
  background: linear-gradient(135deg, #ffe08a, #ff9247);
}

.dot.grey {
  background: linear-gradient(135deg, #6d7384, #a4b1c8);
}

.dot.pulse {
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.map-stage {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.map-shell {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#mojoMap {
  width: 100%;
  height: 520px;
  filter: saturate(1.1) brightness(0.95);
}

.map-controls {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.filter {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: var(--fg);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

.filter.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.map-feed {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.4rem;
  background: rgba(0, 0, 0, 0.5);
}

.map-feed ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.map-feed li {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.8rem 1rem;
}

.map-feed li span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.drops header,
.bridge,
.guild,
.merchant-panel {
  background: rgba(0, 0, 0, 0.7);
}

.drop-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.drop-grid article {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.2rem;
  background: rgba(4, 9, 18, 0.8);
}

.drop-grid .tag {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent-2);
  text-transform: uppercase;
}

.drop-grid h3 {
  margin: 0.8rem 0;
}

.drop-grid .stock {
  color: var(--accent);
  font-weight: 600;
}

.jump-wa {
  width: 100%;
  border-radius: 16px;
  border: 1px solid transparent;
  padding: 0.9rem;
  margin-top: 0.5rem;
  font-weight: 600;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #040109;
  cursor: pointer;
}

.caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1rem;
}

.bridge ol {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-left: 1rem;
}

.bridge li {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.guild {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.guild div {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  background: rgba(10, 5, 20, 0.8);
}

.guild button {
  margin-top: 1rem;
  width: 100%;
}

.merchant-panel form {
  display: grid;
  gap: 1rem;
}

.merchant-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.merchant-panel button {
  padding: 0.9rem;
  border-radius: 16px;
  border: none;
  background: var(--accent);
  color: #040109;
  font-weight: 600;
}

footer {
  margin: 4rem auto;
  width: min(1200px, 92vw);
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1rem;
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  nav {
    flex-wrap: wrap;
  }
  .input-wrap {
    flex-direction: column;
  }
  .map-stage {
    grid-template-columns: 1fr;
  }
  section {
    padding: 1.5rem;
  }
}

/* Leaflet custom pins */
.leaflet-container {
  background: #050212;
}

.mojo-pin {
  transform: translate(-50%, -50%);
  position: relative;
  width: 18px;
  height: 18px;
}

.mojo-pin .pin-core {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.4);
  display: block;
  box-shadow: 0 0 15px rgba(255, 45, 120, 0.6);
}

.mojo-pin.alliance .pin-core {
  background: linear-gradient(135deg, #ffe08a, #ff9247);
}

.mojo-pin.scout .pin-core {
  background: linear-gradient(135deg, #5c6372, #9aa7c2);
}

.mojo-pin .pin-wave {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 45, 120, 0.5);
  animation: pulse 2.4s infinite;
}

.mojo-pin.scout .pin-wave {
  border-color: rgba(154, 167, 194, 0.4);
}

@keyframes pulse {
  0% {
    transform: scale(0.4);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.7);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

input.pulse {
  animation: input-glow 1.2s ease;
}

@keyframes input-glow {
  0% {
    box-shadow: 0 0 0 rgba(255, 45, 120, 0.6);
  }
  50% {
    box-shadow: 0 0 35px rgba(255, 179, 71, 0.8);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 45, 120, 0.1);
  }
}
