/* ============================================
   Hair Haven — Custom Styles
   Bold editorial | Terracotta + Sand
   ============================================ */

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

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

body {
  margin: 0;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: #d4502e;
  color: #FAF5EF;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF5EF;
}
::-webkit-scrollbar-thumb {
  background: #d4502e30;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4502e60;
}

/* --- Header --- */
#main-header {
  background: rgba(250, 245, 239, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(107, 94, 86, 0.08);
}

#main-header.scrolled {
  box-shadow: 0 1px 20px rgba(58, 34, 24, 0.06);
}

/* --- Navigation Links --- */
.nav-link {
  position: relative;
}

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

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

/* --- Mobile Menu --- */
.mobile-menu {
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.active {
  pointer-events: all;
  opacity: 1;
}

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

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

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

/* --- Menu Toggle --- */
#menu-toggle.active .menu-line:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* --- Hero Animations --- */
.hero-eyebrow {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.2s;
}

.hero-headline {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.4s;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.6s;
}

.hero-ctas {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.8s;
}

.hero-image-wrapper {
  opacity: 0;
  transform: translateX(24px);
  animation: slideLeft 0.8s ease forwards;
  animation-delay: 0.5s;
}

.hero-accent-card {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 1s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Scroll Dot --- */
@keyframes scrollDot {
  0% { top: 0; opacity: 1; }
  100% { top: 24px; opacity: 0; }
}

.scroll-dot {
  animation: scrollDot 1.4s ease-in-out infinite;
}

/* --- Section Eyebrow --- */
.section-eyebrow {
  display: block;
}

/* --- Section Title --- */
.section-title {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Section Desc --- */
.section-desc {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Service Cards --- */
.service-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Gallery Items --- */
.gallery-item {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s ease, transform 0.6s ease;
  cursor: pointer;
}

.gallery-item.visible {
  opacity: 1;
  transform: scale(1);
}

.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }

/* --- CTA Buttons --- */
.cta-primary {
  position: relative;
  overflow: hidden;
}

.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-primary:hover::before {
  opacity: 1;
}

.cta-secondary {
  position: relative;
}

.cta-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(212, 80, 46, 0.06);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.cta-secondary:hover::before {
  opacity: 1;
}

/* --- Input Focus --- */
input:focus,
select:focus,
textarea:focus {
  border-color: #d4502e !important;
  box-shadow: 0 0 0 3px rgba(212, 80, 46, 0.1);
}

/* --- Responsive --- */
@media (max-width: 767px) {
  .hero-headline {
    font-size: 2.75rem !important;
  }

  .hero-accent-card {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 16px;
    max-width: 100%;
  }

  .about-img-secondary {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 12px;
    width: 100%;
  }

  .section-title {
    font-size: 2.5rem !important;
  }
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: 4rem !important;
  }
}

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 4.5rem !important;
  }
}

@media (min-width: 1280px) {
  .hero-headline {
    font-size: 5rem !important;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: no-preference) {
  .service-card,
  .section-title,
  .section-desc,
  .gallery-item {
    will-change: opacity, transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .service-card,
  .section-title,
  .section-desc,
  .gallery-item {
    opacity: 1;
    transform: none;
  }
}
