/* ─── BASE ─────────────────────────────────────────────── */
*, *::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; }

/* ─── NAV ──────────────────────────────────────────────── */
#nav {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#nav.scrolled {
  background: rgba(5, 12, 9, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #d4a853;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Mobile menu */
#mobile-menu.open { opacity: 1 !important; pointer-events: all !important; }
.mobile-nav-link {
  position: relative;
  transition: color 0.3s ease;
}
.mobile-nav-link:hover { color: #e8c97a !important; }
.mobile-nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: #d4a853;
  margin: 4px auto 0;
  transition: width 0.3s ease;
}
.mobile-nav-link:hover::after { width: 60%; }

/* Hamburger animation */
#menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menu-btn.active .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 1.4rem;
}

/* ─── FLOATING CARDS ───────────────────────────────────── */
.float-card {
  animation: float 6s ease-in-out infinite;
}
.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -1.5s; }
.card-3 { animation-delay: -3s; }
.card-4 { animation-delay: -4.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* ─── REVEAL ANIMATIONS ────────────────────────────────── */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal[data-reveal-state="hidden"] {
  opacity: 0;
  transform: translateY(30px);
}

/* ─── BACK TO TOP ──────────────────────────────────────── */
#back-to-top.visible {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* ─── SELECTION ─────────────────────────────────────────── */
::selection {
  background: rgba(212, 168, 83, 0.3);
  color: #fefdf8;
}

/* ─── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050c09; }
::-webkit-scrollbar-thumb { background: rgba(212,168,83,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,168,83,0.5); }

/* ─── REDUCED MOTION ────────────────────────────────────── */
@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[data-reveal-state="hidden"] {
    opacity: 1;
    transform: none;
  }
}
