/* Custom styles for Malibu Automated Gate Services */

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

/* Scroll reveal base - content is always visible by default */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animations when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
  }
  .scroll-reveal[data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating card animations */
@keyframes float1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1deg); }
}

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

.floating-card-1 {
  animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
  animation: float2 5s ease-in-out infinite;
}

.floating-card-3 {
  animation: float3 4.5s ease-in-out infinite;
}

/* Navbar glass effect */
.navbar-scrolled {
  background: rgba(10, 22, 40, 0.9) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Custom select arrow */
select option {
  background: #0f2140;
  color: #fff;
}

/* Focus visible styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #34d4a8;
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(52, 212, 168, 0.3);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: #1b396d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34d4a8;
}

/* Mobile menu transitions */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

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

/* Button hover glow */
button:hover,
a:hover {
  cursor: pointer;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
