/* ==========================================================================
   A9X LABS — WELCOME OFFER (guest conversion popup)
   Native to the homepage: midnight stage, glass panel, cyan→violet gradients,
   animated 3D credit token with orbital rings. Hidden until the trigger fires.
   ========================================================================== */

html.wo-open {
    overflow: hidden;
}

.wo {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 18px;
    font-family: inherit;
    color: #eef3ff;
    -webkit-font-smoothing: antialiased;
}

.wo[hidden] {
    display: none !important;
}

.wo *,
.wo *::before,
.wo *::after {
    box-sizing: border-box;
}

.wo__back {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 10, .82);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    opacity: 0;
    transition: opacity .45s ease;
}

.wo.is-in .wo__back {
    opacity: 1;
}

.wo__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(92svh, 780px);
    overflow: auto;
    padding: clamp(22px, 3.2vw, 34px) clamp(20px, 3vw, 32px) 22px;
    border-radius: 24px;
    border: 1px solid rgba(126, 158, 255, .22);
    background:
        radial-gradient(120% 70% at 50% -12%, rgba(124, 92, 255, .2), transparent 58%),
        radial-gradient(90% 60% at 100% 110%, rgba(34, 211, 238, .1), transparent 60%),
        linear-gradient(172deg, rgba(10, 14, 28, .97), rgba(5, 8, 18, .985));
    box-shadow:
        0 70px 160px -60px #000,
        0 0 0 1px rgba(255, 255, 255, .02),
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 0 110px -40px rgba(124, 92, 255, .75);
    backdrop-filter: blur(10px) saturate(118%);
    -webkit-backdrop-filter: blur(10px) saturate(118%);
    text-align: center;
    opacity: 0;
    transform: translateY(18px) scale(.97);
    transition: opacity .45s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
}

.wo.is-in .wo__panel {
    opacity: 1;
    transform: none;
}

.wo.is-out .wo__panel {
    opacity: 0;
    transform: translateY(10px) scale(.985);
    transition: opacity .28s ease, transform .3s ease;
}

.wo.is-out .wo__back {
    opacity: 0;
}

.wo__panel::before {
    content: none;
    display: none;
}

.wo__x {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(126, 158, 255, .2);
    background: rgba(8, 11, 22, .7);
    color: #a8b6d9;
    cursor: pointer;
    transition: color .2s, border-color .2s, transform .25s, background .2s;
}

.wo__x svg {
    width: 14px;
    height: 14px;
}

.wo__x:hover {
    color: #fff;
    border-color: rgba(126, 158, 255, .5);
    background: rgba(124, 92, 255, .2);
    transform: rotate(90deg);
}

/* ---------- credit token stage ---------- */
.wo__stage {
    position: relative;
    width: min(168px, 42vw);
    aspect-ratio: 1;
    margin: 2px auto 12px;
}

.wo__glow {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 92, 255, .55), rgba(34, 211, 238, .12) 52%, transparent 72%);
    filter: blur(14px);
    animation: wo-breathe 5.6s ease-in-out infinite;
}

.wo__token {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 14px 26px rgba(124, 92, 255, .35));
    animation: wo-float 7s ease-in-out infinite;
}

.wo__orbit {
    position: absolute;
    inset: -6%;
    border-radius: 50%;
    border: 1px solid rgba(124, 92, 255, .22);
    border-top-color: rgba(34, 211, 238, .85);
    border-right-color: rgba(124, 92, 255, .6);
    border-bottom-color: rgba(232, 121, 249, .45);
    animation: wo-spin 16s linear infinite;
    opacity: .85;
}

.wo__orbit--b {
    inset: 5%;
    border-color: rgba(124, 92, 255, .16);
    border-bottom-color: rgba(34, 211, 238, .5);
    border-left-color: rgba(232, 121, 249, .5);
    animation-duration: 24s;
    animation-direction: reverse;
    opacity: .5;
}

.wo__sat {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 50%;
    animation: wo-spin 11s linear infinite;
}

.wo__sat::before {
    content: "";
    position: absolute;
    top: -3px;
    left: calc(50% - 3px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 14px 3px rgba(34, 211, 238, .85);
}

.wo__sat--b {
    animation-duration: 17s;
    animation-direction: reverse;
}

.wo__sat--b::before {
    width: 4px;
    height: 4px;
    background: #e879f9;
    box-shadow: 0 0 12px 3px rgba(232, 121, 249, .85);
}

.wo__spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c4b5fd;
    box-shadow: 0 0 10px 2px rgba(196, 181, 253, .7);
    animation: wo-drift 9s ease-in-out infinite alternate;
}

.wo__spark--1 {
    top: 6%;
    left: 12%;
}

.wo__spark--2 {
    top: 18%;
    right: 6%;
    animation-delay: 1.8s;
}

.wo__spark--3 {
    bottom: 14%;
    left: 4%;
    animation-delay: 3.2s;
}

.wo__spark--4 {
    bottom: 6%;
    right: 16%;
    animation-delay: 4.6s;
}

/* ---------- copy ---------- */
.wo__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(124, 92, 255, .34);
    background: linear-gradient(100deg, rgba(124, 92, 255, .18), rgba(34, 211, 238, .08));
    box-shadow: 0 0 26px -12px rgba(124, 92, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
    font-family: var(--mono, ui-monospace, monospace);
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #dcd4ff;
}

.wo__title {
    margin: 12px 0 0;
    font-size: clamp(1.9rem, 5.4vw, 2.6rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -.035em;
    background: linear-gradient(100deg, #f4f7ff 0%, #a9c2ff 42%, #e879f9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.wo__sub {
    margin: 10px 0 0;
    font-size: clamp(1rem, 2.6vw, 1.15rem);
    font-weight: 700;
    color: #eef3ff;
}

.wo__desc {
    margin: 9px auto 0;
    max-width: 42ch;
    font-size: .85rem;
    line-height: 1.75;
    color: #a8b6d9;
}

.wo__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 7px;
    max-width: 340px;
    margin: 16px auto 0;
    padding: 0;
    list-style: none;
}

.wo__features li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(126, 158, 255, .16);
    background: rgba(255, 255, 255, .03);
    justify-content: flex-start;
    font-size: .68rem;
    font-weight: 600;
    color: #c9d4ee;
}

.wo__fico {
    display: grid;
    place-items: center;
    color: #7fd6ea;
}

.wo__fico .icon {
    width: 13px;
    height: 13px;
}

.wo__creditline {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 15px;
    border: 1px solid rgba(232, 196, 124, .28);
    background: radial-gradient(120% 160% at 10% -30%, rgba(255, 184, 107, .14), transparent 58%), linear-gradient(180deg, rgba(21, 16, 8, .9), rgba(12, 10, 6, .95));
}

.wo__creditline b {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #ffd39a;
    font-variant-numeric: tabular-nums;
}

.wo__creditline span {
    font-family: var(--mono, ui-monospace, monospace);
    font-size: .58rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #c9a44c;
}

.wo__creditline i {
    flex-basis: 100%;
    font-style: normal;
    font-size: .6rem;
    color: #a8946a;
}

/* ---------- actions ---------- */
.wo__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 54px;
    margin: 16px 0 0;
    padding-inline: 20px;
    border-radius: 15px;
    border: 1px solid rgba(157, 140, 255, .55);
    background: linear-gradient(120deg, #5b3ff0, #7c5cff 52%, #22d3ee);
    box-shadow: 0 22px 52px -22px rgba(124, 92, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .25);
    color: #fff;
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform .28s cubic-bezier(.16, 1, .3, 1), box-shadow .3s;
}

.wo__cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .26) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s ease;
}

.wo__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 64px -22px rgba(124, 92, 255, 1);
}

.wo__cta:hover::after {
    transform: translateX(120%);
}

.wo__arrow {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(4, 8, 18, .35);
    color: #fff;
}

.wo__arrow svg {
    width: 14px;
    height: 14px;
}

[dir="rtl"] .wo__arrow svg {
    transform: scaleX(-1);
}

.wo__cta:focus-visible,
.wo__later:focus-visible,
.wo__x:focus-visible {
    outline: 2px solid #b9a8ff;
    outline-offset: 3px;
}

.wo__later {
    display: block;
    width: 100%;
    min-height: 40px;
    margin: 8px 0 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: #8fa1c4;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .2s, background .2s;
}

.wo__later:hover {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

.wo__foot {
    margin: 10px 0 0;
    font-family: var(--mono, ui-monospace, monospace);
    font-size: .5rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #5d6c8d;
}

/* ---------- keyframes ---------- */
@property --wo-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes wo-spin {
    to {
        transform: rotate(360deg);
        --wo-angle: 360deg;
    }
}

@keyframes wo-float {

    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateY(-6px) rotate(1.4deg);
    }
}

@keyframes wo-breathe {

    0%,
    100% {
        opacity: .75;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.06);
    }
}

@keyframes wo-drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: .5;
    }

    to {
        transform: translate3d(10px, -14px, 0) scale(1.4);
        opacity: 1;
    }
}

/* ---------- responsive ---------- */
@media (max-width: 520px) {
    .wo {
        padding: 10px;
        align-items: end;
    }

    .wo__panel {
        width: 100%;
        max-height: 88svh;
        border-radius: 22px;
        padding: 20px 16px 16px;
    }

    .wo__stage {
        width: min(150px, 44vw);
        margin-bottom: 10px;
    }

    .wo__features li {
        font-size: .62rem;
    }
}

@media (max-height: 720px) {
    .wo__stage {
        width: min(130px, 34vw);
        margin-bottom: 6px;
    }

    .wo__title {
        font-size: clamp(1.6rem, 4.6vw, 2rem);
    }

    .wo__creditline {
        margin-top: 12px;
        padding: 9px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wo__panel,
    .wo__back,
    .wo__token,
    .wo__glow,
    .wo__orbit,
    .wo__sat,
    .wo__spark,
    .wo__panel::before,
    .wo__cta::after {
        animation: none !important;
        transition-duration: .001ms !important;
    }

    .wo__panel {
        opacity: 1;
        transform: none;
    }
}

.wo-reduced .wo__token,
.wo-reduced .wo__glow,
.wo-reduced .wo__orbit,
.wo-reduced .wo__sat,
.wo-reduced .wo__spark,
.wo-reduced .wo__panel::before {
    animation: none !important;
}

/* light homepage theme */
html[data-home-theme="light"] .wo {
    color: #130c2b;
}

html[data-home-theme="light"] .wo__panel {
    background:
        radial-gradient(120% 70% at 50% -12%, rgba(124, 92, 255, .16), transparent 58%),
        linear-gradient(172deg, rgba(255, 255, 255, .98), rgba(246, 244, 253, .99));
    border-color: rgba(37, 22, 84, .16);
    box-shadow: 0 70px 160px -70px rgba(50, 30, 120, .55), inset 0 1px 0 #fff;
    color: #130c2b;
}

html[data-home-theme="light"] .wo__badge {
    color: #5b21b6;
    background: rgba(109, 40, 217, .1);
    border-color: rgba(109, 40, 217, .25);
}

html[data-home-theme="light"] .wo__sub {
    color: #130c2b;
}

html[data-home-theme="light"] .wo__desc {
    color: #4d4669;
}

html[data-home-theme="light"] .wo__features li {
    color: #4d4669;
    background: #f6f2ff;
    border-color: rgba(37, 22, 84, .12);
}

html[data-home-theme="light"] .wo__later {
    color: #6b6488;
}

html[data-home-theme="light"] .wo__foot {
    color: #7d7697;
}

html[data-home-theme="light"] .wo__x {
    background: rgba(255, 255, 255, .8);
    border-color: rgba(37, 22, 84, .14);
    color: #4d4669;
}

html[data-home-theme="light"] .wo__title {
    background: linear-gradient(100deg, #130c2b 0%, #5b21b6 55%, #c026d3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

html[data-home-theme="light"] .wo__creditline {
    background: radial-gradient(120% 160% at 10% -30%, rgba(255, 184, 107, .18), transparent 58%), linear-gradient(180deg, #fff9ed, #fff4dd);
    border-color: rgba(180, 130, 30, .3);
}