/* ── Base & Utilities ── */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
}

/* ── Navbar ── */
#navbar {
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

#navbar.scrolled {
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
  padding: 0;
}

.nav-text {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
  color: rgba(17, 24, 39, 0.75);
}

/* ── Mobile Menu ── */
.mobile-link {
  display: block;
  border-bottom: 1px solid rgba(5, 150, 105, 0.08);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
  color: #059669;
  padding-left: 0.5rem;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger children */
.grid > .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.grid > .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.grid > .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.grid > .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.grid > .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.grid > .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

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

/* ── Selection ── */
::selection {
  background: rgba(5, 150, 105, 0.2);
  color: #064e3b;
}

/* ── Smooth image loading ── */
img {
  display: block;
  max-width: 100%;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0fdf4;
}
::-webkit-scrollbar-thumb {
  background: #6ee7b7;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34d399;
}
