/* ============================================================
   ReservWise — VFX & Motion Layer
   Interactive cursor backgrounds, particle fields, magnetic
   elements, scroll reveals, ambient gradients
   ============================================================ */

/* ===== Global cursor spotlight (page-wide) ===== */
.cursor-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(76, 175, 99, 0.10),
    rgba(46, 145, 67, 0.05) 30%,
    transparent 60%
  );
  mix-blend-mode: multiply;
  transition: opacity .4s ease;
  opacity: 0;
}
.cursor-spotlight.visible { opacity: 1; }

/* On dark sections, switch to screen blend */
.bg-charcoal .cursor-spotlight,
[data-dark] .cursor-spotlight {
  mix-blend-mode: screen;
}

/* ===== Hero — animated mesh gradient backdrop ===== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-mesh {
  position: absolute;
  inset: -20%;
  z-index: -1;
  filter: blur(80px) saturate(140%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-mesh::before,
.hero-mesh::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.hero-mesh::before {
  width: 50vw; height: 50vw;
  left: -10%; top: -10%;
  background: radial-gradient(circle, #4caf63 0%, transparent 60%);
  animation: meshFloat1 22s ease-in-out infinite;
}
.hero-mesh::after {
  width: 60vw; height: 60vw;
  right: -15%; bottom: -25%;
  background: radial-gradient(circle, #a5d6a7 0%, transparent 60%);
  animation: meshFloat2 28s ease-in-out infinite;
}
.hero-mesh-3 {
  position: absolute;
  width: 35vw; height: 35vw;
  top: 30%; left: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 121, 50, 0.35) 0%, transparent 65%);
  animation: meshFloat3 18s ease-in-out infinite;
}

@keyframes meshFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(8vw, 4vh) scale(1.1); }
  66%     { transform: translate(-4vw, 8vh) scale(0.95); }
}
@keyframes meshFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-6vw, -8vh) scale(1.15); }
}
@keyframes meshFloat3 {
  0%,100% { transform: translate(-50%,-50%) scale(1) rotate(0deg); }
  50%     { transform: translate(-30%,-60%) scale(1.2) rotate(180deg); }
}

/* Hero parallax via mouse */
.hero-mesh {
  transform: translate(calc((var(--mx-pct, 0.5) - 0.5) * 30px), calc((var(--my-pct, 0.5) - 0.5) * 20px));
  transition: transform .6s cubic-bezier(.2,.6,.2,1);
}

/* ===== Particle canvas (sits behind hero copy) ===== */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.7;
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.6,.2,1), transform .9s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.6,.2,1), transform .8s cubic-bezier(.2,.6,.2,1);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: .04s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .12s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .20s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .28s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .36s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .44s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .52s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .60s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(9) { transition-delay: .68s; opacity: 1; transform: translateY(0); }

/* Scale-in reveal variant */
.reveal-scale {
  opacity: 0;
  transform: scale(.96);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.6,.2,1);
}
.reveal-scale.in {
  opacity: 1; transform: scale(1);
}

/* ===== Magnetic buttons — interactive tilt ===== */
.btn.btn-primary,
.btn.btn-secondary {
  position: relative;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.6,.2,1), box-shadow .25s, background .25s, color .25s, border-color .25s;
}
.btn.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), rgba(255,255,255,0.22), transparent 70%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.btn.btn-primary:hover::before { opacity: 1; }

.btn.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), rgba(34,121,50,0.10), transparent 70%);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.btn.btn-secondary:hover::before { opacity: 1; }

/* Pulse ring on primary CTA */
.btn-primary.btn-lg {
  position: relative;
}
.btn-primary.btn-lg::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid var(--green-400);
  opacity: 0;
  animation: pulseRing 2.6s cubic-bezier(.2,.6,.2,1) infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0%   { transform: scale(1);    opacity: 0.6; }
  70%  { transform: scale(1.18); opacity: 0;   }
  100% { transform: scale(1.18); opacity: 0;   }
}

/* ===== Card hover — tilt + shimmer ===== */
.tilt-card {
  position: relative;
  transition: transform .35s cubic-bezier(.2,.6,.2,1), box-shadow .35s ease, border-color .35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--cx, 50%) var(--cy, 50%), rgba(76, 175, 99, 0.10), transparent 50%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.tilt-card:hover::before { opacity: 1; }

/* ===== Floating ambient blobs (decorative) ===== */
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.3;
  z-index: 0;
}
.ambient-blob.b1 {
  width: 300px; height: 300px;
  background: var(--green-400);
  animation: drift1 20s ease-in-out infinite;
}
.ambient-blob.b2 {
  width: 240px; height: 240px;
  background: var(--green-200);
  animation: drift2 26s ease-in-out infinite;
}
@keyframes drift1 {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(40px,-30px); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(-35px,25px); }
}

/* ===== Number count-up styling ===== */
.count-up {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 2ch;
}

/* ===== Marquee — scrolling brand logos / text ===== */
.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 64px;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Animated underline (nav links) ===== */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--green-500);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.6,.2,1);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* ===== Logo arrow lift on hover ===== */
.nav-brand:hover svg .logo-arrow,
.logo-arrow-anim {
  animation: logoArrowPop 1.6s cubic-bezier(.2,.6,.2,1) infinite;
}
@keyframes logoArrowPop {
  0%,100% { transform: translateY(0); }
  40%     { transform: translateY(-3px); }
}

/* ===== Hero stat counters ===== */
.trust-num {
  background: linear-gradient(135deg, var(--charcoal-900) 0%, var(--green-700) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Section dividers — animated wave/line ===== */
.section-rule {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200) 25%, var(--green-200) 50%, var(--gray-200) 75%, transparent);
  background-size: 200% 100%;
  animation: rulePan 8s linear infinite;
}
@keyframes rulePan {
  from { background-position: 0% 0%; }
  to   { background-position: 200% 0%; }
}

/* ===== Live ticker dot ===== */
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  position: relative;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green-400);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0%   { transform: scale(.8); opacity: .8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ===== Number ticker on dashboard ===== */
.flicker-up {
  animation: flickerUp .6s ease-out;
}
@keyframes flickerUp {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== Breakout box — dramatic motion ===== */
.breakout-svg .break-arrow {
  animation: arrowBreak 3.4s cubic-bezier(.2,.6,.2,1) infinite;
  transform-origin: 180px 200px;
  filter: drop-shadow(0 0 12px rgba(76,175,99,0.6));
}
.breakout-svg .box-frame {
  animation: boxBreathe 4.5s ease-in-out infinite;
  transform-origin: 180px 200px;
}
@keyframes arrowBreak {
  0%,12%   { transform: translateY(14px) scale(0.96); opacity: .7; }
  45%,55%  { transform: translateY(-10px) scale(1.04); opacity: 1; }
  88%,100% { transform: translateY(14px) scale(0.96); opacity: .7; }
}
@keyframes boxBreathe {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.035); }
}
.breakout-svg .bo-glow {
  animation: bGlow 3s ease-in-out infinite;
  transform-origin: 180px 60px;
}
@keyframes bGlow {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%     { opacity: 1;   transform: scale(1.25); }
}
/* Reverberation rings — staggered expanding pulses (animates SVG r attr) */
.breakout-svg .bo-ring {
  animation: boRing 3.2s cubic-bezier(.2,.6,.2,1) infinite;
  transform-origin: 180px 200px;
}
.breakout-svg .bo-ring.r1 { animation-delay: 0s; }
.breakout-svg .bo-ring.r2 { animation-delay: 0.8s; }
.breakout-svg .bo-ring.r3 { animation-delay: 1.6s; }
.breakout-svg .bo-ring.r4 { animation-delay: 2.4s; }
@keyframes boRing {
  0%   { r: 30;  opacity: 0.75; stroke-width: 2.5; }
  60%  { opacity: 0.35; stroke-width: 1.4; }
  100% { r: 175; opacity: 0;    stroke-width: 0.4; }
}

/* ===== Hero ambient floor — subtle noise/glow underlay ===== */
.hero::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -40%;
  width: 90vw; height: 90vw;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(76,175,99,0.10), transparent 55%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* Improve hero text contrast over mesh */
.hero-copy .h-display { color: var(--charcoal-900); position: relative; z-index: 2; }
.hero-copy .lead { color: var(--charcoal-700); position: relative; z-index: 2; }

/* ===== Section eyebrow — animated dot pulse ===== */
.eyebrow .dot {
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(46,145,67,0.18); }
  50%     { box-shadow: 0 0 0 8px rgba(46,145,67,0.06); }
}

/* ===== Generic floating orbs for any section ===== */
.section-orbs {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.section-orbs .orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35;
}
.section-orbs .orb-a {
  width: 360px; height: 360px;
  background: var(--green-200);
  top: -100px; left: -120px;
  animation: drift1 24s ease-in-out infinite;
}
.section-orbs .orb-b {
  width: 280px; height: 280px;
  background: var(--green-400);
  bottom: -80px; right: -100px;
  animation: drift2 30s ease-in-out infinite;
  opacity: 0.22;
}

/* ===== Pricing card — featured glow ===== */
.pricing-card.featured {
  position: relative;
}
.pricing-card.featured::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--green-400), transparent 40%, var(--green-600));
  opacity: 0.4;
  z-index: -1;
  filter: blur(8px);
  animation: pricingGlow 4s ease-in-out infinite;
}
@keyframes pricingGlow {
  0%,100% { opacity: 0.3; }
  50%     { opacity: 0.65; }
}

/* ===== Stat numbers — gradient text shimmer ===== */
.problem-stat, .pricing-amount {
  background-size: 200% auto;
  animation: gradPan 6s linear infinite;
}
@keyframes gradPan {
  to { background-position: 200% center; }
}

/* ===== Glow pulse for AI section ===== */
.ai-msg.system {
  position: relative;
}
.ai-msg.system::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(76,175,99,0.4), transparent 50%, rgba(76,175,99,0.2));
  opacity: 0;
  animation: aiGlow 3.4s ease-in-out infinite;
  z-index: -1;
}
@keyframes aiGlow {
  0%,100% { opacity: 0; }
  50%     { opacity: 1; }
}

/* ===== Final CTA — refined ambient orbs + light sweep ===== */
.final-cta {
  position: relative;
  overflow: hidden;
}
.final-cta .h-display,
section.final-cta h1, section.final-cta h2, section.final-cta h3,
.bg-charcoal .h-display,
.bg-charcoal h1, .bg-charcoal h2, .bg-charcoal h3 {
  color: #ffffff !important;
}
.final-cta .lead, .bg-charcoal .lead {
  color: #d4d8e8 !important;
}
.final-cta::before,
.final-cta::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
/* Two slow drifting orbs */
.final-cta::before {
  width: 720px;
  height: 720px;
  left: -180px;
  top: -260px;
  background: radial-gradient(circle, rgba(76,175,99,0.22) 0%, rgba(76,175,99,0) 65%);
  filter: blur(20px);
  animation: ctaOrbA 22s ease-in-out infinite alternate;
}
.final-cta::after {
  width: 640px;
  height: 640px;
  right: -160px;
  bottom: -240px;
  background: radial-gradient(circle, rgba(46,145,67,0.20) 0%, rgba(46,145,67,0) 65%);
  filter: blur(20px);
  animation: ctaOrbB 28s ease-in-out infinite alternate;
}
.final-cta-inner {
  position: relative;
  z-index: 2;
}
/* Light sweep — sits between orbs and content */
.final-cta-inner::before {
  content: "";
  position: absolute;
  inset: -80px -200px;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255,255,255,0.04) 48%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.04) 52%,
    transparent 70%
  );
  z-index: -1;
  animation: ctaSweep 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ctaOrbA {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(60px,40px) scale(1.08); }
  100% { transform: translate(-30px,80px) scale(0.96); }
}
@keyframes ctaOrbB {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-50px,-30px) scale(1.06); }
  100% { transform: translate(40px,-60px) scale(0.94); }
}
@keyframes ctaSweep {
  0%   { transform: translateX(-30%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateX(30%); opacity: 0; }
}

/* ===== Page transition — slide-fade ===== */
.page-fade-in {
  animation: pageSlide .55s cubic-bezier(.2,.6,.2,1) both;
}
@keyframes pageSlide {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ===== Dashboard graph animations =====
   All graphs in DashboardHero animate when the dashboard scrolls into
   view (via `dash-animated` class added by IntersectionObserver). */

/* 1. Reserve health ring — sweeps from 0% to set percent */
.dash-frame .reserve-ring-progress {
  stroke-dasharray: 0 100;
  transition: none;
}
.dash-frame.dash-animated .reserve-ring-progress {
  animation: dashRingFill 1.6s cubic-bezier(.2,.6,.2,1) .25s forwards;
}
@keyframes dashRingFill {
  0%   { stroke-dasharray: 0 100; }
  100% { stroke-dasharray: var(--ring-pct) 100; }
}

/* 2. Sparklines (Safe to spend, Owner draw) — line draws in left to right */
.dash-frame .metric-spark path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.dash-frame.dash-animated .metric-spark path {
  animation: dashSparkDraw 1.4s cubic-bezier(.4,.1,.2,1) .35s forwards;
}
.dash-frame.dash-animated .metric-card:nth-of-type(2) .metric-spark path { animation-delay: .55s; }
@keyframes dashSparkDraw {
  to { stroke-dashoffset: 0; }
}

/* 3. Runway forecast — past line draws first, fill fades, forecast draws after, "now" dot pops */
.dash-frame .runway-past {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.dash-frame .runway-fcast {
  /* keep dashed visual style but add an offset for draw-in */
  stroke-dashoffset: 100;
  opacity: 0;
}
.dash-frame .runway-fill { opacity: 0; }
.dash-frame .runway-dot {
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0);
  opacity: 0;
}
.dash-frame.dash-animated .runway-past {
  animation: runwayPastDraw 1.5s cubic-bezier(.4,.1,.2,1) .4s forwards;
}
.dash-frame.dash-animated .runway-fill {
  animation: runwayFillIn .8s ease-out 1.0s forwards;
}
.dash-frame.dash-animated .runway-fcast {
  animation: runwayFcastDraw 1.2s cubic-bezier(.4,.1,.2,1) 1.4s forwards;
}
.dash-frame.dash-animated .runway-dot {
  animation: runwayDotPop .55s cubic-bezier(.2,.7,.2,1.3) 1.6s forwards;
}
@keyframes runwayPastDraw { to { stroke-dashoffset: 0; } }
@keyframes runwayFillIn   { to { opacity: 1; } }
@keyframes runwayFcastDraw {
  0%   { stroke-dashoffset: 100; opacity: 0; }
  20%  { opacity: 1; }
  100% { stroke-dashoffset: 0;   opacity: 1; }
}
@keyframes runwayDotPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 4. Reserve buckets — bars fill from 0 to target percent (staggered) */
.dash-frame .bucket-fill {
  width: 0;
}
.dash-frame.dash-animated .bucket-fill {
  animation: bucketFill 1.1s cubic-bezier(.2,.6,.2,1) forwards;
}
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(1) .bucket-fill { animation-delay: .55s; }
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(2) .bucket-fill { animation-delay: .70s; }
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(3) .bucket-fill { animation-delay: .85s; }
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(4) .bucket-fill { animation-delay: 1.00s; }
.dash-frame.dash-animated .metric-card .bucket-fill { animation-delay: .80s; }
@keyframes bucketFill {
  0%   { width: 0; }
  100% { width: var(--bucket-pct, 100%); }
}

/* 5. AI guidance card — gentle fade-up on entry */
.dash-frame .ai-card {
  opacity: 0;
  transform: translateY(8px);
}
.dash-frame.dash-animated .ai-card {
  animation: aiCardIn .8s cubic-bezier(.2,.6,.2,1) .9s forwards;
}
@keyframes aiCardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cursor-spotlight, .particle-canvas, .ambient-blob, .hero-mesh, .hero-mesh-3 { display: none; }
}


/* ===== Live activity entry animation ===== */
.dash-frame .activity-card {
  opacity: 0;
  transform: translateY(8px);
}
.dash-frame.dash-animated .activity-card {
  animation: activityCardIn .7s cubic-bezier(.2,.6,.2,1) .55s forwards;
}
@keyframes activityCardIn {
  to { opacity: 1; transform: translateY(0); }
}
.dash-frame .activity-list .activity-item {
  opacity: 0;
  transform: translateX(-6px);
}
.dash-frame.dash-animated .activity-list .activity-item {
  animation: activityRowIn .5s cubic-bezier(.2,.6,.2,1) forwards;
}
.dash-frame.dash-animated .activity-list .activity-item:nth-child(1) { animation-delay: .80s; }
.dash-frame.dash-animated .activity-list .activity-item:nth-child(2) { animation-delay: .92s; }
.dash-frame.dash-animated .activity-list .activity-item:nth-child(3) { animation-delay: 1.04s; }
.dash-frame.dash-animated .activity-list .activity-item:nth-child(4) { animation-delay: 1.16s; }
@keyframes activityRowIn {
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Ongoing micro-animations (kick in after entry finishes) ===== */

/* Reserve donut percentage — gentle breathing pulse */
.dash-frame.dash-animated .reserve-ring-pct {
  animation: ringPctBreathe 3.6s ease-in-out 2.2s infinite;
}
@keyframes ringPctBreathe {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.04); opacity: .92; }
}

/* "On track" badge — subtle pulse */
.dash-frame.dash-animated .reserve-ring-badge {
  animation: badgePulse 3s ease-in-out 2.4s infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,145,67,0); }
  50%      { box-shadow: 0 0 0 4px rgba(46,145,67,.10); }
}

/* Sparkline shimmer — a bright dot travels along the path periodically */
.metric-spark { position: relative; }
.metric-spark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 35%,
    rgba(46,145,67,.18) 50%,
    rgba(255,255,255,0) 65%,
    rgba(255,255,255,0) 100%);
  background-size: 250% 100%;
  background-position: -50% 0;
  pointer-events: none;
  opacity: 0;
}
.dash-frame.dash-animated .metric-spark::after {
  opacity: 1;
  animation: sparkShimmer 4.5s ease-in-out 2.0s infinite;
}
.dash-frame.dash-animated .metric-card:nth-of-type(2) .metric-spark::after {
  animation-delay: 2.6s;
}
@keyframes sparkShimmer {
  0%   { background-position: -50% 0; }
  60%  { background-position: 150% 0; }
  100% { background-position: 150% 0; }
}

/* Bucket bars — periodic shine sweep */
.bucket-fill { position: relative; overflow: hidden; }
.bucket-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,.55) 50%,
    rgba(255,255,255,0) 60%,
    rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  background-position: -50% 0;
  pointer-events: none;
}
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(1) .bucket-fill::after {
  animation: bucketShine 5s ease-in-out 2.0s infinite;
}
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(2) .bucket-fill::after {
  animation: bucketShine 5s ease-in-out 2.4s infinite;
}
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(3) .bucket-fill::after {
  animation: bucketShine 5s ease-in-out 2.8s infinite;
}
.dash-frame.dash-animated .buckets-card .bucket-row:nth-child(4) .bucket-fill::after {
  animation: bucketShine 5s ease-in-out 3.2s infinite;
}
.dash-frame.dash-animated .metric-card .bucket-fill::after {
  animation: bucketShine 5s ease-in-out 2.6s infinite;
}
@keyframes bucketShine {
  0%   { background-position: -50% 0; }
  35%  { background-position: 150% 0; }
  100% { background-position: 150% 0; }
}

/* Live activity bullet — subtle pulse on the "newest" item already handled in component */

/* Activity card amount — soft glow on the newest row */
.dash-frame.dash-animated .activity-item.is-new .activity-item-amt {
  animation: amtGlow 1.6s ease-in-out infinite;
}
@keyframes amtGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(46,145,67,0); }
  50%      { text-shadow: 0 0 6px rgba(46,145,67,.35); }
}
