/* ─────────────────────────────────────────────────────────
   Intro — Concept 4: Scan-line reveal (elevated "minimal line")
   SK. ignites with a cyan underline, then a single glowing cyan
   line sweeps down the screen, wiping the panel away behind it to
   reveal the hero. Modular: swap this + intro.js for another.
   ───────────────────────────────────────────────────────── */

#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

#intro-panel {
    position: absolute;
    inset: 0;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: inset(0 0 0 0);
    will-change: clip-path;
}

#intro-overlay.sweep #intro-panel {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.82s cubic-bezier(0.7, 0, 0.2, 1);
}

.intro-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* soft brand glow */
.intro-center::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 460px;
    height: 320px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(61, 127, 255, 0.12) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

#intro-overlay.enter .intro-center::before {
    opacity: 1;
}

.intro-mono {
    font-family: var(--font-sans, "Geist", Arial, sans-serif);
    font-weight: 800;
    letter-spacing: -2px;
    font-size: 60px;
    line-height: 1;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    filter: blur(6px);
}

.intro-mono .dot {
    color: var(--accent, #3d7fff);
}

.intro-underline {
    width: 180px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, transparent, var(--accent, #3d7fff), transparent);
    opacity: 0;
}

#intro-overlay.enter .intro-mono {
    opacity: 1;
    transform: none;
    filter: blur(0);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
}

#intro-overlay.enter .intro-underline {
    opacity: 0.9;
    transform: scaleX(1);
    transition: opacity 0.5s ease 0.1s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
}

/* center content clears just before the sweep */
#intro-overlay.lift .intro-center {
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.35s ease, transform 0.45s ease;
}

/* the glowing scan line that rides the reveal edge */
#intro-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--accent, #3d7fff);
    box-shadow: 0 0 18px 2px rgba(61, 127, 255, 0.7);
    transform: translateY(-4px);
    opacity: 0;
}

/* soft trailing glow beneath the line */
#intro-line::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 2px;
    height: 130px;
    background: linear-gradient(to bottom, rgba(61, 127, 255, 0.16), transparent);
}

#intro-overlay.sweep #intro-line {
    opacity: 1;
    transform: translateY(100vh);
    transition: transform 0.82s cubic-bezier(0.7, 0, 0.2, 1), opacity 0.2s ease;
}

#intro-overlay.done {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

/* the hero settles into focus as the intro hands off */
body.intro-revealed .hero-content {
    animation: heroSettle 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes heroSettle {
    from { opacity: 0.4; transform: translateY(16px) scale(0.99); }
    to { opacity: 1; transform: none; }
}

body.intro-active {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    #intro-overlay {
        display: none !important;
    }
}
