/* THE BURGER BAR (js/scenes/burger.js + js/burger/): the stage shell, then each step */
.bgbar { position: absolute; inset: 0; }
.bgbar.mixing { background: #fff8fb; }
.bgbar.mixing > :not(.mixstage-wrap) { visibility: hidden; }
body.burger-staged #topbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 50;
  background: none; pointer-events: none; border-bottom: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.burger-staged #topbar > * { pointer-events: auto; }
.bgbar .mixstage-wrap { transition: opacity .45s ease, transform .55s cubic-bezier(.3,1,.4,1); }
.bgbar .mixstage-wrap.entering { opacity: 0; transform: translateX(16%); }
.bgbar .mixstage-wrap.leaving { opacity: 0; transform: translateX(-16%); }

/* the stack on its board (every step) */
.mxs .bg-stack { position: absolute; z-index: 6; pointer-events: none; transform-origin: 50% 100%; }
.mxs .bg-stack svg { display: block; overflow: visible; }
.mxs .bg-stack.bump { animation: bgBump .34s cubic-bezier(.3,1.6,.5,1); }
@keyframes bgBump { 0% { transform: scaleY(.94) scaleX(1.03); } 55% { transform: scaleY(1.04) scaleX(.98); } 100% { transform: none; } }
.mxs .bg-stack.squish { animation: bgSquish .5s cubic-bezier(.3,1.5,.5,1); }
@keyframes bgSquish { 0% { transform: scaleY(1.06); } 40% { transform: scaleY(.82) scaleX(1.06); } 100% { transform: none; } }

/* a tray / basket / shelf of choices (buns, patties, bottles) */
.mxs .bg-tray { position: absolute; z-index: 7; }
.mxs .bg-tray > svg { position: absolute; left: 0; top: 0; display: block; overflow: visible; pointer-events: none; }
.mxs .bg-choice { position: absolute; padding: 0; border: 0; background: none; border-radius: 18px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mxs .bg-choice span { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); padding: 2px 10px; border-radius: 11px; background: #fff; border: 2px solid #f4b8d0; font-weight: 900; font-size: 14px; color: #5a2d4c; white-space: nowrap; }
.mxs .bg-choice:active { background: rgba(255,255,255,.5); }
.mxs .bg-choice.sel { background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 4px #ff8fb1; }
.mxs .bg-choice.sel span { background: #ff8fb1; color: #fff; border-color: #fff; }
.mxs .bg-choice.wish { box-shadow: 0 0 0 4px #fff, 0 0 18px 6px #ffd23f; animation: bgWish 1.3s ease-in-out infinite; }
@keyframes bgWish { 0%, 100% { box-shadow: 0 0 0 4px #fff, 0 0 14px 4px #ffd23f; } 50% { box-shadow: 0 0 0 4px #fff, 0 0 26px 10px #ffd23f; } }

/* the grill */
.bgg .bg-flames path { transform-box: fill-box; transform-origin: 50% 100%; animation: bgFlame .5s ease-in-out infinite alternate; }
.bgg .bg-flames .f1 { animation-delay: -.15s; } .bgg .bg-flames .f2 { animation-delay: -.3s; } .bgg .bg-flames .f3 { animation-delay: -.42s; }
@keyframes bgFlame { from { transform: scaleY(.8) scaleX(1.05); } to { transform: scaleY(1.15) scaleX(.95); } }
.bgg .bg-ongrill { position: absolute; z-index: 8; cursor: pointer; touch-action: none; transform-origin: 50% 70%; }
.bgg .bg-ongrill svg { display: block; overflow: visible; pointer-events: none; }
.bgg .bg-ongrill.on svg { animation: bgSizzle .2s linear infinite alternate; }
@keyframes bgSizzle { from { transform: translateY(0); } to { transform: translateY(-1.5px); } }
.bgg .bg-ongrill.ask { animation: bgAsk .7s ease-in-out infinite; }
@keyframes bgAsk { 0%, 100% { transform: none; } 50% { transform: translateY(-8px) scale(1.04); } }
.bgg .bg-ongrill.flip { animation: bgFlip .5s cubic-bezier(.3,1.2,.5,1); }
@keyframes bgFlip { 0% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-90px) rotateX(180deg); } 100% { transform: translateY(0) rotateX(360deg); } }
.bgg .bg-fly { position: absolute; z-index: 20; width: 200px; height: 80px; pointer-events: none; transition: left .5s cubic-bezier(.3,1.2,.5,1), top .5s cubic-bezier(.3,1.2,.5,1); }
.bgg .bg-fly svg { display: block; overflow: visible; }
.bgg .bg-meter { position: absolute; z-index: 9; width: 180px; height: 22px; border-radius: 11px; background: #fff; border: 3px solid #5a2d4c; box-sizing: border-box; opacity: 0; transition: opacity .3s; }
.bgg .bg-meter.show { opacity: 1; }
.bgg .bg-meter i { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 0; border-radius: 8px; background: linear-gradient(90deg, #ffb6cf, #ffb13c 60%, #8a5134); transition: width .12s linear; }
.bgg .bg-meter b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 13px; font-weight: 900; color: #5a2d4c; text-transform: uppercase; letter-spacing: .5px; }

/* build it: the cart is the pizza cart; a topping hopping over */
.bgb .bg-bit { position: absolute; width: 180px; height: 70px; z-index: 30; pointer-events: none; transition: left .38s cubic-bezier(.3,1.2,.5,1), top .38s cubic-bezier(.3,1.2,.5,1); }
.bgb .bg-bit svg { display: block; overflow: visible; }
.bgb .bg-bit.go { animation: bgHop .38s ease-out; }
@keyframes bgHop { 50% { transform: translateY(-50px) rotate(8deg); } }

/* sauce: the bottle in your hand */
.bgc .bg-hand { position: absolute; width: 140px; height: 180px; z-index: 22; pointer-events: none; opacity: 0; transition: opacity .2s; }
.bgc .bg-hand.show { opacity: 1; animation: bgSqueeze .45s ease-in-out 2 alternate; }
.bgc .bg-hand svg { display: block; overflow: visible; }
@keyframes bgSqueeze { from { transform: rotate(-4deg); } to { transform: rotate(6deg) translateY(4px); } }

/* serve */
.bgs .bgs-cust { position: absolute; z-index: 4; opacity: 0; transform: translateY(40px); transition: opacity .4s, transform .5s cubic-bezier(.3,1.3,.5,1); }
.bgs .bgs-cust.in { opacity: 1; transform: none; }
.bgs .bgs-cust .puppet { display: block; width: 100%; height: auto; }
.bgs .bgs-cust .puppet .pp-mouth > * { display: none; }
.bgs .bgs-cust .puppet[data-mood="happy"] .m-smile, .bgs .bgs-cust .puppet[data-mood="excited"] .m-open, .bgs .bgs-cust .puppet[data-mood="grossed"] .m-grossed { display: block; }
.bgs .bgs-cust.chew .puppet .pp-mouth > * { display: none; }
.bgs .bgs-cust.chew .puppet .m-open { display: block; transform-box: fill-box; transform-origin: 50% 0; animation: bgChew .18s ease-in-out 4 alternate; }
@keyframes bgChew { from { transform: scaleY(1); } to { transform: scaleY(.25); } }
.bgs .bgs-cust.chew .pp-head { animation: bgNod .36s ease-in-out 2; transform-box: fill-box; transform-origin: 50% 80%; }
@keyframes bgNod { 50% { transform: rotate(-4deg) translateY(4px); } }
.bgs .bgs-lip { position: absolute; left: -40px; right: -40px; height: 400px; z-index: 5; background: linear-gradient(#fff, #f6e2ec 30px, #f4c6da 32px, #f4c6da); border-top: 4px solid #5a2d4c; pointer-events: none; }
.bgs .bgs-bubble { position: absolute; z-index: 9; max-width: 340px; padding: 10px 18px; border-radius: 20px; background: #fff; border: 4px solid #5a2d4c; font-weight: 900; font-size: 22px; color: #5a2d4c; opacity: 0; transform: scale(.7); transform-origin: 0 100%; transition: opacity .25s, transform .35s cubic-bezier(.3,1.6,.5,1); pointer-events: none; }
.bgs .bgs-bubble.show { opacity: 1; transform: none; }
.bgs .bgs-tray { position: absolute; z-index: 8; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; transition: left .6s cubic-bezier(.3,1.1,.5,1), top .6s cubic-bezier(.3,1.1,.5,1), opacity .4s; -webkit-tap-highlight-color: transparent; }
.bgs .bgs-tray.in { opacity: 1; animation: bgTrayBob 1.6s ease-in-out infinite; }
.bgs .bgs-tray.go { animation: none; }
@keyframes bgTrayBob { 50% { transform: translateY(-6px); } }
.bgs .bgs-tray svg { display: block; overflow: visible; pointer-events: none; }
/* going overboard with the sauce */
.mxs .bg-stack.shake { animation: bgShake .5s ease-in-out; }
@keyframes bgShake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px) rotate(-2deg); } 40% { transform: translateX(8px) rotate(2deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.bgs .bgs-smear { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; animation: bgSmearIn .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes bgSmearIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.mxs .bg-stack.wobble { animation: bgWobble 1.1s ease-in-out; }
@keyframes bgWobble { 0%, 100% { transform: none; } 15% { transform: rotate(-4deg); } 35% { transform: rotate(4deg); } 55% { transform: rotate(-2.5deg); } 75% { transform: rotate(2deg); } }
