/* ==========================================================================
   QuoteFleet — Free Rates Database globe section
   Dark section, QuoteFleet blue. Coheres with the landing's .section system.
   ========================================================================== */

.qf-globe-section {
  position: relative;
  background: var(--bg, #161616);
  overflow: hidden;
  padding: clamp(56px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--border, rgba(133, 128, 123, 0.18));
}

/* Soft brand glow behind the globe */
.qf-globe-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(760px, 92vw);
  height: min(760px, 92vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(110, 139, 255, 0.12) 0%,
    rgba(110, 139, 255, 0.04) 38%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

.qf-globe-head {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.qf-globe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6E8BFF; /* was var(--accent): computes cobalt #0d3cfc on qf-wft — 2.6:1 */
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0;
  border: none;
  background: transparent;
  margin-bottom: 18px;
}

.qf-globe-head h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--ink, #f9f9f9);
  margin: 0 0 16px;
}

.qf-globe-head h2 .qf-globe-accent {
  color: #6E8BFF; /* was var(--accent): computes cobalt on qf-wft — failed contrast */
}

.qf-globe-head p {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  color: var(--muted, #a39e99);
  max-width: 620px;
  margin: 0 auto;
}

/* ── Globe viewport (crops the oversized globe to frame North America) ── */
.qf-globe-viewport {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  height: 600px;
  margin: 8px auto 0;
  overflow: hidden;
}

.qf-globe-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#qf-globe-canvas {
  opacity: 0;
  transition: opacity 0.9s ease;
  cursor: grab;
}
#qf-globe-canvas:active {
  cursor: grabbing;
}
.qf-globe-viewport canvas {
  display: block;
  margin: 0 auto;
}

/* Bottom fade into the section bg */
.qf-globe-viewport::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26%;
  background: linear-gradient(
    to top,
    var(--bg, #161616) 0%,
    rgba(22, 22, 22, 0.8) 30%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 6;
}

/* Drag hint */
.qf-globe-hint {
  position: relative;
  z-index: 3;
  text-align: center;
  margin: 4px auto 0;
  font-size: 12.5px;
  color: var(--muted-soft, #78736e);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  justify-content: center;
}
.qf-globe-hint svg {
  width: 15px;
  height: 15px;
  opacity: 0.8;
}

/* ── Stats strip (qualitative, honest) ─────────────────────────────────── */
.qf-globe-stats {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 52px);
  flex-wrap: wrap;
  margin: 28px auto 0;
  padding: 0 24px;
}
.qf-globe-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 120px;
}
.qf-globe-stat b {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  color: #6E8BFF; /* was var(--accent): computes cobalt on qf-wft — failed contrast */
  letter-spacing: -0.01em;
}
.qf-globe-stat span {
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 500;
  color: var(--muted, #a39e99);
  letter-spacing: 0.01em;
}

/* ========================================================================== */
/* Marker cards + glowing circular icons (ported .globe-marker*)              */
/* ========================================================================== */
.qfg-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Inactive nodes are small dim dots (network texture) so they don't occlude
   the beams; active nodes bloom into full glowing icon markers. */
.qfg-circle {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(110, 139, 255, 0.12);
  border: 1px solid rgba(110, 139, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.35s ease, height 0.35s ease, background 0.35s ease,
    border-color 0.35s ease, box-shadow 0.35s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
}
.qfg-circle svg {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.qfg-circle::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(110, 139, 255, 0.1);
}
.qfg-circle.active {
  width: 40px;
  height: 40px;
  background: rgba(110, 139, 255, 0.22);
  border: 1.5px solid #0d3cfc;
  box-shadow: 0 0 22px rgba(110, 139, 255, 0.5);
}
.qfg-circle.active svg {
  opacity: 1;
}
.qfg-circle.active::after {
  inset: -4px;
  border-color: rgba(110, 139, 255, 0.3);
  animation: qfg-ping 2s ease-out infinite;
}

/* Hub (database) marker — always emphasised */
.qfg-marker--hub .qfg-circle {
  width: 46px;
  height: 46px;
  background: rgba(13, 60, 252, 0.22);
  border: 1.5px solid #6e8bff;
  box-shadow: 0 0 26px rgba(110, 139, 255, 0.45);
}
.qfg-marker--hub .qfg-circle::after {
  border-color: rgba(110, 139, 255, 0.35);
  animation: qfg-ping 2.4s ease-out infinite;
}
.qfg-marker--hub .qfg-circle svg {
  width: 18px;
  height: 18px;
  opacity: 1;
}

@keyframes qfg-ping {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Floating card above the marker */
.qfg-card {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  width: max-content;
  max-width: 180px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.05);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
  z-index: 20;
}
.qfg-card.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.qfg-card__stat {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
  margin-bottom: 3px;
  letter-spacing: 0.01em;
  white-space: normal;
}
.qfg-card__label {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.58); /* was 0.4 — 3.8:1 */
  line-height: 1.3;
  letter-spacing: 0.02em;
}
/* Hub card carries the brand tint */
.qfg-marker--hub .qfg-card {
  border-color: rgba(110, 139, 255, 0.3);
  background: rgba(13, 60, 252, 0.14);
  max-width: 200px;
}
.qfg-marker--hub .qfg-card__stat {
  color: #cdd7ff;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .qf-globe-viewport { height: 480px; }
}
@media (max-width: 640px) {
  .qf-globe-viewport { height: 400px; }
  .qfg-circle { width: 32px; height: 32px; }
  .qfg-circle svg { width: 13px; height: 13px; }
  .qfg-marker--hub .qfg-circle { width: 38px; height: 38px; }
  .qfg-card {
    max-width: 150px;
    padding: 8px 10px;
    border-radius: 10px;
  }
  .qfg-card__stat { font-size: 12px; }
  .qfg-card__label { font-size: 11px; }
  .qf-globe-stats { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #qf-globe-canvas { transition: none; opacity: 1; }
  .qfg-circle.active::after,
  .qfg-marker--hub .qfg-circle::after { animation: none; }
  @keyframes qfg-ping { 0%, 100% { transform: none; opacity: 1; } }
}
