/* Custom styles for Success Plumbing and Heating */

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

/* Navbar scroll effect */
.nav-scrolled {
  background: rgba(250, 245, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(91, 44, 111, 0.1);
}

.nav-scrolled .font-serif {
  color: #5B2C6F !important;
}

/* Mobile menu transitions */
#mobile-menu {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
  transform: translateX(0);
}

#mobile-menu.closed {
  transform: translateX(100%);
}

/* Service card hover glow */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  border: 2px solid transparent;
  transition: border-color 0.4s ease;
  pointer-events: none;
}

.service-card:hover::after {
  border-color: rgba(245, 158, 11, 0.3);
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
  .reveal-delay-5 { transition-delay: 0.5s; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Hero text underline animation */
@keyframes underline-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Custom selection color */
::selection {
  background: #F59E0B;
  color: #5B2C6F;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* Image hover zoom */
img {
  transition: transform 0.5s ease;
}

/* Subtle pattern overlay for hero */
.hero-pattern {
  background-image: radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(91, 44, 111, 0.06) 0%, transparent 50%);
}

/* Gallery grid gap fix */
.grid-cols-2 > * {
  overflow: hidden;
}

/* Mobile link animation */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
}

.mobile-menu-open .mobile-link {
  animation: mobileLinkIn 0.4s ease forwards;
}

.mobile-menu-open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(6) { animation-delay: 0.3s; }

@keyframes mobileLinkIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hamburger animation */
.hamburger-active line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-active line:nth-child(2) {
  opacity: 0;
}
.hamburger-active line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
