.login-card,
.customer-card-frame {
    position: relative;
    z-index: 2;
    transition:
        opacity 720ms cubic-bezier(0.2, 0.9, 0.2, 1),
        transform 720ms cubic-bezier(0.2, 0.9, 0.2, 1),
        filter 620ms ease;
    will-change: opacity, transform, filter;
}

.portal-motion-card-hidden {
    opacity: 0;
    transform: translateY(34px) scale(0.88);
    filter: blur(10px);
}

.portal-motion-card-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.portal-motion-card-exploded {
    animation: portal-motion-card-boom 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-motion-overlay {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.portal-motion-overlay.is-fading {
    transition: opacity 320ms ease;
    opacity: 0;
}

.portal-motion-floor {
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: 16%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.46),
        rgba(255, 255, 255, 0)
    );
    opacity: 0.38;
}

.portal-motion-actor,
.portal-motion-case {
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    transform: translate3d(-150px, 0, 0);
    will-change: transform, opacity;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.portal-motion-actor {
    width: 112px;
    height: 132px;
    opacity: 0;
}

.portal-motion-actor::before {
    content: "";
    position: absolute;
    inset: 16% 18% 8%;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    filter: blur(18px);
}

.portal-motion-actor::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 10px;
    height: 12px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(15, 28, 62, 0.28), rgba(15, 28, 62, 0));
    filter: blur(3px);
}

.portal-motion-actor-emoji {
    position: relative;
    z-index: 1;
    line-height: 1;
    filter: drop-shadow(0 14px 26px rgba(20, 28, 60, 0.18));
}

.portal-motion-case {
    font-size: 2.3rem;
    line-height: 1;
    opacity: 0;
    filter: drop-shadow(0 12px 22px rgba(12, 22, 50, 0.3));
}

.portal-motion-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.32);
    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.96) 0 8%,
            rgba(122, 187, 255, 0.92) 18%,
            rgba(81, 136, 255, 0.44) 42%,
            rgba(81, 136, 255, 0) 74%
        ),
        radial-gradient(circle, rgba(255, 208, 143, 0.44), rgba(255, 208, 143, 0) 68%);
    mix-blend-mode: screen;
}

.portal-motion-burst::before,
.portal-motion-burst::after {
    content: "";
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.portal-motion-burst::after {
    inset: 12%;
    border-color: rgba(130, 193, 255, 0.36);
}

[data-portal-motion-context="login"] .portal-motion-overlay {
    z-index: 1;
}

[data-portal-motion-context="login"] .portal-motion-floor {
    bottom: 14%;
}

[data-portal-motion-context="customer"] .portal-motion-floor {
    bottom: 12%;
    opacity: 0.34;
}

[data-portal-motion-context="customer"] .portal-motion-case {
    font-size: 2.45rem;
}

[data-portal-motion-context="customer"] .portal-motion-burst {
    width: 220px;
    height: 220px;
}

@keyframes portal-motion-card-boom {
    0% {
        transform: translateY(28px) scale(0.88);
    }

    46% {
        transform: translateY(-8px) scale(1.04);
    }

    72% {
        transform: translateY(2px) scale(0.99);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 900px) {
    .portal-motion-actor {
        width: 92px;
        height: 112px;
    }

    .portal-motion-case {
        font-size: 2rem;
    }

    .portal-motion-burst {
        width: 150px;
        height: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .customer-card-frame {
        transition: none;
    }

    .portal-motion-card-exploded {
        animation: none;
    }

    .portal-motion-overlay {
        display: none;
    }
}
