/* Custom styles for Fred and Sons Restorations */

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

/* Hero angle clip */
.clip-hero-angle {
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: color-mix(in srgb, currentColor 60%, transparent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Mobile nav links */
.mobile-nav-link {
  position: relative;
}

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

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

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* Header scroll state */
header.scrolled {
  box-shadow: 0 1px 20px rgba(26, 60, 52, 0.08);
}

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

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

/* Hamburger animation */
#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Selection color */
::selection {
  background: color-mix(in srgb, #2d4d33 30%, transparent);
  color: #1a2b1f;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #2d4d33;
  outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
  background: #9bb89e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #719a74;
}
