/* ── Base ── */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Scroll Reveal (progressive enhancement) ── */
.scroll-reveal { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Navbar transition ── */
#nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

/* ── Mobile menu transition ── */
#mobileMenu {
  animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f0f4ff; }
::-webkit-scrollbar-thumb { background: #b3c8ff; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #89aaff; }

/* ── Selection ── */
::selection { background: #bbf7d0; color: #0a1628; }

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

/* ── Input autofill ── */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #f0f4ff inset !important;
  -webkit-text-fill-color: #0a1628 !important;
}
