/* Premium Ayurveda Doctor Website Stylesheet */

/* Root styling variables and custom utility classes */
:root {
  --color-green: #2E7D32;
  --color-dark-green: #1B5E20;
  --color-light-green: #E8F5E9;
  --color-beige: #F5F0E6;
  --color-sand: #FAF6EE;
  --color-saffron: #FFB300;
  --color-dark-saffron: #F57C00;
}

/* Base resets & custom scrollbar */
html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-sand);
}

::-webkit-scrollbar-thumb {
  background: #C8E6C9;
  border-radius: 5px;
  border: 2px solid var(--color-sand);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-green);
}

/* Floating Leaf Drift Keyframes & Animations */
@keyframes leaf-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg) scale(0.6);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(110vh) translateX(100px) rotate(360deg) scale(1);
    opacity: 0;
  }
}

@keyframes leaf-sway {

  0%,
  100% {
    margin-left: 0;
  }

  50% {
    margin-left: 50px;
  }
}

.leaf-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.leaf {
  position: absolute;
  display: block;
  width: 25px;
  height: 25px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2381C784'%3E%3Cpath d='M17 8C17 11.23 15.62 14.14 13.41 16.21L12 17.59L10.59 16.21C8.38 14.14 7 11.23 7 8C7 5.24 8.76 2.89 11.2 1.34L12 0.83L12.8 1.34C15.24 2.89 17 5.24 17 8Z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
}

/* Varying leaf sizes, delays, and speeds for an organic drifting forest look */
.leaf:nth-child(1) {
  left: 10%;
  animation: leaf-fall 18s linear infinite, leaf-sway 6s ease-in-out infinite;
  animation-delay: 0s;
}

.leaf:nth-child(2) {
  left: 25%;
  animation: leaf-fall 24s linear infinite, leaf-sway 8s ease-in-out infinite;
  animation-delay: -4s;
  filter: blur(1px);
}

.leaf:nth-child(3) {
  left: 45%;
  animation: leaf-fall 20s linear infinite, leaf-sway 7s ease-in-out infinite;
  animation-delay: -2s;
}

.leaf:nth-child(4) {
  left: 65%;
  animation: leaf-fall 28s linear infinite, leaf-sway 9s ease-in-out infinite;
  animation-delay: -6s;
  filter: blur(2px);
}

.leaf:nth-child(5) {
  left: 80%;
  animation: leaf-fall 22s linear infinite, leaf-sway 6s ease-in-out infinite;
  animation-delay: -1s;
}

.leaf:nth-child(6) {
  left: 92%;
  animation: leaf-fall 26s linear infinite, leaf-sway 8s ease-in-out infinite;
  animation-delay: -3s;
}

/* Subtle Background Mandala Rotation & Breathing */
@keyframes breathe-slow {
  0% {
    transform: rotate(0deg) scale(1);
    opacity: 0.03;
  }

  50% {
    transform: rotate(180deg) scale(1.06);
    opacity: 0.07;
  }

  100% {
    transform: rotate(360deg) scale(1);
    opacity: 0.03;
  }
}

.mandala-bg {
  animation: breathe-slow 160s linear infinite;
  transform-origin: center;
  pointer-events: none;
}

/* Glassmorphism Navigation Bar & Cards */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(224, 224, 224, 0.3);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Modern CSS Scroll-Driven entry reveals with native performance */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-entry {
      from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .scroll-reveal {
      animation: reveal-entry auto ease-out both;
      animation-timeline: view();
      animation-range: entry 10% entry 35%;
    }
  }
}

/* Javascript Intersection Observer Fallback for Firefox and Older Safari */
.js-reveal {
  opacity: 1;
  transform: none;
}

body:not(.scroll-timeline-supported) .scroll-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

body:not(.scroll-timeline-supported) .scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Interactive Card Glow Effect */
.glow-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glow-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(46, 125, 50, 0.12);
  border-color: rgba(46, 125, 50, 0.2);
}

.glow-card-saffron:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(255, 179, 0, 0.12);
  border-color: rgba(255, 179, 0, 0.2);
}

/* 1. Organic Liquid Morphing Shape */
@keyframes organic-morph {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 40% 60% 70% 30% / 50% 60% 30% 70%;
  }
}

.organic-blob {
  animation: organic-morph 15s ease-in-out infinite;
  transition: all 0.5s ease-in-out;
}

/* 2. Auric Golden Energy Pulse (Ojas Aura) */
@keyframes aura-expansion {
  0% {
    box-shadow: 0 0 0 0px rgba(255, 179, 0, 0.35);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(255, 179, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0px rgba(255, 179, 0, 0);
  }
}

.aura-pulse {
  animation: aura-expansion 3.5s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

/* 3. Saffron Light sweep Shimmer for Buttons */
@keyframes shimmer-move {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.shimmer-btn {
  background: linear-gradient(90deg, #2E7D32 0%, #3e9643 35%, #2E7D32 70%, #1B5E20 100%);
  background-size: 200% auto;
  animation: shimmer-move 4.5s linear infinite;
  transition: all 0.3s ease;
}

.shimmer-btn:hover {
  animation-duration: 2s;
  box-shadow: 0 8px 24px -6px rgba(46, 125, 50, 0.4);
}

/* 4. Mouse Trail Leaf Sparkle Particle Styling */
.leaf-sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2366BB6A'%3E%3Cpath d='M17 8C17 11.23 15.62 14.14 13.41 16.21L12 17.59L10.59 16.21C8.38 14.14 7 11.23 7 8C7 5.24 8.76 2.89 11.2 1.34L12 0.83L12.8 1.34C15.24 2.89 17 5.24 17 8Z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 9999;
  animation: sparkle-float 1s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
}

@keyframes sparkle-float {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.7);
    opacity: 0.9;
  }

  100% {
    transform: translateY(-50px) translateX(25px) rotate(220deg) scale(0.1);
    opacity: 0;
  }
}

/* 5. Animated Root Creepers & Creeping Vines */
.rooty-creeper {
  position: absolute;
  top: 0;
  width: 140px;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
}

.rooty-left {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 800' fill='none' stroke='%232E7D32' stroke-width='2'%3E%3Cpath d='M10 0 C30 100, -10 200, 20 300 C-10 400, 40 500, 10 600 C-20 700, 30 800, 10 900' /%3E%3Cpath d='M15 150 C5 170, 35 190, 40 210' stroke-width='1.2' /%3E%3Cpath d='M10 350 C-5 370, -15 390, 5 410' stroke-width='1.2' /%3E%3Cpath d='M20 550 C35 570, 5 590, -5 610' stroke-width='1.2' /%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-size: contain;
  animation: sway-roots 14s ease-in-out infinite alternate;
}

.rooty-right {
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 800' fill='none' stroke='%232E7D32' stroke-width='2'%3E%3Cpath d='M90 0 C70 100, 110 200, 80 300 C110 400, 60 500, 90 600 C120 700, 70 800, 90 900' /%3E%3Cpath d='M85 150 C95 170, 65 190, 60 210' stroke-width='1.2' /%3E%3Cpath d='M90 350 C105 370, 115 390, 95 410' stroke-width='1.2' /%3E%3Cpath d='M80 550 C65 570, 95 590, 105 610' stroke-width='1.2' /%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-size: contain;
  animation: sway-roots 18s ease-in-out infinite alternate-reverse;
}

@keyframes sway-roots {
  0% {
    transform: skewX(-2.5deg) translateX(-4px);
  }

  100% {
    transform: skewX(2.5deg) translateX(4px);
  }
}