/* Fanpass partners page: motion, first pass (Sills, 2026-11-04: "Sites that I'd like to emulate their
   animations are instrument.com and dixonbaxi.com/case-study/inception42").
   Everything here applies only under html.anim, which the head script sets unless the visitor's device
   asks for reduced motion. Without it (or if motion.js fails, which removes the class) the page is static. */

/* Lenis smooth scroll (from lenis/dist/lenis.css, MIT) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); }

/* ── 1. Intro, on load (pure CSS, so it never waits on the script) ───────────────────────── */
@keyframes mo-rise   { from { transform: translateY(105%); } to { transform: none; } }
@keyframes mo-fadeup { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes mo-wipe   { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mo-zoom   { from { transform: scale(1.18); } to { transform: scale(1); } }

/* the FANPASS letters rise one by one out of the wordmark's own box (Instrument's wordmark) */
html.anim .hero svg.wordmark { overflow: hidden; }
html.anim .hero svg.wordmark .L { transform-box: fill-box; animation: mo-rise 1s var(--ease-out) both; }
html.anim .hero svg.wordmark .L:nth-of-type(1) { animation-delay: .05s; }
html.anim .hero svg.wordmark .L:nth-of-type(2) { animation-delay: .12s; }
html.anim .hero svg.wordmark .L:nth-of-type(3) { animation-delay: .19s; }
html.anim .hero svg.wordmark .L:nth-of-type(4) { animation-delay: .26s; }
html.anim .hero svg.wordmark .L:nth-of-type(5) { animation-delay: .33s; }
html.anim .hero svg.wordmark .L:nth-of-type(6) { animation-delay: .40s; }
html.anim .hero svg.wordmark .L:nth-of-type(7) { animation-delay: .47s; }

/* the hero video wipes up into place, with a slow settle on the footage */
html.anim .hero .video-card { animation: mo-wipe 1.2s var(--ease-io) .45s both; }
html.anim .hero .video-card video { animation: mo-zoom 2.2s var(--ease-out) .45s both; }

/* headline, body, buttons and member count follow in sequence */
html.anim .hero h1          { animation: mo-fadeup 1s var(--ease-out) .70s both; }
html.anim .hero .sub        { animation: mo-fadeup 1s var(--ease-out) .82s both; }
html.anim .hero .hero-cta   { animation: mo-fadeup 1s var(--ease-out) .94s both; }
html.anim .hero .members    { animation: mo-fadeup 1s var(--ease-out) 1.06s both; }

/* partner logos come in left to right, in the same row and spacing as before (they end at the
   page's own .9 opacity) */
@keyframes mo-fadeup-logo { from { opacity: 0; transform: translateY(16px); } to { opacity: .9; transform: none; } }
html.anim .logo-grid img { animation: mo-fadeup-logo .9s var(--ease-out) both; }
html.anim .logo-grid img:nth-child(1) { animation-delay: 1.15s; }
html.anim .logo-grid img:nth-child(2) { animation-delay: 1.21s; }
html.anim .logo-grid img:nth-child(3) { animation-delay: 1.27s; }
html.anim .logo-grid img:nth-child(4) { animation-delay: 1.33s; }
html.anim .logo-grid img:nth-child(5) { animation-delay: 1.39s; }
html.anim .logo-grid img:nth-child(6) { animation-delay: 1.45s; }
html.anim .logo-grid img:nth-child(7) { animation-delay: 1.51s; }
html.anim .logo-grid img:nth-child(8) { animation-delay: 1.57s; }

/* ── 2. On scroll (motion.js adds .rv to these, then .in when they come into view) ───────── */
/* headings rise word by word out of a mask (Instrument's "We're a digital-first…") */
html.anim .rv-words .w  { display: inline-block; overflow: hidden; vertical-align: top;
                          padding-bottom: .12em; margin-bottom: -.12em; }
html.anim .rv-words .wi { display: inline-block; transform: translateY(110%);
                          transition: transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
html.anim .rv-words.in .wi { transform: none; }

/* text blocks, list rows and stat tiles fade up, staggered within their group (DixonBaxi's text) */
html.anim .rv { opacity: 0; transform: translateY(28px);
                transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
                transition-delay: var(--d, 0s); }
html.anim .rv.in { opacity: 1; transform: none; }

/* phone devices just fade in, quickly, as soon as they reach the screen (Sills, 2026-11-05: "make the
   phone devices fade in much faster ... I don't love how the animation 'rolls up' and reveals the phone") */
html.anim .rv-phone { opacity: 0; transition: opacity .4s ease-out; }
html.anim .rv-phone.in { opacity: 1; }

/* Reach grid tiles: a quick fade with a slight settle, swept left to right by motion.js (Sills, 2026-11-05) */
html.anim .rv-reach { opacity: 0; transform: scale(1.04);
                      transition: opacity .45s ease-out, transform .6s var(--ease-out); transition-delay: var(--d, 0s); }
html.anim .rv-reach.in { opacity: 1; transform: none; }

/* photos and videos wipe up from the bottom and settle from a slight zoom */
html.anim .rv-media { clip-path: inset(100% 0 0 0);
                      transition: clip-path 1.2s var(--ease-io); transition-delay: var(--d, 0s); }
html.anim .rv-media.in { clip-path: inset(0 0 0 0); }
html.anim .rv-media > img, html.anim .rv-media > video,
html.anim img.rv-media, html.anim video.rv-media { transform: scale(1.12);
                      transition: transform 1.8s var(--ease-out), clip-path 1.2s var(--ease-io);
                      transition-delay: var(--d, 0s); }
html.anim .rv-media.in > img, html.anim .rv-media.in > video,
html.anim img.rv-media.in, html.anim video.rv-media.in { transform: none; }
