/* =========================================
   Remote Computer Repair - Animations
   ========================================= */

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

@keyframes fadeInUp {
  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 scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

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

@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

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

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

/* ---- Application classes ---- */

.animate-hero-1 {
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.1s;
}

.animate-hero-2 {
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.25s;
}

.animate-hero-3 {
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.4s;
}

.animate-hero-4 {
  animation: heroEntrance 0.7s ease both;
  animation-delay: 0.55s;
}

.animate-hero-img {
  animation: scaleIn 0.8s ease both;
  animation-delay: 0.3s;
}

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

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

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

/* Gradient animated background */
.gradient-animate {
  background: linear-gradient(-45deg,
    #0f2338,
    #1a3a5c,
    #1e4a73,
    #0a3055,
    #00618a
  );
  background-size: 400% 400%;
  animation: gradientShift 10s ease infinite;
}

/* Pulse for CTA buttons */
.btn-pulse {
  position: relative;
}

.btn-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse-ring 2.5s ease-out infinite;
  z-index: -1;
}

/* Loading dots */
.loading-dots span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 2px;
  animation: dotBlink 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Hover grow */
.hover-grow {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-grow:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 35px rgba(0,0,0,0.14);
}

/* Slide fade for quiz transitions */
.slide-out {
  animation: fadeInLeft 0.3s ease reverse forwards;
}

.slide-in {
  animation: fadeInRight 0.35s ease both;
}

/* Tick animation for success */
@keyframes drawCheck {
  from { stroke-dashoffset: 60; }
  to   { stroke-dashoffset: 0; }
}

.check-svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.5s ease 0.3s forwards;
}

/* Typing cursor */
.typing-cursor::after {
  content: '|';
  animation: dotBlink 1s step-end infinite;
  color: var(--accent);
}

/* Stagger helpers */
.stagger-1 { animation-delay: 0.05s !important; }
.stagger-2 { animation-delay: 0.12s !important; }
.stagger-3 { animation-delay: 0.19s !important; }
.stagger-4 { animation-delay: 0.26s !important; }
.stagger-5 { animation-delay: 0.33s !important; }
.stagger-6 { animation-delay: 0.40s !important; }

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