/* ==================================================
   UNLOCK BAYI - HOME LOCK LOGO V1
   Standalone animation component
   ================================================== */

.ub-home-lock-logo {
    position: relative;
    isolation: isolate;
    direction: ltr;

    display: flex;
    align-items: center;

    width: min(100%, 510px);
    height: 122px;

    box-sizing: border-box;
    overflow: hidden;

    margin: 4px 0 20px;
    padding: 12px 17px;

    border-radius: 16px;
    border: 1px solid rgba(90,155,235,.23);

    background:
        radial-gradient(
            ellipse at 32% 48%,
            rgba(27,112,218,.21),
            transparent 57%
        ),
        linear-gradient(
            115deg,
            #060d1b 0%,
            #0c1c33 53%,
            #07111f 100%
        );

    box-shadow:
        inset 0 0 25px rgba(43,137,241,.06),
        0 12px 35px rgba(4,14,32,.16);

    user-select: none;
    pointer-events: none;
}

.ub-home-lock-logo *,
.ub-home-lock-logo *::before,
.ub-home-lock-logo *::after {
    box-sizing: border-box;
}

.ub-home-lock-logo::before {
    content: "";
    position: absolute;
    inset: 0;

    opacity: .38;

    background-image:
        radial-gradient(
            rgba(146,190,243,.30) .55px,
            transparent .8px
        );

    background-size: 13px 13px;

    mask-image:
        linear-gradient(
            to right,
            transparent,
            #000 45%,
            transparent
        );

    pointer-events: none;
}

.ub-home-lock-glow {
    position: absolute;

    left: -35px;
    top: -75px;

    width: 250px;
    height: 250px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(30,144,255,.21),
            rgba(30,144,255,.07) 37%,
            transparent 68%
        );

    animation:
        ubHomeGlow 7.2s ease-in-out infinite;
}

.ub-home-lock-icon {
    position: relative;
    z-index: 2;

    flex: 0 0 88px;

    width: 88px;
    height: 96px;

    filter:
        drop-shadow(0 0 10px rgba(51,156,255,.4));
}

.ub-home-lock-ring {
    position: absolute;

    inset: 4px 0 0;

    border: 1px solid rgba(66,154,247,.28);
    border-radius: 50%;

    transform: rotate(-19deg);

    animation:
        ubHomeRing 7.2s ease-in-out infinite;
}

.ub-home-lock-ring::after {
    content: "";
    position: absolute;

    inset: -5px;

    border: 1px solid transparent;
    border-top-color: rgba(82,182,255,.83);
    border-left-color: rgba(82,182,255,.18);

    border-radius: 50%;

    animation:
        ubHomeRingSpin 7.2s linear infinite;
}

.ub-home-lock-shackle {
    position: absolute;

    width: 41px;
    height: 43px;

    left: 24px;
    top: 13px;

    border: 7px solid #56b5ff;
    border-bottom: 0;

    border-radius: 25px 25px 0 0;

    background: transparent;

    transform-origin: 8px 37px;

    box-shadow:
        inset 1px 0 3px rgba(255,255,255,.3),
        0 0 12px rgba(48,157,252,.27);

    animation:
        ubHomeUnlock 7.2s ease-in-out infinite;
}

.ub-home-lock-body {
    position: absolute;

    width: 59px;
    height: 45px;

    left: 15px;
    top: 44px;

    display: grid;
    place-items: center;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.32);

    background:
        linear-gradient(
            135deg,
            #7ac7ff 0%,
            #237ee0 42%,
            #0e4aab 100%
        );

    box-shadow:
        0 0 20px rgba(37,138,245,.44),
        inset 0 1px 2px rgba(255,255,255,.43);

    animation:
        ubHomeLockBody 7.2s ease-in-out infinite;
}

.ub-home-lock-keyhole {
    position: relative;

    width: 11px;
    height: 11px;

    margin-top: -7px;

    border-radius: 50%;
    background: #06234b;
}

.ub-home-lock-keyhole::after {
    content: "";
    position: absolute;

    left: 3px;
    top: 8px;

    width: 5px;
    height: 13px;

    border-radius: 2px;

    background: #06234b;
}

.ub-home-lock-wordmark {
    position: relative;
    z-index: 3;

    flex: 1;
    min-width: 0;

    padding-left: 12px;

    opacity: 0;
    transform: translateX(-17px);

    animation:
        ubHomeWordReveal 7.2s ease-in-out infinite;
}

.ub-home-lock-name {
    display: flex;
    align-items: baseline;
    gap: .18em;

    white-space: nowrap;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: clamp(27px, 3.6vw, 43px);
    line-height: 1.12;

    font-weight: 850;
    letter-spacing: -.05em;
}

.ub-home-lock-name span {
    color: #f5f9ff;

    text-shadow:
        0 0 17px rgba(137,196,255,.20);
}

.ub-home-lock-name strong {
    font-weight: 850;

    color: #f4c66a;

    text-shadow:
        0 0 18px rgba(255,190,65,.22);
}

.ub-home-lock-subtitle {
    margin-top: 7px;

    color: #a9c2df;

    font-size: 10px;
    font-weight: 750;

    letter-spacing: .25em;
    white-space: nowrap;
}

.ub-home-lock-light {
    position: absolute;
    z-index: 4;

    left: -50%;
    top: 8px;

    width: 36%;
    height: calc(100% - 16px);

    opacity: 0;

    transform: skewX(-22deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(139,211,255,.15),
            rgba(255,255,255,.24),
            transparent
        );

    animation:
        ubHomeLightSweep 7.2s ease-in-out infinite;
}

.ub-home-lock-sparks {
    position: absolute;
    z-index: 5;

    inset: 0;

    pointer-events: none;
}

.ub-home-lock-sparks i {
    position: absolute;

    left: 83px;
    top: 57px;

    width: 4px;
    height: 4px;

    border-radius: 1px;

    background: #7fd1ff;

    box-shadow:
        0 0 10px rgba(85,182,255,.9);

    opacity: 0;

    animation:
        ubHomeSparks 7.2s ease-out infinite;
}

.ub-home-lock-sparks i:nth-child(2n) {
    background: #ffcf70;
    box-shadow: 0 0 10px rgba(255,189,75,.8);
}

.ub-home-lock-sparks i:nth-child(1) {
    --tx: 45px;
    --ty: -29px;
}

.ub-home-lock-sparks i:nth-child(2) {
    --tx: 82px;
    --ty: 26px;
}

.ub-home-lock-sparks i:nth-child(3) {
    --tx: 117px;
    --ty: -17px;
}

.ub-home-lock-sparks i:nth-child(4) {
    --tx: 168px;
    --ty: 32px;
}

.ub-home-lock-sparks i:nth-child(5) {
    --tx: 211px;
    --ty: -30px;
}

.ub-home-lock-sparks i:nth-child(6) {
    --tx: 252px;
    --ty: 16px;
}

.ub-home-lock-sparks i:nth-child(7) {
    --tx: 296px;
    --ty: -8px;
}

.ub-home-lock-sparks i:nth-child(8) {
    --tx: 335px;
    --ty: 23px;
}

/* Animation timeline */

@keyframes ubHomeUnlock {
    0%, 17% {
        transform: translate(0,0) rotate(0deg);
    }

    27%, 79% {
        transform: translate(9px,-4px) rotate(34deg);
    }

    94%, 100% {
        transform: translate(0,0) rotate(0deg);
    }
}

@keyframes ubHomeWordReveal {
    0%, 21% {
        opacity: 0;
        transform: translateX(-17px);
        filter: blur(7px);
    }

    37%, 86% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-5px);
        filter: blur(3px);
    }
}

@keyframes ubHomeSparks {
    0%, 16% {
        opacity: 0;
        transform: translate(0,0) scale(.35);
    }

    23% {
        opacity: 1;
    }

    39%, 100% {
        opacity: 0;
        transform:
            translate(var(--tx),var(--ty))
            scale(.6);
    }
}

@keyframes ubHomeRing {
    0%, 100% {
        opacity: .45;
        transform: rotate(-19deg) scale(.97);
    }

    30%, 72% {
        opacity: .95;
        transform: rotate(0) scale(1.04);
    }
}

@keyframes ubHomeRingSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes ubHomeLockBody {
    0%, 100% {
        filter: brightness(.85);
    }

    30%, 80% {
        filter: brightness(1.2);
    }
}

@keyframes ubHomeGlow {
    0%, 100% {
        opacity: .55;
    }

    35%, 75% {
        opacity: 1;
    }
}

@keyframes ubHomeLightSweep {
    0%, 39% {
        left: -50%;
        opacity: 0;
    }

    47% {
        opacity: 1;
    }

    63%, 100% {
        left: 130%;
        opacity: 0;
    }
}

/* Mobile */

@media(max-width:600px) {
    .ub-home-lock-logo {
        width: 100%;
        height: 98px;

        padding: 10px;
        margin-bottom: 16px;

        border-radius: 13px;
    }

    .ub-home-lock-icon {
        flex-basis: 72px;

        transform: scale(.76);
        transform-origin: center left;
    }

    .ub-home-lock-wordmark {
        margin-left: -9px;
        padding-left: 6px;
    }

    .ub-home-lock-name {
        font-size: clamp(23px, 6vw, 33px);
    }

    .ub-home-lock-subtitle {
        font-size: 8px;
        letter-spacing: .11em;
    }
}

@media(max-width:360px) {
    .ub-home-lock-name {
        font-size: 22px;
    }

    .ub-home-lock-subtitle {
        font-size: 7px;
        letter-spacing: .07em;
    }
}


/* ==================================================
   UB_HEADER_ANIMATED_LOGO_V2
   Compact top-left brand treatment
   ================================================== */

.ub-home-animated-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 1 244px;
    width: 244px;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    text-decoration: none;
}

.ub-home-lock-logo--header {
    width: 100%;
    height: 65px;
    min-width: 0;
    margin: 0;
    padding: 5px 8px;
    border-radius: 13px;
    border: 1px solid rgba(90,155,235,.26);
    box-shadow:
        inset 0 0 18px rgba(43,137,241,.07),
        0 3px 15px rgba(3,16,40,.13);
}

.ub-home-lock-logo--header .ub-home-lock-icon {
    flex: 0 0 54px;
    transform: scale(.54);
    transform-origin: left center;
}

.ub-home-lock-logo--header .ub-home-lock-wordmark {
    flex: 1;
    min-width: 0;
    padding-left: 7px;
    margin-left: 0;
    opacity: 1;
    transform: none;
    filter: none;
    animation:
        ubHomeHeaderWord 7.2s ease-in-out infinite;
}

.ub-home-lock-logo--header .ub-home-lock-name {
    font-size: 23px;
    line-height: 1.14;
    letter-spacing: -.055em;
}

.ub-home-lock-logo--header .ub-home-lock-subtitle {
    margin-top: 3px;
    font-size: 6.7px;
    letter-spacing: .105em;
}

.ub-home-lock-logo--header .ub-home-lock-sparks i {
    left: 46px;
    top: 31px;
}

@keyframes ubHomeHeaderWord {
    0%, 100% {
        opacity: .86;
        transform: translateX(0);
        filter: blur(0);
    }
    12% {
        opacity: .35;
        transform: translateX(-6px);
        filter: blur(2px);
    }
    32%, 94% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@media (max-width: 600px) {
    .ub-home-animated-brand {
        flex-basis: 185px;
        width: 185px;
    }

    .ub-home-lock-logo--header {
        height: 53px;
        padding: 4px 6px;
        border-radius: 10px;
    }

    .ub-home-lock-logo--header .ub-home-lock-icon {
        flex-basis: 40px;
        transform: scale(.42);
        transform-origin: left center;
    }

    .ub-home-lock-logo--header .ub-home-lock-wordmark {
        margin-left: 0;
        padding-left: 3px;
    }

    .ub-home-lock-logo--header .ub-home-lock-name {
        font-size: 18px;
    }

    .ub-home-lock-logo--header .ub-home-lock-subtitle {
        font-size: 5.7px;
        letter-spacing: .06em;
    }
}

/* Accessibility: no continuous motion when requested */

@media(prefers-reduced-motion:reduce) {
    .ub-home-lock-logo *,
    .ub-home-lock-logo *::before,
    .ub-home-lock-logo *::after {
        animation: none !important;
    }

    .ub-home-lock-wordmark {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .ub-home-lock-shackle {
        transform: translate(9px,-4px) rotate(34deg);
    }

    .ub-home-lock-sparks,
    .ub-home-lock-light {
        display: none;
    }
}
