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

body {
  overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Navbar */
#navbar {
  background: transparent;
  backdrop-filter: none;
}

#navbar.scrolled {
  background: rgba(253, 245, 235, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .nav-logo {
  color: #3d342c;
}

#navbar.scrolled .nav-link {
  color: #7a6b5e;
}

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

#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s ease forwards;
  opacity: 1;
}

#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; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile menu button active state */
#mobile-menu-btn.active .menu-line-1 {
  transform: rotate(45deg) translate(2px, 2px);
}

#mobile-menu-btn.active .menu-line-2 {
  opacity: 0;
}

#mobile-menu-btn.active .menu-line-3 {
  transform: rotate(-45deg) translate(2px, -2px);
  width: 1.5rem;
}

/* Service cards */
.service-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
  box-shadow: 0 20px 60px -20px rgba(196, 112, 63, 0.12);
}

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

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

::-webkit-scrollbar-thumb {
  background: #d4c8bc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #c99152;
}

/* Selection color */
::selection {
  background: rgba(196, 112, 63, 0.2);
  color: #3d342c;
}

/* Select dropdown arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a89888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

/* Gallery hover overlay */
.aspect-square {
  position: relative;
}

.aspect-square::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61, 52, 44, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
}

.aspect-square:hover::after {
  opacity: 1;
}
