/* Reveal — the pitch sites' shared motion (pitch/snippets/reveal.css, 2026-10-26).
   Copy this file to <slug>/assets/reveal.css and link it after site.css, versioned
   (?v=YYYY-MM-DD). Nothing here hides content unless <html> has the class "js", which
   the page adds with an inline script in <head> (see pitch/snippets/README.md), so a
   browser without JavaScript sees everything at once.

   Hooks:
     data-hero-in        the hero's text stack: its children step in on load, 120 ms apart
     data-media-in       the hero <video> only: fades up from its poster once it can play
                         (never on the hero image: the LCP image is never hidden, §13)
     data-reveal         a section or block: rises 28 px and fades in once, when scrolled to
     data-reveal="fade"  same, without the rise
     data-reveal-group   a parent whose data-reveal children stagger 80 ms apart

   Timing is deliberate (700–800 ms, a long ease-out): fast enough to never feel like
   waiting, slow enough to read as motion. Under prefers-reduced-motion everything is
   simply visible. Print shows everything. */

html.js [data-hero-in] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}
html.js.is-loaded [data-hero-in] > * { opacity: 1; transform: none; }
html.js.is-loaded [data-hero-in] > :nth-child(1) { transition-delay: 0ms; }
html.js.is-loaded [data-hero-in] > :nth-child(2) { transition-delay: 120ms; }
html.js.is-loaded [data-hero-in] > :nth-child(3) { transition-delay: 240ms; }
html.js.is-loaded [data-hero-in] > :nth-child(4) { transition-delay: 360ms; }
html.js.is-loaded [data-hero-in] > :nth-child(5) { transition-delay: 480ms; }
html.js.is-loaded [data-hero-in] > :nth-child(n + 6) { transition-delay: 600ms; }

html.js video[data-media-in] { opacity: 0; transition: opacity 1.2s ease; }
html.js video[data-media-in].is-ready { opacity: 1; }

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Same specificity as the rules above and later in the file, so they win. */
@media (prefers-reduced-motion: reduce) {
  html.js [data-hero-in] > *, html.js video[data-media-in], html.js [data-reveal] {
    opacity: 1; transform: none; transition: none;
  }
}
@media print {
  html.js [data-hero-in] > *, html.js video[data-media-in], html.js [data-reveal] {
    opacity: 1; transform: none; transition: none;
  }
}
