/* bb-motion.css v1.1.0 for bikrambhujel.com.np. Motion ported from React Bits (reactbits.dev, MIT + Commons Clause). */
/* ---------- v1.47: motion ported from React Bits (BlurText, SpotlightCard, ShinyText, CountUp) ----------
   Plain CSS and JS, no React. Light and dark through the theme tokens. Nothing is hidden unless the
   script that reveals it has already run, and reduced motion gets the finished state. */

/* BlurText: the homepage name settles in letter by letter, out of a soft blur. */
.bb-hero h1.bb-blur{animation:none}
.bb-blur .bb-bw{display:inline-block;white-space:nowrap}
.bb-blur .bb-bl{display:inline-block;will-change:transform,filter,opacity;animation:bb-blur-in .85s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--i,0) * 38ms + 80ms)}
@keyframes bb-blur-in{
  0%{opacity:0;filter:blur(12px);transform:translateY(-.32em)}
  55%{opacity:.6;filter:blur(3px);transform:translateY(.04em)}
  100%{opacity:1;filter:blur(0);transform:none}
}

/* SpotlightCard: a soft light follows the pointer across a post card and lights the edge near it. */
.bb-card{--mx:50%;--my:50%;--spot:rgba(255,192,0,.10);--spot-edge:rgba(16,24,39,.30)}
html[data-theme="dark"] .bb-card{--spot:rgba(255,192,0,.13);--spot-edge:rgba(255,192,0,.7)}
.bb-spot,.bb-spot-edge{position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .35s cubic-bezier(.22,.8,.3,1)}
.bb-spot{z-index:0;background:radial-gradient(260px circle at var(--mx) var(--my),var(--spot),transparent 70%)}
.bb-spot-edge{z-index:2;padding:1px;background:radial-gradient(180px circle at var(--mx) var(--my),var(--spot-edge),transparent 70%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}
.bb-card.is-lit .bb-spot,.bb-card.is-lit .bb-spot-edge{opacity:1}
.bb-card .bb-card-media,.bb-card .bb-card-body{position:relative;z-index:1}

/* ShinyText: one pass of light across the hire button when it comes into view. */
.bb-hire .bb-cta{position:relative;overflow:hidden;isolation:isolate}
.bb-hire .bb-cta::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.75) 50%,transparent 70%);transform:translateX(-130%)}
.bb-hire .bb-cta.bb-pass-on::after{animation:bb-pass 1.4s cubic-bezier(.22,.8,.3,1) .25s both}
@keyframes bb-pass{to{transform:translateX(130%)}}

/* CountUp: figures count from zero once they are on screen. */
[data-bb-count],.bb-course-hero-stat strong{font-variant-numeric:tabular-nums}

@media (prefers-reduced-motion:reduce){
  .bb-blur .bb-bl{animation:none}
  .bb-hire .bb-cta.bb-pass-on::after{animation:none}
}
/* ---------- v1.48: stronger, visible motion. DotGrid (React Bits) behind the hero, a slower name
   intro with the lines below following it, and the spotlight on the free-tool tiles too. ---------- */
.bb-hero{position:relative;isolation:isolate;--dot:rgba(16,24,39,.16);--dot-on:#d99a00}
html[data-theme="dark"] .bb-hero{--dot:rgba(255,255,255,.13);--dot-on:#ffc000}
.bb-hero > .bb-wrap{position:relative;z-index:1}
.bb-dots{position:absolute;inset:0;z-index:0;width:100%;height:100%;display:block;pointer-events:none;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.35) 38%,#000 70%);mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.35) 38%,#000 70%)}
@media (max-width:760px){.bb-dots{-webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,.15));mask-image:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,.15))}}

/* Name first, then the lines under it, so the eye is led down the hero. */
.bb-blur .bb-bl{animation-duration:1.1s;animation-delay:calc(var(--i,0) * 55ms + 120ms)}
.bb-hero.bb-seq .bb-eyebrow{animation-delay:0s}
.bb-hero.bb-seq .bb-lead{animation-delay:.75s}
.bb-hero.bb-seq .bb-hero-actions{animation-delay:.9s}

/* Free-tool tiles: same pointer light as the post cards, and on the homepage they arrive as a list. */
.bb-tools a{position:relative;overflow:hidden;isolation:isolate;--mx:50%;--my:50%;--spot:rgba(255,192,0,.12);--spot-edge:rgba(16,24,39,.32)}
html[data-theme="dark"] .bb-tools a{--spot:rgba(255,192,0,.14);--spot-edge:rgba(255,192,0,.7)}
.bb-tools a .bb-spot{z-index:-1}
.bb-tools a.is-lit .bb-spot,.bb-tools a.is-lit .bb-spot-edge{opacity:1}
@keyframes bb-tile-in{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.bb-tools.bb-seq li{animation:bb-tile-in .55s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--i,0) * 45ms + 1s)}

/* Reduced motion (Windows "Animation effects" off, iOS/macOS Reduce motion): no travel, no blur,
   no wave. Visitors still get soft fades and the pointer lights. The theme switches every animation
   off with !important for these visitors, so these more specific rules use !important too. */
@keyframes bb-fade-r{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .bb-hero .bb-eyebrow,.bb-hero h1,.bb-hero .bb-lead,.bb-hero .bb-hero-actions{animation:bb-fade-r .7s ease-out both !important}
  .bb-hero .bb-lead{animation-delay:.25s !important}
  .bb-hero .bb-hero-actions{animation-delay:.4s !important}
  .bb-tools li{animation:bb-fade-r .6s ease-out .5s both !important}
  .bb-spot,.bb-spot-edge{transition:opacity .3s ease-out !important}
}
/* ---------- bb-motion 1.1.0: motion on every page, not just the homepage ----------
   Post and page content rises in as it scrolls into view, card grids cascade, images open in an
   animated pop-up, the rail pop-up's contents cascade, and the mobile menu slides open.
   Every hidden state is added by the script, so if it never runs nothing is hidden. */

/* Content reveal (classes added by bb-motion.js only to blocks that start below the fold). */
.bb-rv{opacity:0;transform:translateY(16px);transition:opacity .6s cubic-bezier(.16,1,.3,1),transform .7s cubic-bezier(.16,1,.3,1)}
.bb-rv.bb-rv-img{transform:translateY(10px) scale(1.035);filter:blur(8px);transition:opacity .7s cubic-bezier(.16,1,.3,1),transform .9s cubic-bezier(.16,1,.3,1),filter .7s cubic-bezier(.16,1,.3,1)}
.bb-rv.is-in{opacity:1;transform:none;filter:none}
.bb-rv-grid > li{opacity:0;transform:translateY(14px) scale(.985);transition:opacity .5s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.16,1,.3,1);transition-delay:calc(var(--i,0) * 55ms)}
.bb-rv-grid.is-in > li{opacity:1;transform:none}

/* Card grids inside pages (e.g. the Tools page) get the same pointer light as post cards. */
.bb-spotable{position:relative;overflow:hidden;isolation:isolate;--mx:50%;--my:50%;--spot:rgba(255,192,0,.12);--spot-edge:rgba(16,24,39,.3)}
html[data-theme="dark"] .bb-spotable{--spot:rgba(255,192,0,.14);--spot-edge:rgba(255,192,0,.7)}
.bb-spotable .bb-spot{z-index:-1}
.bb-spotable.is-lit .bb-spot,.bb-spotable.is-lit .bb-spot-edge{opacity:1}

/* Image pop-up */
.post-body img.bb-zoomable{cursor:zoom-in}
.bb-lb{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:56px 20px 64px}
.bb-lb-scrim{position:absolute;inset:0;background:rgba(10,15,24,.82);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;transition:opacity .35s cubic-bezier(.22,.8,.3,1)}
.bb-lb.is-open .bb-lb-scrim{opacity:1}
.bb-lb-img{position:relative;max-width:min(1200px,100%);max-height:100%;width:auto;height:auto;border-radius:12px;box-shadow:0 30px 80px -20px rgba(0,0,0,.6);cursor:zoom-out;transform-origin:0 0;background:#fff}
.bb-lb-cap{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);max-width:min(760px,calc(100% - 40px));margin:0;color:#e8ecf3;font-size:14px;line-height:1.5;text-align:center;opacity:0;transition:opacity .3s ease-out .2s}
.bb-lb.is-open .bb-lb-cap{opacity:1}
.bb-lb-x{position:absolute;top:14px;right:14px;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:22px;line-height:1;cursor:pointer;opacity:0;transform:scale(.8);transition:opacity .25s ease-out .15s,transform .35s cubic-bezier(.34,1.56,.64,1) .15s,background-color .15s}
.bb-lb.is-open .bb-lb-x{opacity:1;transform:none}
.bb-lb-x:hover{background:rgba(255,255,255,.22)}
.bb-lb-x:focus-visible{outline:2px solid #ffc000;outline-offset:2px}
html.bb-lb-lock{overflow:hidden}

/* Mobile menu: slides down, links cascade in. */
@keyframes bb-nav-in{from{opacity:0;transform:translateY(-10px);clip-path:inset(0 0 100% 0)}to{opacity:1;transform:none;clip-path:inset(0 0 0 0)}}
@keyframes bb-nav-li{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
@media (max-width:1020px){
  .bb-nav.is-open{animation:bb-nav-in .38s cubic-bezier(.16,1,.3,1) both}
  .bb-nav.is-open #bb-menu > li{animation:bb-nav-li .4s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--i,0) * 35ms + 60ms)}
}

/* Reduced motion: things still appear, without travel or blur. */
@media (prefers-reduced-motion:reduce){
  .bb-rv,.bb-rv.bb-rv-img,.bb-rv-grid > li{transform:none!important;filter:none!important;transition:opacity .4s ease-out!important}
  .bb-lb-scrim,.bb-lb-cap,.bb-lb-x{transition:opacity .25s ease-out!important}
  .bb-lb-x{transform:none!important}
  .bb-nav.is-open,.bb-nav.is-open #bb-menu > li{animation:none!important}
}
