/* ============================================
   Sarah Miller Beauty & Hair Salon
   Custom Styles
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #F5F2EB;
}
::-webkit-scrollbar-thumb {
  background: #8fb896;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2D5A3D;
}

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

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

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

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(253, 252, 250, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(45, 90, 61, 0.08);
}

.nav-scrolled .nav-logo-text {
  color: #1c3a26 !important;
}

/* Book button in nav */
.btn-book-nav {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: #2D5A3D;
  color: #FDFCFA;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.3s ease;
}

.btn-book-nav:hover {
  background: #244a31;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45, 90, 61, 0.3);
}

/* Mobile menu */
.mobile-nav-link {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 300;
  color: #1c3a26;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

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

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

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

/* Hamburger animation */
#menu-icon.active #line1 {
  transform: rotate(45deg) translate(3px, 3px);
}
#menu-icon.active #line2 {
  opacity: 0;
  transform: translateX(10px);
}
#menu-icon.active #line3 {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* --- Hero --- */
.hero-subtitle {
  animation: fadeUp 0.8s ease forwards;
  opacity: 0;
}

.hero-title {
  animation: fadeUp 0.8s ease 0.15s forwards;
  opacity: 0;
}

.hero-desc {
  animation: fadeUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.hero-card-main {
  animation: floatIn 1s ease 0.4s forwards;
  opacity: 0;
  transform: translateX(40px);
}

.stat-card-1 {
  animation: floatIn 0.8s ease 0.6s forwards, gentleFloat 4s ease-in-out 1.4s infinite;
  opacity: 0;
  transform: translateX(-30px);
}

.stat-card-2 {
  animation: floatIn 0.8s ease 0.75s forwards, gentleFloat 4.5s ease-in-out 1.55s infinite;
  opacity: 0;
  transform: translateX(30px);
}

.stat-card-3 {
  animation: floatIn 0.8s ease 0.9s forwards, gentleFloat 5s ease-in-out 1.7s infinite;
  opacity: 0;
  transform: translateY(20px);
}

.stat-card-4 {
  animation: floatIn 0.8s ease 1.05s forwards, gentleFloat 3.5s ease-in-out 1.85s infinite;
  opacity: 0;
  transform: scale(0.8);
}

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

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Scroll line animation */
.scroll-line {
  animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -16px; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 32px; opacity: 0; }
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: #2D5A3D;
  color: #FDFCFA;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #244a31;
  border-radius: 100px;
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: 0;
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 90, 61, 0.3);
}

.btn-primary-arrow {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-primary-arrow {
  transform: translateX(4px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  background: transparent;
  color: #2D5A3D;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  border: 1px solid #bdd4c0;
  transition: all 0.4s ease;
}

.btn-secondary:hover {
  background: #2D5A3D;
  color: #FDFCFA;
  border-color: #2D5A3D;
  transform: translateY(-2px);
}

/* --- Section Styles --- */
.section-label {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8fb896;
}

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  color: #1c3a26;
}

.section-desc {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: #5e4428;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

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

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2D5A3D, #8fb896);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

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

/* --- Link Underline --- */
.link-underline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: #2D5A3D;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #2D5A3D;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.link-underline:hover {
  color: #244a31;
}

/* --- Input Fields --- */
.input-field {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #1c3a26;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e8e2d4;
  padding: 12px 0;
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
}

.input-field::placeholder {
  color: #d4cbb8;
}

.input-field:focus {
  border-bottom-color: #2D5A3D;
}

.input-field:focus {
  border-bottom-color: #2D5A3D;
}

/* --- Testimonial Cards --- */
.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-float {
    display: none;
  }

  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
