/* ========== BASE ========== */
*, *::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;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== NAVBAR ========== */
#navbar {
  transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
  background-color: rgba(253, 248, 245, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(131, 21, 48, 0.08);
  padding-top: 0;
  padding-bottom: 0;
}

.nav-link {
  position: relative;
}

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

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

/* ========== MOBILE MENU ========== */
#mobile-menu.open {
  transform: translateX(0);
}

#mobile-menu:not(.open) {
  transform: translateX(100%);
}

.mobile-nav-link {
  position: relative;
}

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

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

/* Menu toggle animation */
.menu-line {
  transition: transform 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6), opacity 0.3s ease, width 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 6px;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

/* ========== DECORATIVE ========== */
.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, #C9A96E, transparent);
}

/* ========== SELECTION ========== */
::selection {
  background-color: rgba(131, 21, 48, 0.15);
  color: #3d0715;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* ========== FOCUS ========== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #C9A96E;
  outline-offset: 4px;
  border-radius: 4px;
}
