/* DIGIGROUPE — cinematic motion restoration, v6
   Subject-driven transitions. The existing video, agent portraits, logos and
   photography ARE the moving objects. Only one text narrative is readable. */
.dg-journey.dg-journey-ready .dg-scene.dg-scene-visible,
.dg-journey.dg-journey-ready .dg-scene.dg-scene-visible:not(.dg-scene-active){
  visibility:visible!important;opacity:1!important;overflow:hidden!important
}
.dg-journey.dg-journey-ready .dg-scene.dg-scene-visible .dg-scene-copy{
  transform-style:preserve-3d;transform-origin:25% 45%;transition:none!important;
  will-change:transform,opacity;backface-visibility:hidden
}
.dg-journey.dg-journey-ready .dg-scene.dg-scene-visible .dg-scene-interface{
  transform-style:preserve-3d;transform-origin:50% 50%;transition:none!important;
  will-change:transform,opacity;backface-visibility:hidden
}
.dg-journey.dg-journey-ready .dg-scene.dg-scene-visible .dg-scene-inner{position:relative;transform-style:preserve-3d}
.dg-journey.dg-journey-ready .dg-scene:not(.dg-scene-active){pointer-events:none!important}
.dg-journey.dg-journey-ready .dg-scene:not(.dg-scene-active) *,
.dg-journey.dg-journey-ready .dg-scene:not(.dg-scene-active) a{pointer-events:none!important}
.dg-scene-interface,.dg-scene-copy{isolation:isolate}
.dg-scene[data-stage="flow"] .dg-scene-copy::before,
.dg-scene[data-stage="ai"] .dg-scene-copy::before,
.dg-scene[data-stage="method"] .dg-scene-copy::before{
  background:radial-gradient(ellipse at 32% 46%,rgba(2,7,21,.92),rgba(2,7,21,.57) 63%,transparent 92%)
}
.dg-journey.dg-journey-ready .dg-scene[data-stage="work"] .dg-scene-copy::before{
  background:radial-gradient(ellipse at 36% 50%,rgba(239,246,255,.98),rgba(239,246,255,.58) 65%,transparent 94%)
}

/* The flow assembles one node at a time as it approaches the camera. */
.dg-scene[data-stage="flow"] .dg-flow-chain button{
  --dg-step:0;
  transform:translate3d(0,calc((1 - var(--dg-scene-amount,1)) * (70px - var(--dg-step) * 25px)),calc((var(--dg-scene-amount,1) - 1) * 140px))
  rotateY(calc((1 - var(--dg-scene-amount,1)) * (var(--dg-step) - 1.5) * 14deg))!important;
  opacity:calc(.3 + var(--dg-scene-amount,1) * .7);
  transition:background .15s,border-color .15s!important
}
.dg-scene[data-stage="flow"] .dg-flow-chain button:nth-of-type(1){--dg-step:0}
.dg-scene[data-stage="flow"] .dg-flow-chain button:nth-of-type(2){--dg-step:1}
.dg-scene[data-stage="flow"] .dg-flow-chain button:nth-of-type(3){--dg-step:2}
.dg-scene[data-stage="flow"] .dg-flow-chain button:nth-of-type(4){--dg-step:3}
.dg-scene[data-stage="flow"] .dg-flow-chain>i{
  opacity:var(--dg-scene-amount,1);transform:scaleX(var(--dg-scene-amount,1));transform-origin:left
}
.dg-scene[data-stage="flow"] .dg-ui-result{
  opacity:calc(.32 + .68 * var(--dg-scene-amount,1));
  transform:translate3d(0,calc((1 - var(--dg-scene-amount,1)) * 40px),0)
}

/* Existing agent illustrations enter as a coordinated constellation in depth,
   not one static web-card stack. At rest everything is perfectly clickable. */
.dg-scene[data-stage="ai"] .dg-agents-grid{perspective:1200px;transform-style:preserve-3d}
.dg-scene[data-stage="ai"] .dg-agent-visual{
  --dg-ax:0;--dg-ay:0;--dg-r:0;
  transform:translate3d(
    calc((1 - var(--dg-scene-amount,1)) * var(--dg-ax)),
    calc((1 - var(--dg-scene-amount,1)) * var(--dg-ay)),
    calc((1 - var(--dg-scene-amount,1)) * -190px))
    rotateY(calc((1 - var(--dg-scene-amount,1)) * var(--dg-r)))
    scale(calc(.79 + var(--dg-scene-amount,1) * .21));
  opacity:calc(.27 + var(--dg-scene-amount,1) * .73);
  transition:border-color .15s,filter .15s!important;
  transform-origin:50% 50%
}
.dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(1){--dg-ax:-160px;--dg-ay:-80px;--dg-r:-28deg}
.dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(2){--dg-ax:20px;--dg-ay:-130px;--dg-r:14deg}
.dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(3){--dg-ax:140px;--dg-ay:-80px;--dg-r:24deg}
.dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(4){--dg-ax:-170px;--dg-ay:110px;--dg-r:-22deg}
.dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(5){--dg-ax:25px;--dg-ay:130px;--dg-r:8deg}
.dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(6){--dg-ax:165px;--dg-ay:105px;--dg-r:22deg}
.dg-scene[data-stage="ai"].dg-scene-active .dg-agent-visual:hover{
  filter:brightness(1.12);border-color:#9bd7ff
}

/* Business brands form a single studio wall when the dark AI environment
   opens onto the pale project space. Original SVG logos stay the heroes. */
.dg-scene[data-stage="work"] .dg-software-collection{perspective:1400px;transform-style:preserve-3d}
.dg-scene[data-stage="work"] .dg-software-logo{
  --dg-lx:0px;--dg-ly:0px;--dg-lr:0deg;
  transform:translate3d(
    calc((1 - var(--dg-scene-amount,1)) * var(--dg-lx)),
    calc((1 - var(--dg-scene-amount,1)) * var(--dg-ly)),
    calc((var(--dg-scene-amount,1) - 1) * 250px))
    rotateY(calc((1 - var(--dg-scene-amount,1)) * var(--dg-lr)))
    scale(calc(.72 + var(--dg-scene-amount,1) * .28));
  opacity:calc(.26 + var(--dg-scene-amount,1) * .74);
  transition:border-color .17s,box-shadow .17s!important;
  backface-visibility:hidden
}
.dg-scene[data-stage="work"] .dg-software-logo:nth-child(1){--dg-lx:-150px;--dg-ly:-65px;--dg-lr:-27deg}
.dg-scene[data-stage="work"] .dg-software-logo:nth-child(2){--dg-lx:0px;--dg-ly:-135px;--dg-lr:12deg}
.dg-scene[data-stage="work"] .dg-software-logo:nth-child(3){--dg-lx:155px;--dg-ly:-65px;--dg-lr:25deg}
.dg-scene[data-stage="work"] .dg-software-logo:nth-child(4){--dg-lx:-115px;--dg-ly:125px;--dg-lr:-15deg}
.dg-scene[data-stage="work"] .dg-software-logo:nth-child(5){--dg-lx:125px;--dg-ly:115px;--dg-lr:18deg}
.dg-scene[data-stage="work"].dg-scene-active .dg-software-logo:hover{border-color:#1167da;box-shadow:0 14px 40px rgba(25,82,175,.19)}

/* One photographic plane folds into the next—web to app, rather than
   simply replacing a slide; the right hand media takes the whole journey. */
.dg-scene[data-stage="web"] .dg-service-image{
  transform:perspective(1200px) rotateY(calc((1 - var(--dg-scene-amount,1)) * 13deg))
    translateX(calc((1 - var(--dg-scene-amount,1)) * -36px));
  opacity:calc(.45 + var(--dg-scene-amount,1) * .55)
}
.dg-scene[data-stage="apps"] .dg-service-image{
  transform:perspective(1200px) rotateY(calc((1 - var(--dg-scene-amount,1)) * -15deg))
    translateX(calc((1 - var(--dg-scene-amount,1)) * 37px))
    scale(calc(.89 + var(--dg-scene-amount,1) * .11));
  opacity:calc(.4 + var(--dg-scene-amount,1) * .6)
}
.dg-scene[data-stage="method"] .dg-method-flow span{
  transform:translate3d(0,calc((1 - var(--dg-scene-amount,1)) * 68px),calc((var(--dg-scene-amount,1) - 1) * 145px));
  opacity:calc(.2 + var(--dg-scene-amount,1) * .8)
}
.dg-scene[data-stage="method"] .dg-method-flow span:nth-child(2){
  transform:translate3d(0,calc((1 - var(--dg-scene-amount,1)) * 105px),calc((var(--dg-scene-amount,1) - 1) * 145px))
}
.dg-scene[data-stage="method"] .dg-method-flow span:nth-child(3){
  transform:translate3d(0,calc((1 - var(--dg-scene-amount,1)) * 142px),calc((var(--dg-scene-amount,1) - 1) * 145px))
}
.dg-scene[data-stage="contact"] .dg-ui-contact{
  transform:perspective(1200px) rotateY(calc((1 - var(--dg-scene-amount,1)) * -6deg));
  box-shadow:0 18px 75px rgba(1,12,45,.22)!important
}

/* Long hero flythrough: video is the moving portal into the agent system.
   Preserve the video asset and its play/pause logic. */
@media(min-width:701px) and (prefers-reduced-motion:no-preference){
 .hero{height:145svh!important;min-height:0!important;overflow:clip}
 .hero .dg-hero-inner{position:sticky;top:0;height:100svh;min-height:0!important}
 .hero .dg-hero-film{
   transform:translate3d(calc(var(--dg-hero-exit,0) * -10vw),calc(var(--dg-hero-exit,0) * -2vh),0)
     perspective(1300px) rotateY(calc(var(--dg-hero-exit,0) * -25deg))
     scale(calc(1 + var(--dg-hero-exit,0) * .38));
   opacity:calc(1 - var(--dg-hero-exit,0) * .89);
   will-change:transform,opacity
 }
}
@media(max-width:700px){
 .dg-scene[data-stage="ai"] .dg-agent-visual:nth-child(n){--dg-ax:0px;--dg-ay:25px;--dg-r:7deg}
 .dg-scene[data-stage="work"] .dg-software-logo:nth-child(n){--dg-lx:0px;--dg-ly:30px;--dg-lr:8deg}
 .dg-journey.dg-journey-ready .dg-scene.dg-scene-visible .dg-scene-interface{transform-origin:50% 36%}
 .dg-scene[data-stage="flow"] .dg-flow-chain button{transform:translateY(calc((1 - var(--dg-scene-amount,1)) * 22px)) scale(calc(.85 + var(--dg-scene-amount,1) * .15))!important}
}
@media(prefers-reduced-motion:reduce){
 .dg-journey .dg-scene-interface,.dg-journey .dg-scene-copy,
 .dg-agents-grid a,.dg-software-collection a,.dg-hero-film{
   transform:none!important;transition:none!important;opacity:1!important
 }
}
/* Required for the sticky hero: the original flex/end-align and 120px top
   padding otherwise push the entire film below the first viewport. */
@media(min-width:701px) and (prefers-reduced-motion:no-preference){
 .hero{display:block!important;align-items:initial!important;padding:0!important;max-height:none!important}
 .hero .dg-hero-inner{position:sticky!important;top:0!important;box-sizing:border-box;height:100svh!important;min-height:100svh!important;padding:clamp(88px,11vh,112px) 0 35px!important;margin:0 auto!important}
}
