/* Custom styles for Perfection Roof Remodel and Landscape */

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

/* Scroll reveal animations */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Default state for scroll-reveal — always visible */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: #334e68;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4a843;
}

/* Selection color */
::selection {
  background: #d4a843;
  color: #0a1628;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #d4a843 !important;
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* Button hover lift */
button, a {
  transition: all 0.2s ease;
}

/* Image loading placeholder */
img {
  background: #1a2d45;
}

/* Staggered reveal delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* Mobile menu link hover */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #1a2d45;
}

.mobile-link:last-child {
  border-bottom: none;
}
