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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f1f5f9;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
  }

  .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
  .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
  .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* ─── Navbar transition ─── */
#nav {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#nav.scrolled {
  background-color: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.07), 0 4px 24px rgba(0, 0, 0, 0.4);
}

#nav[data-nav="light"] .font-display,
#nav[data-nav="light"] a:not(.bg-teal-600):not(.bg-gold-500) {
  color: #f1f5f9;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ─── Mobile menu animation ─── */
#mobile-menu {
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Button focus states ─── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Image aspect ratios ─── */
img {
  max-width: 100%;
  height: auto;
}
