/* ============================================
   H. Moore Developers — Custom Styles
   Burgundy + Blush Editorial Theme
   ============================================ */

/* Base reset & smooth scrolling */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Custom selection color */
::selection {
  background-color: #6E2727;
  color: #FAF6F3;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF6F3;
}
::-webkit-scrollbar-thumb {
  background: #bf4848;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9c3737;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
  background: rgba(250, 246, 243, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(110, 39, 39, 0.08);
}

#navbar.scrolled {
  background: rgba(250, 246, 243, 0.95);
  box-shadow: 0 4px 30px rgba(110, 39, 39, 0.08);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Hamburger animation */
.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}
#menuBtn.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  min-height: 100vh;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              background-color 0.5s ease, 
              color 0.5s ease,
              box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(110, 39, 39, 0.2);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
  overflow: hidden;
  border-radius: 1rem;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
  transition: transform 0.4s ease, border-color 0.3s ease;
}

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

/* ============================================
   Contact Form
   ============================================ */
.contact-input {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-input:focus {
  border-color: #bf4848;
  box-shadow: 0 0 0 3px rgba(191, 72, 72, 0.1);
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
    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[data-delay="1"] { transition-delay: 0.1s; }
  .reveal[data-delay="2"] { transition-delay: 0.2s; }
  .reveal[data-delay="3"] { transition-delay: 0.3s; }
  .reveal[data-delay="4"] { transition-delay: 0.4s; }
  .reveal[data-delay="5"] { transition-delay: 0.5s; }
}

/* For reduced motion preference, ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.1;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  nav, #contact, .map-section, footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}
