/* Bharani Stock Market — Frontend styles */

:root {
  --bharani-shadow-soft: 0 10px 30px -10px rgba(26, 34, 64, 0.18);
  --bharani-shadow-card: 0 4px 20px -4px rgba(26, 34, 64, 0.12);
  --bharani-shadow-gold: 0 20px 50px -15px rgba(212, 167, 44, 0.55);
}

html { scroll-behavior: smooth; }
body { font-feature-settings: "ss01"; }

/* Animations ---------------------------------------------------- */
@keyframes bharani-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-18px) rotate(2deg); }
}
@keyframes bharani-blob {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; transform: translate(0,0) rotate(0); }
  33% { border-radius: 65% 35% 50% 50% / 55% 35% 65% 45%; transform: translate(20px,-15px) rotate(8deg); }
  66% { border-radius: 35% 65% 40% 60% / 65% 55% 45% 35%; transform: translate(-15px,12px) rotate(-6deg); }
}
@keyframes bharani-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes bharani-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Helper classes you can add via "Advanced → Additional CSS class(es)" */
.bharani-float       { animation: bharani-float 6s ease-in-out infinite; }
.bharani-float-slow  { animation: bharani-float 9s ease-in-out infinite; }
.bharani-blob        { animation: bharani-blob 18s ease-in-out infinite; filter: blur(48px); }
.bharani-fade-up     { animation: bharani-fade-up 0.8s ease-out both; }

/* Gold gradient text */
.bharani-text-gold {
  background: linear-gradient(135deg, #ecc97a, #b8860b);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* 3D card hover (apply class "bharani-card-3d") */
.bharani-card-3d {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.bharani-card-3d:hover {
  transform: translateY(-8px) rotateX(3deg) rotateY(-3deg) scale(1.02);
  box-shadow: 0 30px 60px -20px rgba(26, 34, 64, 0.25);
}

/* Shiny button (apply class "bharani-btn-shine") */
.bharani-btn-shine { position: relative; overflow: hidden; }
.bharani-btn-shine::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: bharani-shimmer 3s linear infinite;
  pointer-events: none;
}

/* Generic hover lift for any block (apply class "bharani-hover-lift") */
.bharani-hover-lift { transition: transform .35s ease, box-shadow .35s ease; }
.bharani-hover-lift:hover { transform: translateY(-6px); box-shadow: var(--bharani-shadow-soft); }

/* Image zoom-in on hover (apply to a wp-block-image with class "bharani-zoom") */
.bharani-zoom { overflow: hidden; }
.bharani-zoom img { transition: transform .7s ease; }
.bharani-zoom:hover img { transform: scale(1.08); }

/* Live ticker dot */
.bharani-pulse-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 9999px;
  background: #1f9d55; box-shadow: 0 0 0 0 rgba(31,157,85,.5);
  animation: bharani-pulse 1.8s infinite;
}
@keyframes bharani-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31,157,85,.6); }
  70%  { box-shadow: 0 0 0 14px rgba(31,157,85,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,157,85,0); }
}

/* Underline-on-hover link */
.bharani-link-underline { position: relative; display: inline-block; }
.bharani-link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .35s ease;
}
.bharani-link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Smooth fade-in on scroll for any block with class "bharani-reveal" */
@media (prefers-reduced-motion: no-preference) {
  .bharani-reveal { animation: bharani-fade-up 0.9s ease-out both; }
}
