/* Base */
html {
  scroll-behavior: smooth;
}

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

/* Scroll reveal — progressive enhancement, only active when JS runs */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  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);
}

/* Navbar glass effect when scrolled */
#nav.scrolled {
  background: rgba(253, 248, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* Mobile menu transitions */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

.mobile-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
  color: #7B2D3B;
  padding-left: 0.5rem;
}

/* Button ripple on tap */
a:active, button:active {
  transform: scale(0.97);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf8f6;
}
::-webkit-scrollbar-thumb {
  background: #f9c2ca;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ec637d;
}

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