
:root {
  /* Museum dark palette */
  --void:        #080a0f;
  --exhibit:     #0d1117;
  --glass:       rgba(255,255,255,0.04);
  --border-dim:  rgba(255,255,255,0.08);

  /* Disaster type colors */
  --flood:       #5EA8FF;
  --storm:       #8C86FF;
  --epidemic:    #6EE7C8;
  --infestation: #D6E75B;
  --drought:     #FFC857;
  --wildfire:    #FFA142;
  --earthquake:  #C96B32;
  --volcano:     #FF695B;
  --landslide:   #7FE36A;
  --extreme-temperature: #FF5DB8;


  /* Color theme */
  --bluegrey:    #97AEC4;
  --bluesky:     #6EB6FF;
  --orange:      #FF8775;
  --bgcolor:     #0C1116;
  --text:        #FFF;
  --text-bright: #FFF;
  --text-mid:    #97AEC4;
  --text-dim:    rgba(151,174,196,0.58);
  --gradient-primary: linear-gradient(90deg, #97AEC4 0%, #6EB6FF 50%, #FF8775 100%);

  /* Typography */
  --font-inter: 'Inter', sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
  --font-typewriter: 'Special Elite', cursive;
  --font-garamond: 'Cormorant Garamond', serif;
  --font-body:    'Source Sans 3', sans-serif;
}


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

 html, body { height: 100%; }


body {
  background: var(--bgcolor);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow: hidden;
  min-height: 100vh;
}

/* very subtle starfield */
/* body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #ffffff, transparent),
    radial-gradient(1px 1px   at 73% 24%, #ffffff, transparent),
    radial-gradient(2px 2px   at 23% 67%, #ffffff, transparent),
    radial-gradient(1px 1px   at 88% 78%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 56% 88%, #ffffff, transparent),
    radial-gradient(1px 1px   at 41% 12%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 8% 82%, #ffffff, transparent),
    radial-gradient(1px 1px   at 35% 45%, #ffffff, transparent),
    radial-gradient(2px 2px   at 64% 55%, #ffffff, transparent),
    radial-gradient(1px 1px   at 92% 35%, #ffffff, transparent);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}  */

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================
   APP SHELL & SCENE TRANSITIONS
   ============================================ */

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* .scene {
  position: fixed;
  inset: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
} */

.scene.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* .scene.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
} */

/* WELCOME PAGE */

#timeTravel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.frame {
    position: relative;
    z-index: 1;
    height: 100vh;
    width: 100vw;
    padding: 3rem 4.5rem;
    display: grid;
    grid-template-rows: 1fr auto;
  }
 
.stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

/* ---------- LEFT SIDE — TITLE ---------- */
.left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 38rem;
  }
 
  .now-open {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
  }
 
  .now-open .word {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
 
  .compass {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex-shrink: 0;
  }
 
  h1 {
    font-family: var(--font-inter);
    font-weight: 700;
    font-size: clamp(2.6rem, 5.2vw, 4.8rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text);
  }
 
  h1 .earth {
    font-style: italic;
    font-weight: 400;
    color: var(--text);
  }
 
  h1 .gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
  }
 
  .lede {
    font-family: var(--font-inter);
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--bluegrey);
    font-weight: 400;
    max-width: 32rem;
  }
 
  /* ---------- RIGHT SIDE — TICKET ---------- */
  .right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
  }

 .ticket {
  position: relative;
  width: 600px;
  flex-shrink: 0;
  aspect-ratio: 3 / 1;
  background: var(--bluegrey);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 16px 70px 16px 22px;
  filter: drop-shadow(0 18px 40px rgba(122, 167, 230, 0.15));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 0.5s ease;
}

.ticket:hover {
  transform: translateY(-6px) scale(1.015);
  filter: drop-shadow(0 28px 60px rgba(122, 167, 230, 0.3));
}

/* Inner navy + Earth panel (the inset card) */
.ticket-inner {
  flex: 1;
  height: 100%;
  background-color: #142a47;
  background-image: url('../images/earth_ticket_img.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: lighten;
  position: relative;
  overflow: hidden;
}

.ticket-inner svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Barcode panel — sits on the light-blue card, to the right of the inner */
.ticket-barcode {
  position: absolute;
  top: 16px;
  bottom: 16px;
  right: 16px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ticket-barcode svg {
  width: 100%;
  height: 100%;
}

/* Hover overlay — covers the whole ticket */
.ticket-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 10;
}

.ticket:hover .ticket-overlay {
  opacity: 1;
  pointer-events: auto;
}


.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 2.2rem;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  cursor: pointer;
  transform: translateY(8px);
  transition: transform 0.4s ease, background 0.3s ease;
}

.ticket:hover .enter-btn {
  transform: translateY(0);
}

.enter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.enter-btn .arrow {
  transition: transform 0.3s ease;
}

.enter-btn:hover .arrow {
  transform: translateX(4px);
}

.click-hint {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--bluegrey);
  font-weight: 400;
  letter-spacing: 0.01em;
}
 
  /* ---------- FOOTER ---------- */
  footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--bluegrey);
    padding-top: 2rem;
  }

   .reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }
  .d1 { animation-delay: 0.05s; }
  .d2 { animation-delay: 0.20s; }
  .d3 { animation-delay: 0.40s; }
  .d4 { animation-delay: 0.55s; }
  .d5 { animation-delay: 0.75s; }
  .d6 { animation-delay: 0.90s; }
 
  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
 
  /* compass icons gentle rotation on hover of "NOW OPEN" */
  .now-open:hover .compass {
    animation: spin 4s linear infinite;
  }
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
 
  /* responsive */
  @media (max-width: 1100px) {
    .frame { padding: 2rem 2.4rem; }
    .stage { gap: 2.5rem; }
    .stage {
    grid-template-columns: 1fr;
    justify-items: center;
    }
  }
  @media (max-width: 880px) {
    html, body { overflow: auto; }
    .frame { height: auto; min-height: 100vh; padding: 1.6rem 1.4rem; }
    .stage { grid-template-columns: 1fr; gap: 2rem; }
    .ticket { width: 600px; }
    h1 { font-size: clamp(2rem, 9vw, 3rem); }
    footer { flex-direction: column; gap: 0.6rem; padding-top: 1.5rem; }
  }

/* ============================================
   MUSEUM NAVIGATION
   ============================================ */

/* ---------- Top bar ---------- */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 74px;
  padding: 0 26px 0 50px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgb(12, 17, 22);
}

.top-bar.hidden {
  display: none !important;
}

.brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-earth {
  font-style: italic;
}

.brand-dim {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.breadcrumb {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.breadcrumb .sep {
  margin: 0 10px;
  opacity: 0.5;
}

.top-bar-action {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
}

.top-bar > .pill-btn {
  grid-column: 3;
  justify-self: end;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: var(--text);
  background: rgba(12, 17, 22, 0.2);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}
.pill-btn .arrow { transition: transform .3s ease; }
.pill-btn:hover .arrow { transform: translateX(3px); }

@media (max-width: 640px) {
  .top-bar {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .brand {
    text-align: center;
    white-space: normal;
  }
  .breadcrumb {
    display: none;
  }
  .top-bar-action {
    min-width: 0;
    justify-content: center;
  }
  /* direct pill-btn child (country_timeline.html) */
  .top-bar > .pill-btn {
    font-size: 14px;
    padding: 7px 20px;
  }
}

#museum-nav {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 50px;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

#museum-nav.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-btn {
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  background: transparent;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  color: var(--text-bright);
  background: var(--glass);
}


/* Time travel section and ticket section - just containers */
.time-travel-section {
  position: relative;
  width: 100%;
  height: 25vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
  z-index: 2;
}


/* ============================================
   SCENE 2: GLOBE & MAP
   ============================================ */

#scene-globe {
  background: var(--bgcolor);
}

#globeCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#flatMapContainer {
  position: absolute;
  inset: 0;
  background: var(--void);
}

#flatMapSvg {
  width: 100%;
  height: 100%;
}

.view-toggle {
  position: absolute;
  top: 30px;
  right: 30px;
  display: flex;
  gap: 8px;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 30px;
  padding: 6px;
  z-index: 10;
}

.toggle-btn {
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-mid);
  background: transparent;
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: var(--bluegrey);
  color: #000;
}

.toggle-btn:not(.active):hover {
  color: var(--text-bright);
  background: var(--glass);
}

/* Filter Panel */
.filter-panel {
  position: absolute;
  left: 30px;
  bottom: 80px;
  width: 280px;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 20px;
  z-index: 10;
}

.filter-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.filter-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  text-transform: uppercase;
  display: block;
  margin: 16px 0 8px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-mid);
  background: var(--glass);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--glass);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-bright);
}

.chip.active {
  background: var(--c, var(--bluegrey));
  color: #000;
  border-color: transparent;
}

.year-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-display {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--bluegrey);
  min-width: 50px;
}

#yearSlider {
  flex: 1;
  height: 4px;
  background: var(--border-dim);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

#yearSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--bluegrey);
  border-radius: 50%;
  cursor: pointer;
}

#yearSlider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--bluegrey);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* Globe Legend */
.globe-legend {
  position: absolute;
  right: 30px;
  top: 100px;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px;
  min-width: 160px;
  z-index: 10;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Globe Tooltip */
.globe-tooltip {
  position: fixed;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 12px 16px;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.2s ease;
}

.globe-tooltip.hidden {
  opacity: 0;
}

.tooltip-country {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.tooltip-stat {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.tooltip-cta {
  font-size: 0.75rem;
  color: var(--bluegrey);
  font-style: italic;
}

.globe-point-tooltip {
  width: 230px;
  padding: 12px 14px;
  background: rgba(13, 17, 23, 0.96);
  border: 1px solid rgba(151, 174, 196, 0.38);
  border-radius: 8px;
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.globe-point-tooltip .tooltip-kicker {
  margin-bottom: 4px;
  color: var(--bluegrey);
  font-family: var(--font-inter);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.globe-point-tooltip .tooltip-country {
  margin-bottom: 5px;
  color: var(--text-bright);
}

.globe-point-tooltip .tooltip-stat {
  margin-bottom: 9px;
}

.scene-tooltip,
.float-tooltip-kap {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: inherit !important;
  z-index: 1000 !important;
}

.globe-country-bubble {
  width: var(--marker-size, 24px);
  height: var(--marker-size, 24px);
  display: block;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--marker-color, var(--bluegrey)) 70%, #ffffff 30%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--marker-color, var(--bluegrey)) 78%, transparent);
  box-shadow:
    0 0 6px color-mix(in srgb, var(--marker-color, var(--bluegrey)) 60%, transparent),
    0 0 16px color-mix(in srgb, var(--marker-color, var(--bluegrey)) 28%, transparent);
  opacity: calc(var(--angle-opacity, 1) * 0.85);
  cursor: pointer;
  pointer-events: auto;
  transition: filter 0.18s ease;
}

.globe-country-bubble:hover,
.globe-country-bubble:focus-visible {
  opacity: var(--angle-opacity, 1);
  filter: saturate(1.25) brightness(1.08);
}

.globe-country-bubble:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--marker-color, var(--bluegrey)) 60%, #ffffff 40%);
  outline-offset: 3px;
}

/* ============================================
   SCENE 3: COUNTRY DETAIL WITH ZOOMED MAP
   ============================================ */

#scene-country {
  background: var(--void);
}

/* Split Layout: Map Left, Stats Right */
.country-layout {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* Left: Zoomed Country Map */
.country-map-section {
  flex: 1;
  background: var(--void);
  position: relative;
  overflow: hidden;
}

/* Right: Country Stats Panel */
.country-panel {
  width: 450px;
  background: var(--exhibit);
  border-left: 1px solid var(--border-dim);
  padding: 30px;
  overflow-y: auto;
  z-index: 20;
}

.panel-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  font-size: 1.5rem;
  color: var(--text-mid);
  transition: color 0.2s ease;
}

.panel-close:hover {
  color: var(--text-bright);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.country-flag {
  width: 60px;
  height: 60px;
  background: var(--glass);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.panel-country-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-bright);
  line-height: 1.2;
}

.panel-region {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--void);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 16px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--bluegrey);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-mid);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-chart-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  margin: 24px 0 12px;
}

.mini-chart {
  width: 100%;
  height: 120px;
  background: var(--void);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 12px;
}


/* ============================================
   SCENE 4: EARTH STORY
   ============================================ */

#scene-story {
  background: var(--void);
  padding: 40px;
  overflow-y: auto;
}

.story-header {
  text-align: center;
  margin-bottom: 40px;
}

.story-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--text-bright);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.story-subtitle {
  font-size: 1rem;
  color: var(--text-mid);
  margin-bottom: 24px;
}

.story-toggle {
  display: inline-flex;
  gap: 8px;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 30px;
  padding: 6px;
}

.toggle-pill {
  padding: 8px 24px;
  font-size: 0.9rem;
  color: var(--text-mid);
  background: transparent;
  border-radius: 24px;
  transition: all 0.3s ease;
}

.toggle-pill.active {
  background: var(--bluegrey);
  color: #000;
}

.toggle-pill:not(.active):hover {
  color: var(--text-bright);
}

/* Exhibits Hall (Overview) */
.exhibits-hall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.wall-exhibit {
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--bluegrey);
}

.exhibit-spotlight {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,213,79,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.exhibit-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--bluegrey);
  margin-bottom: 8px;
}

.exhibit-wall-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-bright);
  margin-bottom: 6px;
  line-height: 1.2;
}

.exhibit-wall-subtitle {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.exhibit-viz-area {
  width: 100%;
  height: 300px;
  background: var(--void);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 16px;
}

.exhibit-caption {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.4;
}

/* Deep Dive Panel */
.deep-dive-panel {
  max-width: 1200px;
  margin: 0 auto;
}

.deep-dive-panel.hidden {
  display: none;
}

.deep-select-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.deep-select {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--exhibit);
  color: var(--text-bright);
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  cursor: pointer;
}

.deep-select:focus {
  outline: none;
  border-color: var(--bluegrey);
}

.deep-viz-container {
  width: 100%;
  height: 500px;
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
}

.deep-annotation {
  padding: 20px;
  background: var(--glass);
  border-left: 3px solid var(--bluegrey);
  border-radius: 6px;
  color: var(--text-mid);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1440px) {
  .museum-title h1 {
    font-size: 3.8rem;
  }

  .country-panel {
    width: 400px;
  }

  .exhibits-hall {
    gap: 24px;
  }

  .exhibit-viz-area {
    height: 260px;
  }
}

@media (max-width: 1024px) {
  .museum-title h1 {
    font-size: 3rem;
  }

  .ticket {
    width: 340px;
    height: 200px;
  }

  .ticket-title {
    font-size: 1.5rem;
  }

  .filter-panel {
    width: 240px;
    left: 20px;
    bottom: 70px;
  }

  .country-layout {
    flex-direction: column;
  }

  .country-map-section {
    height: 50vh;
  }

  .country-panel {
    width: 100%;
    height: 50vh;
  }

  .exhibits-hall {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .story-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .museum-title h1 {
    font-size: 2.2rem;
  }

  .ticket {
    width: 300px;
    height: 180px;
  }

  .ticket-title {
    font-size: 1.3rem;
  }

  .view-toggle {
    top: 20px;
    right: 20px;
    font-size: 0.8rem;
  }

  .filter-panel {
    width: 200px;
    padding: 16px;
  }

  .country-panel {
    width: 100%;
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  #scene-story {
    padding: 24px;
  }

  .story-title {
    font-size: 2rem;
  }

  .deep-viz-container {
    height: 400px;
    padding: 20px;
  }
}

/* ============================================
   SCENE 2: 3D GLOBE WITH SPACE BACKGROUND
   ============================================ */

#starfieldCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#globeContainer {
  position: absolute;
  inset: 0;
  background: transparent;
  overflow: hidden;
  z-index: 2;
}

@keyframes twinkle {
  from { transform: translateY(0); }
  to { transform: translateY(-200px); }
}

/* Figma globe overlay */
#scene-globe {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ── Navigation stack overlay ──────────────────────────────────── */
.timeline-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.timeline-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.timeline-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.globe-filter-panel {
  position: absolute;
  top: calc(74px + 18px);
  left: 22px;
  bottom: auto;
  width: 285px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 19px 14px;
  background: var(--bgcolor);
  border: 1px solid #353738;
  border-radius: 20px;
  color: var(--text);
  max-height: calc(100vh - 74px - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 80;
  scrollbar-color: rgba(151,174,196,0.5) transparent;
  scrollbar-width: thin;
}

.globe-filter-panel::-webkit-scrollbar {
  width: 6px;
}

.globe-filter-panel::-webkit-scrollbar-thumb {
  background: rgba(151,174,196,0.45);
  border-radius: 999px;
}

.filter-section {
  width: 100%;
}

.filter-title {
  margin: 0 0 11px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--bluegrey);
  text-transform: uppercase;
}

.year-range-control {
  width: 100%;
}

.range-values {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding-right: 1px;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1;
  color: var(--bluegrey);
}

.range-slider {
  position: relative;
  width: 100%;
  height: 24px;
  margin-top: 2px;
}

.range-track {
  position: absolute;
  top: 9px;
  left: 6px;
  right: 6px;
  height: 6px;
  background: rgba(151, 174, 196, 0.45);
  border-radius: 20px;
}

.range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(151, 174, 196, 0.85);
  border-radius: inherit;
}

.range-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-input:focus-visible {
  outline: none;
}

.range-input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(151, 174, 196, 0.24);
}

.range-input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(151, 174, 196, 0.24);
}

.range-input::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.range-input::-moz-range-track {
  height: 6px;
  background: transparent;
}

.range-input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--bluegrey);
  cursor: pointer;
  pointer-events: auto;
  margin-top: -3px;
  -webkit-appearance: none;
  appearance: none;
}

.range-input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--bluegrey);
  cursor: pointer;
  pointer-events: auto;
}

.range-input-min {
  z-index: 3;
}

.range-input-max {
  z-index: 4;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 26px;
  padding: 5px 11px;
  color: var(--text);
  background: #3E4955;
  border: 1px solid var(--bluegrey);
  border-radius: 10px;
  font-family: var(--font-inter);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-transform: capitalize;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.chip[data-type]::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--c, var(--bluegrey));
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 50%;
}

.chip.active {
  color: var(--text);
  background: #3E4955;
  border-color: var(--bluegrey);
}

.chip:hover,
.chip:focus-visible {
  border-color: #D6E8F7;
  color: var(--text);
}

.chip:focus-visible {
  outline: 2px solid rgba(151, 174, 196, 0.45);
  outline-offset: 2px;
}

.chip:not(.active):not(.chip-action) {
  color: rgba(255,255,255,0.62);
  background: rgba(62,73,85,0.38);
  border-color: rgba(151,174,196,0.32);
}

.chip:not(.active):not(.chip-action)::before {
  opacity: 0.42;
}

.chip-action {
  padding-inline: 12px;
}

.events-widget {
  width: 100%;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 13px 20px;
  border: 1px solid rgba(151,174,196,0.3);
  border-radius: 15px;
  text-align: center;
}

.events-count {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 0.95;
  color: var(--text);
}

.events-label {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  color: var(--bluegrey);
  text-transform: uppercase;
}

.data-status {
  max-width: 180px;
  margin-top: 2px;
  color: var(--orange);
  font-family: var(--font-inter);
  font-size: 10px;
  line-height: 1.2;
  text-transform: none;
}

.earth-story-card {
  position: absolute;
  right: 27px;
  bottom: 28px;
  width: min(369px, calc(100vw - 54px));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(12, 17, 22, 0.96);
  border: 1px solid rgba(151, 174, 196, 0.35);
  border-radius: 15px;
  color: var(--text);
  z-index: 80;
}

.earth-story-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  text-transform: uppercase;
}

.earth-story-card p {
  max-width: 310px;
  margin: 0;
  font-family: var(--font-inter);
  font-size: 18px;
  line-height: 1.05;
  color: var(--text);
}

.earth-story-button {
  min-width: 92px;
  padding: 6px 24px;
  border: 1px solid var(--bluegrey);
  border-radius: 20px;
  color: var(--text);
  background: transparent;
  font-family: var(--font-inter);
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.earth-story-button:hover,
.earth-story-button:focus-visible {
  background: rgba(151, 174, 196, 0.14);
  border-color: #D6E8F7;
}

.earth-story-button:focus-visible {
  outline: 2px solid rgba(151, 174, 196, 0.45);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .globe-filter-panel {
    left: 16px;
    top: calc(74px + 16px);
    width: min(285px, calc(100vw - 32px));
  }

  .earth-story-card {
    right: 16px;
    bottom: 16px;
    width: min(340px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  .globe-filter-panel {
    top: calc(92px + 16px);
    max-height: calc(100vh - 92px - 32px);
    overflow-y: auto;
  }

  .earth-story-card {
    display: none;
  }
}

/* ============================================
   SCENE 3: OVERVIEW
   ============================================ */


.back-button {
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  background: var(--glass);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.back-button:hover {
  color: var(--text-bright);
  background: rgba(255,255,255,0.08);
}


/* Overview View */
.overview-view {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  background: var(--void);
  padding: 40px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.overview-card {
  background: var(--exhibit);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  padding: 30px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.overview-card-header {
  margin-bottom: 24px;
}

.overview-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-bright);
  margin: 0 0 8px 0;
  letter-spacing: 0.05em;
}

.overview-card-header p {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin: 0;
}

.overview-viz {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  min-height: 300px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}
