/* ==================================================
   HOME INTRO ANIMATION (QA test-run splash)
   Plays once per browser session. Loaded by index.html only.
================================================== */

.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: #171717;
    color: #f7f7f5;
    font-family: "DM Sans", sans-serif;
    transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

html.intro-pending .intro-screen { display: flex; }
html.intro-pending body { overflow: hidden; }

.intro-screen.is-leaving { transform: translateY(-100%); }

.intro-inner {
    width: min(420px, 86vw);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.intro-logo {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(64px, 14vw, 112px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -2px;
    opacity: 0;
    transform: translateY(24px);
    animation: introRise 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-logo span { color: #ff5c35; display: inline-block; animation: introBlink 0.9s 0.8s steps(1) 2; }

.intro-log {
    list-style: none;
    display: grid;
    gap: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    color: #a8a8a2;
}

.intro-log li {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-12px);
    animation: introSlide 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.intro-log li::before {
    content: "✓";
    color: #ff5c35;
    font-weight: 700;
}

.intro-log li:nth-child(1) { animation-delay: 0.9s; }
.intro-log li:nth-child(2) { animation-delay: 1.6s; }
.intro-log li:nth-child(3) { animation-delay: 2.3s; }
.intro-log li:nth-child(4) { animation-delay: 3.0s; }
.intro-log li:nth-child(5) { animation-delay: 3.7s; }
.intro-log li.intro-pass { color: #f7f7f5; font-weight: 600; }

.intro-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    animation: introRise 0.5s 0.5s ease forwards;
}

.intro-bar {
    flex: 1;
    height: 3px;
    background: #2e2e2c;
    border-radius: 3px;
    overflow: hidden;
}

.intro-bar i {
    display: block;
    height: 100%;
    width: 100%;
    background: #ff5c35;
    transform: scaleX(0);
    transform-origin: left;
    animation: introFill 4s 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.intro-percent {
    min-width: 44px;
    text-align: right;
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.intro-skip {
    position: absolute;
    right: 24px;
    bottom: 24px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #3a3a37;
    border-radius: 999px;
    color: #a8a8a2;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.intro-skip:hover { color: #fff; border-color: #ff5c35; }

@keyframes introRise  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes introSlide { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes introFill  { to { transform: scaleX(1); } }
@keyframes introBlink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    html.intro-pending .intro-screen { display: none; }
    html.intro-pending body { overflow: auto; }
}
