/* Scroll-led reveals for case-study stories. */
.motion-enabled [data-reveal] { opacity:0; }
.motion-enabled [data-reveal="text"] { transform:translateY(1.5rem); transition:opacity .75s ease, transform .9s cubic-bezier(.2,.75,.25,1); }
.motion-enabled [data-reveal="text"].is-visible { opacity:1; transform:translateY(0); }
.motion-enabled .visual[data-reveal] { transform:translate3d(-2rem, 3rem, 0) rotate(calc(var(--tilt, 0deg) - 1.2deg)); }
.motion-enabled .case-gallery .visual:nth-child(even)[data-reveal] { transform:translate3d(2rem, 3rem, 0) rotate(calc(var(--tilt, 0deg) + 1.2deg)); }
.motion-enabled .visual[data-reveal].is-visible { animation:image-settle .65s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes image-settle { 0% { opacity:0; transform:translate3d(-2rem, 0, 0) rotate(var(--tilt, 0deg)); } 100% { opacity:1; transform:translate3d(0, 0, 0) rotate(var(--tilt, 0deg)); } }
.case-gallery .visual:nth-child(even)[data-reveal].is-visible { animation-name:image-settle-right; }
.motion-enabled .visual[data-reveal].is-visible { animation-delay:var(--reveal-delay, 0s); }
.case-gallery .visual:nth-child(1) { --reveal-delay:.05s; }
.case-gallery .visual:nth-child(2) { --reveal-delay:.75s; }
.case-gallery .visual:nth-child(3) { --reveal-delay:1.3s; }
.case-gallery .visual:nth-child(4) { --reveal-delay:1.85s; }
.case-gallery .visual:nth-child(5) { --reveal-delay:2.4s; }
@keyframes image-settle-right { 0% { opacity:0; transform:translate3d(2rem, 0, 0) rotate(var(--tilt, 0deg)); } 100% { opacity:1; transform:translate3d(0, 0, 0) rotate(var(--tilt, 0deg)); } }
@media (prefers-reduced-motion: reduce) { .motion-enabled [data-reveal] { opacity:1; transform:none; transition:none; animation:none !important; } }

@media (max-width:1024px) {
  .motion-enabled .case-gallery .visual[data-reveal] {
    opacity:1;
    transform:none;
    animation:none !important;
    pointer-events:auto;
  }
}


@media (min-width:1025px) {
  .case-gallery.stack-gallery { position:sticky; top:4rem; width:540px; height:540px; min-width:540px; min-height:540px; display:block; overflow:visible; }
  .case-gallery.stack-gallery .visual { position:absolute; inset:0; width:540px; height:540px; display:flex; align-items:center; margin:0; opacity:0; pointer-events:none; }
  .case-gallery.stack-gallery .visual img { width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; }
  .case-gallery.stack-gallery .visual:nth-child(1) { z-index:1; }
  .case-gallery.stack-gallery .visual:nth-child(2) { z-index:2; }
  .case-gallery.stack-gallery .visual:nth-child(3) { z-index:3; }
  .case-gallery.stack-gallery .visual:nth-child(4) { z-index:4; }
  .case-gallery.stack-gallery .visual:nth-child(5) { z-index:5; }
  .case-gallery.stack-gallery .visual:nth-child(6) { z-index:6; }
  .motion-enabled .case-gallery.stack-gallery .visual[data-reveal] { transform:translate3d(-1.5rem, 2.5rem, 0) rotate(calc(var(--tilt, 0deg) - 1deg)); }
  .motion-enabled .case-gallery.stack-gallery .visual[data-reveal].is-visible { opacity:1; animation:image-settle .65s cubic-bezier(.2,.8,.2,1) forwards; }
  .motion-enabled .case-gallery.stack-gallery .visual:nth-child(even)[data-reveal] { transform:translate3d(1.5rem, 2.5rem, 0) rotate(calc(var(--tilt, 0deg) + 1deg)); }
  .motion-enabled .case-gallery.stack-gallery .visual:nth-child(even)[data-reveal].is-visible { animation-name:image-settle-right; }
}
