/* Base & Utilities */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(184, 134, 11, 0.3);
  color: #fce7eb;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0A0606;
}
::-webkit-scrollbar-thumb {
  background: #841D35;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B8860B;
}

/* Reveal animations — progressive enhancement via JS */
.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[data-revealed="false"] {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile menu transitions */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

/* Hamburger animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 20px;
  margin-left: 0;
  margin-right: 0;
}

/* Mobile link transitions */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(10, 6, 6, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(184, 134, 11, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .group img {
    transition: none;
  }
}

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

/* Gallery grid responsive */
@media (max-width: 767px) {
  .auto-rows-[200px] {
    auto-rows: [row] 180px;
  }
}
