/* ==========================================================================
   VasudevCore — Animation library
   All effects respect prefers-reduced-motion (see style.css global rule).
   ========================================================================== */

@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes sectionAccent { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@keyframes signalPulse { 0%, 100% { opacity: .35; transform: translateX(0) rotate(45deg); } 50% { opacity: 1; transform: translateX(5px) rotate(45deg); } }

main > section.section-motion {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
main > section.section-motion.section-in {
  opacity: 1;
  transform: translateY(0);
}
main > section.section-motion::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent-violet));
  opacity: .7;
  transform: scaleX(0);
  transform-origin: left;
}
main > section.section-motion.section-in::after {
  animation: sectionAccent .8s var(--ease) both;
}

main > section:not(.hero) .section-signal {
  position: absolute;
  top: 22px;
  right: clamp(20px, 5vw, 64px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--signal-delay);
  pointer-events: none;
}
main > section:not(.hero).section-in .section-signal { opacity: .8; transform: translateX(0); }
.section-signal::before {
  content: 'VC';
  margin-right: 4px;
  color: var(--accent-violet);
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .1em;
}
.section-signal span {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--primary);
  transform: rotate(45deg);
  animation: signalPulse 2.4s ease-in-out infinite;
  animation-delay: var(--signal-delay);
}
.section-signal span:nth-child(2) { background: var(--accent); animation-delay: calc(var(--signal-delay) + 160ms); }
.section-signal span:nth-child(3) { background: var(--accent-violet); animation-delay: calc(var(--signal-delay) + 320ms); }

.animated-gradient {
  background: linear-gradient(120deg, var(--primary), var(--accent-violet), var(--accent), var(--primary));
  background-size: 300% 300%;
  animation: gradientShift 10s ease infinite;
}

/* Card entrance stagger uses transform/opacity via .reveal in style.css */

/* Magnetic button micro-tilt handled via JS transform, transition here */
.magnetic { transition: transform .25s var(--ease-soft); }

/* Number counter just needs no special CSS: value swapped by JS */

/* Text reveal (letters/words fade+rise via JS-added spans) */
.text-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.text-reveal.in span { opacity: 1; transform: translateY(0); }

/* Underline draw for links */
.draw-underline { position: relative; }
.draw-underline::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px;
  background: currentColor; transition: right .35s var(--ease-soft);
}
.draw-underline:hover::after { right: 0; }

@media (prefers-reduced-motion: reduce) {
  .animated-gradient, .intro-video, .intro-line { animation: none !important; }
  .home-reveal__panel,
  body.home-loading .site-header,
  body.home-loading .hero-copy { transition: none !important; }
  main > section.section-motion { opacity: 1; transform: none; transition: none; }
  main > section.section-motion::after { animation: none; transform: scaleX(1); }
  .section-signal span { animation: none; }
  body::before { animation: none; }
}
