/* ==========================================
   J.A.R.V.I.S. CINEMATIC INTRO
   HUMANOID UPGRADE
   ========================================== */

.ji-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 50% 50%,
            rgba(0, 102, 255, 0.18),
            transparent 58%
        ),
        radial-gradient(
            ellipse at 50% 68%,
            rgba(0, 229, 255, 0.08),
            transparent 48%
        ),
        #000000;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
}

.ji-overlay,
.ji-overlay * {
    box-sizing: border-box;
}

.ji-overlay.ji-exit {
    opacity: 0;
    transition: opacity 0.28s ease;
}

.ji-top {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    color: #00e5ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    white-space: nowrap;
    opacity: 0.9;
}

.ji-bottom {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #6f87a5;
    white-space: nowrap;
}

.ji-skip {
    position: absolute;
    top: 28px;
    right: 30px;
    z-index: 20;
    padding: 10px 16px;
    border: 1px solid rgba(0, 229, 255, 0.38);
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.82);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.ji-skip:hover {
    background: #00e5ff;
    color: #000000;
    border-color: #00e5ff;
    transform: scale(1.04);
}

.ji-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.92);
    transition:
        opacity 0.18s ease,
        transform 0.26s ease,
        visibility 0.18s;
    padding: 20px;
}

.ji-stage.ji-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* ==========================================
   SEARCH BAR
   ========================================== */

.ji-search {
    width: min(82vw, 560px);
    min-height: 78px;
    padding: 12px 14px 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(10, 15, 26, 0.96);
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 26px;
    box-shadow:
        0 0 34px rgba(0, 102, 255, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.06);
}

.ji-plus {
    font-size: 27px;
    line-height: 1;
    color: #ffffff;
    opacity: 0.95;
}

.ji-input {
    flex: 1;
    font-size: clamp(17px, 3vw, 24px);
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
}

.ji-caret {
    display: inline-block;
    width: 2px;
    height: 24px;
    margin-left: 4px;
    vertical-align: middle;
    background: #00e5ff;
    box-shadow: 0 0 10px #00e5ff;
    animation: ji-blink 0.7s steps(1) infinite;
}

@keyframes ji-blink {
    50% {
        opacity: 0;
    }
}

.ji-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: linear-gradient(180deg, #00aaff, #0066ff);
    color: #ffffff;
    font-size: 26px;
    font-weight: 800;
    box-shadow:
        0 0 22px rgba(0, 102, 255, 0.55),
        inset 0 1px 6px rgba(255, 255, 255, 0.12);
}

/* ==========================================
   THINKING
   ========================================== */

.ji-spinner {
    width: 90px;
    height: 90px;
    border: 7px dotted #00e5ff;
    border-radius: 50%;
    filter: drop-shadow(0 0 12px #00e5ff);
    animation: ji-spin 0.85s linear infinite;
}

@keyframes ji-spin {
    to {
        transform: rotate(360deg);
    }
}

.ji-thinking {
    margin-top: 26px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* ==========================================
   WINDOW
   ========================================== */

.ji-window {
    width: min(84vw, 470px);
    padding: 24px 22px 34px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 30px;
    background: rgba(10, 14, 24, 0.95);
    box-shadow:
        0 0 70px rgba(0, 102, 255, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ji-window-top {
    width: 100%;
    display: flex;
    gap: 7px;
    margin-bottom: 30px;
}

.ji-window-top span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #24384f;
}

/* ==========================================
   HUMANOID FACE
   ========================================== */

.ji-face-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.ji-face-ring {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 229, 255, 0.82);
    box-shadow:
        0 0 18px rgba(0, 229, 255, 0.65),
        0 0 38px rgba(0, 102, 255, 0.35),
        inset 0 0 18px rgba(0, 102, 255, 0.18);
    animation: ji-pulse-ring 1.15s ease-in-out infinite;
}

.ji-face-shell {
    position: relative;
    width: 150px;
    height: 180px;
    background:
        radial-gradient(circle at 35% 24%, #263644 0%, #101722 28%, #04070d 65%, #000000 100%);
    clip-path: polygon(
        50% 0%,
        78% 8%,
        92% 24%,
        94% 48%,
        88% 73%,
        72% 92%,
        50% 100%,
        28% 92%,
        12% 73%,
        6% 48%,
        8% 24%,
        22% 8%
    );
    border: 1px solid rgba(84, 124, 155, 0.6);
    box-shadow:
        inset -14px -18px 30px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 102, 255, 0.18);
}

.ji-face-panel {
    position: absolute;
    top: 25px;
    width: 18px;
    height: 102px;
    border-radius: 14px;
    background: linear-gradient(180deg, #122231, #05070d);
    border: 1px solid rgba(59, 88, 112, 0.7);
    opacity: 0.85;
}

.ji-face-panel.left {
    left: -16px;
    transform: rotate(-12deg);
}

.ji-face-panel.right {
    right: -16px;
    transform: rotate(12deg);
}

.ji-face-headline {
    position: absolute;
    top: 18px;
    left: 50%;
    width: 44px;
    height: 8px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(143, 185, 220, 0.25);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
}

.ji-eye-band {
    position: absolute;
    top: 52px;
    left: 50%;
    width: 102px;
    height: 42px;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ji-eye {
    position: relative;
    width: 40px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #00d5ff, #00e5ff, #5be8ff);
    box-shadow:
        0 0 12px #00e5ff,
        0 0 24px rgba(0, 102, 255, 0.42);
    animation: ji-eye-glow 1.2s ease-in-out infinite;
}

.ji-eye::after {
    content: "";
    position: absolute;
    inset: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0.22;
}

.ji-nose {
    position: absolute;
    top: 82px;
    left: 50%;
    width: 10px;
    height: 40px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(28, 57, 86, 0.25), rgba(0, 229, 255, 0.2));
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.18));
}

.ji-cheek {
    position: absolute;
    top: 100px;
    width: 24px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.35);
    filter: blur(0.2px);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.28);
}

.ji-cheek.left {
    left: 28px;
}

.ji-cheek.right {
    right: 28px;
}

.ji-mouth {
    position: absolute;
    bottom: 34px;
    left: 50%;
    width: 44px;
    height: 14px;
    transform: translateX(-50%);
    border-bottom: 3px solid #00e5ff;
    border-radius: 0 0 30px 30px;
    filter: drop-shadow(0 0 7px rgba(0, 229, 255, 0.65));
    animation: ji-mouth-pulse 1.15s ease-in-out infinite;
}

.ji-chin {
    position: absolute;
    bottom: 18px;
    left: 50%;
    width: 28px;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.2);
}

@keyframes ji-pulse-ring {
    0%, 100% {
        opacity: 0.72;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

@keyframes ji-eye-glow {
    0%, 100% {
        opacity: 0.88;
        transform: scaleX(1);
    }

    50% {
        opacity: 1;
        transform: scaleX(1.05);
    }
}

@keyframes ji-mouth-pulse {
    0%, 100% {
        opacity: 0.76;
        transform: translateX(-50%) scaleX(1);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.08);
    }
}

/* ==========================================
   FEATURE
   ========================================== */

.ji-feature {
    min-height: 110px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.ji-feature-icon {
    color: #00e5ff;
    font-size: 58px;
    font-weight: 900;
    text-shadow:
        0 0 18px #00e5ff,
        0 0 28px rgba(0, 102, 255, 0.45);
}

.ji-feature-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 4px;
}

/* ==========================================
   KINETIC TEXT
   ========================================== */

.ji-kinetic {
    max-width: 92vw;
    text-align: center;
    font-size: clamp(38px, 8vw, 92px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -2px;
    transform: scale(0.74);
    transition: transform 0.16s cubic-bezier(0.2, 1.5, 0.3, 1);
}

.ji-active .ji-kinetic {
    transform: scale(1);
}

.ji-blue {
    color: #00e5ff;
    text-shadow:
        0 0 18px rgba(0, 229, 255, 0.55),
        0 0 28px rgba(0, 102, 255, 0.32);
}

/* ==========================================
   FINAL LOGO
   ========================================== */

.ji-logo {
    margin-top: 28px;
    font-size: clamp(48px, 10vw, 84px);
    font-weight: 900;
    letter-spacing: 8px;
}

.ji-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ji-particles::before,
.ji-particles::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(0, 229, 255, 0.9) 0 1.2px, transparent 1.4px),
        radial-gradient(circle, rgba(0, 102, 255, 0.65) 0 1px, transparent 1.2px);
    background-size: 160px 160px, 220px 220px;
    background-position: 18% 20%, 72% 68%;
    opacity: 0.22;
}

.ji-particles::after {
    background-position: 82% 24%, 30% 76%;
    opacity: 0.14;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 600px) {
    .ji-top {
        top: 20px;
        font-size: 9px;
        letter-spacing: 3px;
    }

    .ji-skip {
        top: 56px;
        right: 16px;
        padding: 9px 13px;
        font-size: 10px;
    }

    .ji-search {
        width: 92vw;
        min-height: 72px;
    }

    .ji-face-wrap {
        width: 190px;
        height: 190px;
    }

    .ji-face-shell {
        width: 130px;
        height: 156px;
    }

    .ji-eye-band {
        width: 88px;
        top: 46px;
    }

    .ji-eye {
        width: 34px;
        height: 12px;
    }

    .ji-kinetic {
        letter-spacing: -1px;
    }

    .ji-bottom {
        bottom: 24px;
        font-size: 9px;
    }
}