/* ═══════════════════════════ DUNE & TWILIGHT DESIGN SYSTEM ═══════════════════════════ */

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

body {
  font-family: 'Manrope', sans-serif;
  background-color: #161311;
  color: #eae1dd;
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ─── Material Symbols ─── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ─── Glassmorphism ─── */
.glass-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(35, 31, 29, 0.65);
  border: 1px solid rgba(80, 69, 59, 0.12);
  background-image: linear-gradient(135deg, rgba(242, 190, 140, 0.03) 0%, rgba(212, 163, 115, 0.01) 100%);
}

/* ─── Scanline Overlay ─── */
.hud-scanline {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(242, 190, 140, 0.03) 2px,
    rgba(242, 190, 140, 0.03) 2.5px
  );
  background-size: 100% 4px;
}

/* ─── Route Glow ─── */
.route-glow {
  filter: drop-shadow(0 0 8px #f2be8c);
}

/* ─── Map Container ─── */
#map {
  width: 100%;
  height: 100%;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-top-left,
.maplibregl-ctrl-top-right {
  display: none !important;
}

.maplibregl-canvas {
  outline: none;
}

/* ─── Custom Map Markers ─── */
.site-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #accec5;
  border: 2px solid rgba(172, 206, 197, 0.6);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(172, 206, 197, 0.5), 0 0 24px rgba(172, 206, 197, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.site-marker::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  border: 1px solid rgba(172, 206, 197, 0.3);
  animation: marker-pulse 3s ease-in-out infinite;
}

.site-marker:hover {
  transform: scale(1.3);
  background: #f2be8c;
  border-color: rgba(242, 190, 140, 0.6);
  box-shadow: 0 0 16px rgba(242, 190, 140, 0.6), 0 0 32px rgba(242, 190, 140, 0.3);
}

.site-marker.active {
  background: #f2be8c;
  border-color: rgba(242, 190, 140, 0.6);
  box-shadow: 0 0 16px rgba(242, 190, 140, 0.6), 0 0 32px rgba(242, 190, 140, 0.3);
}

@keyframes marker-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.8); opacity: 0; }
}

/* Journey position dot */
.journey-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f2be8c;
  box-shadow: 0 0 12px rgba(242, 190, 140, 0.7), 0 0 24px rgba(242, 190, 140, 0.3);
}

.journey-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1px solid rgba(242, 190, 140, 0.4);
  animation: journey-ping 2s ease-in-out infinite;
}

@keyframes journey-ping {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(2); opacity: 0; }
}

/* ─── Las Vegas marker ─── */
.lv-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9c8e82;
  border: 1px solid rgba(156, 142, 130, 0.5);
}

/* ─── View Transitions ─── */
.view-panel {
  transition: opacity 0.6s ease;
}

.view-panel.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

/* ─── Elevation chart bars ─── */
.elev-bar {
  flex: 1;
  min-width: 0;
  border-radius: 1px 1px 0 0;
  transition: height 0.5s ease, background-color 0.3s ease;
}

.elev-bar.past {
  background: rgba(242, 190, 140, 0.2);
}

.elev-bar.current {
  background: #f2be8c;
  box-shadow: 0 0 12px rgba(242, 190, 140, 0.4);
}

.elev-bar.future {
  background: rgba(80, 69, 59, 0.25);
}

/* ─── Sidebar active states ─── */
.sidebar-btn.active {
  color: #f2be8c;
  background: rgba(57, 52, 49, 0.4);
}

/* ─── Nav link active ─── */
.nav-link.active {
  color: #f2be8c !important;
  border-bottom: 1px solid #f2be8c;
  padding-bottom: 4px;
}

/* ─── Tag chips ─── */
.tag-chip {
  padding: 4px 10px;
  background: rgba(57, 52, 49, 0.4);
  border: 1px solid rgba(80, 69, 59, 0.25);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 9999px;
  color: #d4c4b7;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
}

/* ─── Subtle gold glow on primary buttons ─── */
.btn-glow:hover {
  box-shadow: 0 0 20px rgba(242, 190, 140, 0.3);
}

/* ─── Custom scrollbar (hidden) ─── */
::-webkit-scrollbar { display: none; }

/* ─── Parchment gradient overlay for large panels ─── */
.parchment-overlay {
  background: linear-gradient(135deg, rgba(242, 190, 140, 0.05) 0%, rgba(212, 163, 115, 0.03) 100%);
}
