/* Rayat PROJECT OVERVIEW: cinematic 3D lid motion v16, scoped to laptop gallery. */
html body.rayat-case-page .rayat-overview-v15 .laptop-scene{
  perspective:1500px;
  transform-style:preserve-3d;
  isolation:isolate;
}
html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-display{
  z-index:4;
  transform-origin:center bottom;
  transform-style:preserve-3d;
  backface-visibility:hidden;
  transform:rotateX(0deg);
  will-change:auto;
}
html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-screen{
  backface-visibility:hidden;
}
html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-deck{
  display:block;
  position:absolute;
  z-index:2;
  left:5.6%;
  right:5.6%;
  bottom:7.9%;
  height:12%;
  border:1px solid rgba(186,202,216,.45);
  border-radius:2px 2px 9px 9px;
  background:
     repeating-linear-gradient(90deg,transparent 0 5.5%,rgba(6,20,31,.30) 5.7% 6.2%,transparent 6.4% 8.2%),
     linear-gradient(180deg,#4e5b66 1%,#283643 54%,#73808a 100%);
  transform-origin:center bottom;
  transform:rotateX(68deg) translateY(8%);
  box-shadow:inset 0 1px 2px rgba(221,235,241,.35),0 8px 20px rgba(0,0,0,.35);
  pointer-events:none;
}
html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-hinge{
  z-index:5;
  box-shadow:0 1px 7px rgba(206,220,235,.18);
}
html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-base{z-index:6}
html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-ground{z-index:0}
/* One independent motion timeline per laptop, staggered between columns and rows.
   The screen opens, rests at a readable angle, closes softly, then opens again. */
html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running .laptop-display{
  animation:rayat-lid-open-close-v16 17s cubic-bezier(.22,.65,.25,1) var(--lid-stagger,0s) infinite both;
  animation-play-state:paused;
  will-change:transform;
}
html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running.lid-in-view .laptop-display{
  animation-play-state:running;
}
/* 0-12: opening; 12-55: image readable; 55-77: closes and gently reopens.
   The closing moment is short, with generous rest at open state. */
@keyframes rayat-lid-open-close-v16{
  0%{transform:rotateX(70deg)}
  11%{transform:rotateX(-4deg)}
  17%,57%{transform:rotateX(0deg)}
  70%{transform:rotateX(64deg)}
  76%{transform:rotateX(64deg)}
  90%{transform:rotateX(-3deg)}
  96%,100%{transform:rotateX(0deg)}
}
html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running.lid-in-view .laptop-deck{
  animation:rayat-deck-light-v16 17s ease-in-out var(--lid-stagger,0s) infinite both;
  animation-play-state:running;
}
@keyframes rayat-deck-light-v16{
  0%,10%,67%,78%{filter:brightness(1.14)}
  25%,53%,93%,100%{filter:brightness(.91)}
}
html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running .laptop-deck{
  animation-play-state:paused;
}
html body.rayat-case-page .rayat-overview-v15 .shot .laptop-base::before{
  content:"";position:absolute;z-index:2;left:9%;right:9%;height:1px;top:0;
  background:linear-gradient(90deg,transparent,rgba(244,251,255,.6),transparent);
  pointer-events:none;
}
/* On interaction, don't obstruct links or hide the product behind a closed lid. */
@media(hover:hover) and (pointer:fine){
  html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running:is(:hover,:focus-within) .laptop-display{
    animation:none!important;
    transform:rotateX(0deg)!important;
    transition:transform .6s cubic-bezier(.18,.78,.21,1);
  }
  html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running:is(:hover,:focus-within) .laptop-deck{
    animation-play-state:paused!important;
  }
}
/* Touch screens: animation is more restrained; image remains readable longer. */
@media(max-width:680px){
  html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running .laptop-display{
    animation-duration:20s;
  }
  html body.rayat-case-page .rayat-overview-v15 .laptop-scene .laptop-deck{
    height:10%;
  }
  html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running .laptop-deck{
    animation-duration:20s;
  }
}
@media(prefers-reduced-motion:reduce){
  html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running .laptop-display,
  html body.rayat-case-page .rayat-overview-v15 .shot.lid-motion-running .laptop-deck{
    animation:none!important;
    transform:rotateX(0deg)!important;
    filter:none!important;
    will-change:auto!important;
  }
}
