/* P25 Pantoufle — Gallery Motion Lab A1..A6 — draft only. */
html.mev-p25-gallery-js body.mev-p25-gallery-motion .mev-p25-v3-module .mev-p25-v3-grid,
html.mev-p25-gallery-js body.mev-p25-gallery-motion .mev-p25-v3-module .mev-p25-v3-cell{
  will-change:clip-path,opacity;
}
html.mev-p25-gallery-js body.mev-p25-gallery-motion .mev-p25-v3-module:not(.is-gallery-built) .mev-p25-v3-credit{opacity:0}
html.mev-p25-gallery-js body.mev-p25-gallery-motion .mev-p25-v3-module.is-gallery-built .mev-p25-v3-credit{opacity:1;transition:opacity 280ms ease}

/* A1 — simultaneous full-block reveal: one calm opacity/veil release. */
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a1 .mev-p25-v3-module:not(.is-gallery-built) .mev-p25-v3-grid{opacity:0}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a1 .mev-p25-v3-module.is-gallery-building .mev-p25-v3-grid{
  animation:mev-gallery-a1 900ms cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes mev-gallery-a1{from{opacity:0}to{opacity:1}}

/* Shared sequential-cell state. Images themselves never move; only their masks reveal. */
html.mev-p25-gallery-js body:is(.mev-p25-gallery-motion-a2,.mev-p25-gallery-motion-a3,.mev-p25-gallery-motion-a5,.mev-p25-gallery-motion-a6) .mev-p25-v3-module:not(.is-gallery-built) .mev-p25-v3-cell{
  opacity:0;
  clip-path:inset(0 100% 0 0);
}
html.mev-p25-gallery-js body:is(.mev-p25-gallery-motion-a2,.mev-p25-gallery-motion-a3,.mev-p25-gallery-motion-a5,.mev-p25-gallery-motion-a6) .mev-p25-v3-module .mev-p25-v3-cell.is-gallery-cell-building{
  animation:mev-gallery-cell-ltr 820ms cubic-bezier(.22,.61,.36,1) var(--mev-gallery-delay,0ms) forwards;
}
@keyframes mev-gallery-cell-ltr{from{opacity:0;clip-path:inset(0 100% 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}

/* A3 — dominant first: dominant opens vertically, satellites then follow. */
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a3 .mev-p25-v3-cell.is-gallery-dominant{clip-path:inset(100% 0 0 0)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a3 .mev-p25-v3-cell.is-gallery-dominant.is-gallery-cell-building{
  animation-name:mev-gallery-cell-btt;
  animation-duration:920ms;
}
@keyframes mev-gallery-cell-btt{from{opacity:0;clip-path:inset(100% 0 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}

/* A4 — one common geometric mask, centre -> edges. */
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a4 .mev-p25-v3-module:not(.is-gallery-built) .mev-p25-v3-grid{
  opacity:0;
  clip-path:inset(0 50% 0 50%);
}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a4 .mev-p25-v3-module.is-gallery-building .mev-p25-v3-grid{
  animation:mev-gallery-a4 1050ms cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes mev-gallery-a4{from{opacity:0;clip-path:inset(0 50% 0 50%)}to{opacity:1;clip-path:inset(0 0 0 0)}}

/* A5 — cell-by-cell edge construction. */
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a5 .mev-p25-v3-cell.is-from-right{clip-path:inset(0 0 0 100%)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a5 .mev-p25-v3-cell.is-from-top{clip-path:inset(0 0 100% 0)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a5 .mev-p25-v3-cell.is-from-bottom{clip-path:inset(100% 0 0 0)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a5 .mev-p25-v3-cell.is-from-right.is-gallery-cell-building{animation-name:mev-gallery-cell-rtl}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a5 .mev-p25-v3-cell.is-from-top.is-gallery-cell-building{animation-name:mev-gallery-cell-ttb}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a5 .mev-p25-v3-cell.is-from-bottom.is-gallery-cell-building{animation-name:mev-gallery-cell-btt}
@keyframes mev-gallery-cell-rtl{from{opacity:0;clip-path:inset(0 0 0 100%)}to{opacity:1;clip-path:inset(0 0 0 0)}}
@keyframes mev-gallery-cell-ttb{from{opacity:0;clip-path:inset(0 0 100% 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}

/* A6 — dominant first + geometric closure around it. */
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-gallery-dominant{clip-path:inset(50% 0 50% 0)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-gallery-dominant.is-gallery-cell-building{
  animation:mev-gallery-dominant 1200ms cubic-bezier(.22,1,.36,1) var(--mev-gallery-delay,0ms) forwards;
}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-gallery-cell-building:not(.is-gallery-dominant){
  animation-duration:950ms;
  animation-timing-function:cubic-bezier(.22,1,.36,1);
}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-from-right{clip-path:inset(0 0 0 100%)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-from-top{clip-path:inset(0 0 100% 0)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-from-bottom{clip-path:inset(100% 0 0 0)}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-from-right.is-gallery-cell-building{animation-name:mev-gallery-cell-rtl}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-from-top.is-gallery-cell-building{animation-name:mev-gallery-cell-ttb}
html.mev-p25-gallery-js body.mev-p25-gallery-motion-a6 .mev-p25-v3-cell.is-from-bottom.is-gallery-cell-building{animation-name:mev-gallery-cell-btt}
@keyframes mev-gallery-dominant{from{opacity:0;clip-path:inset(50% 0 50% 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}

/* Historical lab controls retained in markup for provenance, never exposed on the production surface. */
.mev-p25-gallery-motion-switcher,.mev-p25-gallery-motion-badge,.mev-p25-v3-switcher,.mev-p25-v3-badge{display:none!important}

/* Draft lab switcher. */
.mev-p25-gallery-motion-switcher{
  position:fixed;left:16px;bottom:16px;z-index:2147482500;
  display:flex;gap:4px;padding:6px;background:rgba(249,249,239,.96);
  border:1px solid rgba(0,0,0,.28);font:600 11px/1 'General Sans',sans-serif;
}
.mev-p25-gallery-motion-switcher a{display:block;padding:8px 9px;color:#111;text-decoration:none!important}
.mev-p25-gallery-motion-switcher a[aria-current="page"]{background:#111;color:#fff}
.mev-p25-gallery-motion-badge{
  position:fixed;left:16px;bottom:58px;z-index:2147482500;
  padding:6px 9px;background:#111;color:#fff;font:500 10px/1.2 'General Sans',sans-serif;letter-spacing:.04em;
}

@media(max-width:700px){
  .mev-p25-gallery-motion-switcher{left:8px;bottom:8px}
  .mev-p25-gallery-motion-badge{left:8px;bottom:50px}
}

@media(prefers-reduced-motion:reduce){
  html.mev-p25-gallery-js body.mev-p25-gallery-motion .mev-p25-v3-module .mev-p25-v3-grid,
  html.mev-p25-gallery-js body.mev-p25-gallery-motion .mev-p25-v3-module .mev-p25-v3-cell{
    opacity:1!important;clip-path:none!important;animation:none!important;
  }
}
