/* Base & Resets */
*, *::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(201, 168, 76, 0.3);
  color: #f0f3f9;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.5);
}

/* Hero Animations */
.hero-elem {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.8s ease forwards;
}
.hero-elem:nth-child(1) { animation-delay: 0.2s; }
.hero-elem:nth-child(2) { animation-delay: 0.4s; }
.hero-elem:nth-child(3) { animation-delay: 0.6s; }
.hero-elem:nth-child(4) { animation-delay: 0.8s; }

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

/* Scroll Reveal (progressive enhancement — hidden by default, shown via JS) */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal-up.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    opacity: 1;
    transform: none;
  }
}

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

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

/* Mobile link animation */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.6s; }

/* Navbar transition */
.nav-scrolled {
  background: rgba(5, 12, 21, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

/* Menu line animation */
.menu-line {
  transition: all 0.3s ease;
}

/* Button hover glow */
button:hover,
a:hover {
  cursor: pointer;
}

/* Image loading placeholder */
img {
  opacity: 1;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid rgba(201, 168, 76, 0.5);
  outline-offset: 2px;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
