/* ============================================
   Hair by Jessica — Custom Styles
   ============================================ */

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

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

::selection {
  background-color: #C4694A;
  color: white;
}

/* --- Navigation --- */
#nav {
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#nav.scrolled {
  background: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C4694A;
  transition: width 0.3s ease;
}

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

/* --- Mobile Menu --- */
.mobile-link {
  position: relative;
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    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:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.menu-line:nth-child(1) {
  transform-origin: center;
}

.menu-line:nth-child(2) {
  opacity: 1;
}

.menu-line:nth-child(3) {
  transform-origin: center;
}

/* Hamburger animation when open */
body.menu-open .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.5rem;
}

/* --- Service Card Hover --- */
.group:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

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

/* --- Smooth Image Loading --- */
img {
  display: block;
  max-width: 100%;
}

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

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

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

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

/* --- Form Input Transitions --- */
input,
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #C4694A;
  box-shadow: 0 0 0 3px rgba(196, 105, 74, 0.15);
}

/* --- Gallery Hover Overlay --- */
.group .group-hover\:scale-110 {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Testimonial Card --- */
.bg-white\/10 {
  background: rgba(255, 255, 255, 0.1);
}

.bg-white\/15 {
  background: rgba(255, 255, 255, 0.15);
}

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