:root {
  --bpm-ink: #1b1915;
  --bpm-muted: #666158;
  --bpm-cream: #fbf8f2;
  --bpm-paper: #fffdf9;
  --bpm-line: rgba(99, 74, 35, 0.17);
  --bpm-gold: #c89332;
  --bpm-gold-light: #f8d77e;
  --bpm-gold-deep: #996515;
  --bpm-blue: #b9dce7;
  --bpm-blue-deep: #8fc3d2;
  --bpm-green: #dfead8;
  --bpm-green-text: #45613a;
  --bpm-purple: #eee7f8;
  --bpm-purple-text: #5d477c;
  --bpm-shadow: 0 22px 55px rgba(52, 43, 29, 0.10);
}

* {
  box-sizing: border-box;
}

.bpm-network-section {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 6vw, 88px) 20px;
  color: var(--bpm-ink);
  background:
    radial-gradient(circle at 14% 22%, rgba(201, 147, 50, 0.075), transparent 28%),
    radial-gradient(circle at 89% 10%, rgba(146, 199, 214, 0.13), transparent 24%),
    var(--bpm-cream);
  isolation: isolate;
}

.bpm-network-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 83, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 83, 39, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.bpm-network-shell {
  width: min(1460px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.9fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

/* ---------------- MAP ---------------- */

.bpm-map-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.55 / 1;
  overflow: hidden;
  border: 1px solid rgba(138, 104, 49, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 43% 50%, rgba(255,255,255,0.34), transparent 38%),
    linear-gradient(145deg, #d7ebf1 0%, var(--bpm-blue) 48%, #9ecedb 100%);
  box-shadow: var(--bpm-shadow);
}

.bpm-map-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -35px 70px rgba(39, 100, 116, 0.11);
}

.bpm-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bpm-map-land {
  opacity: 0.96;
}

.bpm-map-vignette {
  fill: url(#mapVignette);
  pointer-events: none;
}

.bpm-map-status,
.bpm-map-caption {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(126, 95, 44, 0.19);
  background: rgba(255, 253, 249, 0.89);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(48, 40, 28, 0.12);
}

.bpm-map-status {
  left: 24px;
  bottom: 22px;
  padding: 10px 15px;
  border-radius: 999px;
  font: 600 13px/1.2 Arial, Helvetica, sans-serif;
}

.bpm-map-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bpm-gold);
  box-shadow: 0 0 0 6px rgba(200, 147, 50, 0.13);
  animation: bpmStatusPulse 2.2s ease-in-out infinite;
}

.bpm-map-caption {
  right: 22px;
  bottom: 22px;
  max-width: 330px;
  padding: 9px 14px;
  border-radius: 14px;
  color: #373129;
  text-align: right;
  font: 600 12px/1.35 Arial, Helvetica, sans-serif;
}

/* Lines */
.bpm-connection-base {
  fill: none;
  stroke: rgba(255, 248, 217, 0.46);
  stroke-width: 2.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.bpm-connection-glow {
  fill: none;
  stroke: url(#connectionGradient);
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
  vector-effect: non-scaling-stroke;
  filter: url(#softGlow);
  animation: bpmFlowLine 3.3s linear infinite;
}

.bpm-connection-local {
  stroke-dasharray: 1 7;
  opacity: 0.82;
}

.bpm-particle-halo {
  fill: rgba(255, 229, 153, 0.48);
  filter: url(#strongGlow);
  pointer-events: none;
}

.bpm-particle-core {
  fill: #fff9d8;
  filter: url(#strongGlow);
  pointer-events: none;
}

.bpm-static-spark {
  fill: #fff9d8;
  opacity: 0.85;
  filter: url(#softGlow);
}

/* Markers */
.bpm-marker {
  cursor: pointer;
  outline: none;
}

.bpm-marker-ring {
  fill: rgba(255, 248, 223, 0.46);
  stroke: rgba(255, 241, 184, 0.92);
  stroke-width: 2;
  filter: url(#softGlow);
  vector-effect: non-scaling-stroke;
}

.bpm-marker-pulse {
  fill: none;
  stroke: rgba(255, 222, 126, 0.72);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: bpmMarkerPulse 2.9s ease-out infinite;
  vector-effect: non-scaling-stroke;
}

.bpm-marker-core {
  fill: #d39a35;
  stroke: rgba(255,255,255,0.95);
  stroke-width: 2.5;
  filter: url(#markerShadow);
  vector-effect: non-scaling-stroke;
  transition: transform 180ms ease, filter 180ms ease;
}

.bpm-marker:hover .bpm-marker-core,
.bpm-marker:focus-visible .bpm-marker-core {
  transform: scale(1.12);
  filter: url(#strongGlow);
}

.bpm-marker-icon {
  fill: #181611;
  pointer-events: none;
}

.bpm-marker-label {
  fill: rgba(255, 253, 249, 0.96);
  stroke: rgba(151, 104, 24, 0.48);
  stroke-width: 1;
  filter: url(#markerShadow);
}

.bpm-marker-label-text {
  fill: #765019;
  font: 700 12px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}

.bpm-hub .bpm-marker-pulse {
  animation-duration: 2.25s;
}

.bpm-hub-ring {
  fill: rgba(255, 225, 130, 0.13);
  stroke: rgba(255, 222, 119, 0.66);
  stroke-width: 2.2;
  filter: url(#strongGlow);
  transform-box: fill-box;
  transform-origin: center;
  animation: bpmHubRing 2.8s ease-out infinite;
  vector-effect: non-scaling-stroke;
}

.bpm-hub-core {
  fill: rgba(10, 10, 8, 0.94);
  stroke: #f3c65a;
  stroke-width: 3;
  filter: url(#strongGlow);
  vector-effect: non-scaling-stroke;
}

.bpm-hub-logo {
  pointer-events: none;
}

.bpm-map-tooltip {
  position: absolute;
  z-index: 20;
  width: max-content;
  max-width: min(280px, calc(100% - 30px));
  padding: 11px 13px;
  border: 1px solid rgba(116, 84, 31, 0.2);
  border-radius: 12px;
  background: rgba(20, 18, 14, 0.93);
  color: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,0.25);
  transform: translate(-50%, calc(-100% - 15px));
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease;
  font-family: Arial, Helvetica, sans-serif;
}

.bpm-map-tooltip.is-visible {
  opacity: 1;
}

.bpm-map-tooltip strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.bpm-map-tooltip span {
  color: rgba(255,255,255,0.72);
  font-size: 11px;
}

/* ---------------- CONTENT ---------------- */

.bpm-network-content {
  min-width: 0;
}

.bpm-network-eyebrow {
  margin: 0 0 15px;
  color: #8b5d17;
  font: 700 13px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.bpm-network-title {
  max-width: 710px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 5vw, 76px);
  font-weight: 600;
  line-height: 0.93;
  letter-spacing: -0.035em;
}

.bpm-network-intro {
  max-width: 670px;
  margin: 24px 0 28px;
  color: var(--bpm-muted);
  font: 400 clamp(16px, 1.35vw, 20px)/1.55 Arial, Helvetica, sans-serif;
}

.bpm-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.bpm-stat {
  min-width: 0;
  padding: 18px 8px 16px;
  border: 1px solid var(--bpm-line);
  border-radius: 17px;
  background: rgba(255,255,255,0.56);
  box-shadow: 0 9px 24px rgba(56, 46, 31, 0.06);
  text-align: center;
}

.bpm-stat-number {
  display: block;
  margin-bottom: 5px;
  color: #a36b1b;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(35px, 3vw, 47px);
  font-weight: 600;
  line-height: 0.8;
}

.bpm-stat-label {
  display: block;
  overflow-wrap: anywhere;
  font: 700 12px/1.2 Arial, Helvetica, sans-serif;
}

.bpm-featured-list {
  overflow: hidden;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--bpm-line);
  border-radius: 20px;
  background: rgba(255,255,255,0.48);
  box-shadow: 0 12px 34px rgba(56, 46, 31, 0.06);
}

.bpm-featured-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px 16px;
}

.bpm-featured-item + .bpm-featured-item {
  border-top: 1px solid var(--bpm-line);
}

.bpm-featured-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #e8c981;
  color: #201a12;
  box-shadow: inset 0 0 0 1px rgba(127, 88, 20, 0.18);
}

.bpm-featured-icon svg {
  width: 20px;
  height: 20px;
}

.bpm-featured-copy {
  min-width: 0;
}

.bpm-featured-name {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  font: 700 15px/1.2 Arial, Helvetica, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bpm-featured-location {
  display: block;
  color: #777067;
  font: 400 12px/1.2 Arial, Helvetica, sans-serif;
}

.bpm-role {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 7px 11px;
  border-radius: 999px;
  font: 800 10px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bpm-role--share {
  color: #8a5710;
  background: #fbebcd;
}

.bpm-role--be {
  color: var(--bpm-green-text);
  background: var(--bpm-green);
}

.bpm-role--with {
  color: var(--bpm-purple-text);
  background: var(--bpm-purple);
}

.bpm-role--own {
  color: #675019;
  background: #efe1a9;
}

.bpm-network-cta {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid #a56d15;
  border-radius: 17px;
  color: #16130e;
  background: linear-gradient(135deg, #e4b455 0%, #c98e29 100%);
  box-shadow:
    0 13px 26px rgba(130, 83, 12, 0.17),
    inset 0 1px 0 rgba(255,255,255,0.44);
  text-decoration: none;
  font: 800 15px/1 Arial, Helvetica, sans-serif;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.bpm-network-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.035);
  box-shadow:
    0 17px 33px rgba(130, 83, 12, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.48);
}

.bpm-network-cta svg {
  width: 22px;
  height: 22px;
  transition: transform 180ms ease;
}

.bpm-network-cta:hover svg {
  transform: translateX(4px);
}

/* ---------------- ANIMATION ---------------- */

@keyframes bpmFlowLine {
  to { stroke-dashoffset: -56; }
}

@keyframes bpmMarkerPulse {
  0%   { opacity: 0.78; transform: scale(0.65); }
  68%  { opacity: 0; transform: scale(1.62); }
  100% { opacity: 0; transform: scale(1.62); }
}

@keyframes bpmHubRing {
  0%   { opacity: 0.78; transform: scale(0.62); }
  72%  { opacity: 0; transform: scale(1.85); }
  100% { opacity: 0; transform: scale(1.85); }
}

@keyframes bpmStatusPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.78; }
  50%      { transform: scale(1.08); opacity: 1; }
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 1120px) {
  .bpm-network-shell {
    grid-template-columns: minmax(0, 1.12fr) minmax(350px, 0.88fr);
    gap: 30px;
  }

  .bpm-map-caption {
    display: none;
  }

  .bpm-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .bpm-network-section {
    padding-inline: 14px;
  }

  .bpm-network-shell {
    grid-template-columns: 1fr;
  }

  .bpm-network-content {
    order: -1;
  }

  .bpm-network-title {
    max-width: 690px;
    font-size: clamp(45px, 11vw, 68px);
  }

  .bpm-map-card {
    aspect-ratio: 1.35 / 1;
  }
}

@media (max-width: 560px) {
  .bpm-network-section {
    padding-block: 44px;
  }

  .bpm-network-eyebrow {
    font-size: 11px;
  }

  .bpm-network-title {
    font-size: clamp(41px, 12vw, 58px);
  }

  .bpm-network-intro {
    margin-top: 18px;
  }

  .bpm-stat {
    padding-block: 15px;
  }

  .bpm-featured-item {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .bpm-featured-icon {
    width: 37px;
    height: 37px;
  }

  .bpm-role {
    grid-column: 2;
    justify-self: start;
    min-width: 75px;
    margin-top: 3px;
  }

  .bpm-map-card {
    aspect-ratio: 1 / 0.92;
    border-radius: 21px;
  }

  .bpm-map-status {
    left: 13px;
    bottom: 13px;
    padding: 8px 11px;
    font-size: 11px;
  }
}

/* ---------------- ACCESSIBILITY / PERFORMANCE ---------------- */

@media (prefers-reduced-motion: reduce) {
  .bpm-connection-glow,
  .bpm-marker-pulse,
  .bpm-hub-ring,
  .bpm-map-status-dot {
    animation: none !important;
  }

  .bpm-network-cta,
  .bpm-network-cta svg,
  .bpm-marker-core {
    transition: none !important;
  }
}
