/* Radiant Flo · gentle motion (Nov 2026)
   Everything here starts visible. Motion only adds movement on top, so a slow phone never shows a blank page.
   Active only when js/motion.js adds html.rf-motion (not for prefers-reduced-motion). */

/* 1. Hero settle: the first photo starts a touch closer and eases back over 4s.
   Uses the separate `scale` property so it layers with any drift already on the photo. */
html.rf-motion .rfm-settle{scale:1.07;transition:scale 4s cubic-bezier(.2,.7,.2,1);transform-origin:50% 40%}
html.rf-motion .rfm-settle.rfm-in{scale:1}

/* 2. Slow drift: a big photo moves a little slower than the page (browsers that support scroll timelines). */
@keyframes rfm-drift{from{transform:translateY(-5%) scale(1.1)}to{transform:translateY(5%) scale(1.1)}}
@supports (animation-timeline: view()){
  html.rf-motion .rfm-drift{animation:rfm-drift linear both;animation-timeline:view();animation-range:cover 0% cover 100%}
}

/* 3. Photo clip: keeps zooms and videos inside the photo edge; the gold offset frame stays outside it. */
.rfm-clip{position:relative;z-index:1;display:block;overflow:hidden;border:1px solid rgba(46,42,35,.3)}
.rfm-clip > img{display:block;border:0 !important;transition:scale 1.8s cubic-bezier(.2,.7,.2,1)}

/* 4. Hover: the photo inside a card drifts closer, slowly. */
@media (hover:hover){
  html.rf-motion a:hover .rfm-clip > img,
  html.rf-motion a:hover .rfm-clip > .rfm-video,
  html.rf-motion a:focus-visible .rfm-clip > img{scale:1.035}
}

/* 5. Video loop over the photo: the photo shows first, the video fades in once it is actually playing. */
.rfm-video{position:absolute;inset:0;z-index:2;width:100%;height:100%;object-fit:cover;opacity:0;pointer-events:none;
  transition:opacity 1.6s ease,scale 1.8s cubic-bezier(.2,.7,.2,1)}
.rfm-video.rfm-playing{opacity:1}

@media (prefers-reduced-motion:reduce){
  .rfm-settle,.rfm-drift,.rfm-clip > img{scale:1 !important;animation:none !important;transition:none !important}
  .rfm-video{display:none}
}

/* 6. Slow breath: card photos without a video drift a touch closer and back, so they sit at ease beside one that moves. */
@keyframes rfm-breathe{from{transform:scale(1)}to{transform:scale(1.06)}}
html.rf-motion .rfm-breathe{animation:rfm-breathe 20s ease-in-out infinite alternate;transform-origin:50% 45%}
@media (prefers-reduced-motion:reduce){.rfm-breathe{animation:none !important}}
