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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
  background: #1a3c2a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #549f64;
}

/* Selection */
::selection {
  background: #1a3c2a;
  color: #faf8f4;
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 60, 42, 0.1);
}

#navbar.scrolled .font-display,
#navbar.scrolled span:nth-child(1) {
  color: #1a3c2a;
}

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

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #c8f0c4;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
  width: 100%;
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  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.visible {
  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; }

/* Hero underline animation */
h1 span.relative {
  position: relative;
  display: inline-block;
}

/* Floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.absolute.-bottom-6 {
  animation: float 4s ease-in-out infinite;
}

/* Image hover zoom */
.rounded-2xl.overflow-hidden img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rounded-2xl.overflow-hidden:hover img {
  transform: scale(1.05);
}

/* Form select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a3c2a' 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 12px center;
  padding-right: 40px;
}

/* Testimonial card hover */
.group:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease;
}

/* Pulse dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.animate-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
