/* ===========================
   HOLISTIC TRANSCENDENCE ANIMATIONS
   Modern CSS Animations for Enhanced User Experience
   =========================== */

/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
  --animation-duration-fast: 0.8s;
  --animation-duration-normal: 1.2s;
  --animation-duration-slow: 1.8s;
  --animation-easing: cubic-bezier(0.165, 0.84, 0.44, 1);
  --animation-easing-gentle: cubic-bezier(0.23, 1, 0.32, 1);
  --animation-easing-zen: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ===========================
   SCROLL-TRIGGERED ANIMATIONS
   =========================== */

/* Gentle entrance animations for calming effect */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Scroll-triggered animation classes - gentle and calming */
.animate-on-scroll {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity var(--animation-duration-normal) var(--animation-easing-zen),
              transform var(--animation-duration-normal) var(--animation-easing-zen);
  will-change: opacity, transform;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.fade-up {
  animation: fadeInUp var(--animation-duration-slow) var(--animation-easing-zen) forwards;
}

.fade-left {
  animation: fadeInLeft var(--animation-duration-slow) var(--animation-easing-zen) forwards;
}

.fade-right {
  animation: fadeInRight var(--animation-duration-slow) var(--animation-easing-zen) forwards;
}

.fade-scale {
  animation: fadeInScale var(--animation-duration-slow) var(--animation-easing-gentle) forwards;
}

.slide-up {
  animation: slideInUp var(--animation-duration-slow) var(--animation-easing-zen) forwards;
}

/* Stagger animations for groups - meditative and peaceful */
.stagger-children > * {
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition: opacity var(--animation-duration-normal) var(--animation-easing-gentle),
              transform var(--animation-duration-normal) var(--animation-easing-gentle);
  will-change: opacity, transform;
}

.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 0.3s; }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 0.6s; }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 0.9s; }
.stagger-children.animate-in > *:nth-child(5) { transition-delay: 1.2s; }
.stagger-children.animate-in > *:nth-child(6) { transition-delay: 1.5s; }

.stagger-children.animate-in > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ===========================
   CONTINUOUS ANIMATIONS
   =========================== */

/* Gentle continuous animations for zen feeling */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.01);
    opacity: 0.95;
  }
}

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

.float-gentle {
  animation: floatGentle 10s ease-in-out infinite;
}

.pulse {
  animation: pulse 6s ease-in-out infinite;
}

.breathe {
  animation: breathe 8s ease-in-out infinite;
}

/* ===========================
   HOVER EFFECTS
   =========================== */

/* Gentle button hover effects */
.btn {
  position: relative;
  overflow: hidden;
  transition: all var(--animation-duration-fast) var(--animation-easing-gentle);
  transform: translateY(0);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left var(--animation-duration-slow) var(--animation-easing-gentle);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(0px);
  transition-duration: 0.2s;
}

/* Gentle card hover effects */
.content-box {
  transition: all var(--animation-duration-fast) var(--animation-easing-gentle);
  transform: translateY(0);
}

.content-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.content-box .img-box {
  border-radius: 8px;
}

.content-box .img-box img {
  transition: transform var(--animation-duration-slow) var(--animation-easing-gentle);
}

.content-box:hover .img-box img {
  transform: scale(1.03);
}

/* Gentle image hover effects */
.img-hover-zoom {
  overflow: hidden;
  border-radius: 8px;
}

.img-hover-zoom img {
  transition: transform var(--animation-duration-slow) var(--animation-easing-gentle);
}

.img-hover-zoom:hover img {
  transform: scale(1.02);
}

/* Link hover effects */
.links {
  position: relative;
  transition: all var(--animation-duration-fast) var(--animation-easing);
}

.links::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width var(--animation-duration-fast) var(--animation-easing);
}

.links:hover::after {
  width: 100%;
}

.links:hover {
  color: #606D62;
}

/* ===========================
   FORM ANIMATIONS
   =========================== */

.form-group {
  position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
  transition: all var(--animation-duration-fast) var(--animation-easing);
  border: 1px solid rgba(175, 188, 172, 0.2);
  background-color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #AFBCAC;
  background-color: #fff;
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(175, 188, 172, 0.2);
}

.form-group label {
  transition: all var(--animation-duration-fast) var(--animation-easing);
}

.form-group input:focus + label,
.form-group select:focus + label,
.form-group textarea:focus + label {
  color: #606D62;
  transform: scale(1.05);
}

/* ===========================
   LOADING ANIMATIONS
   =========================== */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-load {
  animation: slideDown var(--animation-duration-normal) var(--animation-easing) forwards;
}

/* Navigation load animation - removed to prevent conflicts */

/* Hero content load animation - All Pages */
.home-hero .full-logo,
.about-hero .full-logo,
.couns-hero .full-logo,
.healing-hero .full-logo,
.life-hero .full-logo,
.psych-k-hero .full-logo,
.reiki-hero .full-logo {
  animation: fadeInScale 1.2s var(--animation-easing) 0.3s forwards;
  opacity: 0;
}

.home-hero .text-box,
.about-hero .text-box,
.couns-hero .text-box,
.healing-hero .text-box,
.life-hero .text-box,
.psych-k-hero .text-box,
.reiki-hero .text-box {
  animation: fadeInUp var(--animation-duration-slow) var(--animation-easing) 0.6s forwards;
  opacity: 0;
}

/* About page content boxes animation */
.about-hero .content-box {
  animation: fadeInRight var(--animation-duration-slow) var(--animation-easing) 0.9s forwards;
  opacity: 0;
}

/* ===========================
   TESTIMONIAL ANIMATIONS
   =========================== */

.testimonial {
  transition: all var(--animation-duration-fast) var(--animation-easing);
}

.testimonial:hover {
  transform: translateY(-5px);
}

.button-arrows {
  transition: all var(--animation-duration-fast) var(--animation-easing);
  transform: scale(1);
}

.button-arrows:hover {
  transform: scale(1.1);
  background-color: rgba(175, 188, 172, 0.1);
}

.button-arrows:active {
  transform: scale(0.95);
}

/* ===========================
   UTILITY ANIMATIONS
   =========================== */

/* Reveal animations for text */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  animation: typewriter 2s steps(40) forwards;
}

/* Smooth page transitions */
.page-transition {
  transition: all var(--animation-duration-normal) var(--animation-easing);
}

/* Scroll indicator */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.scroll-indicator {
  animation: bounce 2s infinite;
}

/* ===========================
   RESPONSIVE ANIMATIONS
   =========================== */

@media (max-width: 768px) {
  /* Reduce animation intensity on mobile */
  .btn:hover {
    transform: translateY(-2px);
  }
  
  .content-box:hover {
    transform: translateY(-4px);
  }
  
  /* Disable floating animations on mobile for performance */
  .float,
  .float-gentle,
  .pulse,
  .breathe {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Respect user's motion preferences */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .float,
  .float-gentle,
  .pulse,
  .breathe {
    animation: none !important;
  }
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* Enhanced performance optimizations for smooth scrolling */
html {
  scroll-behavior: smooth;
}

body {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Glass navbar additional styling */
.holistic-nav.nav-glass .links {
  color: rgba(0, 0, 0, 0.9);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.holistic-nav.nav-glass .nav-logo img {
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));
}

.holistic-nav.nav-glass .btn--primary {
  background-color: rgba(249, 244, 215, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(175, 188, 172, 0.3);
}

/* Optimize repaints and compositing */
.animate-on-scroll,
.stagger-children > *,
.block {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* GPU acceleration for smooth animations */
.btn,
.content-box,
.animate-on-scroll,
.testimonial,
.button-arrows {
  will-change: transform;
}

/* Optimize repaints */
.img-box img {
  backface-visibility: hidden;
  transform: translateZ(0);
} 