/* 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;
}

::selection {
  background: rgba(212, 162, 89, 0.3);
  color: #f5f5f5;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #3d3d3d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes scroll-down {
  0% { top: -16px; opacity: 1; }
  100% { top: 48px; opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Floating Cards */
.floating-card {
  animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
  animation-delay: -1.3s;
}

.floating-card:nth-child(3) {
  animation-delay: -2.6s;
}

/* Scroll Indicator */
.animate-scroll-down {
  animation: scroll-down 1.5s ease-in-out infinite;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  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);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(7) { transition-delay: 0.35s; }
.stagger-children .reveal:nth-child(8) { transition-delay: 0.4s; }

/* Navigation */
#nav.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-blur-xl;
  border-bottom: 1px solid rgba(61, 61, 61, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#nav.scrolled a:not(.bg-gradient-to-r) {
  color: #e0e0e0;
}

/* Mobile Menu */
.mobile-link {
  transition: opacity 0.3s, transform 0.3s;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

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

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

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

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

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
  width: 1.5rem;
}

/* Product Cards Hover */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Button Ripple */
button, a {
  position: relative;
  overflow: visible;
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid #d4a259;
  outline-offset: 2px;
}

/* Smooth image loading */
img {
  loading: lazy;
  decoding: async;
}

/* Counter animation */
.counter {
  display: inline-block;
}

/* Gallery hover overlay */
.rounded-2xl.overflow-hidden {
  position: relative;
}

.rounded-2xl.overflow-hidden::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0);
  transition: background 0.3s ease;
  pointer-events: none;
  border-radius: inherit;
}

.rounded-2xl.overflow-hidden:hover::after {
  background: rgba(10, 10, 10, 0.1);
}

/* Section divider accent */
section::before {
  content: '';
  display: block;
}
