/* ==========================================================================
   3D stages (dark cyber panels inside the light site) + tilt / glitch add-ons.
   Loaded last. Works without WebGL (CSS fallback).
   ========================================================================== */

/* ----- Stage shell ----- */
.bm-stage {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius);
  color: #e8eef5; touch-action: pan-y;
  background:
    radial-gradient(70% 90% at 78% 8%, rgba(45, 226, 192, .16), transparent 60%),
    radial-gradient(60% 80% at 8% 100%, rgba(113, 191, 68, .18), transparent 60%),
    #05080d;
  border: 1px solid rgba(113, 191, 68, .38);
  box-shadow: 0 36px 90px -34px rgba(113, 191, 68, .55), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.bm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.bm-stage::before { /* scanlines + grid */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .55;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(113, 191, 68, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(113, 191, 68, .06) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, #000 35%, transparent 100%);
          mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, #000 35%, transparent 100%);
}
.bm-stage::after { /* HUD corner brackets */
  content: ''; position: absolute; inset: 10px; z-index: 3; pointer-events: none;
  background:
    linear-gradient(#71bf44, #71bf44) top left / 18px 2px no-repeat, linear-gradient(#71bf44, #71bf44) top left / 2px 18px no-repeat,
    linear-gradient(#71bf44, #71bf44) top right / 18px 2px no-repeat, linear-gradient(#71bf44, #71bf44) top right / 2px 18px no-repeat,
    linear-gradient(#71bf44, #71bf44) bottom left / 18px 2px no-repeat, linear-gradient(#71bf44, #71bf44) bottom left / 2px 18px no-repeat,
    linear-gradient(#71bf44, #71bf44) bottom right / 18px 2px no-repeat, linear-gradient(#71bf44, #71bf44) bottom right / 2px 18px no-repeat;
}
.bm-stage.is-drag { cursor: grabbing; }
.bm-stage[data-scene="hubs"] { cursor: grab; }

.bm-stage__hud { position: absolute; z-index: 4; left: 22px; right: 22px; top: 18px; display: flex; justify-content: space-between; gap: 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(232, 238, 245, .72); pointer-events: none; }
.bm-stage__hud span:first-child::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: #2de2c0; box-shadow: 0 0 10px #2de2c0; animation: bm-pulse 1.6s ease-in-out infinite; vertical-align: 1px; }

.bm-stage__tag {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 6px; color: #e8eef5;
  background: rgba(8, 14, 22, .72); border: 1px solid rgba(113, 191, 68, .5);
  box-shadow: 0 0 18px -4px rgba(113, 191, 68, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.bm-stage__tag.is-hot { color: #2de2c0; border-color: #2de2c0; box-shadow: 0 0 22px -2px rgba(45, 226, 192, .8); }
.bm-stage__foot { position: absolute; z-index: 4; left: 22px; right: 22px; bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.bm-stage__foot span { font-size: 11px; font-weight: 500; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; color: #cfe9c0; background: rgba(113, 191, 68, .12); border: 1px solid rgba(113, 191, 68, .32); }

/* Fallback when WebGL / Three.js is unavailable */
.bm-stage.is-fallback canvas, .bm-stage:not(.is-3d) canvas { opacity: 0; }
.bm-stage.is-fallback .bm-stage__tag { position: static; display: inline-block; margin: 0 6px 6px 0; transform: none !important; }

/* ----- Hero stage ----- */
.bm-hero__stage { min-height: clamp(380px, 44vw, 560px); }
.bm-hero__stage .bm-stage__tag { margin: 0; }
@media (max-width: 1023px) { .bm-hero__stage { min-height: 380px; } }
@media (max-width: 639px) { .bm-hero__stage { min-height: 340px; } .bm-stage__hud span:last-child { display: none; } }

/* ----- Band stages (core / hubs / skyline) ----- */
.bm-band { padding-block: clamp(32px, 5vw, 64px); }
.bm-stage--band { min-height: clamp(380px, 38vw, 500px); display: flex; align-items: center; }
.bm-stage__copy { position: relative; z-index: 4; max-width: 30rem; padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px); }
.bm-stage--right .bm-stage__copy { margin-left: auto; }
.bm-stage__copy .section-label { color: #8bc94d; }
.bm-stage__copy h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 14px; }
.bm-stage__copy p:not(.section-label) { color: rgba(232, 238, 245, .78); font-size: 1rem; line-height: 1.7; margin: 0; }
.bm-stage--band::selection { background: rgba(113, 191, 68, .4); }
@media (max-width: 767px) {
  .bm-stage--band { align-items: flex-start; min-height: 460px; }
  .bm-stage__copy { max-width: none; }
  .bm-stage--band canvas { opacity: .8; }
}

/* ----- Scroll tunnel ----- */
.bm-tunnel { position: relative; height: 260vh; }
.bm-tunnel__sticky { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); padding: clamp(10px, 2vw, 24px) 0; }
.bm-tunnel__sticky .container { height: 100%; }
.bm-tunnel .bm-stage { height: 100%; }
.bm-tunnel__copy { position: absolute; z-index: 4; left: clamp(22px, 4vw, 56px); bottom: clamp(26px, 5vw, 56px); max-width: 32rem; }
.bm-tunnel__copy .section-label { color: #8bc94d; }
.bm-step { position: absolute; left: 0; bottom: 0; width: 100%; opacity: 0; transform: translateY(16px); filter: blur(6px); transition: opacity .45s ease, transform .45s ease, filter .45s ease; pointer-events: none; }
.bm-step.is-on { opacity: 1; transform: none; filter: none; }
.bm-step b { display: block; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #fff; text-shadow: 0 0 30px rgba(113, 191, 68, .6); }
.bm-step b small { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .2em; color: #2de2c0; text-shadow: none; }
.bm-step p { margin: 12px 0 0; color: rgba(232, 238, 245, .78); line-height: 1.65; }
.bm-tunnel__copy { min-height: 190px; width: min(32rem, calc(100% - 44px)); }
.bm-tunnel__bar { position: absolute; z-index: 4; left: 22px; right: 22px; bottom: 14px; height: 2px; background: rgba(255, 255, 255, .12); }
.bm-tunnel__bar i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #71bf44, #2de2c0); box-shadow: 0 0 12px rgba(113, 191, 68, .8); }
.bm-tunnel__labels { position: absolute; z-index: 4; right: clamp(22px, 4vw, 56px); top: 56px; display: flex; flex-direction: column; gap: 10px; text-align: right; }
.bm-tunnel__labels span { font-size: 11px; font-weight: 600; letter-spacing: .18em; color: rgba(232, 238, 245, .35); transition: color .3s ease; }
.bm-tunnel__labels span.is-on { color: #2de2c0; text-shadow: 0 0 12px rgba(45, 226, 192, .8); }
@media (max-width: 639px) { .bm-tunnel { height: 220vh; } .bm-tunnel__labels { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .bm-tunnel { height: auto; }
  .bm-tunnel__sticky { position: relative; top: 0; height: 70vh; min-height: 440px; }
}

/* ----- Add-on: 3D tilt on cards ----- */
.bm-tilt { transform-style: preserve-3d; will-change: transform; }
.bm-tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px) !important; transition: transform .12s ease-out, box-shadow .25s ease, border-color .25s ease !important; }

/* ----- Add-on: glitch headings ----- */
.bm-glitch { position: relative; }
.bm-glitch.is-glitching, .bm-glitch:hover { animation: bm-jit .42s steps(2, end) 1; }
.bm-glitch::before, .bm-glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; opacity: 0; font: inherit; letter-spacing: inherit; line-height: inherit; -webkit-text-fill-color: currentColor; background: none; filter: none; }
.bm-glitch.is-glitching::before, .bm-glitch:hover::before { opacity: .8; color: #ff3df0; transform: translate(-3px, 0); clip-path: inset(10% 0 55% 0); animation: bm-slice 0.42s steps(3, end) 1; mix-blend-mode: multiply; }
.bm-glitch.is-glitching::after, .bm-glitch:hover::after { opacity: .8; color: #2de2c0; transform: translate(3px, 0); clip-path: inset(55% 0 12% 0); animation: bm-slice 0.42s steps(3, end) 1 reverse; mix-blend-mode: multiply; }
.hero h1.bm-glitch::before, .hero h1.bm-glitch::after { display: none; } /* gradient text: jitter only, avoids doubled headline */
@keyframes bm-jit { 0% { transform: translate(0); } 25% { transform: translate(-2px, 1px); } 50% { transform: translate(2px, -1px); } 75% { transform: translate(-1px, 0); } 100% { transform: translate(0); } }
@keyframes bm-slice { 0% { clip-path: inset(8% 0 62% 0); } 33% { clip-path: inset(40% 0 30% 0); } 66% { clip-path: inset(70% 0 5% 0); } 100% { clip-path: inset(20% 0 50% 0); } }

/* ----- Add-on: chromatic flicker on image cards / buttons ----- */
.image-card:hover img { filter: drop-shadow(2px 0 0 rgba(255, 61, 240, .45)) drop-shadow(-2px 0 0 rgba(45, 226, 192, .45)); }

@media (prefers-reduced-motion: reduce) {
  .bm-glitch, .bm-glitch::before, .bm-glitch::after { animation: none !important; }
  .bm-tilt:hover { transform: none !important; }
  .bm-stage__hud span:first-child::before { animation: none; }
}

/* Readability: scrim behind the copy; stack copy above the scene on narrow stages */
.bm-stage--band .bm-stage__copy { background: linear-gradient(90deg, rgba(5, 8, 13, .82), rgba(5, 8, 13, .55) 70%, transparent); border-radius: var(--radius) 0 0 var(--radius); }
.bm-stage--band.bm-stage--right .bm-stage__copy { background: linear-gradient(270deg, rgba(5, 8, 13, .82), rgba(5, 8, 13, .55) 70%, transparent); border-radius: 0 var(--radius) var(--radius) 0; }
@media (max-width: 899px) {
  .bm-stage--band { min-height: 540px; align-items: flex-start; }
  .bm-stage--band .bm-stage__copy, .bm-stage--band.bm-stage--right .bm-stage__copy { max-width: none; background: linear-gradient(180deg, rgba(5, 8, 13, .88), rgba(5, 8, 13, .5) 75%, transparent); border-radius: var(--radius) var(--radius) 0 0; padding-top: 52px; }
}
.bm-stage__hud { z-index: 6; }

@media (max-width: 639px) {
  .bm-hero__stage .bm-stage__foot { display: none; }
  .bm-stage__tag { font-size: 10px; padding: 5px 9px; letter-spacing: .08em; }
}

/* ==========================================================================
   Light panels: same 3D stages on a pale background (overrides the dark shell above)
   ========================================================================== */
.bm-stage {
  color: var(--text);
  background:
    radial-gradient(70% 90% at 80% 6%, rgba(15, 174, 148, .10), transparent 60%),
    radial-gradient(60% 80% at 6% 100%, rgba(113, 191, 68, .14), transparent 60%),
    #f7faf8;
  border: 1px solid rgba(74, 154, 34, .35);
  box-shadow: 0 30px 70px -36px rgba(74, 154, 34, .45), 0 0 0 1px rgba(255, 255, 255, .8) inset;
}
.bm-stage::before {
  opacity: .5;
  background:
    repeating-linear-gradient(0deg, rgba(11, 13, 18, .025) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(74, 154, 34, .09) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(74, 154, 34, .09) 1px, transparent 1px) 0 0 / 48px 48px;
}
.bm-stage::after {
  background:
    linear-gradient(#4a9a22, #4a9a22) top left / 18px 2px no-repeat, linear-gradient(#4a9a22, #4a9a22) top left / 2px 18px no-repeat,
    linear-gradient(#4a9a22, #4a9a22) top right / 18px 2px no-repeat, linear-gradient(#4a9a22, #4a9a22) top right / 2px 18px no-repeat,
    linear-gradient(#4a9a22, #4a9a22) bottom left / 18px 2px no-repeat, linear-gradient(#4a9a22, #4a9a22) bottom left / 2px 18px no-repeat,
    linear-gradient(#4a9a22, #4a9a22) bottom right / 18px 2px no-repeat, linear-gradient(#4a9a22, #4a9a22) bottom right / 2px 18px no-repeat;
}
.bm-stage__hud { color: var(--text-3); }
.bm-stage__hud span:first-child::before { background: #0fae94; box-shadow: 0 0 0 3px rgba(15, 174, 148, .2); }
.bm-stage__tag {
  color: var(--text); background: rgba(255, 255, 255, .86); border-color: rgba(74, 154, 34, .55);
  box-shadow: 0 6px 18px -8px rgba(74, 154, 34, .55);
}
.bm-stage__tag.is-hot { color: #0b8f78; border-color: #0fae94; box-shadow: 0 8px 22px -6px rgba(15, 174, 148, .6); }
.bm-stage__foot span { color: var(--text-2); background: rgba(255, 255, 255, .8); border-color: rgba(74, 154, 34, .35); }

.bm-stage__copy .section-label { color: var(--accent-text); }
.bm-stage__copy h2 { color: var(--text); }
.bm-stage__copy p:not(.section-label) { color: var(--text-2); }
.bm-stage--band .bm-stage__copy { background: linear-gradient(90deg, rgba(247, 250, 248, .92), rgba(247, 250, 248, .6) 70%, transparent); }
.bm-stage--band.bm-stage--right .bm-stage__copy { background: linear-gradient(270deg, rgba(247, 250, 248, .92), rgba(247, 250, 248, .6) 70%, transparent); }
@media (max-width: 899px) {
  .bm-stage--band .bm-stage__copy, .bm-stage--band.bm-stage--right .bm-stage__copy { background: linear-gradient(180deg, rgba(247, 250, 248, .94), rgba(247, 250, 248, .6) 75%, transparent); }
}

.bm-step b { color: var(--text); text-shadow: none; }
.bm-step b small { color: #0b8f78; }
.bm-step p { color: var(--text-2); }
.bm-tunnel__copy .section-label { color: var(--accent-text); }
.bm-tunnel__labels span { color: rgba(11, 13, 18, .35); }
.bm-tunnel__labels span.is-on { color: #0b8f78; text-shadow: none; }
.bm-tunnel__bar { background: rgba(11, 13, 18, .12); }
.bm-tunnel__bar i { box-shadow: 0 0 10px rgba(74, 154, 34, .6); }
.bm-glitch.is-glitching::before, .bm-glitch:hover::before, .bm-glitch.is-glitching::after, .bm-glitch:hover::after { mix-blend-mode: normal; opacity: .55; }

/* Footer chips collide with the labels when the hero stage is short/narrow */
@media (max-width: 1099px) { .bm-hero__stage .bm-stage__foot { display: none; } }

/* ===== Video panel (replaces the old image card in the tech section) ===== */
.bm-video { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: #05080d; box-shadow: var(--shadow); border: 1px solid var(--line); isolation: isolate; }
.bm-video__poster, .bm-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; display: block; }
.bm-video::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 13, .45)); transition: opacity .3s ease; }
.bm-video.is-playing::after { opacity: 0; }
.bm-video__play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; color: #0b1119; background: var(--accent);
  box-shadow: 0 0 0 10px rgba(113, 191, 68, .22), 0 0 0 22px rgba(113, 191, 68, .10), 0 18px 40px -8px rgba(113, 191, 68, .7);
  transition: transform .25s ease, box-shadow .25s ease;
}
.bm-video__play svg { width: 34px; height: 34px; margin-left: 4px; }
.bm-video__play:hover, .bm-video__play:focus-visible { transform: scale(1.07); box-shadow: 0 0 0 12px rgba(113, 191, 68, .3), 0 0 0 28px rgba(113, 191, 68, .12), 0 22px 48px -8px rgba(113, 191, 68, .85); outline: none; }
.bm-video__badge { position: absolute; z-index: 2; left: 18px; bottom: 16px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; padding: 7px 12px; border-radius: 999px; background: rgba(5, 8, 13, .55); border: 1px solid rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bm-video.is-playing .bm-video__play, .bm-video.is-playing .bm-video__badge, .bm-video.is-playing .bm-video__poster { display: none; }
@media (max-width: 639px) { .bm-video { aspect-ratio: 4 / 3; } .bm-video__play { width: 72px; height: 72px; margin: -36px 0 0 -36px; } }

/* ===== Blueprint diagram cards (replace the stock-photo cards) ===== */
.bm-dcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; border-radius: var(--radius);
  min-height: 460px; background: linear-gradient(180deg, #fbfdfb, #f2f7f3); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bm-dcard::before { /* blueprint grid */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(74, 154, 34, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(74, 154, 34, .10) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, #000 30%, transparent 90%); mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, #000 30%, transparent 90%);
}
.bm-dcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.bm-dcard .dg { display: block; width: 100%; height: auto; padding: 18px 18px 0; flex: 1 1 auto; min-height: 0; overflow: visible; }
.bm-dcard__body { padding: 0 24px 24px; }
.bm-dcard__body .image-card-icon { margin-bottom: 12px; }
.bm-dcard__body h3 { font-size: 1.125rem; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.bm-dcard__body p { font-size: .875rem; color: var(--text-2); line-height: 1.6; margin: 0; }

.dg { --dg-g: #4a9a22; --dg-t: #0fae94; --dg-m: #d81bc9; }
.dg path, .dg circle, .dg rect { fill: none; stroke: var(--dg-g); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dg-ring circle { stroke: rgba(74, 154, 34, .35); stroke-width: 1; }
.dg-cloud path { stroke: var(--dg-t); stroke-width: 2; fill: rgba(15, 174, 148, .08); }
.dg-slabs path { fill: #fff; stroke: var(--dg-g); }
.dg-slabs path.top { fill: rgba(113, 191, 68, .14); }
.dg-slabs .led { fill: var(--dg-t); stroke: none; animation: dg-blink 1.8s ease-in-out infinite; }
.dg-slabs .led--b { fill: var(--dg-m); animation-delay: .6s; }
.dg-nodes circle { fill: #fff; stroke: var(--dg-t); stroke-width: 1.8; }
.dg-flow { stroke: var(--dg-t); stroke-width: 1.4; stroke-dasharray: 4 6; animation: dg-dash 1.4s linear infinite; }
.dg-flow--b { animation-direction: reverse; stroke: var(--dg-g); }
.dg-text text { font-size: 8px; font-weight: 600; letter-spacing: .14em; fill: var(--text-3); font-family: inherit; }
.dg-target circle { stroke: rgba(74, 154, 34, .55); stroke-width: 1.2; }
.dg-target path { stroke: rgba(74, 154, 34, .55); stroke-width: 1.2; }
.dg-target .dg-core { fill: var(--dg-t); stroke: none; }
.dg-target .dg-ping { stroke: var(--dg-t); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: dg-ping 2.4s ease-out infinite; }
.dg-bars rect { fill: rgba(113, 191, 68, .22); stroke: var(--dg-g); transform-box: fill-box; transform-origin: 50% 100%; animation: dg-grow 3.2s ease-in-out infinite alternate; }
.dg-bars rect:nth-child(2) { animation-delay: .2s; } .dg-bars rect:nth-child(3) { animation-delay: .4s; } .dg-bars rect:nth-child(4) { animation-delay: .6s; }
.dg-bars path { stroke: rgba(74, 154, 34, .5); }
@keyframes dg-dash { to { stroke-dashoffset: -20; } }
@keyframes dg-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes dg-ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(4.2); opacity: 0; } }
@keyframes dg-grow { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .dg-flow, .dg-slabs .led, .dg-ping, .dg-bars rect { animation: none !important; } }
@media (max-width: 1023px) { .bm-dcard { min-height: 0; } .bm-dcard .dg { max-height: 280px; } }

/* Panel variant: a stage without a text block (used in place of a flat illustration) */
.bm-stage--panel { aspect-ratio: 7 / 6; min-height: 340px; width: 100%; }
@media (max-width: 639px) { .bm-stage--panel { aspect-ratio: 1 / 1; min-height: 320px; } }

/* ==========================================================================
   Our people / The BASIC Group / CTA band (follows basicinsight.my/about)
   ========================================================================== */
.bm-head { max-width: 46rem; margin-bottom: clamp(24px, 3vw, 40px); }
.bm-head .section-title { margin-bottom: 14px; }
.bm-mute { color: var(--text-3); }
.bm-lead { font-size: 1.125rem; line-height: 1.65; color: var(--text-2); margin: 0; }
.bm-lead strong { color: var(--text); font-weight: 700; }

.bm-teamjump { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 clamp(32px, 4vw, 52px); }
.bm-teamjump a { padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--panel); transition: border-color .2s ease, color .2s ease, box-shadow .2s ease; }
.bm-teamjump a:hover { color: var(--accent-text); border-color: var(--accent); box-shadow: 0 6px 18px -8px var(--accent-glow); }

.bm-tgroup { margin-bottom: clamp(36px, 5vw, 60px); scroll-margin-top: calc(var(--header-h) + 24px); }
.bm-tgroup__title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0 0 28px; }
.bm-tgrid { display: grid; gap: 24px; }
.bm-tgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52rem; }
.bm-tgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bm-tgrid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1199px) { .bm-tgrid--5, .bm-tgrid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .bm-tgrid--5, .bm-tgrid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .bm-tgrid--5, .bm-tgrid--4, .bm-tgrid--2 { grid-template-columns: 1fr; } }

.bm-tcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.bm-tcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.bm-tcard__photo {
  aspect-ratio: 4 / 5; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 35%, #ddf0d2, transparent 75%), linear-gradient(rgba(11, 13, 18, .05) 1px, transparent 1px) 0 0 / 28px 28px, #f6f7f9;
}
.bm-tcard__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.bm-tcard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.bm-tcard__name { font-size: 16px; font-weight: 700; letter-spacing: -.015em; color: var(--text); margin: 0; }
.bm-tcard__role { font-size: 12.5px; line-height: 1.4; color: var(--accent-text); margin: 4px 0 0; }
.bm-tcard__profile { align-self: flex-start; margin-top: auto; padding: 12px 0 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.bm-tcard__profile::after { content: ' \2192'; transition: margin .2s ease; }
.bm-tcard__profile:hover { color: var(--accent-text); }
.bm-tcard__profile:hover::after { margin-left: 4px; }

.bm-pmodal { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.bm-pmodal[open] { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); animation: bm-pop .25s ease; }
.bm-pmodal::backdrop { background: rgba(11, 13, 18, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.bm-pmodal__photo { background: radial-gradient(80% 70% at 50% 35%, #ddf0d2, transparent 75%), #f6f7f9; min-height: 280px; }
.bm-pmodal__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.bm-pmodal__text { padding: 32px 28px 28px; }
.bm-pmodal__name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.bm-pmodal__role { font-size: 13px; color: var(--accent-text); margin: 6px 0 16px; }
.bm-pmodal__bio { font-size: 15px; line-height: 1.7; color: var(--text-2); margin: 0; }
.bm-pmodal__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
@media (max-width: 639px) { .bm-pmodal[open] { grid-template-columns: 1fr; } .bm-pmodal__photo { min-height: 0; aspect-ratio: 4 / 3; } }
@keyframes bm-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.bm-companies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 899px) { .bm-companies { grid-template-columns: 1fr; } }
.bm-company { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.bm-company:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.bm-status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.bm-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow-soft); }
.bm-company h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0 0 4px; }
.bm-company__reg { font-size: 13px !important; color: var(--text-3) !important; margin: 0 0 14px !important; }
.bm-company p { font-size: 15px; line-height: 1.65; color: var(--text-2); margin: 0; }
.bm-company a { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.bm-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(60% 140% at 90% 0%, var(--accent-glow-soft), transparent 60%), var(--panel); box-shadow: var(--shadow-sm); }
.bm-cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0 0 8px; }
.bm-cta p { color: var(--text-2); margin: 0; max-width: 34rem; }
.bm-pmodal { margin: auto; inset: 0; position: fixed; }

/* Team photos: 60% smaller (40% of the card width), left-aligned thumbnail */
.bm-tcard__photo { width: 40%; min-width: 72px; margin: 18px 0 0 18px; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 479px) { .bm-tcard__photo { width: 34%; } }

/* Team cards: photo beside the text so there is no empty space on the right */
.bm-tcard { flex-direction: row; align-items: flex-start; gap: 18px; padding: 18px; }
.bm-tcard__photo { width: 112px; min-width: 0; flex: none; margin: 0; }
.bm-tcard__body { padding: 0; align-self: stretch; min-width: 0; }
.bm-tcard__profile { padding-top: 14px; }
.bm-tgrid--4, .bm-tgrid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bm-tgrid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bm-tgrid--2 { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1099px) { .bm-tgrid--5, .bm-tgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) { .bm-tgrid--5, .bm-tgrid--4, .bm-tgrid--2 { grid-template-columns: 1fr; } .bm-tcard__photo { width: 96px; } }

/* Keep two columns on tablets/large phones so cards never stretch with empty space */
@media (max-width: 719px) { .bm-tgrid--5, .bm-tgrid--4, .bm-tgrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bm-tcard { gap: 14px; padding: 14px; } .bm-tcard__photo { width: 88px; } }
@media (max-width: 479px) { .bm-tgrid--5, .bm-tgrid--4, .bm-tgrid--2 { grid-template-columns: 1fr; } .bm-tcard__photo { width: 96px; } }

/* ===== Chart sketch panel (replaces a stock photo of people) ===== */
.bm-sketch {
  position: relative; border-radius: var(--radius); overflow: hidden; isolation: isolate; aspect-ratio: 3 / 4; width: 100%;
  background: linear-gradient(180deg, #fbfdfb, #f2f7f3); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 14px;
}
.bm-sketch::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(74, 154, 34, .10) 1px, transparent 1px), linear-gradient(90deg, rgba(74, 154, 34, .10) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 95% 80% at 50% 45%, #000 30%, transparent 95%); mask-image: radial-gradient(ellipse 95% 80% at 50% 45%, #000 30%, transparent 95%);
}
.bm-sketch .dg { width: 100%; height: 100%; display: block; }
.dg-axes path { stroke: rgba(74, 154, 34, .45); stroke-width: 1; }
.dg-area { fill: rgba(15, 174, 148, .12); stroke: none; }
.dg-line { stroke: var(--dg-t); stroke-width: 2; stroke-dasharray: 520; stroke-dashoffset: 520; animation: dg-draw 4.5s ease-in-out infinite; }
.dg-donut circle { stroke: rgba(74, 154, 34, .35); stroke-width: 1.2; }
.dg-donut .dg-donut__a { stroke: var(--dg-g); stroke-width: 9; stroke-dasharray: 46 54; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 70px 238px; animation: dg-spin 12s linear infinite; }
.dg-donut .dg-donut__b { stroke: var(--dg-t); stroke-width: 9; stroke-dasharray: 28 72; stroke-dashoffset: -50; stroke-linecap: butt; transform: rotate(-90deg); transform-origin: 70px 238px; animation: dg-spin 12s linear infinite; }
@keyframes dg-draw { 0% { stroke-dashoffset: 520; } 55%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -520; } }
@keyframes dg-spin { to { transform: rotate(270deg); } }
@media (prefers-reduced-motion: reduce) { .dg-line { animation: none !important; stroke-dashoffset: 0; } .dg-donut__a, .dg-donut__b { animation: none !important; } }

@media (max-width: 1023px) { .bm-sketch { max-width: 440px; margin-inline: auto; } }

/* Very narrow phones (320px): stages/panels must shrink with their column, not force it wider */
.two-col > * { min-width: 0; }
@media (max-width: 639px) { .bm-stage--panel { min-height: 0; } }

/* Ultra-wide screens: keep the hero (and its photo) centred instead of pinned to the far right edge */
@media (min-width: 1921px) { .bm-hero { max-width: 1920px; margin-inline: auto; } }

/* ===== Team: single simple grid of six ===== */
.bm-tgrid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1099px) { .bm-tgrid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .bm-tgrid--6 { grid-template-columns: 1fr; } }

/* ===== Clients page ===== */
.bm-clientgroup { margin-bottom: clamp(36px, 5vw, 64px); }
.bm-clientgroup .bm-head { margin-bottom: 20px; }
.bm-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.bm-logo {
  display: flex; align-items: center; justify-content: center; height: 104px; padding: 18px 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bm-logo img { max-width: 100%; max-height: 42px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .72; transition: filter .25s ease, opacity .25s ease, transform .25s ease; }
.bm-logo:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.bm-logo:hover img { filter: none; opacity: 1; transform: scale(1.04); }
@media (max-width: 479px) { .bm-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .bm-logo { height: 92px; padding: 14px; } }
.bm-clientsnext { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(60% 140% at 90% 0%, var(--accent-glow-soft), transparent 60%), var(--panel); }
.bm-clientsnext h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; color: var(--text); }
.bm-clientsnext p { margin: 0; color: var(--text-2); }

/* ===== Platforms page ===== */
.bm-platformgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 767px) { .bm-platformgrid { grid-template-columns: 1fr; } }
.bm-platform { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px; min-height: 250px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; overflow: hidden; }
.bm-platform::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; background: radial-gradient(420px circle at 85% 0%, var(--accent-glow-soft), transparent 60%); }
.bm-platform:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.bm-platform:hover::before { opacity: 1; }
.bm-platform__logo { display: flex; align-items: center; height: 64px; margin-bottom: 14px; }
.bm-platform__logo img { max-height: 44px; max-width: 220px; width: auto; height: auto; object-fit: contain; }
.bm-platform h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0; }
.bm-platform p { color: var(--text-2); font-size: 1rem; line-height: 1.6; margin: 0; }
.bm-platform__go { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.bm-platform:hover .bm-platform__go svg { transform: translateX(3px); }
.bm-platform__go svg { transition: transform .2s ease; }

/* Tunnel text block: a little more air between the "How we work" label and the step on phones */
@media (max-width: 639px) { .bm-tunnel__copy { min-height: 232px; } }
