/* ==========================================================================
   iSolution India — Kinetic Animations & Micro-Interactions
   ========================================================================== */

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 10px var(--primary-container);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.15);
    box-shadow: 0 0 18px var(--primary);
  }
}

@keyframes scroll-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Scroll Reveal Classes (via IntersectionObserver)
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.reveal-delay-1 {
  transition-delay: 100ms;
}

.reveal-delay-2 {
  transition-delay: 200ms;
}

.reveal-delay-3 {
  transition-delay: 300ms;
}

.reveal-delay-4 {
  transition-delay: 400ms;
}

/* --------------------------------------------------------------------------
   Micro-Interactions & Hover States
   -------------------------------------------------------------------------- */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-zoom-img {
  overflow: hidden;
}

.hover-zoom-img img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.interactive-glow {
  position: relative;
  overflow: hidden;
}

.interactive-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(5, 195, 221, 0.15), transparent 60%);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  pointer-events: none;
}

.interactive-glow:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   Dynamic Cursor (from animations-demo.html)
   ========================================================================== */
.custom-cursor-dot,
.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.custom-cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--primary-container, #05c3dd);
  box-shadow: 0 0 12px #05c3dd, 0 0 24px rgba(5, 195, 221, 0.6);
  transition: transform 0.12s ease-out, background-color 0.2s ease, opacity 0.3s ease;
}

.custom-cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(5, 195, 221, 0.65);
  background: rgba(5, 195, 221, 0.05);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              background-color 0.25s ease,
              box-shadow 0.25s ease,
              opacity 0.3s ease;
}

/* Cursor Hover & Active States */
body.is-hovering .custom-cursor-ring {
  width: 62px;
  height: 62px;
  border-color: #38e1f8;
  background: rgba(5, 195, 221, 0.14);
  box-shadow: 0 0 24px rgba(5, 195, 221, 0.45);
}

body.is-hovering .custom-cursor-dot {
  transform: translate(-50%, -50%) scale(1.6);
  background: #ffffff;
  box-shadow: 0 0 16px #38e1f8;
}

body.is-clicking .custom-cursor-ring {
  width: 26px;
  height: 26px;
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

body.is-clicking .custom-cursor-dot {
  transform: translate(-50%, -50%) scale(0.7);
}

/* Light Mode Overrides for Cursor */
html.light .custom-cursor-dot {
  background: #0284a2;
  box-shadow: 0 0 10px rgba(2, 132, 162, 0.5);
}

html.light .custom-cursor-ring {
  border-color: rgba(2, 132, 162, 0.7);
  background: rgba(2, 132, 162, 0.06);
}

html.light body.is-hovering .custom-cursor-ring {
  border-color: #0284a2;
  background: rgba(2, 132, 162, 0.12);
  box-shadow: 0 0 18px rgba(2, 132, 162, 0.3);
}

html.light body.is-hovering .custom-cursor-dot {
  background: #005f73;
}

html.light body.is-clicking .custom-cursor-ring {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.2);
}

/* Disable on touch devices */
@media (pointer: coarse), (hover: none) {
  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }
}

/* ==========================================================================
   Kinetic Graphic Shapes & Animations (Home Page)
   ========================================================================== */

/* Ambient Orb Living Kinetic Pulse */
@keyframes kinetic-orb-drift-1 {
  0%, 100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 0.8;
  }
  33% {
    transform: translate(-46%, -25px) scale(1.08);
    opacity: 1;
  }
  66% {
    transform: translate(-54%, 15px) scale(0.95);
    opacity: 0.75;
  }
}

@keyframes kinetic-orb-drift-2 {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translate(-35px, -30px) scale(1.15) rotate(15deg);
    opacity: 0.95;
  }
}

.ambient-glow-top {
  animation: kinetic-orb-drift-1 16s ease-in-out infinite;
}

.ambient-glow-right {
  animation: kinetic-orb-drift-2 20s ease-in-out infinite;
}

/* Floating Geometric Graphic Badges & Rings */
@keyframes kinetic-float-smooth {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(2deg);
  }
}

@keyframes kinetic-float-reverse {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(14px) rotate(-2.5deg);
  }
}

@keyframes kinetic-spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-kinetic-shape {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  opacity: 0.65;
}

.hero-shape-ring {
  width: 340px;
  height: 340px;
  border: 1.5px dashed rgba(5, 195, 221, 0.22);
  top: 12%;
  left: 4%;
  animation: kinetic-spin-slow 45s linear infinite, kinetic-float-smooth 8s ease-in-out infinite;
}

.hero-shape-ring-2 {
  width: 250px;
  height: 250px;
  border: 1px solid rgba(69, 229, 252, 0.16);
  bottom: 8%;
  right: 5%;
  animation: kinetic-spin-slow 35s linear infinite reverse, kinetic-float-reverse 9s ease-in-out infinite;
}

.hero-floating-badge {
  position: absolute;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: rgba(13, 20, 30, 0.75);
  border: 1px solid var(--border-accent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 18px rgba(5, 195, 221, 0.16);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-pure);
  pointer-events: none;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html.light .hero-floating-badge {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(2, 132, 162, 0.35);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08), 0 0 14px rgba(2, 132, 162, 0.12);
  color: var(--text-pure);
}

.hero-badge-left {
  top: 24%;
  left: 5%;
  animation: kinetic-float-smooth 6.5s ease-in-out infinite;
}

.hero-badge-right {
  top: 34%;
  right: 5%;
  animation: kinetic-float-reverse 7.5s ease-in-out infinite;
}

@media (max-width: 1100px) {
  .hero-floating-badge,
  .hero-shape-ring,
  .hero-shape-ring-2 {
    display: none !important;
  }
}

/* 3D Tilt Cards with Specular Glare (from animations-demo.html) */
[data-tilt="true"] {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
  transition: transform 0.18s ease-out, border-color var(--transition-fast), box-shadow var(--transition-fast);
  will-change: transform;
}

.card-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.14) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: overlay;
  z-index: 2;
}

[data-tilt="true"]:hover .card-glare {
  opacity: 1;
}

html.light .card-glare {
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(2, 132, 162, 0.15) 0%, transparent 60%);
  mix-blend-mode: multiply;
}

/* Sparkline Drawing & Kinetic Peak Glow */
@keyframes dash-draw {
  from {
    stroke-dashoffset: 200;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes peak-pulse {
  0%, 100% {
    r: 3.5;
    fill: #05c3dd;
    filter: drop-shadow(0 0 4px #05c3dd);
  }
  50% {
    r: 5.5;
    fill: #ffffff;
    filter: drop-shadow(0 0 10px #05c3dd);
  }
}

.kinetic-sparkline-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 0;
  animation: dash-draw 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.kinetic-sparkline-peak {
  animation: peak-pulse 2s ease-in-out infinite;
}

/* Kinetic Sound/Frequency Reaction Bars */
.reaction-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.reaction-bar {
  width: 3px;
  background: var(--primary, #05c3dd);
  border-radius: 99px;
  animation: sound-wave 1.2s ease-in-out infinite alternate;
}

.reaction-bar:nth-child(1) { height: 35%; animation-delay: 0.1s; }
.reaction-bar:nth-child(2) { height: 75%; animation-delay: 0.35s; }
.reaction-bar:nth-child(3) { height: 100%; animation-delay: 0.15s; }
.reaction-bar:nth-child(4) { height: 55%; animation-delay: 0.45s; }
.reaction-bar:nth-child(5) { height: 85%; animation-delay: 0.25s; }

@keyframes sound-wave {
  0% { transform: scaleY(0.3); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* Kinetic Radar Ripple on SEO Map Pin */
@keyframes radar-ripple {
  0% {
    transform: scale(0.8);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.radar-ripple-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.radar-ripple-box::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--secondary);
  animation: radar-ripple 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

/* Magnetic Button Transition */
[data-magnetic="true"] {
  display: inline-flex;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* ==========================================================================
   Kinetic Typography / Heading Animation
   ========================================================================== */

/* Liquid Shimmer Kinetic Gradient */
@keyframes kinetic-gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 22%, var(--secondary) 48%, #818cf8 74%, var(--primary-container) 100%) !important;
  background-size: 260% 260% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
  animation: kinetic-gradient-flow 5s ease-in-out infinite alternate;
  text-shadow: 0 0 30px rgba(5, 195, 221, 0.28);
  position: relative;
}

html.light .gradient-text {
  background: linear-gradient(135deg, #0284a2 0%, #007791 28%, #0284c7 56%, #005f73 100%) !important;
  background-size: 260% 260% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: kinetic-gradient-flow 5s ease-in-out infinite alternate;
  text-shadow: none;
}

/* Kinetic Word Masks & Stagger Entrance */
.kinetic-phrase-wrap {
  display: inline-block;
  position: relative;
}

.kinetic-word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.15em;
  line-height: 1.15;
}

.kinetic-word {
  display: inline-block;
  transform: translateY(115%) rotate(3deg);
  opacity: 0;
  filter: blur(5px);
  transform-origin: bottom left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
  cursor: default;
}

.kinetic-heading.kinetic-revealed .kinetic-word {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
  filter: blur(0);
}

/* Kinetic Accent Underline */
.kinetic-underline {
  position: relative;
  display: inline-block;
}

.kinetic-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
  box-shadow: 0 0 12px var(--primary);
}

.kinetic-heading.kinetic-revealed .kinetic-underline::after {
  transform: scaleX(1);
}

html.light .kinetic-underline::after {
  background: linear-gradient(90deg, #0284a2, #007791);
  box-shadow: 0 0 8px rgba(2, 132, 162, 0.4);
}

/* ==========================================================================
   BTN-02: Spark & Confetti Particle Burst Button Effect (from animations-demo.html)
   ========================================================================== */

.btn-fx-btn-02,
[data-btn-fx="btn-02"],
.site-header .btn-primary,
.mobile-drawer .btn-primary,
.btn-whatsapp {
  position: relative;
  overflow: hidden !important;
  user-select: none;
  cursor: pointer;
}

.btn-fx-btn-02::before,
[data-btn-fx="btn-02"]::before,
.site-header .btn-primary::before,
.mobile-drawer .btn-primary::before,
.btn-whatsapp::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2;
}

.btn-fx-btn-02:hover::before,
[data-btn-fx="btn-02"]:hover::before,
.site-header .btn-primary:hover::before,
.mobile-drawer .btn-primary:hover::before,
.btn-whatsapp:hover::before {
  left: 220%;
}

.btn-fx-btn-02:active,
[data-btn-fx="btn-02"]:active,
.site-header .btn-primary:active,
.mobile-drawer .btn-primary:active,
.btn-whatsapp:active {
  transform: scale(0.97);
}

/* Strictly exclude channel-whatsapp from any button shine / sweep */
.channel-whatsapp::before,
.channel-whatsapp::after,
.channel-whatsapp:hover::before,
.channel-whatsapp:hover::after,
.channel-whatsapp *:before,
.channel-whatsapp *:after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
  transition: none !important;
  background: none !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Spark Particle Canvas Overlay */
#fxSparkCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999999;
}

/* --------------------------------------------------------------------------
   Reduced Motion Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .kinetic-word {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }

  .gradient-text {
    animation: none !important;
  }

  .kinetic-underline::after {
    transform: scaleX(1) !important;
    transition: none !important;
  }
}
