/* DIGIGROUPE V42 — active spheres & agent cards.
 * Everything is scoped to the six clickable objects: no new backgrounds,
 * canvas layers, transforms on carousel anchors or fixed overlays. */

/* More substantial, glossy pearls; slight translucency remains at the rim. */
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark,
body.dg-bg-safe.dg-atmosphere-home .dg-journey-ready .dg-scene[data-stage="work"] .dg-software-logo:nth-child(n) .dg-software-mark{
  position:relative!important;
  background:
   radial-gradient(circle at 28% 20%,rgba(255,255,255,.77),rgba(255,255,255,.13) 35%,transparent 53%),
   radial-gradient(circle at 44% 39%,
    rgba(var(--dg-v23-orb-rgb,102,157,220),.94) 0%,
    rgba(var(--dg-v23-orb-rgb,102,157,220),.87) 48%,
    rgba(var(--dg-v23-orb-rgb,102,157,220),.74) 76%,
    rgba(13,35,77,.66) 100%)!important;
  border:1px solid rgba(183,225,255,.57)!important;
  box-shadow:inset 0 2px 15px rgba(255,255,255,.41),
   inset -13px -18px 25px rgba(0,18,49,.27),
   0 18px 40px rgba(0,9,39,.30),
   0 0 0 8px rgba(var(--dg-v23-orb-rgb,102,157,220),.07)!important;
  opacity:1!important;
  transform-style:preserve-3d;
}
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:not(.dg-v9-selected) .dg-software-mark{
  opacity:.97!important;
}
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo.dg-v9-selected .dg-software-mark{
  box-shadow:inset 0 2px 19px rgba(255,255,255,.49),
   inset -13px -18px 25px rgba(0,16,48,.29),
   0 21px 50px rgba(0,9,39,.39),
   0 0 0 10px rgba(var(--dg-v23-orb-rgb,102,157,220),.1)!important;
}
/* Moving terminator: local illumination rotates over the surface.
 * The actual brand logo remains straight above it, on z-index 2. */
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::after{
  content:"";
  position:absolute;
  inset:1px;
  z-index:1;
  border-radius:50%;
  pointer-events:none;
  background:
    radial-gradient(ellipse 63% 90% at 91% 51%,
      rgba(0,15,43,.49),rgba(0,20,50,.19) 62%,transparent 96%),
    radial-gradient(ellipse 35% 48% at 26% 24%,rgba(255,255,255,.27),transparent 96%);
  transform:rotateY(-68deg) rotateZ(-15deg);
  opacity:.95;
}
/* Visible local orbital path behind every pearl. */
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::before{
  content:"";
  position:absolute;
  inset:-22%;
  z-index:-1;
  border:1.6px solid rgba(var(--dg-v23-orb-rgb,102,157,220),.70)!important;
  border-radius:50%;
  background:transparent!important;
  box-shadow:0 0 15px rgba(var(--dg-v23-orb-rgb,102,157,220),.19)!important;
  transform:rotateX(69deg) rotateZ(-31deg);
  pointer-events:none;
}
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo.dg-v9-selected .dg-software-mark::before{
  border-color:rgba(198,234,255,.86)!important;
  border-width:2px!important;
}
/* Desktop: the real three-dimensional WebGL sphere is visible and now
 * rotates in JavaScript. Do not cover its canvas with a solid CSS pearl. */
html.dg-v23-spheres-webgl body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark,
html.dg-v23-spheres-webgl body.dg-bg-safe.dg-atmosphere-home .dg-journey-ready .dg-scene[data-stage="work"] .dg-software-logo:nth-child(n) .dg-software-mark{
  background:radial-gradient(circle at 26% 20%,rgba(255,255,255,.21),
    rgba(var(--dg-v23-orb-rgb,102,157,220),.06) 60%,transparent 95%)!important;
}
html.dg-v23-spheres-webgl body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-v23-sphere-canvas{
  opacity:.99!important;
}
html.dg-v23-spheres-webgl body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::after{
  opacity:.24;
}
/* Cards are positioned in 3D by the original V9 JS. Animate their
 * inner imagery only, so links and touch navigation remain stable. */
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual img{
  transform-origin:50% 52%;
  backface-visibility:visible;
  border:1px solid rgba(160,212,255,.35)!important;
  border-radius:12px!important;
}
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:16px;
  border:1px solid rgba(151,214,255,.4);
  box-shadow:0 0 25px rgba(67,162,255,.21);
  opacity:.3;
  pointer-events:none;
}
body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual.dg-v9-selected::after{
  border-color:rgba(163,221,255,.78);
  box-shadow:0 0 35px rgba(72,172,255,.39);
}
/* Animate all six objects while their chapter is visible; stagger for
 * natural motion, and stop off-screen to limit power consumption. */
@media(prefers-reduced-motion:no-preference){
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark{
    animation:dg-v42-float 7.1s ease-in-out infinite!important;
    animation-play-state:paused!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"].dg-scene-active .dg-software-logo .dg-software-mark{
    animation-play-state:running!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:nth-child(2) .dg-software-mark{
    animation-duration:8.1s!important;animation-delay:-2.4s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:nth-child(3) .dg-software-mark{
    animation-duration:7.5s!important;animation-delay:-4.2s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:nth-child(4) .dg-software-mark{
    animation-duration:8.7s!important;animation-delay:-1.3s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:nth-child(5) .dg-software-mark{
    animation-duration:7.9s!important;animation-delay:-5.1s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:nth-child(6) .dg-software-mark{
    animation-duration:9.1s!important;animation-delay:-3.8s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::after{
    animation:dg-v42-spin 11s ease-in-out infinite;
    animation-play-state:paused;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::before{
    animation:dg-v42-ring 13s linear infinite!important;
    animation-play-state:paused!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"].dg-scene-active .dg-software-logo .dg-software-mark::before,
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"].dg-scene-active .dg-software-logo .dg-software-mark::after{
    animation-play-state:running!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo:nth-child(even) .dg-software-mark::after{
    animation-duration:16s;animation-delay:-5s;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual img{
    animation:dg-v42-agent-float 6.2s ease-in-out infinite!important;
    animation-play-state:paused!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"].dg-scene-active .dg-agent-visual img{
    animation-play-state:running!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(2) img{
    animation-duration:7.2s!important;animation-delay:-2s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(3) img{
    animation-duration:6.9s!important;animation-delay:-3.3s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(4) img{
    animation-duration:7.6s!important;animation-delay:-4.1s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(5) img{
    animation-duration:6.6s!important;animation-delay:-1.5s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(6) img{
    animation-duration:7.9s!important;animation-delay:-4.6s!important;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual::after{
    animation:dg-v42-card-glow 5.9s ease-in-out infinite;
    animation-play-state:paused;
  }
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"].dg-scene-active .dg-agent-visual::after{
    animation-play-state:running;
  }
}
@keyframes dg-v42-float{
  0%,100%{translate:0 1px}
  28%{translate:-3px -8px}
  64%{translate:3px -4px}
}
@keyframes dg-v42-spin{
  0%{transform:rotateY(-68deg) rotateZ(-16deg)}
  25%{transform:rotateY(0deg) rotateZ(-5deg)}
  50%{transform:rotateY(78deg) rotateZ(8deg)}
  75%{transform:rotateY(184deg) rotateZ(13deg)}
  100%{transform:rotateY(292deg) rotateZ(-16deg)}
}
@keyframes dg-v42-ring{
  from{transform:rotateX(69deg) rotateZ(-31deg)}
  to{transform:rotateX(69deg) rotateZ(329deg)}
}
@keyframes dg-v42-agent-float{
  0%,100%{transform:perspective(800px) translateY(1px) rotateY(-2.1deg) rotateX(.7deg)}
  37%{transform:perspective(800px) translateY(-10px) rotateY(2.5deg) rotateX(-1.6deg)}
  73%{transform:perspective(800px) translateY(-4px) rotateY(-1.1deg) rotateX(.5deg)}
}
@keyframes dg-v42-card-glow{
  0%,100%{opacity:.30}
  50%{opacity:.77}
}
@media(max-width:700px){
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::before{inset:-18%}
}
@media(prefers-reduced-motion:reduce){
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark,
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::before,
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="work"] .dg-software-logo .dg-software-mark::after,
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual img,
  body.dg-bg-safe.dg-atmosphere-home .dg-scene[data-stage="ai"] .dg-agent-visual::after{
    animation:none!important;
    translate:none!important;
  }
}


/* The V9 orbit director previously faded nonselected planets down to
 * 0.14 on desktop, which made even an opaque pearl appear transparent.
 * Keep their position and size perspective, but never fade below 70%. */
body.dg-bg-safe.dg-atmosphere-home .dg-journey.dg-journey-ready .dg-scene[data-stage="work"] .dg-software-logo:nth-child(n){
  opacity:clamp(.70,var(--dg-v9-opacity,1),1)!important;
}
