/* =============================================
   Hair by Savannah Ray — Custom Styles
   ============================================= */

/* --- Base & Typography --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #c9a227;
  color: #0a1628;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f9f3e0;
}
::-webkit-scrollbar-thumb {
  background: #c9a227;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b8901f;
}

/* --- Navigation --- */
#site-header {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
  backdrop-filter: blur(10px);
}

.nav-link {
  position: relative;
}

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

#mobile-menu:not(.open) {
  opacity: 0;
  pointer-events: none;
}

.menu-line {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease,
              width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(6px) 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(-6px) rotate(-45deg);
  width: 1.5rem;
}

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

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

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-nav-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, #c9a227, #d4af5a, #c9a227);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Gallery --- */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* --- Form --- */
input:focus,
select:focus,
textarea:focus {
  border-bottom-color: #c9a227 !important;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* --- Responsive --- */
@media (max-width: 767px) {
  .font-serif {
    line-height: 1.15;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #services .service-card {
    padding: 2rem !important;
  }
}
