/* ═══════════════ BASE & RESET ═══════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: #040108;
  color: #f5f0fa;
  font-family: 'Montserrat', system-ui, sans-serif;
}

::selection {
  background-color: rgba(212, 168, 83, 0.3);
  color: #f5f0fa;
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #d4a853, #8e52ab);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #f0c86e, #a874c8);
}

/* ═══════════════ SCROLL REVEAL ═══════════════ */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ═══════════════ FLOATING CARDS ═══════════════ */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
  animation-delay: 0s;
}

.floating-card:nth-child(2) {
  animation-delay: -2s;
}

.floating-card:nth-child(3) {
  animation-delay: -4s;
}

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

/* ═══════════════ SCROLL INDICATOR ═══════════════ */
@keyframes scroll-indicator {
  0% { top: 0; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.animate-scroll-indicator {
  animation: scroll-indicator 1.5s ease-in-out infinite;
}

/* ═══════════════ NAVBAR SCROLL STATE ═══════════════ */
#navbar.scrolled {
  background: rgba(4, 1, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

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

/* ═══════════════ MOBILE MENU ANIMATION ═══════════════ */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#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.5rem;
}

/* ═══════════════ MOBILE LINKS ═══════════════ */
.mobile-link {
  transition: all 0.3s ease;
}

.mobile-link:hover {
  letter-spacing: 0.05em;
}

/* ═══════════════ FORM STYLES ═══════════════ */
select option {
  background: #0d0616;
  color: #f5f0fa;
}

input:focus, textarea:focus, select:focus {
  outline: none;
}

/* ═══════════════ REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .floating-card {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
  .font-serif {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
}
