/* Steven Williams Real Estate — shared motion system.
   Scroll reveals are additive: elements carry .rv in the template and
   reveal.js promotes them to .rv.in as they enter the viewport. */

/* Transition-based (not animation-based) on purpose: transitions resolve to
   their end state even in prerendered/hidden pages where the rendering loop
   never runs, so content can never get stuck invisible.
   Everything is scoped under .rv-on, which reveal.js stamps on <html> as its
   first statement — if reveal.js ever fails to load, nothing gets hidden. */
.rv-on .rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.9, 0.28, 1), transform 0.9s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.rv-on .rv.in {
  opacity: 1;
  transform: none;
}

/* Slow cinematic drift on the hero media. */
.kenburns {
  animation: sw-kenburns 38s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  will-change: transform;
}
@keyframes sw-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}

/* Premise mini-chart bars grow in once their card reveals. */
.rv-on .barfill {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.22, 0.9, 0.28, 1) 0.35s;
}
.rv-on .in .barfill { transform: scaleX(1); }

/* Modal choreography — applied on mount since modals render conditionally.
   Deliberately no fill mode: if the animation can't run, the modal simply
   shows in its natural (visible) state. */
.modal-veil { animation: sw-veil 0.3s ease-out; }
@keyframes sw-veil {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-panel { animation: sw-panel 0.5s cubic-bezier(0.22, 0.9, 0.28, 1); }
@keyframes sw-panel {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .kenburns { animation: none !important; }
  .barfill { transform: none !important; transition: none !important; }
  .modal-veil, .modal-panel { animation: none !important; }
}

/* Print is a synchronous snapshot — no observers, no transitions. Everything
   must be visible regardless of scroll position. */
@media print {
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  .kenburns { animation: none !important; }
  .barfill { transform: none !important; transition: none !important; }
}
