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

::selection {
  background-color: #6B2D5B;
  color: #fff;
}

/* ─── Hero Animations ─── */
.hero-elem {
  opacity: 0;
  transform: translateY(24px);
  animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Nav Links ─── */
.nav-link {
  position: relative;
}

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

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

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

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background-color: #F59E0B;
  transition: width 0.3s ease;
}

.mobile-link:hover::after,
.mobile-link.active::after {
  width: 100%;
}

#mobile-menu.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

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

#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; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }

@keyframes mobileLinkIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-link {
  transform: translateY(-12px);
}

/* ─── Menu Toggle Animation ─── */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
  width: 1.25rem;
}

/* ─── Header Scroll State ─── */
#site-header.scrolled {
  box-shadow: 0 1px 0 rgba(107, 45, 91, 0.08);
}

/* ─── Image Hover ─── */
.group img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── 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;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #d49ab5;
  border-radius: 4px;
}

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