/* =============================================
   ANIMATIONS — andrewpower.org
   Initial states + keyframes for GSAP triggers
   ============================================= */

/* ─── JS-driven reveal initial states ─── */
/* These classes are applied via JS and animated off by GSAP */

.anim-fade-up {
  opacity: 0;
  transform: translateY(60px);
}

.anim-fade-in {
  opacity: 0;
}

.anim-slide-left {
  opacity: 0;
  transform: translateX(-80px);
}

.anim-slide-right {
  opacity: 0;
  transform: translateX(80px);
}

.anim-scale-up {
  opacity: 0;
  transform: scale(0.88);
}

/* Clip-path reveal — text lines */
.anim-clip {
  clip-path: inset(0 0 100% 0);
}

/* Word-level reveal wrapper */
.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.05;
}
.word-inner {
  display: inline-block;
  transform: translateY(110%);
}

/* ─── CSS-only Marquee (fallback / base) ─── */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
}
.marquee-track.playing {
  animation: marquee-scroll 20s linear infinite;
}

/* ─── Number count-up container ─── */
.count-stat {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ─── Page transitions ─── */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--purple-deepest);
  z-index: 10000;
  transform: translateY(100%);
  pointer-events: none;
}

/* ─── Hover magnetic button effect ─── */
.magnetic {
  display: inline-block;
  transition: transform 0.4s var(--ease-magnetic);
}

/* ─── Line entrance animation ─── */
@keyframes line-reveal {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Gold shimmer on static elements ─── */
@keyframes gold-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold-dark) 0%,
    var(--gold-light) 40%,
    var(--gold) 50%,
    var(--gold-light) 60%,
    var(--gold-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gold-shimmer 4s linear infinite;
}

/* ─── Glowing underline ─── */
.glow-link {
  position: relative;
  display: inline-block;
}
.glow-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  transition: width 0.4s var(--ease-out);
}
.glow-link:hover::after {
  width: 100%;
}
