/* BE-NEXTGEN clusters section — animated ecosystem map */
  #bng-clusters{
  --bng-yellow:#ffcc00; --bng-ink:#000; --bng-muted:#5f5f5f;
  --bng-bg:#fff; --bng-text:#000; --bng-line:#000; --bng-outline-fill:#fff; --bng-outline-text:#000;
  --bng-card:#000; --bng-card-line:#444; --bng-font:'Poppins',system-ui,sans-serif;
  font-family:var(--bng-font); background:var(--bng-bg); color:var(--bng-text); letter-spacing:normal;
  padding:88px 20px 64px; overflow:hidden; position:relative;
}
#bng-clusters *{box-sizing:border-box}
/* dark theme (matches a dark green site): add class="bng-dark" to the section */
#bng-clusters{scroll-margin-top:72px}
@media (max-width:760px){ #bng-clusters .clusters__leaf{display:none} }
#bng-clusters.bng-dark{
  --bng-bg:transparent; --bng-text:#303d23; --bng-muted:#303d23; --bng-line:#303d23;
  --bng-outline-fill:#303d23; --bng-outline-text:#fff; --bng-card:#303d23; --bng-card-line:#617b47;
  --bng-font:'Jost',system-ui,sans-serif;
}
.bng-dark .bng-card{border:1px solid rgba(255,204,0,.35)}
.bng-head{max-width:640px;margin:0 auto 20px;text-align:center}
.bng-head h2{font-size:clamp(30px,4.2vw,46px);font-weight:700;margin:0 0 12px;line-height:1.1;letter-spacing:-.01em}
.bng-head p{color:var(--bng-muted);font-size:17px;margin:0;line-height:1.6}

.bng-stage{position:relative;max-width:1280px;margin:0 auto}
.bng-svg{width:100%;height:auto;display:block;overflow:visible;touch-action:manipulation}

/* cables */
.bng-spoke,.bng-branch{fill:none;stroke:var(--bng-line);stroke-linecap:round;transition:stroke-width .4s}
.bng-spoke{stroke-width:3}
.bng-branch{stroke-width:2.6}
.bng-hot{stroke-width:6}
.bng-draw{stroke-dasharray:var(--len);stroke-dashoffset:var(--len);
  transition:stroke-dashoffset .55s cubic-bezier(.65,0,.35,1)}
.bng-in .bng-draw{stroke-dashoffset:0}
.bng-link{fill:none;stroke:var(--bng-line);stroke-width:3;stroke-linecap:round;stroke-dasharray:14 7}

/* nodes */
.bng-node{cursor:pointer;outline:none}

.bng-circle{fill:url(#bng-g-sun);transition:filter .3s}
.bng-halo{fill:url(#bng-g-halo);pointer-events:none}
.bng-flash{fill:#fff;opacity:0;pointer-events:none}
.bng-outline{fill:var(--bng-outline-fill);stroke:var(--bng-yellow);stroke-width:7}
.bng-ringdeco{fill:none;stroke:var(--bng-yellow);stroke-width:3}
.bng-label{font-family:var(--bng-font);fill:var(--bng-ink);text-anchor:middle;dominant-baseline:central;pointer-events:none}
.bng-label.bng-onout{fill:var(--bng-outline-text)}
.bng-main .bng-label{font-size:28px;font-weight:600}
.bng-sub .bng-label{font-size:22px;font-weight:500}
.bng-node:hover .bng-circle,.bng-node.bng-active .bng-circle{filter:drop-shadow(0 12px 22px rgba(255,204,0,.7))}
.bng-node:focus-visible .bng-circle{stroke:var(--bng-line);stroke-width:4}
.bng-ripple{fill:none;stroke:var(--bng-yellow);stroke-width:3;pointer-events:none}
.bng-shock{fill:none;stroke:var(--bng-yellow);pointer-events:none}

/* centre logo */
.bng-core{cursor:pointer}

.bng-logo-path{fill:none;stroke:var(--bng-yellow);stroke-width:26;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:var(--len);stroke-dashoffset:var(--len);transition:stroke-dashoffset .7s cubic-bezier(.65,0,.35,1)}
.bng-in .bng-logo-path{stroke-dashoffset:0}
.bng-orbit{fill:none;stroke:var(--bng-yellow);stroke-width:2.5;stroke-dasharray:.1 13;stroke-linecap:round}

/* signals */
.bng-sig-o{fill:var(--bng-ink)} .bng-sig-i{fill:var(--bng-yellow)}

/* detail panel */
.bng-cardwrap{position:relative;min-height:150px;display:flex;justify-content:center;align-items:flex-start;margin-top:4px}
.bng-hint{position:absolute;margin:0;color:var(--bng-muted);font-size:14px;transition:opacity .3s}
.bng-cardwrap.bng-has .bng-hint{opacity:0}
.bng-card{position:relative;width:min(560px,100%);background:var(--bng-card);color:#fff;border-radius:22px;
  padding:20px 24px;opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .3s,transform .3s}
.bng-card.bng-show{opacity:1;transform:none}
.bng-card h3{margin:0 0 6px;font-size:19px;font-weight:600;color:var(--bng-yellow)}
.bng-card p{margin:0;font-size:14.5px;line-height:1.6;color:#ececec}
.bng-tags{display:none;margin-top:12px;flex-wrap:wrap;gap:6px}
.bng-tags span{font-size:12.5px;border:1px solid var(--bng-card-line);border-radius:999px;padding:3px 11px}
.bng-tags span.bng-on{background:var(--bng-yellow);color:#000;border-color:var(--bng-yellow)}

.bng-main .bng-long{font-size:23px}
.bng-hint-m{display:none}
.bng-card .bng-back{display:none;margin-top:12px;font-size:13px;color:#bdbdbd}

/* phones: compact diagram (logo + 4 clusters) */
@media (max-width:760px){
  #bng-clusters{padding:56px 8px 40px}
  .bng-head{padding:0 10px}
  .bng-head p{font-size:15.5px}
  .bng-stage{max-width:520px}
  .bng-m .bng-main .bng-label{font-size:35px;font-weight:700}
  .bng-m .bng-main .bng-long{font-size:27px}
  .bng-hint-d{display:none} .bng-hint-m{display:inline}
  .bng-card .bng-back{display:block}
  .bng-cardwrap{min-height:190px;padding:0 6px}
  .bng-card{padding:18px 20px}
}
@media (prefers-reduced-motion:reduce){
  #bng-clusters *{animation:none!important;transition:none!important}
  .bng-draw,.bng-logo-path{stroke-dashoffset:0!important}
  .bng-node .bng-pop,.bng-core .bng-pop{transform:none!important;opacity:1!important}
}

/* section heading on the dark #40512e background */
#bng-clusters.bng-dark .title{color:#303d23}
#bng-clusters.bng-dark .clusters__top p{color:var(--bng-muted)}

/* sage background: deeper glow so the yellow circles stand out */
#bng-clusters.bng-dark .bng-circle{filter:drop-shadow(0 8px 18px rgba(48,61,35,.35))}
#bng-clusters.bng-dark .bng-node:hover .bng-circle,#bng-clusters.bng-dark .bng-node.bng-active .bng-circle{filter:drop-shadow(0 12px 22px rgba(48,61,35,.55))}

/* desktop & tablet: size the map so the whole section (title + every cluster) fits on one screen */
@media (min-width:761px){
  #bng-clusters{padding:104px 20px 24px;scroll-margin-top:0;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;justify-content:center}
  #bng-clusters .clusters__top{margin-bottom:12px}
  #bng-clusters .bng-stage{width:100%;max-width:min(1280px, calc((100vh - 345px) * 1.347));max-width:min(1280px, calc((100svh - 345px) * 1.347))}
  #bng-clusters .bng-cardwrap{min-height:96px}
}

/* no focus square / tap flash when clicking the logo or a circle with the mouse; keyboard focus stays visible on the circle itself */
#bng-clusters .bng-core, #bng-clusters .bng-node, #bng-clusters .bng-svg { outline: none; -webkit-tap-highlight-color: transparent; }
#bng-clusters .bng-core:focus, #bng-clusters .bng-node:focus { outline: none; }
