/* =====================================================================
   Earth / Globe Section  —  self-contained styles
   Extracted from dropship.io (Webflow main stylesheet + Odyn bundle).
   All theme CSS variables have been replaced with literal values so
   this file works in any project with no extra setup.
   ===================================================================== */

/* ---- Outer layout wrappers --------------------------------------- */
.globe-component {
  display: flex;
  flex-flow: column;
  justify-content: flex-start;
  align-items: center;
  gap: 3rem;
}

.globe-wrapper {
  width: 100%;
}

/* The frame is the positioning context for the canvas, markers and fades.
   16 / 8 aspect ratio gives the wide "half-globe rising" composition.   */
#jb-outer,
.globe-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  /* soft purple halo behind the globe (matches the theme glow + lifts the
     globe off the dark background so its edge stays visible) */
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* The wrap is twice as tall as the frame so the sphere sits in the
   upper half and the bottom half is masked away by #jb-fade.           */
#jb-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
}

#jb-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#jb-markers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Bottom fade — fades the globe into the page background.
   Change #07060f to match the background colour of your section. */
#jb-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, #07060f);
  z-index: 3;
  pointer-events: none;
}

/* Optional extra gradient used in the original markup (.globe-gradient).
   Sits at the very bottom of the frame.                                */
.globe-gradient {
  position: absolute;
  inset: auto 0% 0%;
  height: 25%;
  background-image: linear-gradient(0deg, #07060f, rgba(7, 6, 15, 0));
}

#jb-loader {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #c4b5fd;
  letter-spacing: 0.06em;
  z-index: 10;
  animation: jbBlink 1.4s ease-in-out infinite;
}

/* ---- Markers ------------------------------------------------------ */
/* The marker container is positioned by JS via inline left/top.        */
.jb-marker {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate(-50%, -100%) scale(0.6);
}

/* JS toggles .jb-vis / .jb-hid to pop markers in and out as they rotate
   to the front / back of the globe.                                    */
.jb-marker.jb-vis {
  animation: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards jbPopIn;
}
.jb-marker.jb-hid {
  animation: 0.25s ease-in forwards jbPopOut;
}

.jb-marker .jb-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(20, 16, 40, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: #ece9f7;
  white-space: nowrap;
  letter-spacing: -0.01em;
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.85);
}

/* Google "G" logo at the front of each pin (Google-review branding). */
.jb-marker .jb-g {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Five gold stars — the classic Google 5-star rating. */
.jb-marker .jb-stars {
  color: #fbbf24;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.45));
}

.jb-marker .jb-pin {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jb-marker .jb-core {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #a855f7;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.9);
}

.jb-marker .jb-ring {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(168, 85, 247, 0.55);
  border-radius: 50%;
  animation: jbRipple 2.8s ease-out infinite;
}

.jb-marker .jb-ring-2 {
  animation-delay: 1.1s;
}

/* ---- Keyframes ---------------------------------------------------- */
@keyframes jbPopIn {
  0%  { opacity: 0; transform: translate(-50%, -100%) scale(0.5) translateY(6px); }
  to  { opacity: 1; transform: translate(-50%, -100%) scale(1)   translateY(0);   }
}
@keyframes jbPopOut {
  0%  { opacity: 1; transform: translate(-50%, -100%) scale(1);   }
  to  { opacity: 0; transform: translate(-50%, -100%) scale(0.7); }
}
@keyframes jbRipple {
  0%  { transform: scale(0.3); opacity: 1; }
  to  { transform: scale(2.6); opacity: 0; }
}
@keyframes jbBlink {
  0%, to { opacity: 0.4; }
  50%    { opacity: 1;   }
}
