/* ============================================
   OPUS CONSULTANTS — Animation Definitions
   ============================================ */

/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---------- Line Draw ---------- */
.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.5s var(--ease-out);
}

.line-draw.drawn {
  stroke-dashoffset: 0;
}

/* ---------- Clip Path Reveals ---------- */
.clip-reveal {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.8s var(--ease-out);
}

.clip-reveal.revealed {
  clip-path: inset(0 0 0 0);
}

.clip-reveal-left {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s var(--ease-out);
}

.clip-reveal-left.revealed {
  clip-path: inset(0 0 0 0);
}

/* ---------- Text Split Animation ---------- */
.text-split .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease-out),
              transform 0.4s var(--ease-out);
}

.text-split.animated .char {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Glow Pulse ---------- */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(93, 126, 188, 0.15);
  }
  50% {
    box-shadow: 0 0 30px rgba(93, 126, 188, 0.25);
  }
}

.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

/* ---------- Float Animation ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 4s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0.5s; }
.float-delay-2 { animation-delay: 1s; }
.float-delay-3 { animation-delay: 1.5s; }

/* ---------- Border Glow ---------- */
@keyframes borderGlow {
  0%, 100% { border-color: var(--color-border); }
  50% { border-color: rgba(93, 126, 188, 0.3); }
}

/* ---------- Fade In Up (CSS only) ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Scale In ---------- */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- Shimmer ---------- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

/* ---------- Parallax Container ---------- */
.parallax-container {
  will-change: transform;
}

/* ---------- Magnetic Effect Base ---------- */
.magnetic {
  transition: transform 0.3s var(--ease-out);
}

/* ---------- Counter Animation ---------- */
.counter-value {
  display: inline-block;
  will-change: contents;
}

/* ---------- Process Line Animation ---------- */
.process-line-animated .process-line-fill {
  transition: width 1.2s var(--ease-out);
}

/* ---------- Marker Blink ---------- */
@keyframes markerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- Loading screen animations ---------- */
@keyframes loaderLineH {
  to { width: 100%; }
}

@keyframes loaderLineV {
  to { height: 100%; }
}

.loader-lines .line-h-1 {
  top: 30%;
  animation: loaderLineH 0.8s 0.2s var(--ease-out) forwards;
}

.loader-lines .line-h-2 {
  top: 70%;
  animation: loaderLineH 0.8s 0.4s var(--ease-out) forwards;
}

.loader-lines .line-v-1 {
  left: 25%;
  animation: loaderLineV 0.8s 0.3s var(--ease-out) forwards;
}

.loader-lines .line-v-2 {
  left: 75%;
  animation: loaderLineV 0.8s 0.5s var(--ease-out) forwards;
}

/* ---------- Nav link underline ---------- */
@keyframes navUnderline {
  from { width: 0; }
  to { width: 100%; }
}

/* ---------- Reduced motion override ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .clip-reveal,
  .clip-reveal-left {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }

  .float,
  .glow-pulse,
  .shimmer-text {
    animation: none;
  }

  .text-split .char {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
