/* ============================================
   KUSH CUSTOM CABINETRY — CUSTOM STYLES
   ============================================ */

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

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

/* Custom selection color */
::selection {
  background: #7B2D3B;
  color: #FAF6F3;
}

/* ============================================
   HERO ANIMATIONS (above fold — always visible)
   ============================================ */
.hero-tag {
  animation: slideUp 0.8s ease forwards;
}

.hero-line {
  display: inline-block;
  animation: slideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.25s; }
.hero-line:nth-child(3) { animation-delay: 0.4s; }

.hero-fade {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.7s;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SCROLL REVEAL (below fold — progressive enhancement)
   Only active when JS runs and user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

/* When JS is disabled, all reveal elements are visible by default */
.no-js .reveal,
.js .reveal {
  /* JS will add .reveal-visible; without JS, content stays visible */
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  background: rgba(250, 246, 243, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(123, 45, 59, 0.08);
}

#navbar.scrolled {
  box-shadow: 0 1px 24px rgba(61, 12, 17, 0.06);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Menu button animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

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

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

/* ============================================
   SELECT STYLING
   ============================================ */
select option {
  background: #2C2826;
  color: #fff;
}

/* ============================================
   FOCUS VISIBLE
   ============================================ */
:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-tag,
  .hero-line,
  .hero-fade {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .group img {
    transition: none;
  }

  .group:hover img {
    transform: none;
  }
}
