/* =============================================
   ANIMATIONS.CSS — Keyframes & Animation Classes
   ============================================= */

/* === Keyframes === */

@keyframes wordReveal {
  from {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

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

/* === Word Reveal === */
.word-reveal {
  display: inline;
}

.word-reveal span {
  display: inline-block;
  opacity: 0;
  animation: wordReveal 0.7s var(--ease-out-expo) forwards;
  will-change: opacity, filter, transform;
}

/* === Scroll Reveal === */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.from-left {
  transform: translateX(-40px);
}
.reveal-on-scroll.from-left.visible {
  transform: translateX(0);
}

.reveal-on-scroll.from-right {
  transform: translateX(40px);
}
.reveal-on-scroll.from-right.visible {
  transform: translateX(0);
}

.reveal-on-scroll.scale {
  transform: scale(0.95);
}
.reveal-on-scroll.scale.visible {
  transform: scale(1);
}

/* === Stagger Delays === */
.stagger-1 { transition-delay: 0.05s !important; }
.stagger-2 { transition-delay: 0.10s !important; }
.stagger-3 { transition-delay: 0.15s !important; }
.stagger-4 { transition-delay: 0.20s !important; }
.stagger-5 { transition-delay: 0.25s !important; }
.stagger-6 { transition-delay: 0.30s !important; }

/* === Animate Once (direct, no observer) === */
.animate-fade-up {
  animation: fadeUp 0.8s var(--ease-out-expo) both;
}

.animate-fade-in {
  animation: fadeIn 0.6s var(--ease-out-expo) both;
}

.animate-scale-in {
  animation: scaleIn 0.5s var(--ease-out-expo) both;
}

/* === Hover Utilities === */
.hover-lift {
  transition: transform var(--duration-fast) var(--ease-out-expo);
}
.hover-lift:hover {
  transform: translateY(-4px);
}

/* === Loading Shimmer === */
.shimmer {
  background: linear-gradient(
    90deg,
    #1e1e1e 25%,
    #2a2a2a 50%,
    #1e1e1e 75%
  );
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
}

/* === Page Transition === */
.page-enter {
  animation: fadeIn 0.5s var(--ease-out-expo) both;
}

/* =============================================
   UIVERSE.IO INSPIRED ANIMATIONS
   ============================================= */

/* === Glowing Gradient Border === */
@keyframes gradientBorder {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.glow-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    #1e355e,
    #d32b2b,
    #2a4a7f,
    #1e355e
  );
  background-size: 300% 300%;
  animation: gradientBorder 4s ease infinite;
  opacity: 0;
  transition: opacity 0.4s;
}

.glow-card:hover::before {
  opacity: 1;
}

/* === 3D Tilt Card === */
.tilt-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: 0 25px 50px rgba(78, 31, 0, 0.2);
}

/* === Floating Animation === */
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

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

/* === Blob Morphing Background === */
@keyframes blobMorph {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50%  { border-radius: 50% 60% 30% 70% / 40% 30% 70% 50%; }
  75%  { border-radius: 70% 30% 50% 60% / 30% 70% 40% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.blob-bg {
  width: 600px;
  height: 600px;
  background: radial-gradient(
    ellipse at center,
    rgba(30, 53, 94, 0.18),
    rgba(211, 43, 43, 0.06)
  );
  animation: blobMorph 10s ease-in-out infinite;
  position: absolute;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

/* === Neon Glow Text === */
@keyframes neonPulse {
  0%, 100% {
    text-shadow:
      0 0 5px rgba(155, 110, 18, 0.5),
      0 0 10px rgba(155, 110, 18, 0.4),
      0 0 20px rgba(155, 110, 18, 0.3);
  }
  50% {
    text-shadow:
      0 0 10px rgba(155, 110, 18, 0.8),
      0 0 20px rgba(155, 110, 18, 0.6),
      0 0 40px rgba(155, 110, 18, 0.4);
  }
}

.neon-text {
  animation: neonPulse 3s ease-in-out infinite;
}

/* === Gradient Shimmer Text === */
@keyframes gradientTextMove {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-text {
  background: linear-gradient(
    90deg,
    #ffffff,
    #d0dbf0,
    #ffffff,
    #d0dbf0,
    #ffffff
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientTextMove 5s ease infinite;
}

/* === Magnetic Button Glow === */
@keyframes buttonGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(155, 110, 18, 0.3); }
  50%       { box-shadow: 0 0 20px rgba(155, 110, 18, 0.6), 0 0 40px rgba(155, 110, 18, 0.2); }
}

.btn-glow {
  animation: buttonGlow 2s ease-in-out infinite;
}

/* === Ripple Effect === */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-wave {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  background-color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* === Typewriter Cursor === */
@keyframes typewriterCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.typewriter-cursor::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  animation: typewriterCursor 1s step-end infinite;
  color: var(--color-gold);
}

/* === Counter Number Animation === */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.count-animate {
  animation: countUp 0.8s var(--ease-out-expo) both;
}

/* === Shine Sweep on Cards === */
@keyframes shineSweep {
  0%   { left: -100%; }
  100% { left: 150%; }
}

.shine-card {
  position: relative;
  overflow: hidden;
}

.shine-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transform: skewX(-20deg);
  transition: none;
}

.shine-card:hover::after {
  animation: shineSweep 0.6s ease;
}

/* === Staggered Reveal for Grid Items === */
.stagger-grid > *:nth-child(1) { transition-delay: 0.05s !important; }
.stagger-grid > *:nth-child(2) { transition-delay: 0.12s !important; }
.stagger-grid > *:nth-child(3) { transition-delay: 0.19s !important; }
.stagger-grid > *:nth-child(4) { transition-delay: 0.26s !important; }
.stagger-grid > *:nth-child(5) { transition-delay: 0.33s !important; }
.stagger-grid > *:nth-child(6) { transition-delay: 0.40s !important; }

/* === Particle Dot === */
@keyframes particleFloat {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.8; }
  100% { transform: translateY(-120px) rotate(360deg); opacity: 0; }
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat linear infinite;
}

/* === Glitch Flicker === */
@keyframes glitch {
  0%, 90%, 100% { transform: none; filter: none; }
  92%           { transform: translateX(-3px); filter: hue-rotate(90deg); }
  94%           { transform: translateX(3px); filter: hue-rotate(-90deg); }
  96%           { transform: translateX(-2px) skewX(2deg); }
  98%           { transform: none; }
}

.glitch-text {
  animation: glitch 6s ease-in-out infinite;
}

/* === Scale Bounce Hover === */
.bounce-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bounce-hover:hover {
  transform: scale(1.06);
}

/* === Underline Slide === */
.underline-slide {
  position: relative;
  display: inline-block;
}

.underline-slide::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.3s var(--ease-out-expo);
}

.underline-slide:hover::after {
  width: 100%;
}

/* === Pulsing Ring === */
@keyframes pulsingRing {
  0%   { box-shadow: 0 0 0 0 rgba(155, 110, 18, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(155, 110, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(155, 110, 18, 0); }
}

.pulsing-ring {
  animation: pulsingRing 2s ease-out infinite;
}

/* === Scroll Progress Bar === */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e355e, #d32b2b);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(211, 43, 43, 0.5);
}

