/* =============================================
   EFFECTS — 3D, Animations, Interactive Feel
   ============================================= */

/* ---- GLOW CURSOR FOLLOWER ---- */
.glow-cursor {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  will-change: transform;
  opacity: 0;
}

.glow-cursor.active {
  opacity: 1;
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for grids */
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
.reveal-delay-4 { transition-delay: 0.24s; }
.reveal-delay-5 { transition-delay: 0.30s; }
.reveal-delay-6 { transition-delay: 0.36s; }

/* ---- 3D CARD TILT ---- */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99),
              box-shadow 0.4s ease;
}

.tilt-card .card-inner,
.tilt-card > * {
  transform: translateZ(20px);
}

/* ---- MAGNETIC BUTTON ---- */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
  will-change: transform;
}

.hero .magnetic-btn,
.hero-ctas .magnetic-btn {
  transition: none !important;
  will-change: auto !important;
  transform: none !important;
}

/* ---- HERO PARALLAX ---- */
.parallax-wrapper {
  position: relative;
  overflow: hidden;
}

.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ---- ANIMATED GRADIENT TEXT ---- */
.gradient-animated {
  background: linear-gradient(
    90deg,
    #22C55E 0%,
    #10B981 25%,
    #3B82F6 50%,
    #10B981 75%,
    #22C55E 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}

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

/* ---- FLOATING ORB (hero bg) ---- */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  animation: orbFloat 8s ease-in-out infinite;
}

.floating-orb.orb-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(34,197,94,0.08) 0%, transparent 70%);
  top: -80px;
  left: 10%;
  animation-duration: 7s;
}

.floating-orb.orb-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  top: 40px;
  right: 15%;
  animation-duration: 9s;
  animation-delay: -2s;
}

.floating-orb.orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(167,139,250,0.05) 0%, transparent 70%);
  bottom: -60px;
  left: 30%;
  animation-duration: 10s;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-15px, 10px) scale(0.95); }
}

/* ---- STAT NUMBER COUNT-UP GLOW ---- */
.num-counted {
  position: relative;
}

.num-counted::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 8px;
  background: rgba(34,197,94,0.08);
  opacity: 0;
  animation: countGlow 0.6s ease forwards;
}

@keyframes countGlow {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.2); }
}

/* ---- CARD SHIMMER ON HOVER ---- */
.firm-card::before,
.category-card::before,
.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.02) 50%,
    transparent 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.firm-card:hover::before,
.category-card:hover::before,
.blog-card:hover::before {
  left: 100%;
}

/* ---- NAV LINK HOVER UNDERLINE ---- */
.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 1px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%;
  left: 20%;
}

/* ---- STEP CONNECTOR LINE ---- */
.steps {
  position: relative;
}

.step {
  position: relative;
}

/* ---- CTA BANNER GLOW ---- */
.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.1) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
  animation: ctaPulse 5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* ---- BADGE SHIMMER ---- */
.badge-green {
  position: relative;
  overflow: hidden;
}

.badge-green::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.15), transparent);
  animation: badgeShimmer 3s ease-in-out infinite;
}

@keyframes badgeShimmer {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* ---- FIRM CARD ROW ENTRANCE ---- */
.firm-card-row {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.firm-card-row.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---- FOOTER WAVE TOP ---- */
.footer {
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%230C1220' d='M0,30 C360,60 1080,0 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: cover;
}

/* ---- SMOOTH PAGE TRANSITION ---- */
body {
  animation: pageIn 0.4s ease;
}

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

/* ---- RANKING NUMBER PULSE ---- */
.card-rank.top-3 {
  animation: rankPulse 2s ease-in-out infinite;
}

@keyframes rankPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(34,197,94,0.15); }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .glow-cursor { display: none; }
  .floating-orb { animation: none; }
}
