/* ========== BASE & RESET ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

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

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-up {
  animation: fadeUp 0.8s ease-out forwards;
}

.anim-up:nth-child(2) {
  animation-delay: 0.15s;
}

.anim-up:nth-child(3) {
  animation-delay: 0.3s;
}

.anim-up:nth-child(4) {
  animation-delay: 0.45s;
}

/* ========== REVEAL ON SCROLL ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* ========== NAV ========== */
#site-header {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
  position: relative;
}

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

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

/* ========== MOBILE MENU ========== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

/* ========== GALLERY HOVER ========== */
.group:hover .group-hover\:-translate-y-0\.5 {
  transform: translateY(-0.125rem);
}

/* ========== FORM FOCUS ========== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* ========== SELECTION ========== */
::selection {
  background: #c9a84c;
  color: #162244;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #98b0db;
}

/* ========== MOBILE MENU ANIM ========== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mobile-menu.open {
  animation: slideDown 0.3s ease forwards;
}

/* ========== BACK TO TOP ========== */
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 640px) {
  .font-display {
    line-height: 1.1;
  }
}

/* ========== PRINT ========== */
@media print {
  #site-header, #back-to-top, #mobile-menu {
    display: none !important;
  }
}
