/* Motion layer for menaftergod.net (2026-11-12), from the Seek website template's motion.css at the "subtle" level
   (Dustin, 2026-11-11: every site gets it "without my prompting"). Small effects live here; the hero entrance, the
   scroll reveals and the photo band's drift are GSAP (motion.js). build.py links this file on every page.
   Content is always visible without JavaScript, and a man whose phone asks for reduced motion gets none of it.
   2026-11-12 (SEO audit H5): the hero is never hidden. It is the page's largest paint, so it shows from the first
   frame and only rises into place, in CSS, without waiting on GSAP. GSAP hides and reveals only what starts below
   the fold. */

/* Fade between pages (browsers with cross-document view transitions; the rest just load). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 240ms; }

/* The header gets a shadow once the page moves (motion.js sets the class). */
.bar { transition: box-shadow 200ms ease; }
.bar.is-scrolled { box-shadow: 0 12px 30px -20px #000; }

/* Photos lift a little under the pointer. */
.shot, .way-pic, .band { overflow: hidden; }
.shot img, .way-pic img, .hh-pic img { transition: scale 600ms cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
  .shot:hover img, .way:hover .way-pic img, .hh-pic:hover img { scale: 1.03; }
}

/* Hero entrance: a short rise from the first frame, fully visible all the way (a transform delays no paint and
   shifts no layout). html.motion-on is set in the head before the body paints, and never for reduced motion. */
@keyframes mag-rise { from { transform: translateY(18px); } to { transform: none; } }
html.motion-on .hero h1, html.motion-on .hero .lead, html.motion-on .hero .acts, html.motion-on .hero-host,
html.motion-on .phero .wrap > *, html.motion-on .ehero .wrap > * {
  animation: mag-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
html.motion-on .hero .lead, html.motion-on .phero .wrap > :nth-child(2), html.motion-on .ehero .wrap > :nth-child(2) { animation-delay: 60ms; }
html.motion-on .hero .acts, html.motion-on .phero .wrap > :nth-child(3), html.motion-on .ehero .wrap > :nth-child(3) { animation-delay: 120ms; }
html.motion-on .hero-host, html.motion-on .phero .wrap > :nth-child(n+4), html.motion-on .ehero .wrap > :nth-child(n+4) { animation-delay: 180ms; }

/* Start state for what GSAP reveals: motion.js marks only pieces that start below the fold, once GSAP is running. */
html.motion-on [data-reveal] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .bar, .shot img, .way-pic img, .hh-pic img { transition: none !important; }
  .shot:hover img, .way:hover .way-pic img, .hh-pic:hover img { scale: 1 !important; }
  html.motion-on .hero h1, html.motion-on .hero .lead, html.motion-on .hero .acts, html.motion-on .hero-host,
  html.motion-on .phero .wrap > *, html.motion-on .ehero .wrap > * { animation: none !important; }
  html.motion-on [data-reveal] { opacity: 1; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Printing never waits on an animation. */
@media print {
  html.motion-on .hero h1, html.motion-on .hero .lead, html.motion-on .hero .acts, html.motion-on .hero-host,
  html.motion-on .phero .wrap > *, html.motion-on .ehero .wrap > *, html.motion-on [data-reveal] { opacity: 1 !important; transform: none !important; animation: none !important; }
}
