/* ------------------------------------------------------------------
   SCROLL REVEAL: content rises into place with a soft glow as it
   scrolls into view, once per element. reveal.js does the timing.

   Nothing is hidden unless reveal.js has put the "rv" class on <html>
   (it skips that when JavaScript fails or the visitor prefers reduced
   motion), so the page always works without it.

   The selector list below must match TARGETS in reveal.js.
   ------------------------------------------------------------------ */

:root {
  --rv-glow: rgba(0, 71, 143, 0.30);   /* brand blue */
  --rv-ring: rgba(0, 71, 143, 0.22);
  --rv-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html[data-theme="soft"] {
  --rv-glow: rgba(217, 180, 90, 0.32);   /* gold in Soft Light */
  --rv-ring: rgba(217, 180, 90, 0.26);
}

/* waiting below the fold: invisible, but still taking up its space (no layout shift) */
html.rv :is(
  .section-head > *, .faq-head > *, .contact-head > *, .contact-info > *, .plans-head > *, .bio-story > *, .split > div:not(.faq-list) > *,
  .care-card, .feature, .faq-item, .contact-form, .book-card, .plan, .bio-card, .care-tabs, .care-panel, .faq-rail, .post-text, .post-thumb
):not(.rv-done) { opacity: 0; }

/* text: rises and briefly catches the light */
.rv-in.rv-text { animation: rv-rise 0.9s var(--rv-ease) var(--rv-delay, 0ms) both, rv-glow-text 1.6s ease-out var(--rv-delay, 0ms) both; }
/* cards and panels: rise with a soft halo that fades as they settle */
.rv-in.rv-card { animation: rv-rise 0.9s var(--rv-ease) var(--rv-delay, 0ms) both, rv-glow-card 1.7s ease-out var(--rv-delay, 0ms) both; }
/* photos inside cards ease from 97% to full size */
.rv-in .photo img, .rv-in.bio-card img { animation: rv-settle 1.1s var(--rv-ease) var(--rv-delay, 0ms) both; }

@keyframes rv-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rv-glow-text {
  0%   { text-shadow: 0 0 0 transparent; }
  35%  { text-shadow: 0 0 22px var(--rv-glow); }
  100% { text-shadow: 0 0 0 transparent; }
}
@keyframes rv-glow-card {
  0%   { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; }
  40%  { box-shadow: 0 0 0 1px var(--rv-ring), 0 18px 50px -10px var(--rv-glow); }
  100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; }
}
@keyframes rv-settle {
  from { opacity: 0.4; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html.rv :is(.section-head > *, .faq-head > *, .contact-head > *, .contact-info > *, .plans-head > *, .bio-story > *, .split > div:not(.faq-list) > *, .care-card, .feature, .faq-item, .contact-form, .book-card, .plan, .bio-card, .care-tabs, .care-panel, .faq-rail, .post-text, .post-thumb) { opacity: 1; }
  .rv-in, .rv-in .photo img, .rv-in.bio-card img { animation: none !important; }
}
