/* ─── Base & Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d0518; }
::-webkit-scrollbar-thumb { background: #361d45; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #4e2860; }

/* ─── Selection ─── */
::selection { background: rgba(212, 160, 23, 0.3); color: #f5f0f7; }

/* ─── Navbar ─── */
#navbar {
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
#navbar.scrolled {
  background: rgba(13, 5, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(212, 160, 23, 0.1);
}
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #d4a017;
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* ─── Mobile Menu ─── */
#mobileMenu.open { opacity: 1 !important; pointer-events: all !important; }
#mobileMenu.open .mobile-link { animation: fadeSlideUp 0.4s ease forwards; }
#mobileMenu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu .mobile-link:nth-child(4) { animation-delay: 0.2s; }

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

/* ─── Hero Animations ─── */
.hero-orb {
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.hero-orb:nth-child(3) { animation-delay: -5s; animation-duration: 12s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

/* Hero fade-in — above the fold, always visible */
.fade-in {
  animation: heroFadeIn 1s ease forwards;
  opacity: 1;
}
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.3s; }
.fade-in:nth-child(3) { animation-delay: 0.5s; }
.fade-in:nth-child(4) { animation-delay: 0.7s; }

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

/* ─── Scroll Reveal (below the fold only) ─── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Fallback: ensure content is visible even without JS */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Form Inputs ─── */
input:focus, select:focus, textarea:focus {
  border-color: rgba(212, 160, 23, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1) !important;
}

/* ─── Date input placeholder color fix ─── */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) saturate(3) hue-rotate(10deg);
  cursor: pointer;
}

/* ─── Smooth image loading ─── */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ─── Focus visible ─── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #d4a017;
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ─── Responsive tweaks ─── */
@media (max-width: 640px) {
  .font-display { line-height: 1.15; }
}
