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

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

::selection {
  background-color: rgba(74, 168, 120, 0.2);
  color: #0d1f4d;
}

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

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

.scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal.revealed:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal.revealed:nth-child(6) { transition-delay: 0.5s; }

/* ── Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.02); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(20px) scale(1.03); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 10s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* ── Navbar ── */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(13, 31, 77, 0.08);
}

/* ── Mobile Menu ── */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(13, 31, 77, 0.06);
  transition: color 0.2s;
}

.mobile-link:last-child {
  border-bottom: none;
}

.mobile-link:hover {
  color: #4aa878;
}

/* ── Service cards ── */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* ── Form inputs ── */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(74, 168, 120, 0.15);
}

/* ── Smooth transitions for interactive elements ── */
a, button {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f4faf8;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #9bd4b8, #4aa878);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #6dbc94, #358a60);
}

/* ── Responsive adjustments ── */
@media (max-width: 640px) {
  .font-serif {
    font-size: 2rem;
    line-height: 1.15;
  }

  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .font-serif {
    font-size: 3rem;
  }
}
