:root {
    --jn-intro-navy: #123b63;
    --jn-intro-deep: #0a2743;
    --jn-intro-light: #f8fbff;
}

html.jn-intro-active,
html.jn-intro-active body {
    overflow: hidden !important;
}

.jn-intro {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    min-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 44%, rgba(91, 155, 210, 0.2), transparent 32%),
        linear-gradient(145deg, var(--jn-intro-deep) 0%, var(--jn-intro-navy) 58%, #0d3153 100%);
    opacity: 1;
    visibility: visible;
    transition: opacity 520ms cubic-bezier(0.4, 0, 0.2, 1), visibility 520ms step-end;
    isolation: isolate;
}

.jn-intro::before,
.jn-intro::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.jn-intro::before {
    width: min(72vw, 700px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.045);
    box-shadow:
        0 0 0 72px rgba(255, 255, 255, 0.018),
        0 0 0 144px rgba(255, 255, 255, 0.012);
}

.jn-intro::after {
    width: 170px;
    height: 170px;
    background: rgba(90, 165, 225, 0.13);
    filter: blur(42px);
    opacity: 0;
    animation: jn-intro-glow 1.8s 720ms ease-out forwards;
}

.jn-intro-stage {
    position: relative;
    z-index: 1;
    width: 132px;
    height: 132px;
    display: grid;
    place-items: center;
    transform: scale(0.94);
    animation: jn-intro-stage-in 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.jn-intro-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
    filter: drop-shadow(0 10px 24px rgba(1, 16, 30, 0.28));
}

.jn-intro-frame-base,
.jn-intro-frame-line {
    fill: rgba(255, 255, 255, 0.025);
    stroke-width: 2.2;
    vector-effect: non-scaling-stroke;
}

.jn-intro-frame-base {
    stroke: rgba(255, 255, 255, 0.15);
}

.jn-intro-frame-line {
    fill: none;
    stroke: var(--jn-intro-light);
    stroke-linecap: round;
    stroke-dasharray: 0 101;
    stroke-dashoffset: 0;
    animation: jn-intro-draw 1.22s 160ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.jn-intro-mark {
    color: var(--jn-intro-light);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 44px;
    font-weight: 720;
    line-height: 1;
    letter-spacing: -3px;
    transform: translateX(-1px);
    opacity: 0;
    text-shadow: 0 7px 24px rgba(1, 16, 30, 0.32);
    animation:
        jn-intro-mark-in 680ms 340ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
        jn-intro-mark-finish 520ms 1.52s ease-out forwards;
}

.jn-intro-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.jn-intro.is-leaving {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.jn-intro.is-leaving .jn-intro-stage {
    transform: scale(1.025);
    transition: transform 520ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes jn-intro-stage-in {
    to { transform: scale(1); }
}

@keyframes jn-intro-draw {
    from {
        stroke-dasharray: 0 101;
        stroke-dashoffset: 0;
    }
    to {
        stroke-dasharray: 101 0;
        stroke-dashoffset: 0;
    }
}

@keyframes jn-intro-mark-in {
    from {
        opacity: 0;
        transform: translateX(-1px) scale(0.84);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateX(-1px) scale(1);
        filter: blur(0);
    }
}

@keyframes jn-intro-mark-finish {
    50% { text-shadow: 0 0 22px rgba(255, 255, 255, 0.45); }
    100% { text-shadow: 0 7px 24px rgba(1, 16, 30, 0.32); }
}

@keyframes jn-intro-glow {
    0% { opacity: 0; transform: scale(0.72); }
    45% { opacity: 1; }
    100% { opacity: 0; transform: scale(1.28); }
}

@media (max-width: 560px) {
    .jn-intro-stage {
        width: 118px;
        height: 118px;
    }

    .jn-intro-mark {
        font-size: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jn-intro,
    .jn-intro-stage,
    .jn-intro-frame-line,
    .jn-intro-mark,
    .jn-intro::after {
        animation: none !important;
        transition-duration: 120ms !important;
    }

    .jn-intro-frame-line {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }

    .jn-intro-mark {
        opacity: 1;
    }
}
