*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

/* Reveal-on-scroll — progressive enhancement, hidden by default */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar scroll state */
#nav.scrolled {
  background: rgba(61, 18, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #F5C518;
  border-radius: 1px;
  transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
  width: 60%;
  left: 20%;
}

/* Mobile link underline */
.mobile-link {
  position: relative;
}

/* Smooth image loading */
img {
  loading: lazy;
}

/* Selection color */
::selection {
  background: rgba(123, 45, 59, 0.2);
  color: inherit;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
  outline: 2px solid #F5C518;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf2f4;
}
::-webkit-scrollbar-thumb {
  background: #f9cfd9;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f4a7b8;
}
