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

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

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ── Navbar scroll state ── */
#nav.scrolled {
  box-shadow: 0 4px 20px rgba(10, 26, 46, 0.12);
}

/* ── Mobile menu animation ── */
#mobile-menu.open {
  max-height: 400px;
}

#mobile-menu.closed {
  max-height: 0;
}

.menu-line:nth-child(3) {
  width: 1.5rem;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
  background: #9fb3c8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #627d98;
}

/* ── Selection color ── */
::selection {
  background: #fcd34d;
  color: #102a43;
}
