/* Custom styles for Booth & Sons Scrap Yard */

:root {
  --scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
}

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

/* Nav scroll state */
#navbar.scrolled {
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(15, 76, 117, 0.06), 0 4px 24px rgba(15, 76, 117, 0.06);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #1a9970;
  border-radius: 1px;
  transition: width 0.25s ease;
}

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

/* Mobile menu */
.mobile-link {
  display: block;
}

/* Hero image */
.hero-img {
  will-change: transform;
}

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

/* Staggered card animations */
.card-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

.floating-badge {
  animation: float 4s ease-in-out infinite;
}

/* Subtle gradient text */
.gradient-text {
  background: linear-gradient(135deg, #1a9970 0%, #0F4C75 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Pulse dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.animate-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

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

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

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

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

/* Selection */
::selection {
  background: rgba(26, 153, 112, 0.15);
  color: #0F4C75;
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid #1a9970;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduce 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, .card-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Tablet */
@media (max-width: 767px) {
  .font-serif {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* Large screens */
@media (min-width: 1280px) {
  .max-w-7xl {
    max-width: 80rem;
  }
}
