/* ── Base & Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(212, 160, 23, 0.3);
  color: #fff;
}

/* ── Floating Animations ── */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(0.5deg); }
}

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

@keyframes float-3 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(0.3deg); }
}

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

.float-card-1 { animation: float-1 6s ease-in-out infinite; }
.float-card-2 { animation: float-2 5s ease-in-out infinite 0.5s; }
.float-card-3 { animation: float-3 7s ease-in-out infinite 1s; }
.float-card-4 { animation: float-4 4.5s ease-in-out infinite 0.3s; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  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);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Navbar ── */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(26, 10, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .menu-line {
  background: #fff;
}

/* ── Mobile Menu ── */
#mobile-menu.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

#mobile-menu.open .mobile-link {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

#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 fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Menu Button ── */
.menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

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

/* ── Custom Select ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a0a2e;
}

::-webkit-scrollbar-thumb {
  background: #3d1c6e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a2d8a;
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid rgba(212, 160, 23, 0.6);
  outline-offset: 2px;
}

/* ── 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 {
    opacity: 1;
    transform: none;
  }
}
