/* === Custom Styles for Hair by MamaHil === */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf8f5;
}
::-webkit-scrollbar-thumb {
  background: #D4748A;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8B1A4A;
}

/* === Scroll Reveal Animations === */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

/* Default state for reduced motion / no-JS: always visible */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Navbar === */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(254, 252, 251, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(139, 26, 74, 0.08);
}

#navbar.scrolled .menu-line {
  background: #8B1A4A;
}

/* === Mobile Menu === */
#mobileMenu {
  max-height: 0;
}

#mobileMenu.open {
  max-height: 400px;
}

#mobileMenu.open .menu-line:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}
#mobileMenu.open .menu-line:nth-child(2) {
  opacity: 0;
}
#mobileMenu.open .menu-line:last-child {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(139, 26, 74, 0.08);
}

.mobile-link:last-child {
  border-bottom: none;
}

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #8B1A4A, #D4748A);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: left;
}

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

/* === Hero Image Parallax === */
#hero img {
  will-change: transform;
}

/* === Gallery Hover === */
.group img {
  will-change: transform;
}

/* === Form Focus States === */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(139, 26, 74, 0.1);
}

/* === Button Ripple === */
button, a {
  position: relative;
  overflow: visible;
}

/* === Selection Color === */
::selection {
  background: rgba(212, 116, 138, 0.25);
  color: #3d2c2c;
}

/* === Mobile Responsive Tweaks === */
@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.75rem;
    line-height: 1.15;
  }

  .service-card {
    padding: 1.5rem;
  }

  #about .relative {
    margin-bottom: 2rem;
  }

  .floating-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
  }
}

/* === Print Styles === */
@media print {
  #navbar, #mobileMenu {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
