/* ===================================
   Hair By Krista — Custom Styles
   Classic & Elegant Design System
   =================================== */

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

body {
  font-family: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF7F2;
}
::-webkit-scrollbar-thumb {
  background: #D9754E;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B8614A;
}

/* --- Navbar Transitions --- */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 36, 32, 0.06);
}

/* --- Mobile Menu --- */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
}
#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Hamburger Animation --- */
#menuBtn.active #bar1 {
  transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active #bar2 {
  opacity: 0;
}
#menuBtn.active #bar3 {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Service Cards --- */
.service-card {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.service-card:hover {
  transform: translateY(-4px);
}

/* --- Gallery --- */
.gallery-item {
  cursor: pointer;
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(44, 36, 32, 0);
  transition: background 0.4s ease;
}
.gallery-item:hover::after {
  background: rgba(44, 36, 32, 0.1);
}
.gallery-item {
  position: relative;
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.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; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery-item img {
    transition: none;
  }
  .gallery-item:hover img {
    transform: none;
  }
}

/* --- Selection Color --- */
::selection {
  background: #D9754E;
  color: #FAF7F2;
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #B8614A;
  outline-offset: 2px;
}

/* --- Form Select Arrow --- */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6560' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  appearance: none;
  -webkit-appearance: none;
}

/* --- Print Styles --- */
@media print {
  #navbar, #menuBtn, .gallery-item { display: none; }
  body { background: white; }
  a { color: #2C2420; }
}
