/* ==========================================================================
   THE MARKETING GIRL — Animations (CSS-only where possible)
   ========================================================================== */

/* Loader — also hides itself with pure CSS if JavaScript is unavailable */
.loader-inner img{animation:loaderPop .8s var(--ease) both}
.loader-bar span{animation:loaderFill 1s var(--ease) forwards}
#loader{animation:loaderOut .45s ease 1.6s forwards}
@keyframes loaderPop{from{opacity:0;transform:scale(.9) translateY(10px)}to{opacity:1;transform:none}}
@keyframes loaderFill{to{transform:scaleX(1)}}
@keyframes loaderOut{to{opacity:0;visibility:hidden}}

/* Hero background drift */
.hero{animation:gradientDrift 18s ease-in-out infinite alternate}
@keyframes gradientDrift{from{background-position:0% 40%}to{background-position:100% 60%}}

/* Hero entrance */
.hero .reveal-load{opacity:0;transform:translateY(26px);animation:riseIn .9s var(--ease) forwards}
.hero .reveal-load:nth-child(1){animation-delay:.15s}
.hero .reveal-load:nth-child(2){animation-delay:.3s}
.hero .reveal-load:nth-child(3){animation-delay:.45s}
.hero .reveal-load:nth-child(4){animation-delay:.6s}
.hero .reveal-load:nth-child(5){animation-delay:.75s}
@keyframes riseIn{to{opacity:1;transform:none}}
.scene{opacity:0;animation:sceneIn 1.2s var(--ease) .4s forwards}
@keyframes sceneIn{from{opacity:0;transform:translateY(30px) scale(.94)}to{opacity:1;transform:none}}

/* Floating 3D chips (inner wrapper floats so mouse-parallax transform stays separate) */
.float-chip svg{animation:bob 6s ease-in-out infinite}
.fc2 svg{animation-delay:-1s}.fc3 svg{animation-delay:-2.4s}.fc4 svg{animation-delay:-3.2s}.fc5 svg{animation-delay:-4s}.fc6 svg{animation-delay:-1.8s}
@keyframes bob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-7px) rotate(4deg)}}
.device{animation:deviceFloat 7s ease-in-out infinite}
@keyframes deviceFloat{0%,100%{transform:translateZ(40px) rotateY(-14deg) rotateX(4deg) translateY(0)}50%{transform:translateZ(40px) rotateY(-10deg) rotateX(2deg) translateY(-12px)}}
.d-bars b{animation:barGrow 3.6s var(--ease) infinite alternate}
.d-bars b:nth-child(2){animation-delay:.15s}.d-bars b:nth-child(3){animation-delay:.3s}.d-bars b:nth-child(4){animation-delay:.45s}.d-bars b:nth-child(5){animation-delay:.6s}
@keyframes barGrow{from{transform:scaleY(.55)}to{transform:scaleY(1)}}
.scene-bg{animation:slowSpin 90s linear infinite}
@keyframes slowSpin{to{transform:rotate(360deg)}}

/* Scroll reveal (class "js" is added to <html> by an inline script, so no-JS visitors still see everything) */
.js .reveal{opacity:0;transform:translateY(34px);transition:opacity .9s var(--ease),transform .9s var(--ease);transition-delay:var(--delay,0s)}
.js .reveal.in{opacity:1;transform:none}
.js .reveal-left{transform:translateX(-40px)}
.js .reveal-right{transform:translateX(40px)}
.js .reveal-scale{transform:scale(.94)}

/* Shimmer on gold text */
.gold-text{background-size:200% 100%;animation:shimmer 7s linear infinite}
@keyframes shimmer{from{background-position:0 0}to{background-position:-200% 0}}

/* Page hero soft glow */
.page-hero::before{content:"";position:absolute;width:420px;height:420px;border-radius:50%;left:-120px;top:20%;background:radial-gradient(circle,rgba(204,165,82,.25),transparent 65%);animation:blobMove 14s ease-in-out infinite alternate;pointer-events:none}
@keyframes blobMove{to{transform:translate(160px,-40px) scale(1.2)}}

/* Gentle pulse for primary CTA in hero */
.hero .btn:not(.btn--ghost){animation:ctaPulse 3.4s ease-in-out 2.2s infinite}
@keyframes ctaPulse{0%,100%{box-shadow:0 10px 30px -10px rgba(218,117,144,.7),0 0 0 0 rgba(218,117,144,.35)}50%{box-shadow:0 10px 30px -10px rgba(218,117,144,.7),0 0 0 12px rgba(218,117,144,0)}}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;animation-delay:0s!important}
  .js .reveal{opacity:1;transform:none}
  .hero .reveal-load,.scene{opacity:1;transform:none}
  #cursor-fx{display:none}
  .stage{transform:none!important}
}
