/* ============================================================
   noise-remover.com — Animations CSS
   Version: 1.0.0
   ============================================================ */

/* ============================================================
   1. REDUCED MOTION — Accessibility First
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   2. PAGE LOAD ANIMATIONS
   ============================================================ */
.animate-page-load {
  animation: pageLoad 0.6s ease forwards;
}

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

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* ============================================================
   3. HERO ANIMATIONS
   ============================================================ */
.hero-headline {
  opacity: 0;
  animation: heroHeadline 0.7s 0.2s ease forwards;
}

.hero-subtext {
  opacity: 0;
  animation: heroSubtext 0.7s 0.4s ease forwards;
}

.hero-cta {
  opacity: 0;
  animation: heroCta 0.7s 0.6s ease forwards;
}

.hero-meta {
  opacity: 0;
  animation: heroCta 0.7s 0.7s ease forwards;
}

.hero-upload-box {
  opacity: 0;
  animation: heroUpload 0.8s 0.8s ease forwards;
}

.hero-illustration {
  opacity: 0;
  animation: heroIllustration 0.9s 0.5s ease forwards;
}

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

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

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

@keyframes heroUpload {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* ============================================================
   4. FLOATING ANIMATION
   ============================================================ */
.float {
  animation: float 4s ease-in-out infinite;
}

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

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

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

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

/* ============================================================
   5. PULSE ANIMATIONS
   ============================================================ */
.pulse-orange {
  animation: pulseOrange 2s ease-in-out infinite;
}

.pulse-border {
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseOrange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
  50%       { box-shadow: 0 0 0 10px rgba(255,107,0,0.15); }
}

@keyframes pulseBorder {
  0%, 100% { border-color: rgba(255,107,0,0.4); }
  50%       { border-color: rgba(255,107,0,1); }
}

/* Upload zone pulse */
.upload-zone-animate {
  animation: uploadPulse 3s ease-in-out infinite;
}

@keyframes uploadPulse {
  0%, 100% {
    border-color: rgba(255,107,0,0.4);
    background-color: rgba(255,255,255,1);
  }
  50% {
    border-color: rgba(255,107,0,0.9);
    background-color: rgba(255,240,224,0.4);
  }
}

/* Online status dot */
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  animation: onlinePulse 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes onlinePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

/* ============================================================
   6. HOVER MICRO-INTERACTIONS
   ============================================================ */

/* Card lift */
.hover-lift {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* Button press */
.hover-press:active {
  transform: scale(0.96);
}

/* Icon bounce on hover */
.hover-bounce:hover i,
.hover-bounce:hover svg {
  animation: iconBounce 0.4s ease;
}

@keyframes iconBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.2) rotate(-5deg); }
  60%  { transform: scale(0.9) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Icon rotate on hover */
.hover-rotate:hover i {
  animation: iconRotate 0.5s ease;
}

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

/* Shimmer effect on hover */
.hover-shimmer {
  position: relative;
  overflow: hidden;
}

.hover-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0s;
}

.hover-shimmer:hover::after {
  left: 150%;
  transition: left 0.5s ease;
}

/* ============================================================
   7. SCROLL-TRIGGERED (AOS compatible classes)
   ============================================================ */

/* These work with both AOS and our custom scroll observer */
[data-animate] {
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

[data-animate].animated {
  opacity: 1;
  transform: none !important;
}

[data-animate="fade-up"] {
  transform: translateY(30px);
}

[data-animate="fade-down"] {
  transform: translateY(-30px);
}

[data-animate="fade-left"] {
  transform: translateX(30px);
}

[data-animate="fade-right"] {
  transform: translateX(-30px);
}

[data-animate="zoom-in"] {
  transform: scale(0.88);
}

[data-animate="zoom-out"] {
  transform: scale(1.12);
}

[data-animate="flip-up"] {
  transform: perspective(600px) rotateX(20deg);
}

/* Delay utilities */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="600"] { transition-delay: 0.6s; }
[data-delay="700"] { transition-delay: 0.7s; }
[data-delay="800"] { transition-delay: 0.8s; }

/* ============================================================
   8. PROCESSING / LOADING ANIMATIONS
   ============================================================ */

/* Rotating spinner */
.spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Progress bar fill animation */
.progress-animate {
  animation: progressFill 1.5s ease forwards;
}

@keyframes progressFill {
  from { width: 0%; }
}

/* Processing dots */
.processing-dots::after {
  content: '';
  animation: processingDots 1.4s steps(4, end) infinite;
}

@keyframes processingDots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* Step completion checkmark */
.step-complete {
  animation: stepComplete 0.4s ease forwards;
}

@keyframes stepComplete {
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ============================================================
   9. WAVEFORM ANIMATIONS
   ============================================================ */
.waveform-live .waveform-bar {
  animation: waveformLive 0.8s ease-in-out infinite alternate;
}

.waveform-live .waveform-bar:nth-child(2n)   { animation-delay: 0.1s; }
.waveform-live .waveform-bar:nth-child(3n)   { animation-delay: 0.2s; }
.waveform-live .waveform-bar:nth-child(4n)   { animation-delay: 0.15s; }
.waveform-live .waveform-bar:nth-child(5n)   { animation-delay: 0.25s; }
.waveform-live .waveform-bar:nth-child(6n)   { animation-delay: 0.05s; }
.waveform-live .waveform-bar:nth-child(7n)   { animation-delay: 0.3s; }

@keyframes waveformLive {
  from { transform: scaleY(0.3); }
  to   { transform: scaleY(1); }
}

/* Waveform bar stagger-in on load */
.waveform-bars-in .waveform-bar {
  opacity: 0;
  animation: barAppear 0.4s ease forwards;
}

.waveform-bars-in .waveform-bar:nth-child(1)  { animation-delay: 0.02s; }
.waveform-bars-in .waveform-bar:nth-child(2)  { animation-delay: 0.04s; }
.waveform-bars-in .waveform-bar:nth-child(3)  { animation-delay: 0.06s; }
.waveform-bars-in .waveform-bar:nth-child(4)  { animation-delay: 0.08s; }
.waveform-bars-in .waveform-bar:nth-child(5)  { animation-delay: 0.10s; }
.waveform-bars-in .waveform-bar:nth-child(6)  { animation-delay: 0.12s; }
.waveform-bars-in .waveform-bar:nth-child(7)  { animation-delay: 0.14s; }
.waveform-bars-in .waveform-bar:nth-child(8)  { animation-delay: 0.16s; }
.waveform-bars-in .waveform-bar:nth-child(9)  { animation-delay: 0.18s; }
.waveform-bars-in .waveform-bar:nth-child(10) { animation-delay: 0.20s; }

@keyframes barAppear {
  from { opacity: 0; transform: scaleY(0); }
  to   { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   10. COUNTER ANIMATION
   ============================================================ */
.counter-animate {
  transition: all 0.1s ease;
}

/* ============================================================
   11. FORM MICRO-INTERACTIONS
   ============================================================ */

/* Input focus glow */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  animation: inputFocus 0.2s ease forwards;
}

@keyframes inputFocus {
  from { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
  to   { box-shadow: 0 0 0 3px rgba(255,107,0,0.12); }
}

/* Error shake */
.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-6px); }
  30%       { transform: translateX(6px); }
  45%       { transform: translateX(-5px); }
  60%       { transform: translateX(5px); }
  75%       { transform: translateX(-3px); }
  90%       { transform: translateX(3px); }
}

/* Success bounce */
.success-bounce {
  animation: successBounce 0.5s ease;
}

@keyframes successBounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Password strength bar */
.strength-bar-fill {
  transition: width 0.4s ease, background-color 0.4s ease;
}

/* ============================================================
   12. OTP / VERIFICATION ANIMATIONS
   ============================================================ */
.otp-input.filled {
  animation: otpFilled 0.2s ease forwards;
}

@keyframes otpFilled {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ============================================================
   13. MODAL ANIMATIONS
   ============================================================ */
.modal-overlay {
  animation: modalOverlayIn 0.25s ease forwards;
}

.modal-overlay.closing {
  animation: modalOverlayOut 0.2s ease forwards;
}

.modal-box {
  animation: modalBoxIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-box.closing {
  animation: modalBoxOut 0.2s ease forwards;
}

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

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

@keyframes modalBoxIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* ============================================================
   14. DROPDOWN ANIMATIONS
   ============================================================ */
.dropdown-menu {
  transform-origin: top center;
  animation: dropdownIn 0.2s ease forwards;
}

.dropdown-menu.closing {
  animation: dropdownOut 0.15s ease forwards;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: scaleY(0.8) translateY(-8px); }
  to   { opacity: 1; transform: scaleY(1) translateY(0); }
}

@keyframes dropdownOut {
  from { opacity: 1; transform: scaleY(1) translateY(0); }
  to   { opacity: 0; transform: scaleY(0.8) translateY(-8px); }
}

/* ============================================================
   15. ACCORDION ANIMATIONS
   ============================================================ */
.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content.open {
  max-height: 1000px;
}

.accordion-icon {
  transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

/* ============================================================
   16. STAR RATING ANIMATIONS
   ============================================================ */
.star-fill {
  animation: starFill 0.3s ease forwards;
}

@keyframes starFill {
  0%   { transform: scale(0.7); opacity: 0.5; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================================
   17. SCROLL PROGRESS BAR (Blog)
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  z-index: calc(var(--z-sticky) + 10);
  transition: width 0.1s linear;
}

/* ============================================================
   18. NOTIFICATION / ALERT ANIMATIONS
   ============================================================ */
.alert-animate {
  animation: alertIn 0.35s ease forwards;
}

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

/* ============================================================
   19. PRICING TOGGLE ANIMATION
   ============================================================ */
.price-transition {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.price-transition.switching {
  opacity: 0;
  transform: translateY(-4px);
}

/* ============================================================
   20. RESULT CARD SLIDE IN
   ============================================================ */
.result-slide-in {
  animation: resultSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* ============================================================
   21. CHECKMARK DRAW ANIMATION
   ============================================================ */
.checkmark-draw {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmarkDraw 0.5s ease forwards;
}

@keyframes checkmarkDraw {
  to { stroke-dashoffset: 0; }
}

/* ============================================================
   22. NUMBER COUNT UP
   ============================================================ */
.count-up {
  display: inline-block;
  transition: all 0.05s linear;
}

/* ============================================================
   23. TIMELINE ANIMATION
   ============================================================ */
.timeline-item {
  opacity: 0;
  transform: translateX(-20px);
}

.timeline-item.animated {
  animation: timelineIn 0.5s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }

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

/* ============================================================
   24. UTILITY ANIMATION CLASSES
   ============================================================ */
.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

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

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