/* ============================================
   Fimoria - Animations Stylesheet
   ============================================ */

/* ============ KEYFRAMES ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes waveMove {
  0% { transform: translateX(0) scaleY(1); }
  50% { transform: translateX(-25%) scaleY(0.85); }
  100% { transform: translateX(-50%) scaleY(1); }
}

@keyframes gridPan {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

@keyframes heroReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

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

@keyframes borderPulse {
  0%, 100% { border-color: rgba(45, 125, 210, 0.3); }
  50% { border-color: rgba(45, 125, 210, 0.7); }
}

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

/* ============ HERO ANIMATIONS ============ */
.hero-badge {
  animation: fadeInUp 0.6s ease both;
  animation-delay: 0.1s;
}

.hero-headline {
  animation: heroReveal 0.8s ease both;
  animation-delay: 0.25s;
}

.hero-sub {
  animation: heroReveal 0.8s ease both;
  animation-delay: 0.4s;
}

.hero-actions {
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.55s;
}

.hero-stats {
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.7s;
}

.hero-visual {
  animation: fadeInRight 1s ease both;
  animation-delay: 0.3s;
}

.hero-badge-float {
  animation: float 4s ease-in-out infinite;
  animation-delay: 1s;
}

/* ============ GRID ANIMATION ============ */
.hero-grid-overlay {
  animation: gridPan 8s linear infinite;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* Stagger delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.6s; }
.stagger-children > *:nth-child(8) { transition-delay: 0.7s; }

/* ============ HOVER EFFECTS ============ */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 34, 64, 0.15);
}

.hover-scale {
  transition: transform 0.25s ease;
}

.hover-scale:hover {
  transform: scale(1.03);
}

/* ============ WAVE DIVIDERS ============ */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
}

/* ============ PAGE TRANSITION ============ */
.page-transition {
  animation: fadeIn 0.4s ease;
}

/* ============ COUNTER ANIMATION ============ */
.counter-num {
  animation: counterSpin 0.4s ease both;
}

/* ============ LOADING STATES ============ */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ============ BUTTON RIPPLE ============ */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s ease;
}

.btn-primary:active::after {
  background: rgba(255,255,255,0.15);
}

/* ============ ACTIVE STATUS DOT ============ */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: dotBlink 2s ease-in-out infinite;
  margin-right: 6px;
}

/* ============ IMAGE ZOOM ON HOVER ============ */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: inherit;
}

.img-zoom-wrap img {
  transition: transform 0.55s ease;
}

.img-zoom-wrap:hover img {
  transform: scale(1.06);
}

/* ============ NAV UNDERLINE EFFECT ============ */
.nav-links a {
  position: relative;
}

/* ============ SVG DECORATION ============ */
.section-decoration {
  position: absolute;
  opacity: 0.04;
  pointer-events: none;
}

/* ============ FORM FOCUS ANIMATIONS ============ */
.form-group input,
.form-group select,
.form-group textarea {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(45, 125, 210, 0.12);
}

/* ============ CARD ENTRY ============ */
.card-entry {
  animation: scaleIn 0.5s ease both;
}

/* ============ MOBILE MENU TRANSITION ============ */
.mobile-menu {
  animation: fadeIn 0.25s ease;
}

/* ============ SUCCESS ANIMATION ============ */
@keyframes checkmark {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.success-icon {
  animation: checkmark 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
