/* ============================================================
   AHALYA INVESTMENT LLC — ANIMATIONS & KEYFRAMES
   ============================================================ */

/* ── Fade Animations ─────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

/* ── Slide Animations ────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

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

/* ── Scale Animations ────────────────────────────────────── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Rotation ─────────────────────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes rotateBounce {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(15deg); }
  75%  { transform: rotate(-15deg); }
  100% { transform: rotate(0deg); }
}

/* ── Water Drop / Loading ─────────────────────────────────── */
@keyframes waterDrop {
  0%   { transform: translateY(-20px) scale(0.8); opacity: 0; }
  60%  { transform: translateY(0) scale(1.1); opacity: 1; }
  80%  { transform: translateY(-5px) scale(0.95); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes ripple {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes dropletFall {
  0%   { transform: translateY(-100px) rotate(-45deg); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(60px) rotate(-45deg); opacity: 0; }
}

/* ── Wave Animation ──────────────────────────────────────── */
@keyframes wave {
  0%   { transform: translateX(0) scaleY(1); }
  50%  { transform: translateX(-25%) scaleY(0.8); }
  100% { transform: translateX(-50%) scaleY(1); }
}

@keyframes waveReverse {
  0%   { transform: translateX(0) scaleY(1); }
  50%  { transform: translateX(25%) scaleY(0.85); }
  100% { transform: translateX(50%) scaleY(1); }
}

/* ── Floating / Bob ──────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-15px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-10px) rotate(2deg); }
  66%       { transform: translateY(-5px) rotate(-2deg); }
}

/* ── Shimmer / Skeleton ──────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Glow Pulse ──────────────────────────────────────────── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(14,165,233,0.3); }
  50%       { box-shadow: 0 0 50px rgba(14,165,233,0.7), 0 0 80px rgba(14,165,233,0.3); }
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(14,165,233,0.3); }
  50%       { text-shadow: 0 0 30px rgba(14,165,233,0.8), 0 0 60px rgba(14,165,233,0.4); }
}

/* ── Border Glow ─────────────────────────────────────────── */
@keyframes borderGlow {
  0%, 100% { border-color: rgba(14,165,233,0.3); }
  50%       { border-color: rgba(14,165,233,0.8); }
}

/* ── Marquee ─────────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Progress Bar ────────────────────────────────────────── */
@keyframes progressGrow {
  from { width: 0; }
  to   { width: var(--progress-width, 100%); }
}

/* ── Bounce ──────────────────────────────────────────────── */
@keyframes bounce {
  0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
  50%       { transform: translateY(-20px); animation-timing-function: cubic-bezier(0.8,0,1,1); }
}

/* ── Checkmark Draw ──────────────────────────────────────── */
@keyframes drawCheck {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}

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

/* ── Hero Text Reveal ────────────────────────────────────── */
@keyframes heroReveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  to   { clip-path: inset(0 0% 0 0); opacity: 1; }
}

/* ── Loading Screen ──────────────────────────────────────── */
@keyframes loaderLine {
  0%   { width: 0%; left: 0; }
  50%  { width: 100%; left: 0; }
  100% { width: 0%; left: 100%; }
}

@keyframes loaderFadeOut {
  from { opacity: 1; visibility: visible; }
  to   { opacity: 0; visibility: hidden; }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40%            { transform: scale(1.2); opacity: 1; }
}

/* ── Counter Number Roll ─────────────────────────────────── */
@keyframes numberRoll {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Arrow Bounce ────────────────────────────────────────── */
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%       { transform: translateY(8px) rotate(45deg); }
}

/* ── Card Hover Lift ──────────────────────────────────────── */
@keyframes cardLift {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-8px) scale(1.02); }
}

/* ── Gradient Shift ──────────────────────────────────────── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ──────────────────────────────────────────────────────────
   UTILITY ANIMATION CLASSES
   ──────────────────────────────────────────────────────── */

.animate-fadeIn        { animation: fadeIn 0.6s ease both; }
.animate-fadeInUp      { animation: fadeInUp 0.7s ease both; }
.animate-fadeInDown    { animation: fadeInDown 0.7s ease both; }
.animate-fadeInLeft    { animation: fadeInLeft 0.7s ease both; }
.animate-fadeInRight   { animation: fadeInRight 0.7s ease both; }
.animate-scaleIn       { animation: scaleIn 0.5s var(--easing-spring) both; }
.animate-float         { animation: float 4s ease-in-out infinite; }
.animate-floatSlow     { animation: floatSlow 6s ease-in-out infinite; }
.animate-spin          { animation: spin 1.2s linear infinite; }
.animate-bounce        { animation: bounce 1.5s infinite; }
.animate-pulse         { animation: scalePulse 2.5s ease-in-out infinite; }
.animate-shimmer {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% auto;
  animation: shimmer 1.8s linear infinite;
}

/* Delay utilities */
.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }
.delay-600  { animation-delay: 0.6s; }
.delay-700  { animation-delay: 0.7s; }
.delay-800  { animation-delay: 0.8s; }

/* ── Scroll Reveal (initial hidden state for JS to reveal) ─ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--easing-smooth), transform 0.7s var(--easing-smooth);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--easing-smooth), transform 0.7s var(--easing-smooth);
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--easing-smooth), transform 0.7s var(--easing-smooth);
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.7s var(--easing-smooth), transform 0.7s var(--easing-smooth);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ── Hover Micro-interactions ─────────────────────────────── */
.hover-lift {
  transition: transform 0.3s var(--easing-spring), box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform 0.3s var(--easing-spring);
}
.hover-scale:hover {
  transform: scale(1.04);
}

.hover-glow:hover {
  box-shadow: var(--shadow-accent);
}

/* ── Loading Screen ──────────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-loading);
  background: var(--dark-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
  overflow: hidden;
}
#loading-screen::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.1), transparent 60%);
  animation: rotateGradient 15s linear infinite;
}
@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem 4rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  animation: floatLoader 4s ease-in-out infinite;
}
@keyframes floatLoader {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.logo-glow {
  position: relative;
  display: inline-block;
  background: var(--white);
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}
.logo-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.4);
  opacity: 0.5;
  animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.05); }
}
.loader-logo {
  width: 140px;
  position: relative;
  z-index: 2;
  display: block;
}
.loader-text {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--gray-300);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeText 2s infinite;
}
@keyframes fadeText {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.loader-bar-wrap {
  width: 260px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.loader-bar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px var(--accent);
}
.loader-ripple {
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmerRipple 1.5s infinite linear;
}
@keyframes shimmerRipple {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.loader-percentage {
  margin-top: 1rem;
  font-family: var(--font-mono, monospace);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--white);
  text-shadow: 0 0 20px rgba(14, 165, 233, 0.8);
}

/* ── Scroll Progress Bar ─────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-accent);
  z-index: calc(var(--z-sticky) + 1);
  transition: width 0.1s linear;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ── Floating Buttons ─────────────────────────────────────── */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: var(--z-overlay);
}
.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-bounce);
  position: relative;
  overflow: visible;
}
.floating-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: ripple 2s ease-out infinite;
}
.floating-btn-whatsapp { background: #25D366; }
.floating-btn-whatsapp::before { background: rgba(37,211,102,0.4); }
.floating-btn-call { background: var(--accent); }
.floating-btn-call::before { background: rgba(14,165,233,0.4); }
.floating-btn:hover { transform: scale(1.15) translateY(-3px); }

.floating-btn .tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark);
  color: var(--white);
  font-size: var(--text-xs);
  font-family: var(--font-body);
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.floating-btn:hover .tooltip { opacity: 1; }

/* ── Back To Top ──────────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}

/* ── Wave Section Divider ────────────────────────────────── */
.wave-divider {
  position: relative;
  overflow: hidden;
}
.wave-divider svg {
  display: block;
  width: 100%;
}

/* ── Animated Gradient Text ──────────────────────────────── */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-animated {
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s linear infinite;
}

/* ── Typing Cursor ───────────────────────────────────────── */
.typed-cursor {
  color: var(--accent);
  font-weight: var(--weight-light);
}
