/* P-6 brand intro. Whole timeline is CSS (1.6 s), so it ends even if JS fails.
   0-700 mark draws | 350-800 fill | 600-1050 glow pulse | 400-980 letters | 1000-1400 fly | 1250-1600 overlay fades */
.tji { display: none; }
html.tj-intro .tji {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: #05080a;
    pointer-events: auto;
    cursor: pointer;
    animation: tjiOut .35s ease 1.25s forwards, tjiGone .01s linear 1.6s forwards;
}
.tji__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 46%, rgba(57, 240, 162, .22), rgba(57, 240, 162, .06) 32%, transparent 62%);
    opacity: 0;
    animation: tjiGlow 1.2s ease-out forwards;
}
.tji__stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.tji__mark {
    width: 128px;
    height: 128px;
    overflow: visible;
    transform-origin: 50% 50%;
    animation:
        tjiFly .4s cubic-bezier(.6, 0, .3, 1) 1s forwards,
        tjiPulse .45s ease-in-out .6s 1;
}
.tji__p {
    stroke: #39f0a2;
    stroke-width: 2.2;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    fill-opacity: 0;
    animation: tjiDraw .7s cubic-bezier(.4, 0, .2, 1) forwards, tjiFill .45s ease .35s forwards;
}
.tji__p--j { animation-delay: .1s, .45s; }
.tji__shine { opacity: 0; animation: tjiShine .3s ease .8s forwards; }
.tji__word {
    display: flex;
    font: 700 30px/1 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: .02em;
    color: #e6edf2;
    animation: tjiWordOut .25s ease 1s forwards;
}
.tji__word span {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    animation: tjiLetter .3s ease calc(.4s + var(--i) * .035s) forwards;
}
.tji__word .tji__j { color: #39f0a2; }

@keyframes tjiDraw { to { stroke-dashoffset: 0; } }
@keyframes tjiFill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes tjiShine { 0% { opacity: 0; } 50% { opacity: .8; } 100% { opacity: .52; } }
@keyframes tjiPulse {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(57, 240, 162, 0)); }
    50% { filter: drop-shadow(0 0 22px rgba(57, 240, 162, .75)); }
}
@keyframes tjiGlow { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: .8; } }
@keyframes tjiLetter { to { opacity: 1; transform: none; } }
@keyframes tjiWordOut { to { opacity: 0; } }
@keyframes tjiFly {
    to {
        transform: translate(var(--tji-dx, 0px), var(--tji-dy, -20px)) scale(var(--tji-s, .3));
        opacity: var(--tji-o, 0);
    }
}
@keyframes tjiOut { to { opacity: 0; } }
@keyframes tjiGone { to { visibility: hidden; pointer-events: none; } }

@media (max-width: 480px) {
    .tji__mark { width: 104px; height: 104px; }
    .tji__word { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    html.tj-intro .tji { display: none; }
}
