/* Custom styles for Rocco's Landscaping */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fafaf5;
}
::-webkit-scrollbar-thumb {
  background: #c93f22;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8301c;
}

/* Selection color */
::selection {
  background: #c93f22;
  color: #fff;
}

/* Navbar transition states */
#navbar.scrolled {
  background: rgba(254, 253, 251, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
  color: #292524 !important;
}

#navbar.scrolled a:not(.bg-terra-600):not(.bg-white) {
  color: #57534e !important;
}

#navbar.scrolled a:not(.bg-terra-600):not(.bg-white):hover {
  color: #c93f22 !important;
}

#navbar.scrolled .menu-line {
  background: #292524 !important;
}

/* Mobile menu animations */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu toggle animation */
.menu-line:last-child {
  transition: width 0.3s ease, transform 0.3s ease, margin 0.3s ease !important;
}

body.menu-open .menu-line:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}
body.menu-open .menu-line:last-child {
  width: 1.5rem;
  margin-left: 0;
}
body.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

/* Service card hover effects */
.service-card {
  transform: translateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

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

/* Gallery item */
.gallery-item {
  position: relative;
  overflow: hidden;
}

/* Scroll reveal base - always visible by default */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Progressive enhancement: only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.animated {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  /* JS will add .visible class to trigger animation */
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Decorative leaf animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* Print styles */
@media print {
  nav, #contact, footer, .gallery-item { display: none; }
  body { color: #000; background: #fff; }
  .bg-terra-700 { background: #a8301c !important; }
}
