/* =========================================================
   animations.css : keyframes, split-text states, motion prefs
   ========================================================= */

/* ---------- Split text (built by JS) ---------- */
.split-words .w, .split-chars .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.split-words .w > span, .split-chars .c { display: inline-block; }
.reveal-lines .w { overflow: visible; }
/* keep gradient continuous across split words */
.grad-text .w > span, .grad-text .c {
  background: var(--grad); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.grad-text--anim, .grad-text--anim .w > span, .grad-text--anim .c { animation: gradShift 6s ease-in-out infinite alternate; }

/* JS-enabled initial states: content stays visible if JS / GSAP fails (see .gsap-ready guard) */
.gsap-ready .reveal-up { opacity: 0; transform: translateY(40px); }

/* ---------- Keyframes ---------- */
@keyframes gradShift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes gridMove { from { background-position: 0 0, 0 0; } to { background-position: 0 64px, 0 0; } }
@keyframes breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes wave { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(1); } }
@keyframes draw { 0% { stroke-dashoffset: 260; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinSlow { from { transform: rotate(0); } to { transform: rotate(180deg); } }
@keyframes dash { to { stroke-dashoffset: -20; } }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pinBounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-5px); } 70% { transform: translateY(1px); } }
@keyframes pinFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes barUp { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
@keyframes pulseFill { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes flowLine { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes orbA { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8%, 10%) scale(1.15); } }
@keyframes orbB { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-10%, 8%) scale(.9); } }
@keyframes zonePulse { 0% { transform: scale(.35); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes tpinFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes floatY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* floating panels idle drift (parallax transform is applied by JS on top) */
.gpanel { animation: floatY 7s ease-in-out infinite; }
.gpanel--call { animation-duration: 8s; animation-delay: -2s; }
.gpanel--book { animation-duration: 6.5s; animation-delay: -4s; }
.gpanel--insight { animation-duration: 9s; animation-delay: -1s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .gsap-ready .reveal-up { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
  .spark__line { stroke-dashoffset: 0; }
  .wave i { transform: scaleY(.6); }
}
