
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    z-index: 999;
    background: linear-gradient(
        90deg,
        #9a6bd5,
        #ecc0e7,
        #efba77
    );
    box-shadow: 0 0 12px #b98de6;
    pointer-events: none;
    transition: width .1s linear;
}

.hero-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-bubbles i {
    position: absolute;
    bottom: -70px;
    width: 25px;
    height: 25px;
    border: 1px solid #ffffff35;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 25%,
        #ffffff30,
        #ffffff05 65%
    );
    animation: bubbleRise 12s linear infinite;
}

.hero-bubbles i:nth-child(1) {
    left: 8%;
    width: 18px;
    height: 18px;
    animation-duration: 11s;
}

.hero-bubbles i:nth-child(2) {
    left: 23%;
    width: 42px;
    height: 42px;
    animation-delay: -5s;
}

.hero-bubbles i:nth-child(3) {
    left: 43%;
    width: 12px;
    height: 12px;
    animation-delay: -8s;
}

.hero-bubbles i:nth-child(4) {
    left: 65%;
    width: 32px;
    height: 32px;
    animation-delay: -3s;
    animation-duration: 14s;
}

.hero-bubbles i:nth-child(5) {
    left: 83%;
    width: 48px;
    height: 48px;
    animation-delay: -7s;
}

.hero-bubbles i:nth-child(6) {
    left: 94%;
    width: 20px;
    height: 20px;
    animation-delay: -10s;
}

@keyframes bubbleRise {
    0% {
        transform: translate(0, 0) scale(.7);
        opacity: 0;
    }

    15% {
        opacity: .7;
    }

    50% {
        transform: translate(25px, -300px) scale(1);
    }

    100% {
        transform: translate(-15px, -850px) scale(1.2);
        opacity: 0;
    }
}

.magnetic {
    translate: var(--mx, 0px) var(--my, 0px);
    transition:
        translate .22s ease-out,
        transform .2s,
        background .3s,
        box-shadow .3s;
}

.product::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        180px circle at var(--spot-x, 50%) var(--spot-y, 50%),
        #ffffff38,
        transparent 75%
    );
    opacity: 0;
    transition: opacity .3s;
}

.product:hover::before {
    opacity: 1;
}

.fly-drink {
    position: fixed;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid white;
    border-radius: 18px;
    z-index: 950;
    pointer-events: none;
    box-shadow: 0 15px 35px #38215355;
}

.boba-particle {
    position: fixed;
    z-index: 940;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 25%,
        #b78a65,
        #513326 65%,
        #241620
    );
    box-shadow:
        inset 0 1px 2px #ffffff50,
        0 3px 7px #38215320;
}

.cart-bump {
    animation: cartBump .55s ease !important;
}

@keyframes cartBump {
    0%, 100% {
        scale: 1;
    }

    40% {
        scale: 1.18;
        box-shadow: 0 0 0 7px #b490de25;
    }

    70% {
        scale: .96;
    }
}

.checkout-motion {
    position: fixed;
    z-index: 210;
    bottom: 25px;
    left: 25px;
    width: 230px;
    padding: 22px 18px 18px;
    background: #ffffffed;
    backdrop-filter: blur(20px);
    border: 1px solid #e3d5f3;
    border-radius: 25px;
    box-shadow: 0 20px 65px #38215330;
    text-align: center;
    animation: checkoutEnter .45s cubic-bezier(.2,.8,.2,1) both;
    pointer-events: none;
}

.checkout-motion > strong {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #382153;
}

.checkout-motion > small {
    display: block;
    color: #80768b;
    font-size: 11px;
    margin-top: 4px;
}

@keyframes checkoutEnter {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.checkout-cup,
.celebration-cup {
    position: relative;
    width: 100px;
    height: 142px;
    margin: 12px auto 0;
}

.cup-body {
    position: absolute;
    bottom: 10px;
    left: 12px;
    width: 76px;
    height: 104px;
    overflow: hidden;
    border: 3px solid #c6afd9;
    border-top: none;
    border-radius: 5px 5px 22px 22px;
    background: #f0e8f8;
    isolation: isolate;
}

.cup-body::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 8px;
    width: 5px;
    height: 72%;
    background: #ffffff65;
    border-radius: 10px;
    z-index: 3;
}

.cup-lid {
    position: absolute;
    width: 86px;
    height: 12px;
    top: 17px;
    left: 7px;
    border-radius: 9px;
    background: #62438d;
    border-bottom: 3px solid #42265f;
    z-index: 5;
}

.cup-straw {
    position: absolute;
    top: -12px;
    left: 52px;
    width: 10px;
    height: 49px;
    border-radius: 5px;
    background: linear-gradient(
        90deg,
        #9671c4,
        #cfb4ee
    );
    transform: rotate(15deg);
    transform-origin: bottom;
    z-index: 1;
}

.cup-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 86%;
    background: linear-gradient(
        180deg,
        #edd2ad,
        #b8885c
    );
    border-radius: 50% 50% 0 0 / 8px 8px 0 0;
    z-index: 1;
}

.checkout-cup .cup-liquid {
    animation: fillTea 2.8s ease-in-out infinite;
}

@keyframes fillTea {
    0% {
        height: 8%;
    }

    75%, 100% {
        height: 86%;
    }
}

.tea-stream {
    position: absolute;
    top: -15px;
    left: 42px;
    width: 8px;
    height: 120px;
    background: linear-gradient(
        180deg,
        transparent,
        #d1a578 25%,
        #e8c49d
    );
    border-radius: 10px;
    z-index: 2;
    transform-origin: top;
    animation: pourTea 2.8s ease infinite;
}

@keyframes pourTea {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }

    12%, 65% {
        transform: scaleY(1);
        opacity: .85;
    }

    85%, 100% {
        transform: scaleY(0);
        opacity: 0;
    }
}

.cup-pearls {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.cup-pearls i {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 25%,
        #805842,
        #3e232b 68%,
        #21151e
    );
}

.cup-pearls i:nth-child(1) {
    bottom: 5px;
    left: 7px;
}

.cup-pearls i:nth-child(2) {
    bottom: 4px;
    left: 21px;
}

.cup-pearls i:nth-child(3) {
    bottom: 5px;
    left: 35px;
}

.cup-pearls i:nth-child(4) {
    bottom: 6px;
    left: 48px;
}

.cup-pearls i:nth-child(5) {
    bottom: 17px;
    left: 15px;
}

.cup-pearls i:nth-child(6) {
    bottom: 17px;
    left: 42px;
}

.checkout-cup .cup-pearls i {
    animation: pearlBounce .8s ease-in-out infinite alternate;
}

.checkout-cup .cup-pearls i:nth-child(even) {
    animation-delay: -.4s;
}

@keyframes pearlBounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-5px);
    }
}

.cup-brand {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 33%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    background: #fff4df;
    border: 1px solid #ffffff80;
    border-radius: 50%;
    color: #62438d;
    font-size: 14px;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.cup-shadow {
    position: absolute;
    bottom: 0;
    left: 18px;
    width: 64px;
    height: 9px;
    border-radius: 50%;
    background: #38215315;
}

.motion-loading {
    height: 4px;
    background: #eee6f8;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 15px;
}

.motion-loading::after {
    content: "";
    display: block;
    width: 45%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(
        90deg,
        #9569ca,
        #d4b3ed
    );
    animation: motionLoading 1.4s ease-in-out infinite;
}

@keyframes motionLoading {
    from {
        transform: translateX(-110%);
    }

    to {
        transform: translateX(240%);
    }
}

.success-dialog {
    position: fixed;
    width: min(410px, calc(100% - 36px));
    max-height: calc(100% - 30px);
    padding: 32px;
    border: 1px solid #e8def2;
    border-radius: 30px;
    background: #fff;
    color: #241b32;
    box-shadow: 0 30px 100px #23133350;
    text-align: center;
    overflow: auto;
}

.success-dialog[open] {
    animation: dialogFade .4s ease both;
}

.success-dialog::backdrop {
    background: #21132e80;
    backdrop-filter: blur(8px);
    animation: dialogFade .3s ease both;
}

@keyframes dialogFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-art {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        #eee1fa,
        #f8f3fc 65%,
        transparent 70%
    );
}

.success-dialog[open] .celebration-cup {
    animation: celebrationPop .7s cubic-bezier(.2,1.4,.4,1) both;
}

@keyframes celebrationPop {
    0% {
        transform: scale(.3) rotate(-25deg);
        opacity: 0;
    }

    65% {
        transform: scale(1.12) rotate(8deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(-6deg);
        opacity: 1;
    }
}

.success-star {
    position: absolute;
    color: #ba8ae2;
    font-size: 27px;
    animation: starTwinkle 1.8s ease-in-out infinite alternate;
}

.star-one {
    top: 15px;
    left: 15px;
}

.star-two {
    top: 30px;
    right: 7px;
    animation-delay: -.6s;
    color: #e7b66f;
}

.star-three {
    bottom: 25px;
    left: 10px;
    animation-delay: -1.2s;
    color: #e7b66f;
}

@keyframes starTwinkle {
    from {
        transform: scale(.65) rotate(0);
        opacity: .4;
    }

    to {
        transform: scale(1.2) rotate(20deg);
        opacity: 1;
    }
}

.success-check {
    position: absolute;
    z-index: 5;
    right: 18px;
    bottom: 10px;
    width: 54px;
    height: 54px;
    padding: 5px;
    background: #319568;
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 7px 18px #31956835;
    animation: celebrationPop .6s .4s both;
}

.success-check svg {
    width: 100%;
    height: 100%;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-check svg circle {
    opacity: .5;
}

.success-check svg path {
    stroke-dasharray: 35;
    stroke-dashoffset: 35;
    animation: drawCheck .55s .65s ease forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #319568;
}

.success-dialog h2 {
    font-size: 29px;
    margin: 10px 0;
    letter-spacing: -1px;
}

.success-dialog p {
    color: #80768b;
    font-size: 13px;
    line-height: 1.8;
}

.success-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 23px 0 17px;
    padding: 15px;
    border-radius: 13px;
    background: #f5f0fb;
    color: #62438d;
}

.success-summary span {
    font-size: 12px;
}

.success-summary strong {
    font-size: 20px;
}

.confetti-layer {
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    pointer-events: none;
}

@media (max-width: 600px) {
    .checkout-motion {
        width: 175px;
        left: 14px;
        bottom: 90px;
        padding: 13px;
    }

    .checkout-cup {
        scale: .8;
        margin-top: 0;
        margin-bottom: -12px;
    }

    .success-dialog {
        padding: 24px;
    }

    .success-dialog h2 {
        font-size: 25px;
    }

    .success-art {
        margin-bottom: 15px;
    }

    .fly-drink {
        width: 62px;
        height: 62px;
    }
}

@media (hover: none) {
    .magnetic {
        translate: none;
    }

    .product::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bubbles {
        display: none;
    }

    .fly-drink,
    .boba-particle,
    .confetti-layer {
        display: none;
    }

    .checkout-cup .cup-liquid {
        height: 86%;
    }

    .tea-stream {
        display: none;
    }

    .success-check svg path {
        stroke-dashoffset: 0;
    }

    .magnetic {
        translate: none;
    }
}
