/* ============================================================
   BrightCore Systems LLC — Animations
   animations.css | Version 1.0
   ============================================================ */

/* ── Keyframes ───────────────────────────────────────────── */

/* Fade animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

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

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

@keyframes scaleOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.85); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Loading */
@keyframes loadingBar {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

@keyframes loadingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.75; transform: scale(0.96); }
}

/* Spin / Rotate */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

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

@keyframes floatCard {
  0%, 100% { transform: translateY(-50%); }
  50%       { transform: translateY(calc(-50% - 12px)); }
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -20px) scale(1.05); }
  66%       { transform: translate(-15px, 15px) scale(0.95); }
}

@keyframes floatLeft {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-12px); }
}

/* Pulse */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.08); opacity: 0.8; }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(6,182,212,0.4); }
  50%       { transform: scale(1.3); opacity: 0.8; box-shadow: 0 0 0 6px rgba(6,182,212,0); }
}

@keyframes pulseRing {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Glow */
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.15); }
  50%       { box-shadow: 0 0 40px rgba(37, 99, 235, 0.35); }
}

@keyframes glowText {
  0%, 100% { text-shadow: 0 0 10px rgba(96, 165, 250, 0.3); }
  50%       { text-shadow: 0 0 25px rgba(96, 165, 250, 0.7); }
}

/* Ripple */
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* Particles */
@keyframes particleFloat {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-20px) scale(1); opacity: 0; }
}

@keyframes particleFade {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%       { opacity: 0.8; transform: scale(1.2); }
}

/* Gradient animation */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes gradientRotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes marqueeRev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* Scroll indicator */
@keyframes scrollPulse {
  0%        { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.4); opacity: 0.4; }
  100%      { transform: scaleY(1); opacity: 1; }
}

/* Bar fill */
@keyframes barFill {
  from { width: 0%; }
  to   { width: 85%; }
}

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

/* WhatsApp bounce */
@keyframes waBounce {
  0%, 100% { transform: translateY(0); }
  20%       { transform: translateY(-8px); }
  40%       { transform: translateY(0); }
  60%       { transform: translateY(-4px); }
  80%       { transform: translateY(0); }
}

/* Slide in */
@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

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

/* Wave */
@keyframes wave {
  0%   { transform: translateX(0) translateZ(0) scaleY(1); }
  50%  { transform: translateX(-25%) translateZ(0) scaleY(0.55); }
  100% { transform: translateX(-50%) translateZ(0) scaleY(1); }
}

/* Blob morph */
@keyframes blobMorph {
  0%, 100% {
    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% 60% / 40% 30% 70% 50%;
  }
  75% {
    border-radius: 40% 60% 50% 30% / 60% 40% 60% 40%;
  }
}

/* Progress bar animation */
@keyframes progressFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Bounce */
@keyframes bounce {
  0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
  50%       { transform: translateY(-20px); animation-timing-function: cubic-bezier(0.8,0,1,1); }
}

/* ── Utility Animation Classes ───────────────────────────── */
.animate-fadeIn       { animation: fadeIn 0.6s ease both; }
.animate-fadeInUp     { animation: fadeInUp 0.7s ease both; }
.animate-fadeInDown   { animation: fadeInDown 0.7s ease both; }
.animate-fadeInLeft   { animation: fadeInLeft 0.7s ease both; }
.animate-fadeInRight  { animation: fadeInRight 0.7s ease both; }
.animate-scaleIn      { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.animate-float        { animation: float 4s ease-in-out infinite; }
.animate-pulse        { animation: pulse 2s ease-in-out infinite; }
.animate-spin         { animation: spin 1s linear infinite; }
.animate-spin-slow    { animation: spinSlow 10s linear infinite; }
.animate-glow         { animation: glow 2.5s ease-in-out infinite; }
.animate-bounce       { animation: bounce 1.5s ease infinite; }

/* Delay helpers */
.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-600  { animation-delay: 0.6s; }
.delay-700  { animation-delay: 0.7s; }
.delay-800  { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1.0s; }

/* ── Particle Canvas ─────────────────────────────────────── */
#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Hero Particles ──────────────────────────────────────── */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.6);
  animation: particleFloat linear infinite;
}

/* ── Floating tech icons in hero ─────────────────────────── */
.hero-tech-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  color: #fff;
  font-weight: 700;
  font-size: var(--text-xs);
  animation: float ease-in-out infinite;
  z-index: 3;
  padding: 0.625rem 1rem;
  gap: 0.4rem;
}

/* ── Gradient mesh background ────────────────────────────── */
.gradient-mesh {
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
}

/* ── Network dots background ─────────────────────────────── */
.dot-bg {
  background-image: radial-gradient(circle, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Hexagon pattern ─────────────────────────────────────── */
.hex-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Crect width='56' height='100' fill='none'/%3E%3Cpath d='M28 66L0 50V18L28 2l28 16v32L28 66zm0-6l22-13V23L28 9 6 23v24L28 60z' fill='%232563EB' fill-opacity='0.04'/%3E%3C/svg%3E");
}

/* ── SVG Wave Animation ──────────────────────────────────── */
.animated-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  animation: wave 12s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
}

.animated-wave-2 {
  animation: wave 18s cubic-bezier(0.36, 0.45, 0.63, 0.53) -3s infinite reverse;
  opacity: 0.5;
}

/* ── Blob decoration ─────────────────────────────────────── */
.blob {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  opacity: 0.07;
  animation: blobMorph 12s ease-in-out infinite;
  pointer-events: none;
}

/* ── Tilt card effect ────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}

/* ── Magnetic button ─────────────────────────────────────── */
.magnetic {
  display: inline-flex;
  position: relative;
  overflow: visible;
}

/* ── Typewriter cursor ───────────────────────────────────── */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: currentColor;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

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

/* ── Number scroll animation ─────────────────────────────── */
.counter-animate {
  animation: countUp 0.5s ease both;
}

/* ── Shimmer skeleton ────────────────────────────────────── */
@keyframes shimmer {
  from { background-position: -1000px 0; }
  to   { background-position: 1000px 0; }
}

.shimmer {
  background: linear-gradient(90deg, var(--gray) 0%, var(--gray-dark) 50%, var(--gray) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
