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

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #0a1226;
  color: #ffffff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1226;
}
::-webkit-scrollbar-thumb {
  background: #d4a017;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #e4bb33;
}

/* ===== REVEAL ANIMATIONS ===== */
/* Default state: content is visible (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    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-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
  .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
  background-color: rgba(10, 18, 38, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 160, 23, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  opacity: 1;
  transform: translateY(0);
}

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

#mobileMenu.open .mobile-link {
  animation: slideIn 0.3s ease 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; }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== HAMBURGER ANIMATION ===== */
.menu-line {
  display: block;
  transition: all 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menuToggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}
#menuToggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
  margin-left: 0;
  margin-right: 0;
}

/* ===== SELECTION ===== */
::selection {
  background-color: #d4a017;
  color: #0a1226;
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid #d4a017;
  outline-offset: 2px;
}

/* ===== FORM STYLES ===== */
select option {
  background-color: #0f1a3a;
  color: #ffffff;
}

/* ===== ACCESSIBILITY: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
