/* ========== 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, 160, 23, 0.3);
  color: #f0f4f8;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050d14;
}
::-webkit-scrollbar-thumb {
  background: #1e2d3d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0d5c5a;
}

/* ========== NAVBAR ========== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #d4a017, #e6b830);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #e6b830;
}

/* Navbar scrolled state */
nav.scrolled {
  background: rgba(5, 13, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 45, 61, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav.scrolled .nav-link {
  color: #94a3b8;
}

nav.scrolled .nav-link:hover {
  color: #e6b830;
}

/* ========== MOBILE MENU ========== */
.mobile-link {
  position: relative;
}

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

#mobile-menu.open .mobile-link {
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 1;
}

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

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

/* Hamburger animation */
.menu-line {
  display: block;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
  width: 1.25rem;
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
  }
  .reveal-right {
    opacity: 0;
    transform: translateX(30px);
  }

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

/* ========== MENU ITEMS ========== */
#menu li {
  border-bottom: 1px solid rgba(45, 74, 92, 0.4);
  padding-bottom: 5px;
}

#menu li:last-child {
  border-bottom: none;
}

/* ========== GOLD LINE DECORATION ========== */
@media (min-width: 1024px) {
  #hero::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -2rem;
    width: 1px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, rgba(212, 160, 23, 0.2), transparent);
  }
}

/* ========== IMAGE HOVER ========== */
img {
  display: block;
  max-width: 100%;
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #d4a017;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
  .font-display {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
}

/* ========== LOADING STATE ========== */
@media (prefers-reduced-motion: no-preference) {
  html.loading * {
    transition: none !important;
    animation: none !important;
  }
}
