/* Base & Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
select option { background: #0D0D0D; color: #fff; }

/* Scroll Reveal - progressive enhancement, only applies when JS is active */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
  }
}

/* Header scroll state */
header.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.25rem;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: rgba(201, 169, 110, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201, 169, 110, 0.5); }

/* Selection */
::selection { background: rgba(201, 169, 110, 0.3); color: #fff; }

/* Focus visible */
:focus-visible { outline: 2px solid rgba(201, 169, 110, 0.5); outline-offset: 2px; }

/* Input autofill override */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0D0D0D inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}
