/* ═══════════════════════════════════════════════════════
   Global Intelligence Map — Globe Styles
   ═══════════════════════════════════════════════════════ */

/* ── Hero Context Bar ── */
.globe-hero {
  background: #0F1B2D;
  padding: calc(80px + 48px) 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.globe-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(2, 132, 199, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.globe-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.globe-hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B8860B;
  margin: 0 0 16px;
}

.globe-hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 5vw, 42px);
  color: #ffffff;
  margin: 0 0 16px;
  line-height: 1.15;
}

.globe-hero-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: #94A3B8;
  line-height: 1.65;
  margin: 0 0 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.globe-hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
}

.globe-hero-stat {
  text-align: center;
}

.globe-hero-stat-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: #0284C7;
  line-height: 1;
}

.globe-hero-stat-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #64748B;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 6px;
}

.globe-hero-scroll {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  animation: gentleBounce 2.5s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ── Globe container ── */
#globe-container {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  background: #050a14;
}

#globe-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Globe header overlay (filters + count only, no title) ── */
.globe-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 24px 40px 20px;
  background: linear-gradient(180deg, rgba(5,10,20,0.9) 0%, rgba(5,10,20,0.5) 50%, transparent 100%);
  pointer-events: none;
}

.globe-header > * {
  pointer-events: auto;
}

/* ── Stats counter ── */
#globe-count {
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 4px;
}

.gs-num {
  font-size: 32px;
  font-weight: 700;
  color: #0284C7;
  font-family: 'JetBrains Mono', monospace;
}

.gs-label {
  font-size: 14px;
  color: #94A3B8;
  margin-left: 8px;
}

/* ── Filter bar ── */
#globe-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.gf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: rgba(15, 27, 45, 0.7);
  color: #94A3B8;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.gf-btn:hover {
  border-color: rgba(14, 165, 233, 0.4);
  color: #e2e8f0;
  background: rgba(14, 165, 233, 0.1);
}

.gf-btn.active {
  border-color: #0284C7;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.2);
}

.gf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Tooltip ── */
#globe-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  background: rgba(10, 22, 40, 0.95);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 260px;
}

#globe-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.gt-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.gt-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.gt-hq {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #64748B;
}

/* ── Detail card ── */
#globe-card {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 320px;
  z-index: 50;
  background: rgba(10, 22, 40, 0.95);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 12px;
  padding: 24px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

#globe-card.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.gc-close:hover {
  background: rgba(14, 165, 233, 0.2);
  color: #ffffff;
}

.gc-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.gc-name {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.2;
}

.gc-meta {
  display: flex;
  gap: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 12px;
}

.gc-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gc-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.6;
  margin: 0 0 12px;
}

.gc-product {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #0284C7;
  margin-bottom: 16px;
}

.gc-product:empty {
  display: none;
}

.gc-link {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #0284C7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.gc-link:hover {
  color: #38BDF8;
}

/* ── Bottom legend/instructions ── */
.globe-legend {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  pointer-events: none;
}

.globe-instructions {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: #475569;
  display: flex;
  gap: 16px;
}

.globe-instructions span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.globe-instructions kbd {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #64748B;
}

/* ── Region stats bar ── */
.globe-regions {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 32px;
  pointer-events: none;
}

.gr-item {
  text-align: center;
  font-family: 'DM Sans', sans-serif;
}

.gr-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #0284C7;
}

.gr-label {
  font-size: 10px;
  color: #475569;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Loading state ── */
.globe-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #0284C7;
  letter-spacing: 0.1em;
  z-index: 5;
}

.globe-loading::after {
  content: '';
  animation: globeLoadDots 1.5s infinite;
}

@keyframes globeLoadDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .globe-header {
    padding: 16px 20px 14px;
  }

  .globe-hero-stats {
    gap: 24px;
  }

  .globe-hero-stat-value {
    font-size: 22px;
  }

  .globe-hero-desc {
    font-size: 14px;
  }

  .gs-num {
    font-size: 24px;
  }

  .gs-label {
    font-size: 12px;
  }

  #globe-filters {
    gap: 4px;
    max-height: 80px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .gf-btn {
    font-size: 11px;
    padding: 5px 10px;
  }

  #globe-card {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .gc-name {
    font-size: 18px;
  }

  .globe-legend {
    display: none;
  }

  .globe-regions {
    gap: 16px;
    bottom: 60px;
  }

  .gr-count {
    font-size: 16px;
  }

  .gr-label {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  #globe-container {
    height: calc(100vh - 60px);
    min-height: 400px;
  }

  .globe-hero {
    padding: calc(60px + 32px) 0 32px;
  }

  .globe-hero-stats {
    gap: 16px;
    flex-wrap: wrap;
  }

  .globe-hero-stat-value {
    font-size: 20px;
  }

  .globe-hero-stat-label {
    font-size: 10px;
  }

  #globe-filters {
    max-height: 36px;
  }

  .globe-regions {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════
   Resources Section — Below the Globe
   ═══════════════════════════════════════════════════════ */

.globe-resources {
  background: #ffffff;
  padding: 80px 0 96px;
  text-align: center !important;
}

.globe-resources .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.globe-resources-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B8860B;
  margin: 0 auto 12px !important;
  text-align: center !important;
  display: block;
  width: 100%;
  max-width: 100% !important;
}

.globe-resources-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 4vw, 36px);
  color: #0F1B2D;
  margin: 0 auto 12px !important;
  line-height: 1.2;
  text-align: center !important;
  width: 100%;
  max-width: 100% !important;
}

.globe-resources-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #64748B;
  line-height: 1.6;
  max-width: 560px !important;
  margin: 0 auto 48px !important;
  text-align: center !important;
}

.globe-resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

.globe-resource-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.globe-resource-card:hover {
  border-color: #1E3A5F;
  box-shadow: 0 4px 24px rgba(15, 27, 45, 0.08);
  transform: translateY(-2px);
}

.grc-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(15, 27, 45, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E3A5F;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.globe-resource-card:hover .grc-icon {
  background: #0F1B2D;
  color: #ffffff;
}

.grc-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: #0F1B2D;
  margin: 0 0 8px;
  line-height: 1.3;
}

.grc-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #64748B;
  line-height: 1.6;
  margin: 0 0 16px;
  flex-grow: 1;
}

.grc-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #1E3A5F;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.globe-resource-card:hover .grc-link {
  color: #0284C7;
}

.grc-link svg {
  transition: transform 0.2s ease;
}

.globe-resource-card:hover .grc-link svg {
  transform: translateX(3px);
}

/* Footer on globe page — use site navy (matches rest of site) */
/* No overrides needed — .footer defaults from style.css apply naturally */

@media (max-width: 768px) {
  .globe-resources {
    padding: 56px 0 64px;
  }

  .globe-resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .globe-resource-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .globe-resources-grid {
    grid-template-columns: 1fr;
  }
}
