/* Influity.ai — the double-tap loading screen, shared by the public pages and the signed-in app. */
/* ---- loader: the mark IS a double tap (Daniel 2026-10-28) — three beats per loop: tap one (the upper dot pops toward
   the viewer), tap two (the lower dot, a little off the first), then the reaction lands on top and is gone. The reaction
   turns through Instagram's heart, TikTok's finger, YouTube's skip and Facebook's like, one per loop. A shine runs
   along the word. Shown on first paint and again when a link leaves for another page (loader.js); the signed-in app shows the same
   screen between its tabs (components/ui/Loader.js — keep its markup in step with the public pages'). Themed by
   --ld-bg / --ld-fg / --ld-glyph (the app sets them from its light/dark tokens). V2 = tag site-loader-v2. ---- */
.ld-screen{--cycle:1.9s;--gap:.28s;position:fixed;inset:0;z-index:200;background:var(--ld-bg,#141414);color:var(--ld-fg,#F2EEDF);font-family:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:26px;transition:opacity .45s cubic-bezier(.4,0,.2,1),visibility .45s}
.ld-screen.done{opacity:0;visibility:hidden;pointer-events:none}
/* lifted, it stops moving: nothing animates behind the page (the app keeps this screen mounted between tabs) */
.ld-screen.done .d,.ld-screen.done .r,.ld-screen.done .ld-react,.ld-screen.done .ld-word span,.ld-screen.done .ld-word i{animation-play-state:paused}
.no-js .ld-screen{display:none}
.ld-screen .ld-stage{position:relative;width:104px;height:104px;animation:ld-in .55s cubic-bezier(.2,.9,.3,1.3) both}
.ld-screen .ld-mark{width:100%;height:100%;overflow:visible}
.ld-screen .d,.ld-screen .r{transform-box:fill-box;transform-origin:50% 50%;animation:ld-pop var(--cycle) infinite}
.ld-screen .r{animation-name:ld-ripple;animation-timing-function:ease-out}
.ld-screen .f1{animation:ld-pop var(--cycle) infinite,ld-front var(--cycle) infinite}
.ld-screen .d2,.ld-screen .r2{animation-delay:var(--gap)}
.ld-screen .ld-react{position:absolute;left:50%;top:50%;width:60px;height:60px;margin:-30px 0 0 -30px;opacity:0;overflow:visible;
  animation:ld-react calc(var(--cycle) * 4) calc(var(--cycle) * var(--k)) infinite}
.ld-screen .ld-word{display:flex;align-items:baseline;font-weight:700;font-size:26px;letter-spacing:-.03em;animation:ld-up .6s .1s cubic-bezier(.2,.8,.2,1) both}
.ld-screen .ld-word span,.ld-screen .ld-word i{display:inline-block;font-style:normal;animation:ld-wave 1.4s calc(var(--i) * 70ms) ease-in-out infinite}
.ld-screen .ld-word i{font-weight:400;color:#FF4D00}
.ld-screen .ld-g{fill:var(--ld-glyph,#fff)}
/* one tap: the dot pulls back, swells toward the viewer and settles (~0.4 s). The second tap follows --gap behind,
   so the pair reads as a real double tap; the rest of the cycle belongs to the reaction (Daniel 2026-10-28) */
@keyframes ld-pop{
  0%{transform:scale(1)}
  2%{transform:scale(.86);animation-timing-function:cubic-bezier(.2,.7,.4,1)}
  8.7%{transform:scale(1.42);animation-timing-function:cubic-bezier(.6,0,.8,.4)}
  14%{transform:scale(.84);animation-timing-function:ease-out}
  16.7%{transform:scale(1.07)}
  19.3%{transform:scale(.98)}
  22%,100%{transform:scale(1)}
}
/* the orange dot is painted under the ember one; a copy on top shows while it is nearer, so it passes in front */
@keyframes ld-front{0%,3.3%,12.7%,100%{opacity:0}4.7%,11.3%{opacity:1}}
@keyframes ld-ripple{0%,13.3%{transform:scale(1);opacity:.5}14.7%{transform:scale(1.04);opacity:.9}32%{transform:scale(1.7);opacity:0}38%{transform:scale(.8);opacity:0}60%,100%{transform:scale(1);opacity:.5}}
/* the reaction: the long third beat of its own loop (the first quarter of the four-loop turn). It spawns fast where it
   is, ~0.55 s into the loop as the second tap lands, then a gust throws it up — accelerating, drifting, tilting — and it
   fades as it goes, ~0.85 s (Daniel 2026-10-28) */
@keyframes ld-react{
  0%,7.2%{opacity:0;transform:translate(0,0) scale(.3) rotate(0)}
  8.1%{opacity:1;transform:translate(0,0) scale(1.14) rotate(0)}
  9.2%{opacity:1;transform:translate(0,0) scale(1) rotate(0);animation-timing-function:cubic-bezier(.5,0,.75,.35)}
  20.4%,100%{opacity:0;transform:translate(14px,-96px) scale(.82) rotate(-12deg)}
}
@keyframes ld-wave{0%,45%,100%{transform:translateY(0);opacity:.55}20%{transform:translateY(-1.5px);opacity:1}}
@keyframes ld-in{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes ld-up{from{transform:translateY(10px);opacity:0}to{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.ld-screen .d,.ld-screen .r,.ld-screen .ld-react,.ld-screen .ld-word span,.ld-screen .ld-word i,.ld-screen .ld-stage,.ld-screen .ld-word{animation:none}.ld-screen .ld-word span,.ld-screen .ld-word i{opacity:1}.ld-screen .f1{opacity:0}}
