/* ============================
   Melissa Homepage - Custom Styles
   ============================ */

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.animate-fade-in {
  animation: fade-in 0.8s ease-out both;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out both;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* Navigation */
#navbar {
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
  background: rgba(23, 37, 84, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

#navbar.scrolled .nav-logo-text {
  color: white;
}

#navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

#navbar.scrolled .nav-link:hover {
  color: white;
}

/* Feature Tabs */
.feature-tab {
  background: transparent;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.feature-tab:hover {
  background: #f1f5f9;
  color: #334155;
}

.feature-tab.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

/* ROI Calculator Slider */
.roi-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.roi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.roi-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Number counting animation */
.roi-number {
  animation: count-up 0.4s ease-out both;
}

/* Trust badge hover */
.trust-badge {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trust-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Industry card hover */
.industry-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.industry-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.08);
}

/* Stats counter animation */
@keyframes stat-pop {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.stat-animated {
  animation: stat-pop 0.5s ease-out both;
}

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

/* Custom selection color */
::selection {
  background: rgba(37, 99, 235, 0.2);
  color: inherit;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Process timeline stepper */
.process-step {
  position: relative;
}

.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: linear-gradient(to right, #bfdbfe, #dbeafe);
}

@media (max-width: 768px) {
  .process-step:not(:last-child)::after {
    display: none;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.5rem;
  }
}
