/*
 * Shared XOrbit brand visuals for public pages (login and landing).
 * These pages render before any user theme loads, so they own their palette
 * and follow the operating-system colour scheme.
 */
:root {
    --lb-page: #eef4fc;
    --lb-panel: #ffffff;
    --lb-ink: #0f2547;
    --lb-muted: #5a6f8f;
    --lb-faint: #8a9bb6;
    --lb-line: #d6e2f1;
    --lb-field: #f7faff;
    --lb-blue: #1f6bff;
    --lb-blue-deep: #0b2f7a;
    --lb-cyan: #22b8f0;
    --lb-danger: #d6334d;
    --lb-shadow: 0 24px 60px rgba(15, 45, 100, 0.14);
}

@media (prefers-color-scheme: dark) {
    :root {
        --lb-page: #071226;
        --lb-panel: #0d1c38;
        --lb-ink: #e7efff;
        --lb-muted: #9fb2d3;
        --lb-faint: #6f84a8;
        --lb-line: #213659;
        --lb-field: #0a1730;
        --lb-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    }
}

/* ---------- Deep-blue hero panel ---------- */
.lb-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(ellipse 70% 55% at 50% 38%, rgba(64, 180, 255, 0.45), transparent 70%),
        linear-gradient(160deg, #061a4a 0%, #0b3a9e 48%, #1477e0 78%, #1fa8ec 100%);
    box-shadow: var(--lb-shadow);
}

/* Soft star dust */
.lb-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 28% 72%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 78% 22%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 88% 58%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 52% 10%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 66% 46%, rgba(255, 255, 255, 0.45), transparent);
    animation: lbTwinkle 5s ease-in-out infinite alternate;
}

.lb-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
}

.lb-brand i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5cf0b8;
    box-shadow: 0 0 10px #5cf0b8;
}

/* ---------- Large logo with halo and orbits ---------- */
.lb-logo-stage {
    position: relative;
    width: clamp(220px, 30vw, 360px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.lb-logo-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Feather the square artwork into the panel so only the glowing mark shows. */
    -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 46%, transparent 68%);
    mask-image: radial-gradient(circle at 50% 48%, #000 46%, transparent 68%);
    mix-blend-mode: screen;
    filter: saturate(1.15) brightness(1.08);
    animation: lbFloat 7s ease-in-out infinite;
}

.lb-halo {
    position: absolute;
    inset: 8%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 210, 255, 0.55), transparent 65%);
    filter: blur(18px);
    animation: lbPulse 5s ease-in-out infinite;
}

.lb-orbit {
    position: absolute;
    inset: -4% -14%;
    border-radius: 50%;
    border: 1.5px solid rgba(180, 230, 255, 0.45);
    transform: rotate(-18deg);
    pointer-events: none;
}

.lb-orbit::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 14px 4px rgba(120, 210, 255, 0.9);
    offset-path: ellipse(50% 50% at 50% 50%);
    offset-rotate: 0deg;
    animation: lbSatellite 9s linear infinite;
}

.lb-orbit.o2 {
    inset: 6% -4%;
    border-style: dashed;
    border-color: rgba(180, 230, 255, 0.28);
    transform: rotate(14deg);
}

.lb-orbit.o2::after {
    width: 7px;
    height: 7px;
    animation-duration: 13s;
    animation-direction: reverse;
}

.lb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lb-chips span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

/* Bubbles echoing the dots in the logo swoosh */
.lb-bubble {
    position: absolute;
    bottom: -20px;
    z-index: -1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    animation: lbRise linear infinite;
}

.lb-bubble.b1 { left: 14%; width: 10px; height: 10px; animation-duration: 11s; }
.lb-bubble.b2 { left: 32%; width: 6px; height: 6px; animation-duration: 8s; animation-delay: -3s; }
.lb-bubble.b3 { left: 63%; width: 12px; height: 12px; animation-duration: 13s; animation-delay: -6s; }
.lb-bubble.b4 { left: 82%; width: 7px; height: 7px; animation-duration: 9s; animation-delay: -1s; }

/* ---------- Waves ---------- */
.lb-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: -1;
    width: 100%;
    height: clamp(90px, 18vh, 160px);
}

.lb-waves use {
    animation: lbWave 22s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.lb-waves use:nth-child(1) { animation-delay: -2s; animation-duration: 9s; fill: rgba(255, 255, 255, 0.18); }
.lb-waves use:nth-child(2) { animation-delay: -3s; animation-duration: 12s; fill: rgba(120, 210, 255, 0.28); }
.lb-waves use:nth-child(3) { animation-delay: -4s; animation-duration: 15s; fill: rgba(255, 255, 255, 0.22); }
.lb-waves use:nth-child(4) { animation-delay: -5s; animation-duration: 22s; fill: var(--lb-page); }

.lb-wave-line {
    position: absolute;
    left: -5%;
    width: 110%;
    height: 120px;
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
}

.lb-wave-line path {
    fill: none;
    stroke: rgba(170, 225, 255, 0.8);
    stroke-width: 1.2;
    stroke-dasharray: 6 10;
    animation: lbDash 18s linear infinite;
}

.lb-wave-line.l1 { top: 20%; }
.lb-wave-line.l2 { top: 52%; opacity: 0.22; transform: scaleX(-1); }

/* ---------- Keyframes ---------- */
@keyframes lbWave { 0% { transform: translate3d(-90px, 0, 0); } 100% { transform: translate3d(85px, 0, 0); } }
@keyframes lbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes lbPulse { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes lbSatellite { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes lbTwinkle { from { opacity: 0.5; } to { opacity: 1; } }
@keyframes lbRise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-110vh); opacity: 0; } }
@keyframes lbDash { to { stroke-dashoffset: -320; } }
@keyframes lbSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .lb-hero *,
    .lb-hero::before,
    .lb-hero *::before,
    .lb-hero *::after {
        animation: none !important;
        transition: none !important;
    }

    .lb-bubble {
        display: none;
    }
}
