/* ── Base ── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* ── Navbar transitions ── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Mobile menu animations ── */
#mobile-menu {
  animation: menuFadeIn 0.3s ease forwards;
}
@keyframes menuFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.mobile-link {
  opacity: 0;
  animation: linkSlideIn 0.3s ease forwards;
}
.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-link:nth-child(5) { animation-delay: 0.3s; }
@keyframes linkSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hero animations ── */
.hero-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 0.8s ease forwards;
}
.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }
@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Scroll reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Form focus styles ── */
input:focus, textarea:focus {
  background: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f9fafb; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
</style>
