/* ========== 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(201, 168, 76, 0.3);
  color: #f0f4f8;
}

/* ========== HERO ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.hero-badge {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-headline {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-subtitle {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-ctas {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* ========== SCROLL REVEAL ========== */
.reveal-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion: disable all custom animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal-section {
    opacity: 1;
    transform: none;
  }

  .hero-badge,
  .hero-headline,
  .hero-subtitle,
  .hero-ctas {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .scroll-dot {
    animation: none;
  }

  .hero-bg img {
    transform: none;
  }
}

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

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

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

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

/* Mobile menu lines animation */
.menu-line {
  display: block;
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* Mobile links */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(56, 84, 110, 0.3);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ========== HEADER SCROLL STATE ========== */
#site-header.scrolled {
  background: rgba(10, 21, 32, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#site-header.scrolled .nav-link {
  color: #c5d3e4;
}

/* ========== HERO ========== */
.hero-bg {
  will-change: transform;
}

.hero-bg img {
  transition: transform 8s ease-out;
}

.hero-bg.loaded img {
  transform: scale(1);
}

/* ========== GOLD ACCENT DIVIDER ========== */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.4), transparent);
}

/* ========== CARD HOVER EFFECTS ========== */
.reveal-section {
  will-change: transform, opacity;
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #c9a84c;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a1520;
}

::-webkit-scrollbar-thumb {
  background: #2d4a6e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a5f8a;
}

/* ========== UTILITY ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
