/* Custom animations and styles for Reflexify Landing Page */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Reasoning step animation */
.reasoning-step {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

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

/* Stagger animation delays */
.reasoning-step:nth-child(1) { animation-delay: 0.1s; }
.reasoning-step:nth-child(2) { animation-delay: 0.3s; }
.reasoning-step:nth-child(3) { animation-delay: 0.5s; }

/* Feature card hover effect */
.feature-card {
  transform: translateY(0);
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

/* Integration card hover effect */
.integration-card {
  transition: all 0.3s ease;
}

.integration-card:hover {
  transform: scale(1.05);
}

/* Agent diagram subtle animation */
.agent-diagram {
  animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
  50% {
    box-shadow: 0 0 40px 0 rgba(14, 165, 233, 0.1);
  }
}

/* Gradient text animation */
.gradient-text-animated {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

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

/* Button hover scale */
.btn-scale {
  transition: transform 0.2s ease;
}

.btn-scale:hover {
  transform: scale(1.05);
}

/* Mobile menu animation */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 300px;
  opacity: 1;
}

/* Loading spinner for reasoning loop */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 2s linear infinite;
}

/* Fade in on scroll (for JS intersection observer) */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Input focus styles */
input:focus {
  outline: none;
}

/* Selection color */
::selection {
  background: rgba(14, 165, 233, 0.3);
  color: white;
}

/* Animated dash for omnichannel flow lines */
@keyframes dashFlow {
  from {
    stroke-dashoffset: 20;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.animate-dash {
  animation: dashFlow 1.5s linear infinite;
}

/* Channel item hover */
.channel-item {
  transition: all 0.3s ease;
}

.channel-item:hover {
  transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .agent-diagram {
    padding: 1rem;
  }

  .react-step {
    padding: 0.75rem;
  }
}