/* ============================================
   Family Acupuncture Clinic — Custom Styles
   ============================================ */

/* Base & Typography */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fafaf9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Selection */
::selection {
  background: rgba(13, 148, 136, 0.2);
  color: #042f2e;
}

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

#navbar.scrolled {
  background: rgba(4, 47, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-logo-text {
  color: #ffffff;
}

.nav-subtitle-text {
  color: #5eead4;
}

.nav-link-text {
  color: rgba(255, 255, 255, 0.8);
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-link-text {
  color: #ffffff;
}

#navbar.scrolled .nav-subtitle-text {
  color: #5eead4;
}

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

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

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

/* Menu button animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.25rem;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }
.hero-anim:nth-child(5) { animation-delay: 1.0s; }

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

/* ============================================
   Floating Decorations
   ============================================ */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes floatMedium {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

@keyframes bounceSlow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.animate-float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-float-medium {
  animation: floatMedium 5s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulseSlow 4s ease-in-out infinite;
}

.animate-bounce-slow {
  animation: bounceSlow 2.5s ease-in-out infinite;
}

/* ============================================
   Scroll Reveal (below the fold only)
   ============================================ */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .hero-anim {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .animate-float-slow,
  .animate-float-medium,
  .animate-pulse-slow,
  .animate-bounce-slow {
    animation: none;
  }
}

/* ============================================
   Card Hover Effects
   ============================================ */
.group:hover .group-hover\:bg-teal-600 {
  transition: background-color 0.5s ease;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
  outline: none;
}

/* ============================================
   Utility
   ============================================ */
.font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-sans {
  font-family: 'Inter', system-ui, sans-serif;
}
