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

/* Scroll reveal */
.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.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal.revealed:nth-child(5) { transition-delay: 0.35s; }
.scroll-reveal.revealed:nth-child(6) { transition-delay: 0.4s; }

/* Header scroll state */
#site-header.scrolled {
  background: rgba(15, 26, 48, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Nav link underline on scroll */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E8C06A;
  border-radius: 1px;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* Mobile link */
.mobile-link {
  position: relative;
  padding-left: 0;
}

/* Selection color */
::selection {
  background: rgba(212, 168, 75, 0.3);
  color: #1B2A4A;
}

/* Smooth image rendering */
img {
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
  background: #d4a84b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b8922e;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #D4A84B;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
