/* World map for "Where we work": navy dots (the SVG is a mask, so colour comes from here) with a
   soft gold glow where the offices are, gold routes out of Dubai, and pins that pulse. */

.world-map { position: relative; margin: clamp(28px, 3vw, 40px) 0 clamp(20px, 2.4vw, 32px); aspect-ratio: 168 / 80; }
.world-map__dots {
  position: absolute; inset: 0;
  background:
    radial-gradient(16% 30% at 69% 50%, rgb(176 158 93 / 1) 0%, rgb(176 158 93 / .75) 45%, rgb(176 158 93 / 0) 100%),
    radial-gradient(60% 80% at 60% 45%, rgb(11 21 48 / .34), rgb(11 21 48 / .2) 70%);
  -webkit-mask: url(../img/world-dots.svg) center / 100% 100% no-repeat;
  mask: url(../img/world-dots.svg) center / 100% 100% no-repeat;
}
:is(.ground-inverse, .glow-ground) .world-map__dots {
  background:
    radial-gradient(22% 34% at 68% 46%, rgb(201 184 122 / .95), rgb(201 184 122 / 0) 70%),
    radial-gradient(60% 80% at 60% 45%, rgb(255 255 255 / .28), rgb(255 255 255 / .14) 70%);
}

.world-map__routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.world-map__routes path { fill: none; stroke: var(--gold); stroke-width: .22; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .85; }
html.motion .world-map:not(.is-on) .world-map__routes path { stroke-dashoffset: 1; }
html.motion .world-map__routes path { transition: stroke-dashoffset 1.6s cubic-bezier(.65, 0, .35, 1); }
html.motion .world-map__routes path:nth-child(2) { transition-delay: .15s; }
html.motion .world-map__routes path:nth-child(3) { transition-delay: .3s; }
html.motion .world-map__routes path:nth-child(4) { transition-delay: .45s; }

.world-map__pin { position: absolute; width: 0; height: 0; }
.world-map__pin > i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgb(255 255 255 / .9), 0 4px 10px rgb(5 11 31 / .35); }
.world-map__pin--hq > i { left: -7px; top: -7px; width: 14px; height: 14px; background: radial-gradient(circle at 35% 35%, #F3E7B8, #B09E5D 60%, #8F7F45); }
.world-map__pin--dot > i { left: -3.5px; top: -3.5px; width: 7px; height: 7px; box-shadow: 0 0 0 2px rgb(255 255 255 / .9); }
.world-map__pin:not(.world-map__pin--dot) > i::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--gold); opacity: 0; }
html.motion .world-map.is-on .world-map__pin:not(.world-map__pin--dot) > i::after { animation: map-pulse 2.8s cubic-bezier(.2, .8, .2, 1) infinite; }
html.motion .world-map.is-on .world-map__pin--below > i::after { animation-delay: .7s; }
html.motion .world-map.is-on .world-map__pin--right > i::after { animation-delay: 1.4s; }
html.motion .world-map.is-on .world-map__pin--above > i::after { animation-delay: 2.1s; }
@keyframes map-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }

.world-map__label { position: absolute; display: grid; gap: 1px; padding: 6px 10px; white-space: nowrap; border-radius: 8px; background: rgb(255 255 255 / .94); box-shadow: 0 0 0 1px rgb(176 158 93 / .45), 0 10px 24px -12px rgb(5 11 31 / .45); }
.world-map__label b { font: 600 13px/1.2 var(--font-display); color: var(--p-ink); }
.world-map__label small { font-size: 11px; line-height: 1.3; color: var(--p-muted); }
.world-map__pin--hq .world-map__label { right: 16px; top: -14px; }
.world-map__pin--below .world-map__label { right: 14px; left: auto; top: 18px; }
.world-map__pin--right .world-map__label { left: 16px; top: -12px; }
.world-map__pin--above .world-map__label { left: -30px; bottom: 16px; }

@media (max-width: 767px) {
  .world-map { margin-inline: calc(-1 * var(--gut)); }
  .world-map__label { padding: 4px 7px; }
  .world-map__label b { font-size: 11px; }
  .world-map__label small { display: none; }
  .world-map__pin--below .world-map__label { right: 8px; left: auto; top: 12px; }
  .world-map__pin--hq .world-map__label { right: 12px; top: -10px; }
  .world-map__pin--right .world-map__label { left: auto; right: -46px; top: 12px; }
  .world-map__pin--above .world-map__label { left: -20px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .world-map__routes path { transition: none; stroke-dashoffset: 0 !important; }
  .world-map__pin > i::after { animation: none !important; }
}
