/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* Selection */
::selection {
  background: #a7f3d0;
  color: #064e3b;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
  background: #6ee7b7;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34d399;
}

/* Nav */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #059669;
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #059669 !important;
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(254, 253, 248, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

.navbar-scrolled .nav-link {
  color: rgba(6, 78, 59, 0.7) !important;
}

.navbar-scrolled .font-display {
  color: #064e3b !important;
}

/* Mobile menu */
.mobile-nav-link {
  position: relative;
}

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

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #34d399, #6ee7b7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* Gallery */
.gallery-item {
  position: relative;
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 150, 105, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Review cards */
.review-card {
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  line-height: 1;
  color: rgba(110, 231, 183, 0.1);
  pointer-events: none;
}

/* Scroll reveal animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }

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

/* Focus visible */
*:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Button ripple */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Form transitions */
input, select, textarea {
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}
