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

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

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

/* Geometric Animations */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-slower {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(8deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.geo-shape {
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
}

.shape-circle-1 {
  width: 300px;
  height: 300px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  top: 10%;
  right: -5%;
  animation: float-slow 8s ease-in-out infinite;
}

.shape-circle-2 {
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  bottom: 20%;
  left: 5%;
  animation: float-slower 10s ease-in-out infinite;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 100px solid rgba(255, 255, 255, 0.15);
  top: 30%;
  left: 8%;
  animation: float-medium 7s ease-in-out infinite;
}

.shape-square {
  width: 80px;
  height: 80px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  top: 60%;
  right: 10%;
  animation: float-slower 9s ease-in-out infinite;
  transform: rotate(45deg);
}

.shape-ring {
  width: 120px;
  height: 120px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  bottom: 15%;
  right: 25%;
  animation: spin-slow 20s linear infinite;
}

.shape-dots {
  top: 45%;
  left: 15%;
  display: grid;
  grid-template-columns: repeat(4, 12px);
  gap: 12px;
  opacity: 0.2;
}

.shape-dots span {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: float-slower 4s ease-in-out infinite;
}

.shape-dots span:nth-child(2) { animation-delay: 0.2s; }
.shape-dots span:nth-child(3) { animation-delay: 0.4s; }
.shape-dots span:nth-child(4) { animation-delay: 0.6s; }
.shape-dots span:nth-child(5) { animation-delay: 0.8s; }
.shape-dots span:nth-child(6) { animation-delay: 1.0s; }
.shape-dots span:nth-child(7) { animation-delay: 1.2s; }
.shape-dots span:nth-child(8) { animation-delay: 1.4s; }
.shape-dots span:nth-child(9) { animation-delay: 1.6s; }
.shape-dots span:nth-child(10) { animation-delay: 1.8s; }
.shape-dots span:nth-child(11) { animation-delay: 2.0s; }
.shape-dots span:nth-child(12) { animation-delay: 2.2s; }

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #059669, #34d399);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

/* Testimonial Cards */
.testimonial-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.12);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 80px;
  font-family: Georgia, serif;
  color: #d1fae5;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

.testimonial-card > * {
  position: relative;
  z-index: 1;
}

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

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .reveal-hidden.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.nav-scrolled a:not(.bg-emerald-600):not(.bg-emerald-800) {
  color: #064e3b !important;
}

/* Mobile menu transitions */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Image hover */
.rounded-2xl.overflow-hidden img {
  transition: transform 0.5s ease;
}

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

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