/* KalpOCR Cognitive Data Field
   Shared ambient motion for the public landing and secure login surfaces. */
.kalp-ai-atmosphere {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    isolation: isolate;
}

.kalp-ai-atmosphere::before,
.kalp-ai-atmosphere::after {
    content: "";
    position: absolute;
    inset: -24%;
    pointer-events: none;
}

.kalp-ai-atmosphere::before {
    background:
        radial-gradient(circle at 18% 28%, rgba(30, 178, 255, .20), transparent 22%),
        radial-gradient(circle at 76% 16%, rgba(40, 125, 255, .17), transparent 24%),
        radial-gradient(circle at 68% 78%, rgba(47, 232, 205, .14), transparent 22%),
        conic-gradient(from 110deg at 48% 50%, transparent, rgba(40, 155, 255, .09), transparent 30%, rgba(56, 238, 213, .07), transparent 64%);
    filter: blur(26px) saturate(120%);
    opacity: .92;
    transform: translate3d(-2%, -1%, 0) scale(1.02);
    animation: kalpAuroraDrift 18s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.kalp-ai-atmosphere::after {
    inset: -10%;
    background-image:
        linear-gradient(rgba(123, 211, 255, .038) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123, 211, 255, .038) 1px, transparent 1px);
    background-size: 52px 52px;
    opacity: .55;
    mask-image: radial-gradient(ellipse at 50% 44%, #000 8%, rgba(0, 0, 0, .68) 46%, transparent 79%);
    transform: perspective(760px) rotateX(62deg) translate3d(0, 11%, 0) scale(1.35);
    transform-origin: center bottom;
    animation: kalpGridBreathe 12s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.kalp-ai-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: .86;
}

.kalp-ai-beams {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    opacity: .72;
}

.kalp-ai-beam {
    position: absolute;
    left: -35%;
    width: 34%;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(87, 220, 255, .12), rgba(116, 241, 220, .72), transparent);
    box-shadow: 0 0 16px rgba(54, 207, 255, .24);
    transform: rotate(-14deg) translate3d(0, 0, 0);
    animation: kalpDataBeam 10s linear infinite;
    will-change: transform, opacity;
}

.kalp-ai-beam:nth-child(1) { top: 22%; animation-delay: -1.5s; }
.kalp-ai-beam:nth-child(2) { top: 56%; width: 23%; animation-delay: -6.2s; animation-duration: 13s; }
.kalp-ai-beam:nth-child(3) { top: 79%; width: 29%; animation-delay: -8.4s; animation-duration: 16s; }

.kalp-ai-orbit {
    position: absolute;
    z-index: 1;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(99, 218, 255, .09);
    border-radius: 50%;
    opacity: .72;
    animation: kalpOrbitTurn 26s linear infinite;
    will-change: transform;
}

.kalp-ai-orbit::before,
.kalp-ai-orbit::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.kalp-ai-orbit::before {
    inset: 34px;
    border: 1px dashed rgba(108, 226, 255, .10);
}

.kalp-ai-orbit::after {
    top: 30px;
    left: 44px;
    width: 7px;
    height: 7px;
    background: #73ebdc;
    box-shadow: 0 0 0 6px rgba(77, 228, 211, .08), 0 0 18px rgba(77, 228, 211, .5);
}

.kalp-ai-orbit.is-primary { right: -74px; bottom: -90px; }
.kalp-ai-orbit.is-secondary { left: -96px; top: 12%; width: 210px; height: 210px; animation-direction: reverse; animation-duration: 34s; }

.kalp-ai-atmosphere[data-ai-scene="landing"] .kalp-ai-canvas { opacity: .76; }
.kalp-ai-atmosphere[data-ai-scene="landing"]::after { opacity: .42; }
.kalp-ai-atmosphere[data-ai-scene="admin"]::before { opacity: .78; }
.kalp-ai-atmosphere[data-ai-scene="client"]::before { opacity: .86; }

.landing-hero {
    position: relative;
    isolation: isolate;
}

.landing-hero > .hero-layout {
    position: relative;
    z-index: 2;
}

body.kalp-auth,
body.kalp-customer-auth {
    isolation: isolate;
}

body.kalp-auth > .kalp-ai-atmosphere,
body.kalp-customer-auth > .kalp-ai-atmosphere {
    position: fixed;
}

body.kalp-auth .auth-shell,
body.kalp-customer-auth .login-shell {
    position: relative;
    z-index: 2;
}

body.kalp-auth .auth-shell { background: transparent; }
body.kalp-auth .auth-story {
    background:
        radial-gradient(circle at 94% 6%, rgba(8, 167, 232, .22), transparent 17rem),
        linear-gradient(145deg, rgba(2, 20, 49, .94), rgba(3, 48, 99, .91));
    backdrop-filter: blur(8px);
}
body.kalp-auth .auth-panel { background: rgba(255, 255, 255, .985); }
body.kalp-auth .auth-shell,
body.kalp-customer-auth .login-frame {
    box-shadow:
        0 38px 100px rgba(0, 8, 32, .44),
        0 0 0 1px rgba(109, 215, 255, .05),
        0 0 70px rgba(25, 139, 237, .09);
}

@keyframes kalpAuroraDrift {
    0% { transform: translate3d(-3%, -2%, 0) scale(1.01) rotate(-1deg); opacity: .72; }
    52% { transform: translate3d(3%, 2%, 0) scale(1.08) rotate(2deg); opacity: .96; }
    100% { transform: translate3d(-1%, 4%, 0) scale(1.04) rotate(-2deg); opacity: .82; }
}

@keyframes kalpGridBreathe {
    from { transform: perspective(760px) rotateX(62deg) translate3d(-1%, 11%, 0) scale(1.35); opacity: .32; }
    to { transform: perspective(760px) rotateX(62deg) translate3d(2%, 8%, 0) scale(1.43); opacity: .58; }
}

@keyframes kalpDataBeam {
    0% { transform: translate3d(0, 0, 0) rotate(-14deg); opacity: 0; }
    12% { opacity: .7; }
    76% { opacity: .5; }
    100% { transform: translate3d(510%, -130px, 0) rotate(-14deg); opacity: 0; }
}

@keyframes kalpOrbitTurn { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
    .kalp-ai-atmosphere::after { background-size: 38px 38px; opacity: .34; }
    .kalp-ai-orbit.is-secondary { display: none; }
    .kalp-ai-orbit.is-primary { right: -130px; bottom: -130px; }
    .kalp-ai-canvas { opacity: .66; }
}

@media (prefers-reduced-motion: reduce) {
    .kalp-ai-atmosphere::before,
    .kalp-ai-atmosphere::after,
    .kalp-ai-beam,
    .kalp-ai-orbit {
        animation: none !important;
    }
    .kalp-ai-atmosphere::before { transform: none; opacity: .72; }
    .kalp-ai-beams { opacity: .22; }
}
