/* Base & Utilities */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(45, 90, 61, 0.15);
  color: #1c3a27;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: #2D5A3D;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* Navbar scrolled state */
.navbar-scrolled {
  background-color: rgba(250, 250, 247, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

.navbar-scrolled .nav-link {
  color: #2D5A3D;
}

.navbar-scrolled .menu-line {
  background-color: #2D5A3D;
}

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

.mobile-menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(2px, -2px);
  width: 5rem;
}

/* Floating Cards */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  animation-delay: 0s;
}

.card-2 {
  animation-delay: -1.5s;
}

.card-3 {
  animation-delay: -3s;
}

.card-4 {
  animation-delay: -4.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* Scroll Reveal */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .floating-card {
    animation: none;
  }
  
  .reveal {
    transition: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Service Cards */
.service-card {
  opacity: 1;
  transform: translateY(0);
}

/* Form Focus Styles */
input:focus,
textarea:focus {
  outline: none;
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(45, 90, 61, 0.03) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}

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

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

::-webkit-scrollbar-thumb {
  background: #bdd4be;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #93b896;
}
