/* Custom styles for B&B Automotive Salvage & Repairs */

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

/* Custom animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(12deg); }
  50% { transform: translateY(-20px) rotate(12deg); }
}

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

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

.animate-float-delayed {
  animation: float-delayed 7s ease-in-out infinite;
  animation-delay: 1s;
}

/* Scroll reveal — progressive enhancement, hidden by default for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback: ensure scroll-reveal content is visible even without JS */
@media not all and (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

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

#mobile-menu.open {
  max-height: 500px;
}

/* Navbar scroll state */
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Selection color */
::selection {
  background: #99f6e4;
  color: #134e4a;
}

/* Form focus styles */
input:focus, textarea:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Success message animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-success {
  animation: slideIn 0.4s ease forwards;
}

/* Image loading placeholder */
img {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
