/* ============================================================
   T.Finch preview — scroll-triggered section reveals.
   Loaded only on preview pages (paired with redesign-anim.js).
   Headers fade in slowly word-by-word when scrolled into view;
   sub-headers fade up.
   ============================================================ */

/* The home hero title has no reveal-up guard, so pre-hide it to
   avoid a flash of the full text before the JS wraps it. */
.pv-home .hero-cinematic-title { opacity: 0; }
.pv-home .hero-cinematic-title.rd-wf { opacity: 1; }

/* Word-by-word fade-in for headers. */
.rd-wf .rd-wf-word { opacity: 0; }
.rd-wf-go .rd-wf-word {
    animation: rd-wf-in 0.7s ease forwards;
    animation-delay: var(--d, 0s);
}
@keyframes rd-wf-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Sub-headers: fade + rise, on the same per-section trigger. */
.rd-fade {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.15s;
}
.rd-fade.rd-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .pv-home .hero-cinematic-title { opacity: 1; }
    .rd-wf .rd-wf-word { opacity: 1; }
    .rd-fade { opacity: 1; transform: none; }
}
