/* Base & Reset */
*, *::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;
}

/* Scroll Reveal Animations */
.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);
}

.reveal[data-state="hidden"] {
  opacity: 0;
  transform: translateY(30px);
}

.reveal[data-state="visible"] {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar transition */
.nav-scrolled {
  background: rgba(250, 245, 247, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(176, 95, 114, 0.08);
}

.nav-scrolled .font-display {
  color: rgb(92, 44, 54) !important;
}

.nav-scrolled a:not(.bg-plum-600) {
  color: rgb(127, 63, 78) !important;
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Button focus styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid rgb(245, 158, 11);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgb(219, 168, 184);
  color: rgb(46, 21, 28);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgb(250, 245, 247);
}
::-webkit-scrollbar-thumb {
  background: rgb(219, 168, 184);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgb(176, 95, 114);
}
