/* Income Engine motion system — Apple-grade scroll choreography, zero deps. */

/* — Reveal primitives — */
[data-reveal] { opacity: 0; }
[data-reveal].is-in { opacity: 1; }
[data-reveal="up"] { transform: translateY(42px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
[data-reveal="up"].is-in { transform: none; }
[data-reveal="scale"] { transform: scale(.92); transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1s cubic-bezier(.16,1,.3,1); }
[data-reveal="scale"].is-in { transform: none; }

/* — Kinetic type: split chars rise like Apple keynote titles — */
[data-split] .ch { display: inline-block; opacity: 0; transform: translateY(110%) rotate(4deg); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0s); }
[data-split].is-in .ch { opacity: 1; transform: none; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; }

/* — Scroll-scrubbed scenes (CSS scroll-driven animations, Chrome/Safari 2026) — */
@supports (animation-timeline: view()) {
  [data-scrub] { animation-timeline: view(); animation-fill-mode: both; animation-timing-function: linear; }
  [data-scrub="hero-settle"] { animation-name: ie-hero-settle; animation-range: exit 0% exit 100%; }
  [data-scrub="card-rise"]   { animation-name: ie-card-rise; animation-range: entry 0% entry 90%; }
  [data-scrub="depth-back"]  { animation-name: ie-depth-back; animation-range: entry 0% exit 100%; }
  [data-scrub="fade-away"]   { animation-name: ie-fade-away; animation-range: exit 30% exit 100%; }
}
@keyframes ie-hero-settle { from { transform: scale(1) translateY(0); opacity: 1; } to { transform: scale(.94) translateY(-4vh); opacity: .25; } }
@keyframes ie-card-rise   { from { transform: perspective(1200px) rotateX(14deg) translateY(9vh) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ie-depth-back  { from { transform: translateY(6vh); } to { transform: translateY(-6vh); } }
@keyframes ie-fade-away   { from { opacity: 1; } to { opacity: 0; transform: translateY(-3vh); } }

/* — Magnetic CTA base — */
[data-magnetic] { transition: transform .25s cubic-bezier(.34,1.56,.64,1); will-change: transform; }

/* — Top progress hairline — */
.ie-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); z-index: 90; pointer-events: none; }

/* — Reduced motion: everything just appears — */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-split] .ch { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-scrub] { animation: none !important; }
}
