/* ===== Base & Animations ===== */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(4, 120, 87, 0.2);
  color: #064E3B;
}

/* ===== Fade-up animation ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fadeUp 0.7s ease-out both;
}

/* ===== Scroll line animation ===== */
@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 0;
  }
}

.animate-scroll-line {
  animation: scrollLine 1.8s ease-in-out infinite;
}

/* ===== Intersection Observer reveal ===== */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Staggered delays for grid items */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== Navbar scroll state ===== */
#navbar.scrolled {
  background-color: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

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

#navbar.scrolled .nav-link:hover {
  color: #047857;
}

/* ===== Mobile menu animation ===== */
#mobileMenu {
  animation: slideDown 0.3s ease-out;
}

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

/* ===== Custom 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='%239CA3AF' 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 1rem center;
  padding-right: 2.5rem;
}

/* ===== Smooth focus styles ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* ===== Button hover glow ===== */
button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
  .font-serif {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
