/* ============================================
   Big River Materials — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1c1d21;
}
::-webkit-scrollbar-thumb {
  background: #3b3d44;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #F97066;
}

/* Selection */
::selection {
  background: rgba(249, 112, 102, 0.3);
  color: #f6f6f7;
}

/* ============================================
   Navigation
   ============================================ */
#site-header.scrolled {
  background: rgba(14, 15, 17, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(249, 112, 102, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
#mobile-menu.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* ============================================
   Service Cards
   ============================================ */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F97066, #e8554a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
  position: relative;
}

.testimonial-card::after {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 6rem;
  font-weight: 700;
  color: rgba(249, 112, 102, 0.06);
  line-height: 1;
  pointer-events: none;
}

/* ============================================
   Gallery Hover Overlay
   ============================================ */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ============================================
   Scroll Reveal Animations
   (progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  /* Stagger children */
  .reveal-stagger > * {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.05s; }
  .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
  .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.15s; }
  .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.2s; }
  .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.25s; }
  .reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.3s; }
}

/* Reduced motion: disable all animations */
@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, .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   Form Styles
   ============================================ */
select option {
  background: #1c1d21;
  color: #f6f6f7;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .font-serif {
    word-spacing: -0.02em;
  }
}
