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

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

::selection {
  background-color: #065F46;
  color: #FDF6E3;
}

/* ── Navigation ── */
#site-header.scrolled #nav-backdrop {
  background-color: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#site-header.scrolled .nav-link {
  color: rgba(6, 78, 59, 0.7);
}

#site-header.scrolled .nav-link:hover {
  color: #064E3B;
}

.nav-link {
  position: relative;
}

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

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

/* ── Mobile Menu ── */
#mobile-menu.open {
  translate: 0 0;
}

#mobile-menu:not(.open) {
  translate: 100% 0;
}

.mobile-menu-link {
  opacity: 0;
  translate: 0 -12px;
  transition: opacity 0.35s ease, translate 0.35s ease;
}

#mobile-menu.open .mobile-menu-link {
  opacity: 1;
  translate: 0 0;
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Service Cards ── */
.service-card {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.0s; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:nth-child(5) { transition-delay: 0.32s; }
.service-card:nth-child(6) { transition-delay: 0.40s; }

/* ── Section reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

img[src] {
  opacity: 1;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* ── Form 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='%23065F46' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

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

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