*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #d1fae5;
}
::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection */
::selection {
  background: #065f46;
  color: #fdf8f0;
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(253, 248, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
  color: #064e3b !important;
}

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

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* Service cards */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

/* Gallery images */
.group img {
  will-change: transform;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .service-card:hover {
    transform: none;
  }
  .group img {
    transition: none;
  }
}
