/* Living marks for ubosbd.com — copied verbatim from the NEXUS app (frontend/src/index.css, 'The NEXUS mark in motion' and 'The MANAGER mark in motion'), so the site moves exactly as the products do. Driven by living.js. */
:root{--nexus-x-blue:64 105 225;--nexus-x-orange:255 140 0;--nexus-x-red:255 30 30;--nexus-x-green:20 122 46;--nexus-x-diamond:195 24 92}
.nx-p { transform-box: fill-box; transform-origin: center; }

/* "born" — the X assembles from its corners, then NE and US come out of it. */
[data-nx="born"] .nx-tl { animation: nx-in-tl .7s cubic-bezier(.2,.8,.2,1) both; }
[data-nx="born"] .nx-bl { animation: nx-in-bl .7s .08s cubic-bezier(.2,.8,.2,1) both; }
[data-nx="born"] .nx-tr { animation: nx-in-tr .7s .16s cubic-bezier(.2,.8,.2,1) both; }
[data-nx="born"] .nx-br { animation: nx-in-br .7s .24s cubic-bezier(.2,.8,.2,1) both; }
[data-nx="born"] .nx-dm { animation: nx-pop .45s .7s cubic-bezier(.3,1.6,.5,1) both; }
[data-nx="born"] .nx-left  { animation: nx-out-left .75s 1s cubic-bezier(.2,.8,.2,1) both; }
[data-nx="born"] .nx-right { animation: nx-out-right .75s 1s cubic-bezier(.2,.8,.2,1) both; }

/* "turn" — the X makes one full turn in its place. */
[data-nx="turn"] .nx-xg { animation: nx-turn 1.1s cubic-bezier(.45,0,.2,1) both; }
@keyframes nx-turn { to { transform: rotate(360deg); } }

/* "shine" — a band of light crosses the word, and only the word. */
.nx-sweep { opacity: 0; }
[data-nx="shine"] .nx-sweep { animation: nx-sweep 1.4s ease-in-out both; }
@keyframes nx-sweep {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 1; transform: translateX(1300%); }
}

/* "rise" — N, E, X, U, S hop in turn, left to right. */
[data-nx="rise"] .nx-letter,
[data-nx="rise"] .nx-xg { animation: nx-hop .55s cubic-bezier(.3,.7,.4,1) both; }
[data-nx="rise"] .nx-l-e { animation-delay: .09s; }
[data-nx="rise"] .nx-xg  { animation-delay: .18s; }
[data-nx="rise"] .nx-l-u { animation-delay: .27s; }
[data-nx="rise"] .nx-l-s { animation-delay: .36s; }
@keyframes nx-hop {
  0%, 100% { transform: translateY(0); }
  45%      { transform: translateY(-34px); }
  75%      { transform: translateY(5px); }
}

/* "pulse" — the diamond at the centre beats twice. */
[data-nx="pulse"] .nx-dm { animation: nx-heart 1.1s ease-in-out both; }
@keyframes nx-heart {
  0%, 50%, 100% { transform: scale(1); }
  20%           { transform: scale(1.55); }
  70%           { transform: scale(1.3); }
}

/* "wipe" — the word is written in again from the left. */
[data-nx="wipe"] .nx-reveal { animation: nx-wipe 1.2s cubic-bezier(.6,0,.3,1) both; transform-origin: left center; }
@keyframes nx-wipe { from { transform: scaleX(0); opacity: .2; } }

/* "flash" — the X alone: each arm dips and comes back, round the circle. */
[data-nx="flash"] .nx-arm { animation: nx-flash .9s ease-in-out both; }
[data-nx="flash"] .nx-tr { animation-delay: .15s; }
[data-nx="flash"] .nx-br { animation-delay: .3s; }
[data-nx="flash"] .nx-bl { animation-delay: .45s; }
@keyframes nx-flash { 0%, 100% { opacity: 1; } 40% { opacity: .2; } }
@keyframes nx-in-tl { from { transform: translate(-140px, -100px) rotate(-25deg); opacity: 0; } }
@keyframes nx-in-bl { from { transform: translate(-140px, 100px) rotate(25deg); opacity: 0; } }
@keyframes nx-in-tr { from { transform: translate(140px, -100px) rotate(25deg); opacity: 0; } }
@keyframes nx-in-br { from { transform: translate(140px, 100px) rotate(-25deg); opacity: 0; } }
@keyframes nx-pop { from { transform: scale(0); opacity: 0; } }
@keyframes nx-out-left { from { transform: translateX(300px); opacity: 0; } 40% { opacity: 1; } }
@keyframes nx-out-right { from { transform: translateX(-300px); opacity: 0; } 40% { opacity: 1; } }

.nx-spin { transition: transform .9s cubic-bezier(.4,0,.2,1); }
.group:hover .nx-spin,
.nx-spin:hover { transform: rotate(360deg); }

.nx-load .nx-arm { animation: nx-beat 1.2s ease-in-out infinite; opacity: .25; }
.nx-load .nx-tr { animation-delay: .3s; }
.nx-load .nx-br { animation-delay: .6s; }
.nx-load .nx-bl { animation-delay: .9s; }
.nx-load .nx-letter { opacity: .35; }
@keyframes nx-beat { 0%, 100% { opacity: .25; } 25% { opacity: 1; } }

/* Still, and complete. The loading mark keeps its arms lit rather than dim:
   a dim X that never brightens reads as something switched off. */
@media (prefers-reduced-motion: reduce) {
  [data-nx] *, .nx-load * { animation: none !important; }
  .nx-sweep { opacity: 0; }
  .nx-load .nx-arm { opacity: 1; }
  .nx-spin { transition: none; }
  .group:hover .nx-spin, .nx-spin:hover { transform: none; }
}

/*
  The MANAGER mark in motion (owner, 11 Nov 2026 — "sob", all of the sample
  "MANAGER — জীবন্ত লোগো"):

    the M        born · roll · shine · bounce · pulse · wave · turn · orbit ·
                 stretch · glint
    the word     born · wave · shine · tri · wipe · type · gather · flip ·
                 glint · breathe
    no rest      each starts the moment the last ends ("থামা যাবে না").
                 Set as data-mg by ManagerMotion's clocks, which hold each
                 movement's length (MARK_MS, WORD_MS) — change a duration
                 here and change it there.
    mg-load      the ball keeps bouncing, the letters keep their wave — a wait
    mg-spin      one full turn under the pointer — the rail's home tile

  Every piece moves around its own centre (fill-box), so a percentage is of
  the piece itself and the same keyframes serve the 22px rail and the panel.
*/
.mg-p { transform-box: fill-box; transform-origin: center; }
.mg-ball { transform-origin: 50% 50%; }
.mg-letter { transform-origin: 50% 100%; }
.mg-sweep, .mg-star, .mg-cursor { opacity: 0; }
.mg-cursor { fill: #d4a017; }
.mg-star { fill: #fff; }

/* ---- the M -------------------------------------------------------------- */
[data-mg="born"] .mg-m { animation: mg-draw .9s cubic-bezier(.6,0,.3,1) both; }
[data-mg="born"] .mg-ball { animation: mg-drop .8s .75s cubic-bezier(.3,.7,.4,1) both; }
@keyframes mg-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mg-drop {
  0% { transform: translateY(-260%); opacity: 0; } 45% { transform: translateY(0); opacity: 1; }
  62% { transform: translateY(-38%) scale(1.05,.95); } 78% { transform: translateY(0) scale(1.08,.9); }
  88% { transform: translateY(-10%); } 100% { transform: none; }
}
[data-mg="roll"] .mg-ball { animation: mg-roll 1.5s cubic-bezier(.45,0,.3,1) both; }
@keyframes mg-roll {
  0% { transform: none; } 45% { transform: translateX(-230%) rotate(-540deg); }
  55% { transform: translateX(-230%) rotate(-560deg); } 100% { transform: none; }
}
[data-mg="shine"] .mg-sweep { animation: mg-sweep 1.3s ease-in-out both; }
@keyframes mg-sweep { 0% { opacity: 1; transform: translateX(0); } 100% { opacity: 1; transform: translateX(540%); } }
[data-mg="bounce"] .mg-ball { animation: mg-bounce 1.4s cubic-bezier(.3,.7,.4,1) both; }
@keyframes mg-bounce {
  0%, 100% { transform: none; } 14% { transform: translateY(-120%); } 28% { transform: translateY(0) scale(1.1,.88); }
  42% { transform: translateY(-70%); } 56% { transform: translateY(0) scale(1.06,.93); } 68% { transform: translateY(-30%); }
  80% { transform: translateY(0); }
}
[data-mg="pulse"] .mg-ball { animation: mg-heart 1.2s ease-in-out both; }
@keyframes mg-heart {
  0%, 100% { transform: scale(1); filter: none; } 15% { transform: scale(1.25); filter: drop-shadow(0 0 10px #ffcf40); }
  30% { transform: scale(1); } 45% { transform: scale(1.2); filter: drop-shadow(0 0 14px #ffcf40); } 65% { transform: scale(1); filter: none; }
}
[data-mg="wave"] .mg-m { animation: mg-wave 1.3s ease-in-out both; }
@keyframes mg-wave {
  0%, 100% { transform: none; } 20% { transform: skewX(-6deg) scaleY(1.04); } 45% { transform: skewX(5deg) scaleY(.97); }
  70% { transform: skewX(-2deg); }
}
[data-mg="turn"] .mg-whole { animation: mg-turn 1.2s cubic-bezier(.45,0,.2,1) both; }
@keyframes mg-turn { to { transform: perspective(600px) rotateY(360deg); } }
[data-mg="orbit"] .mg-ball { animation: mg-orbit 1.6s cubic-bezier(.45,0,.3,1) both; }
@keyframes mg-orbit {
  0% { transform: none; } 25% { transform: translate(-120%,-330%) scale(.85); } 50% { transform: translate(-480%,-240%) scale(.8); }
  75% { transform: translate(-300%,40%) scale(.9); } 100% { transform: none; }
}
[data-mg="stretch"] .mg-m { animation: mg-stretch 1.1s cubic-bezier(.3,1.5,.5,1) both; }
[data-mg="stretch"] .mg-ball { animation: mg-push 1.1s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes mg-stretch { 0%, 100% { transform: none; } 35% { transform: scaleX(1.1) scaleY(.94); } 60% { transform: scaleX(.97) scaleY(1.03); } }
@keyframes mg-push { 0%, 100% { transform: none; } 35% { transform: translateX(70%); } 60% { transform: translateX(-15%); } }
[data-mg="glint"] .mg-star { animation: mg-star 1s ease-in-out both; }
[data-mg="glint"] .mg-m { animation: mg-bright 1s ease-in-out both; }
@keyframes mg-star {
  0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1.6) rotate(45deg); }
  70% { opacity: .6; transform: scale(1) rotate(90deg); }
}
@keyframes mg-bright { 0%, 100% { filter: none; } 40% { filter: brightness(1.25) saturate(1.2); } }

/* ---- the word ------------------------------------------------------------ */
[data-mg="born"] .mg-letter { animation: mg-rise .6s calc(var(--i) * .09s) cubic-bezier(.2,.8,.2,1) both; }
[data-mg="born"] .mg-tri { animation: mg-pop .5s calc(.75s + var(--i) * .12s) cubic-bezier(.3,1.6,.5,1) both; }
@keyframes mg-rise { from { transform: translateY(60%); opacity: 0; } }
@keyframes mg-pop { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
[data-mg="wave"] .mg-letter { animation: mg-hop .5s calc(var(--i) * .08s) cubic-bezier(.3,.7,.4,1) both; }
[data-mg="wave"] .mg-tri { animation: mg-hop .5s calc(.08s + var(--i) * .24s) cubic-bezier(.3,.7,.4,1) both; }
@keyframes mg-hop { 0%, 100% { transform: none; } 50% { transform: translateY(-22%); } }
[data-mg="shine"] .mg-sweep { animation: mg-sweep 1.4s ease-in-out both; }
[data-mg="tri"] .mg-tri { animation: mg-tri .9s calc(var(--i) * .18s) cubic-bezier(.3,.7,.4,1) both; }
@keyframes mg-tri {
  0%, 100% { transform: none; } 40% { transform: translateY(-140%) rotate(180deg); }
  70% { transform: translateY(0) rotate(360deg) scale(1.15,.85); }
}
[data-mg="wipe"] .mg-reveal { animation: mg-draw 1.2s cubic-bezier(.6,0,.3,1) both; }
[data-mg="type"] .mg-letter { animation: mg-type .01s calc(var(--i) * .14s) step-end both; }
[data-mg="type"] .mg-tri { animation: mg-type .01s calc(1.05s + var(--i) * .1s) step-end both; }
[data-mg="type"] .mg-cursor { animation: mg-cursor 1.4s linear both; }
@keyframes mg-type { from { opacity: 0; } to { opacity: 1; } }
@keyframes mg-cursor { 0% { opacity: 1; transform: translateX(0); } 85% { opacity: 1; transform: translateX(8300%); } 100% { opacity: 0; transform: translateX(8300%); } }
[data-mg="gather"] .mg-letter { animation: mg-gather .8s cubic-bezier(.2,.8,.2,1) both; }
[data-mg="gather"] .mg-tri { animation: mg-pop .4s .75s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes mg-gather {
  from { transform: translate(calc((var(--i) - 3) * 60%), var(--dy, 0)) rotate(calc((var(--i) - 3) * 12deg)); opacity: 0; }
}
[data-mg="flip"] .mg-letter { animation: mg-flip .55s calc(var(--i) * .09s) ease-in-out both; }
[data-mg="flip"] .mg-tri { animation: mg-flip .55s calc(.3s + var(--i) * .2s) ease-in-out both; }
@keyframes mg-flip { to { transform: perspective(400px) rotateY(360deg); } }
[data-mg="glint"] .mg-tri { animation: mg-glint 1s calc(var(--i) * .2s) ease-in-out both; }
@keyframes mg-glint {
  0%, 100% { filter: none; transform: none; }
  40% { filter: brightness(1.5) drop-shadow(0 0 8px #ffd34a); transform: scale(1.25); }
}
[data-mg="breathe"] .mg-letter,
[data-mg="breathe"] .mg-tri { animation: mg-breathe 1.4s ease-in-out both; }
@keyframes mg-breathe { 0%, 100% { transform: none; } 45% { transform: translateX(calc(var(--x, 0) * 1%)); } }

/* ---- a wait, and the pointer --------------------------------------------- */
.mg-load .mg-ball { animation: mg-bounce 1.4s cubic-bezier(.3,.7,.4,1) infinite; }
.mg-load .mg-letter { animation: mg-hop 1.2s calc(var(--i) * .1s) cubic-bezier(.3,.7,.4,1) infinite; }
.mg-spin .mg-whole { transition: transform .9s cubic-bezier(.4,0,.2,1); }
.group:hover .mg-spin .mg-whole,
.mg-spin:hover .mg-whole { transform: perspective(600px) rotateY(360deg); }

@media (prefers-reduced-motion: reduce) {
  [data-mg] *, .mg-load * { animation: none !important; }
  .mg-sweep, .mg-star, .mg-cursor { opacity: 0; }
  .mg-spin .mg-whole { transition: none; }
  .group:hover .mg-spin .mg-whole, .mg-spin:hover .mg-whole { transform: none; }
}

/* ---- Site layout for the living marks ---- */
[data-live]{display:inline-flex;align-items:center;gap:18px;max-width:100%}
[data-live] svg{display:block;height:auto}
[data-live="nexus"] svg{width:min(460px,80vw)}
[data-live="manager"]{gap:clamp(8px,2.5vw,18px)}
.live-mg-mark svg{width:min(120px,17vw)}
.live-mg-word svg{width:min(360px,52vw)}
/* A logo drawn as one picture — living.js imageLogo(). The letters and the mark are the same file, each
   clipped to its own side, so the mark can move without the letters moving with it. */
.li-box{position:relative;display:inline-block;line-height:0}
.li-box img{display:block;height:var(--li-h,64px);width:auto;max-width:100%}
.li-word{clip-path:inset(0 0 0 calc(var(--mark) * 100%))}
.li-mark{position:absolute;inset:0;clip-path:inset(0 calc((1 - var(--mark)) * 100%) 0 0);transform-origin:calc(var(--mark) * 50%) 50%}
.li-shine{position:absolute;inset:0;opacity:0;pointer-events:none;
  background:linear-gradient(100deg,transparent 35%,rgba(255,255,255,.95) 50%,transparent 65%) no-repeat;background-size:40% 100%;background-position:-60% 0;
  -webkit-mask:var(--src) center/100% 100% no-repeat;mask:var(--src) center/100% 100% no-repeat}
[data-li="born"]{animation:li-draw 1.1s cubic-bezier(.6,0,.3,1) both}
@keyframes li-draw{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
[data-li="turn"] .li-mark{animation:li-turn 1.15s cubic-bezier(.45,0,.2,1) both}
@keyframes li-turn{to{transform:perspective(500px) rotateY(360deg)}}
[data-li="shine"] .li-shine{animation:li-shine 1.35s ease-in-out both}
@keyframes li-shine{0%{opacity:1;background-position:-60% 0}100%{opacity:1;background-position:160% 0}}
[data-li="pulse"] .li-mark{animation:li-heart 1.1s ease-in-out both}
@keyframes li-heart{0%,50%,100%{transform:scale(1)}20%{transform:scale(1.12)}70%{transform:scale(1.07)}}
[data-li="hop"] .li-mark{animation:li-hop .9s cubic-bezier(.3,.7,.4,1) both}
@keyframes li-hop{0%,100%{transform:none}40%{transform:translateY(-14%)}70%{transform:translateY(3%) scale(1.04,.96)}}
[data-li="glint"] .li-mark{animation:li-glint 1s ease-in-out both}
@keyframes li-glint{0%,100%{filter:none}40%{filter:brightness(1.3) saturate(1.25) drop-shadow(0 0 10px rgba(255,255,255,.7))}}
@media (prefers-reduced-motion: reduce){[data-li],[data-li] *{animation:none!important}}
.live-plate{display:inline-flex;align-items:center;background:#fff;border-radius:18px;padding:14px 22px;margin:6px 0 16px;box-shadow:0 10px 30px rgba(0,0,0,.25);max-width:100%;overflow:hidden}

/* UBOS: the mark turns slowly, always, with a light crossing it. */
.ubos-live{position:relative;display:inline-block;width:min(120px,26vw);aspect-ratio:1}
.ubos-live img{width:100%;height:100%;animation:ubos-turn 9s linear infinite;filter:drop-shadow(0 6px 18px rgba(0,0,0,.35))}
@keyframes ubos-turn{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){.ubos-live img{animation:none}}
/* The home page's product cards: each logo alive at card size. NEXUS's letters are white, so it sits on its own blue. */
.logo-full [data-live="img"]{--li-h:58px}
.logo-full .li-box img{max-width:none}
.nx-chip{display:inline-flex;align-items:center;height:58px;padding:0 16px;border-radius:12px;background:linear-gradient(135deg,#0b2a8a,#2563eb)}
.nx-chip [data-live="nexus"] svg{width:200px}
.mg-card .live-mg-mark svg{width:56px}
.mg-card .live-mg-word svg{width:170px}
.mg-card{gap:8px}

/* ---- the UBOS header lockup: seventeen movements, the logo always whole ---- */
[data-lu] .li-mark,[data-lu] .li-word{will-change:transform}
[data-lu="born"]{animation:li-draw 1.1s cubic-bezier(.6,0,.3,1) both}
[data-lu="turn"] .li-mark{animation:li-turn 1.15s cubic-bezier(.45,0,.2,1) both}
[data-lu="shine"] .li-shine{animation:li-shine 1.35s ease-in-out both}
[data-lu="pulse"] .li-mark{animation:li-heart 1.1s ease-in-out both}
[data-lu="hop"] .li-mark{animation:li-hop .9s cubic-bezier(.3,.7,.4,1) both}
[data-lu="glint"] .li-mark{animation:li-glint 1s ease-in-out both}
[data-lu="spin"] .li-mark{animation:lu-spin 1.15s cubic-bezier(.5,0,.2,1) both}
@keyframes lu-spin{to{transform:rotate(360deg)}}
[data-lu="swing"] .li-mark{animation:lu-swing 1.25s ease-in-out both}
@keyframes lu-swing{0%,100%{transform:rotate(0)}20%{transform:rotate(-14deg)}45%{transform:rotate(10deg)}70%{transform:rotate(-5deg)}}
[data-lu="tilt"]{animation:lu-tilt 1.35s ease-in-out both}
@keyframes lu-tilt{0%,100%{transform:perspective(600px) rotateX(0)}40%{transform:perspective(600px) rotateX(22deg)}70%{transform:perspective(600px) rotateX(-8deg)}}
[data-lu="zoom"]{animation:lu-zoom 1.05s ease-in-out both}
@keyframes lu-zoom{0%,100%{transform:scale(1)}45%{transform:scale(1.07)}}
[data-lu="bounce"] .li-word{animation:lu-bounce 1.05s cubic-bezier(.3,.7,.4,1) both}
@keyframes lu-bounce{0%,100%{transform:none}35%{transform:translateY(-10%)}65%{transform:translateY(2%) scale(1.02,.97)}}
[data-lu="wave"] .li-word{animation:lu-wave 1.25s ease-in-out both}
@keyframes lu-wave{0%,100%{transform:skewX(0)}25%{transform:skewX(-9deg)}55%{transform:skewX(6deg)}80%{transform:skewX(-2deg)}}
[data-lu="glow"]{animation:lu-glow 1.15s ease-in-out both}
@keyframes lu-glow{0%,100%{filter:none}45%{filter:drop-shadow(0 0 8px rgba(47,123,255,.75)) brightness(1.08)}}
[data-lu="drop"] .li-mark{animation:lu-drop 1.05s cubic-bezier(.3,1.4,.5,1) both}
@keyframes lu-drop{0%{transform:translateY(-70%);opacity:0}60%{opacity:1}100%{transform:none;opacity:1}}
[data-lu="slide"] .li-word{animation:lu-slide 1.05s cubic-bezier(.2,.8,.3,1) both}
@keyframes lu-slide{0%{transform:translateX(6%);opacity:.2}100%{transform:none;opacity:1}}
[data-lu="breathe"]{animation:lu-breathe 1.45s ease-in-out both}
@keyframes lu-breathe{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.97);opacity:.88}}
[data-lu="flash"] .li-word{animation:lu-flash .85s ease-in-out both}
@keyframes lu-flash{0%,100%{filter:none}40%{filter:brightness(1.6) saturate(1.3)}}
.brand-live [data-live="img"]{--li-h:40px}
@media (max-width:640px){.brand-live [data-live="img"]{--li-h:32px}}
@media (prefers-reduced-motion:reduce){[data-lu],[data-lu] *{animation:none!important}}
.brand-live .li-box img{max-width:none}

/* a product's own logo in the header: as tall as UBOS, but never wider than the room the menu leaves */
.brand-live [data-live="img"][style*="--ar"]{--li-h:min(40px,calc(250px / var(--ar)))}
@media (max-width:640px){.brand-live [data-live="img"][style*="--ar"]{--li-h:min(32px,calc(170px / var(--ar)))}}
