/* arch-rise-photo: a photo frame that rises as a rounded arch window and squares off, the photo drifting inside.
   Markup: <div class="arp" data-arp style="--arp-ratio: 3 / 2"><img src alt width height></div>
   (part.js wraps the img in .arp-frame > .arp-drift; you may write those wrappers yourself).
   Without JS (or under reduced motion) it is a plain full-size photo. */
.arp {
  --arp-n: 8;                       /* parallax intensity N: photo is (100 + 2N)% of the frame tall */
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--arp-ratio, auto);
  overflow: hidden;                 /* the frame only ever shrinks inside its box */
  margin: 0;
}
.arp > img,
.arp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.arp-frame {
  overflow: hidden;
  transform-origin: var(--arp-origin, 50% 50%);
  background: var(--arp-placeholder, transparent);
}
.arp-drift { position: absolute; inset: 0; }
.arp.is-arp-live .arp-drift { will-change: transform; }
.arp > img,
.arp-frame img {
  object-fit: cover;
  display: block;
}
.arp-frame img {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  top: calc(var(--arp-n) * -1%);
  height: calc(100% + var(--arp-n) * 2%);
}
@media (prefers-reduced-motion: reduce) {
  .arp-frame { transform: none !important; clip-path: none !important; }
  .arp-drift { transform: none !important; }
}
