/* Scroll reveal: content rises, sharpens and fades in once as it enters the viewport.
   Hidden only when the head script adds .js-reveal, so the page stays readable without JavaScript. */
:root { --reveal-ease: cubic-bezier(.16, 1, .3, 1); }

.js-reveal :is(
  .pv-investigation-intro > *,
  .pv-invite > *,
  .pv-connections-intro > *,
  .pv-chapter .pv-copy > *,
  .pv-chapter > .pv-stage,
  .pv-profile-intro > *,
  .pv-nights,
  .pv-chores,
  .pv-three-steps > li,
  .pv-trust header > *,
  .pv-principles > article,
  .pv-trust-note,
  .pv-faq > h3,
  .pv-faq-list > details,
  .pv-closing .pv-shell > *,
  .site-footer
):not(.is-revealed) { opacity: 0; }

.is-revealed { animation: pv-reveal 1.1s var(--reveal-ease) var(--reveal-delay, 0ms) backwards; }
/* Product visuals travel a little further and settle from a slight scale. */
.pv-stage.is-revealed { animation-name: pv-reveal-visual; animation-duration: 1.4s; }
.site-footer.is-revealed { animation-name: pv-reveal-fade; }

/* The hero plays on first paint with CSS alone, so it never waits for reveal.js. */
.js-reveal .pv-hero-copy > * { animation: pv-reveal 1.1s var(--reveal-ease) backwards; }
.js-reveal .pv-hero-copy > :nth-child(1) { animation-delay: .15s; }
.js-reveal .pv-hero-copy > :nth-child(2) { animation-delay: .25s; }
.js-reveal .pv-hero-copy > :nth-child(3) { animation-delay: .35s; }
.js-reveal .pv-hero-copy > :nth-child(4) { animation-delay: .45s; }
.js-reveal .pv-navigation { animation: pv-reveal-fade 1.2s var(--reveal-ease) .5s backwards; }
.is-revealed.is-instant { animation: none; }

@keyframes pv-reveal { from { opacity: 0; translate: 0 28px; filter: blur(8px); } }
@keyframes pv-reveal-visual { from { opacity: 0; translate: 0 48px; scale: .97; filter: blur(10px); } }
@keyframes pv-reveal-fade { from { opacity: 0; } }

/* The hero skyline settles slowly as the page opens. */
.js-reveal .pv-hero .landscape { animation: pv-reveal-skyline 2.4s var(--reveal-ease) backwards; }
@keyframes pv-reveal-skyline { from { opacity: 0; scale: 1.06; } }
.js-reveal .pv-closing::before { opacity: 0; transition: opacity 1.8s var(--reveal-ease); }
.js-reveal .pv-closing.is-in-view::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  /* The head script skips .js-reveal for reduced motion; this guards later preference changes. */
  .is-revealed, .js-reveal .pv-hero .landscape, .js-reveal .pv-hero-copy > *, .js-reveal .pv-navigation { animation: none; }
}
