/* Custom styles for Hairitage Salon */

:root {
  --terra-500: #d94f36;
  --terra-600: #c43d26;
  --sand-500: #e8a847;
  --sand-700: #ab6a26;
  --warm-900: #4a3e36;
  --warm-800: #584a41;
  --warm-700: #6d5c50;
  --warm-600: #8a7568;
  --warm-500: #a89484;
  --warm-300: #dbd0c4;
  --warm-200: #ebe4dc;
  --warm-100: #f4f0ec;
  --warm-50: #faf8f6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Floating shapes animation */
.floating-shape {
  animation: float 6s ease-in-out infinite;
}

.shape-1 { animation-delay: 0s; }
.shape-2 { animation-delay: 1.5s; }
.shape-3 { animation-delay: 3s; }
.shape-4 { animation-delay: 4.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Navbar scroll state */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(250, 248, 246, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(74, 62, 54, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terra-500);
  transition: width 0.3s ease;
}

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

/* Mobile menu */
#mobileMenu {
  left: 0;
}

#mobileMenu.open {
  transform: translateX(0);
}

#mobileMenu.closed {
  transform: translateX(-100%);
}

.menu-line {
  transition: all 0.3s ease;
}

#mobileMenuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#mobileMenuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

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

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

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

/* Service cards */
.service-card {
  transform: translateY(0);
  transition: transform 0.5s ease, box-shadow 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}

.service-card:hover {
  transform: translateY(-8px);
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(74, 62, 54, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
}

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

/* Reveal animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

::-webkit-scrollbar-track {
  background: var(--warm-100);
}

::-webkit-scrollbar-thumb {
  background: var(--warm-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--warm-500);
}

/* Selection */
::selection {
  background: rgba(217, 79, 54, 0.15);
  color: var(--warm-900);
}
