/* ==========================================================================
   Obalint Hero Map, embedded as the hero's animated background layer
   (replaces the former hero-bg.jpg photo). Sits behind the hero's own
   navy scrim (kept at very low opacity so the map reads clearly) and
   behind the headline / trust-list, which are untouched.
   ========================================================================== */

.ob-hero__map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.obalint-map-embed {
  --primary-blue: #0048AF;
  --secondary-blue: #1597D5;
  --other-blue: #09182C;
  --orange: #FF8312;
  --light-orange: #FFB471;
  --light-blue: #74C4EA;
  --white: #FFFFFF;
  --success: #1C9A6C;
  --text-primary: #09182C;
  --text-secondary: #5B6B85;
  --border-default: #E2E6EC;
  --surface-card: #F6F8FB;

  background: transparent;
  font-family: 'DM Sans', sans-serif;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ob-hero__map-bg .map-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.ob-hero__map-bg .map-stage svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* --- Continent-tinted coastline dots --- */

.ob-hero__map-bg .dot {
  opacity: 0.16;
  transition: opacity 300ms cubic-bezier(.4,0,.2,1), fill 300ms cubic-bezier(.4,0,.2,1);
}

.ob-hero__map-bg .dot.region-africa   { fill: var(--orange); }
.ob-hero__map-bg .dot.region-asia      { fill: var(--light-blue); }
.ob-hero__map-bg .dot.region-europe    { fill: var(--white); opacity: 0.9; stroke: var(--border-default); stroke-width: 0.6; }
.ob-hero__map-bg .dot.region-americas  { fill: var(--success); }
.ob-hero__map-bg .dot.region-oceania   { fill: var(--primary-blue); }
.ob-hero__map-bg .dot.region-default   { fill: var(--other-blue); }

/* Signal states override continent tint while a call/response is live */
.ob-hero__map-bg .dot.lit-call {
  opacity: 0.55;
  fill: var(--primary-blue);
}

.ob-hero__map-bg .dot.lit-response {
  opacity: 0.65;
  fill: var(--orange);
}

.ob-hero__map-bg .pulse-ring {
  fill: none;
  stroke-width: 2;
  transform-origin: center;
  transform-box: fill-box;
  animation: obhm-pulse-out 2.6s ease-out 3;
}

.ob-hero__map-bg .pulse-core {
  transform-origin: center;
  transform-box: fill-box;
  transition: r 200ms cubic-bezier(.4,0,.2,1);
}

.ob-hero__map-bg .tier-critical .pulse-ring { stroke: var(--orange); }
.ob-hero__map-bg .tier-critical .pulse-core { fill: var(--orange); }

.ob-hero__map-bg .tier-elevated .pulse-ring { stroke: var(--light-orange); }
.ob-hero__map-bg .tier-elevated .pulse-core { fill: var(--light-orange); }

.ob-hero__map-bg .tier-monitoring .pulse-ring { stroke: var(--secondary-blue); }
.ob-hero__map-bg .tier-monitoring .pulse-core { fill: var(--secondary-blue); }

.ob-hero__map-bg .marker-group.responding .pulse-core {
  r: 5.5;
  stroke: var(--other-blue);
  stroke-width: 1.5;
}

.ob-hero__map-bg .marker-group.responding .pulse-ring {
  animation: obhm-pulse-out 0.9s ease-out 1;
  stroke: var(--other-blue);
}

.ob-hero__map-bg .ambient-arc {
  fill: none;
  stroke: var(--secondary-blue);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 3 7;
  opacity: 0.35;
  animation: obhm-flow 7s linear infinite;
}

.ob-hero__map-bg .call-arc {
  fill: none;
  stroke: var(--primary-blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 4 4;
  opacity: 0;
  transition: opacity 200ms cubic-bezier(.4,0,.2,1);
}

.ob-hero__map-bg .call-arc.active {
  opacity: 0.85;
  animation: obhm-dash-run 1s linear infinite;
}

.ob-hero__map-bg .travel-dot { opacity: 0; }
.ob-hero__map-bg .travel-dot.out { fill: var(--primary-blue); }
.ob-hero__map-bg .travel-dot.back { fill: var(--orange); }

.ob-hero__map-bg .travel-dot.out.active {
  opacity: 1;
  offset-distance: 0%;
  animation: obhm-travel-out var(--call-ms) ease-in forwards;
}

.ob-hero__map-bg .travel-dot.back.active {
  opacity: 1;
  offset-distance: 0%;
  animation: obhm-travel-out var(--return-ms) ease-out forwards;
}

/* --- Legend: Monitoring / Elevated / Critical --- */

.ob-hero__map-bg .legend {
  position: absolute;
  right: 20px;
  top: 20px;
  left: 20px;
  max-width: max-content;
  margin-left: auto;
  background: var(--other-blue);
  border: none;
  border-bottom: 2px solid var(--primary-blue);
  border-radius: 0;
  padding: 10px 18px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  box-sizing: border-box;
}
@media (max-width: 575px) {
  .ob-hero__map-bg .legend { gap: 10px 14px; padding: 8px 12px; }
  .ob-hero__map-bg .legend-item { font-size: 10px; gap: 5px; }
}

.ob-hero__map-bg .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.02em;
  color: var(--white);
}

.ob-hero__map-bg .legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ob-hero__map-bg .swatch-monitoring { background: var(--secondary-blue); }
.ob-hero__map-bg .swatch-elevated   { background: var(--light-orange); }
.ob-hero__map-bg .swatch-critical   { background: var(--orange); }

/* --- Hint box / caption --- */

.ob-hero__map-bg .caption-bar {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 240px;
  background: var(--white);
  border: 1px solid var(--border-default);
  box-shadow: 0 4px 16px rgba(9, 24, 44, 0.10);
  border-radius: 12px;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 20px));
  transition: opacity 180ms cubic-bezier(.4,0,.2,1), transform 180ms cubic-bezier(.4,0,.2,1);
  z-index: 6;
}
@media (max-width: 575px) {
  .ob-hero__map-bg .caption-bar { display: none; }
}

.ob-hero__map-bg .caption-bar.show {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 12px));
}

.ob-hero__map-bg .caption-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--white);
  filter: drop-shadow(0 2px 1px rgba(9, 24, 44, 0.08));
}

.ob-hero__map-bg .caption-bar .c-line {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.ob-hero__map-bg .caption-bar .c-sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 12px;
  line-height: 16px;
  color: var(--text-secondary);
  margin-top: 4px;
}

@keyframes obhm-pulse-out {
  0%   { opacity: 0.9; transform: scale(0.3); }
  100% { opacity: 0;   transform: scale(2.6); }
}

@keyframes obhm-flow {
  to { stroke-dashoffset: -100; }
}

@keyframes obhm-dash-run {
  to { stroke-dashoffset: -16; }
}

@keyframes obhm-travel-out {
  from { offset-distance: 0%;   opacity: 1; }
  90%  { opacity: 1; }
  to   { offset-distance: 100%; opacity: 0; }
}

.reduced-motion .ob-hero__map-bg .pulse-ring,
.reduced-motion .ob-hero__map-bg .ambient-arc,
.reduced-motion .ob-hero__map-bg .call-arc.active,
.reduced-motion .ob-hero__map-bg .travel-dot.active {
  animation: none !important;
}

.reduced-motion .ob-hero__map-bg .pulse-ring { opacity: 0; }
.reduced-motion .ob-hero__map-bg .call-arc { opacity: 0 !important; }
.reduced-motion .ob-hero__map-bg .travel-dot { opacity: 0 !important; }
