/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fadeIn 1s ease forwards;
}

.animate-scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
  transform-origin: top;
}

/* ─── Scroll Reveal ─── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Navbar ─── */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(107, 47, 91, 0.06);
}

/* ─── Mobile Menu ─── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }

/* ─── Menu link hover effect ─── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #D4A843;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ─── Menu items hover ─── */
.group:hover .font-sans.text-stone-200 {
  color: #FFD86E;
  transition: color 0.3s ease;
}

/* ─── Custom scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #FAFAF5;
}

::-webkit-scrollbar-thumb {
  background: #D49ABF;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A8497F;
}

/* ─── Selection ─── */
::selection {
  background: #E8C2DF;
  color: #2D1326;
}

/* ─── Responsive tweaks ─── */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.15;
  }
}
