/* Leleka Motion v4 • 24 October 2026
   Longer, visibly gliding entrances. Existing site's 3D, hover, reveal, parallax
   and before/after components are kept intact. No hidden content at rest. */
@media (prefers-reduced-motion: no-preference) {
  .lm-motion { opacity: 1; }
  .lm-motion.lm-entered {
    animation-name: lm-arrive-up;
    animation-duration: 2250ms;
    animation-timing-function: cubic-bezier(.32,.10,.22,1);
    animation-fill-mode: both;
    animation-delay: var(--lm-delay, 0ms);
  }
  .lm-motion.lm-entered.lm-left { animation-name: lm-arrive-left; }
  .lm-motion.lm-entered.lm-right { animation-name: lm-arrive-right; }
  .lm-motion.lm-entered.lm-scale { animation-name: lm-arrive-scale; }
  .lm-motion.lm-entered.lm-zoom { animation-name: lm-arrive-zoom; }
  @keyframes lm-arrive-left {
    0% { opacity:.08; transform:translate3d(-118px,0,0); filter:blur(2px); }
    65% { opacity:1; filter:blur(0); }
    100% { opacity:1; transform:translate3d(0,0,0); filter:blur(0); }
  }
  @keyframes lm-arrive-right {
    0% { opacity:.08; transform:translate3d(118px,0,0); filter:blur(2px); }
    65% { opacity:1; filter:blur(0); }
    100% { opacity:1; transform:translate3d(0,0,0); filter:blur(0); }
  }
  @keyframes lm-arrive-up {
    0% { opacity:.08; transform:translate3d(0,50px,0); }
    65% { opacity:1; }
    100% { opacity:1; transform:none; }
  }
  @keyframes lm-arrive-scale {
    0% { opacity:.07; transform:translate3d(82px,0,0) scale(.88); filter:blur(2px); }
    65% { opacity:1; filter:blur(0); }
    100% { opacity:1; transform:none; filter:blur(0); }
  }
  @keyframes lm-arrive-zoom {
    0% { opacity:.08; transform:scale(.88); }
    65% { opacity:1; }
    100% { opacity:1; transform:none; }
  }
  .lm-motion.lm-entered.lm-hero { animation-duration:2500ms; }
  .lm-motion.lm-entered.lm-slow { animation-duration:2350ms; }
  /* Do not change the existing BA drag interaction. Smooth only scroll-driven progression. */
  .wipe .clean { transition: clip-path 360ms cubic-bezier(.25,.72,.28,1); }
  .wipe .edge { transition:left 360ms cubic-bezier(.25,.72,.28,1), opacity 270ms ease; }
  .wipe-progress i { transition:width 360ms ease-out; }
  .ba:not(.is-dragging) .ba-before { transition:clip-path 260ms ease-out; }
  .ba:not(.is-dragging) .ba-handle { transition:left 260ms ease-out; }
}
@media (max-width:640px) and (prefers-reduced-motion: no-preference) {
  .lm-motion.lm-entered { animation-duration:1950ms; }
  .lm-motion.lm-entered.lm-hero { animation-duration:2200ms; }
  @keyframes lm-arrive-left { from { opacity:.08; transform:translate3d(-65px,0,0); } 65% { opacity:1; } to { opacity:1; transform:none; } }
  @keyframes lm-arrive-right { from { opacity:.08; transform:translate3d(65px,0,0); } 65% { opacity:1; } to { opacity:1; transform:none; } }
  @keyframes lm-arrive-scale { from { opacity:.08; transform:translate3d(42px,0,0) scale(.92); } 65% { opacity:1; } to { opacity:1; transform:none; } }
}
@media (prefers-reduced-motion: reduce) {
  .lm-motion,.lm-motion.lm-pending,.lm-motion.lm-entered { animation:none!important; transform:none!important; opacity:1!important; filter:none!important; }
  .wipe .clean,.wipe .edge,.wipe-progress i { transition:none!important; }
}

/* Before / After: perceptual smoothing instead of jumping to wheel position. */
@media (prefers-reduced-motion: no-preference) {
  .wipe-wrap.lm-smooth-wipe .wipe .clean {
    clip-path: inset(0 0 0 calc((1 - var(--lm-p, 0)) * 100%));
    transition: none;
  }
  .wipe-wrap.lm-smooth-wipe .wipe .edge {
    left: calc((1 - var(--lm-p, 0)) * 100%);
    transition: opacity 250ms ease;
  }
  .wipe-wrap.lm-smooth-wipe .wipe-progress i {
    width: calc(var(--lm-p, 0) * 100%);
    transition: none;
  }
}


/* v5: independent footer entrance; no animation or hiding before intersection. */
.site-footer { overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) {
  .site-footer .lm-footer-item.lm-footer-show {
    animation-duration: 2380ms;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(.28,.08,.17,1);
    animation-delay: var(--lm-footer-delay, 0ms);
    backface-visibility: hidden;
  }
  .site-footer .lm-footer-item.lm-footer-from-left.lm-footer-show { animation-name: lm-footer-left; }
  .site-footer .lm-footer-item.lm-footer-from-right.lm-footer-show { animation-name: lm-footer-right; }
  .site-footer .lm-footer-item.lm-footer-from-center.lm-footer-show {
    animation-name: lm-footer-grow;
    animation-duration: 2050ms;
  }
  @keyframes lm-footer-left {
    0% { opacity: .06; transform: translate3d(-170px,0,0); filter:blur(1.5px); }
    55% { opacity: .98; filter:none; }
    100% { opacity:1; transform:translate3d(0,0,0); filter:none; }
  }
  @keyframes lm-footer-right {
    0% { opacity: .06; transform: translate3d(170px,0,0); filter:blur(1.5px); }
    55% { opacity: .98; filter:none; }
    100% { opacity:1; transform:translate3d(0,0,0); filter:none; }
  }
  @keyframes lm-footer-grow {
    0% { opacity: .08; transform: scale(.54); }
    65% { opacity: 1; }
    100% { opacity:1; transform:scale(1); }
  }
  @media(max-width:640px) {
    .site-footer .lm-footer-item.lm-footer-show { animation-duration: 2100ms; }
    .site-footer .lm-footer-item.lm-footer-from-center.lm-footer-show { animation-duration:1850ms; }
    @keyframes lm-footer-left { from {opacity:.06;transform:translate3d(-85px,0,0)} 60% {opacity:1} to {opacity:1;transform:none} }
    @keyframes lm-footer-right { from {opacity:.06;transform:translate3d(85px,0,0)} 60% {opacity:1} to {opacity:1;transform:none} }
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-footer .lm-footer-item { animation:none!important; opacity:1!important; transform:none!important; filter:none!important; }
}
