/* ============================================
   Hair by Ashley Kantola — Custom Styles
   Premium Dark Luxury Theme
   ============================================ */

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(212, 168, 83, 0.3);
  color: #faf9f6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050505;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #064e3b, #d4a853);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #047857, #c9a227);
}

/* Reveal Animations — Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 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; }
}

/* Reduced motion fallback — content always visible */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Navbar glass effect */
#navbar.scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

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

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

/* Hamburger animation */
.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(5px, -5px);
}

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

#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; }

/* Gold shimmer effect on hover for CTA buttons */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Floating cards animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(var(--rotate, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rotate, 0deg)); }
}

/* Back to top button */
#backToTop.visible {
  opacity: 1;
  pointer-events: all;
}

/* Image hover zoom wrapper */
.group img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Service card hover glow */
.group:hover {
  box-shadow: 0 0 60px rgba(212, 168, 83, 0.05);
}

/* Gold line decoration */
.gold-line {
  background: linear-gradient(90deg, transparent, #d4a853, transparent);
}

/* Custom select styling */
select option {
  background: #0a0a0a;
  color: #f5f3ed;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #d4a853;
  outline-offset: 2px;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Prevent layout shift on images */
img {
  content-visibility: auto;
}
