/* ============================================
   BLUE BARN MARKET — Custom Styles
   ============================================ */

/* --- Base & Smooth Scrolling --- */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* --- Navbar --- */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 160, 23, 0.1);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.nav-link {
  position: relative;
}

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

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

/* --- Mobile Menu --- */
#mobileMenu.open {
  max-height: 400px;
}

#menuIcon.open #bar1 {
  transform: translateY(5px) rotate(45deg);
}

#menuIcon.open #bar2 {
  opacity: 0;
}

#menuIcon.open #bar3 {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #d4a017;
  transition: width 0.3s ease;
}

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

/* --- Scroll Indicator --- */
@keyframes scrollIndicator {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

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

/* --- Floating Cards --- */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

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

.float-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.float-medium {
  animation: floatMedium 5s ease-in-out infinite;
}

.float-fast {
  animation: floatFast 4s ease-in-out infinite;
}

/* --- Reveal Animations --- */
.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);
}

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

/* When JS is disabled, all reveals are visible by default */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* When JS is enabled, add visible class via JS */
.js-enabled .reveal {
  opacity: 0;
  transform: translateY(30px);
}

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

/* --- Form Styles --- */
select option {
  background: #1c1917;
  color: #e7e5e4;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #44403c;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .float-slow, .float-medium, .float-fast {
    animation: none;
    transform: none;
  }
}
