/* Custom styles for Hatchett Overstock */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: #fefcf3;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection color */
::selection {
  background: #d4a373;
  color: #065f46;
}

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

#navbar.scrolled {
  background-color: rgba(254, 252, 243, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 20px rgba(6, 95, 70, 0.08);
}

/* Mobile menu animations */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Menu button animation */
#menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

#menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.25rem;
}

/* Scroll reveal base styles */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 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; }
}

/* Floating cards animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--rotate, 0deg)); }
}

/* Apply float to hero cards with different timings */
#hero .absolute.rounded-lg:nth-child(1) {
  animation: float 5s ease-in-out infinite;
  --rotate: 2deg;
}

#hero .absolute.rounded-lg:nth-child(2) {
  animation: float 6s ease-in-out infinite 0.5s;
  --rotate: -1deg;
}

#hero .absolute.rounded-lg:nth-child(3) {
  animation: float 5.5s ease-in-out infinite 1s;
  --rotate: 1deg;
}

#hero .absolute.rounded-lg:nth-child(4) {
  animation: float 6.5s ease-in-out infinite 1.5s;
  --rotate: -2deg;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #d4a373;
  outline-offset: 2px;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Image loading placeholder */
img {
  background-color: #d1fae5;
}

/* Print styles */
@media print {
  #navbar, #mobile-menu, .reveal { display: none; }
  body { background: white; color: black; }
}
