/* =====================================================================
   Best Free Tools Online - Launch Motion Landing Intro
   Plays full-viewport motion graphics on entry, then smoothly reveals
   the main tools directory.
   ===================================================================== */

html.intro-active,
html.intro-active body {
    overflow: hidden;
    height: 100%;
}

.launch-landing {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

html.intro-active .launch-landing {
    display: flex;
}

.launch-landing.is-exiting {
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
}

.launch-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: #f5f7fa;
}

/* Subtle top bar over the intro */
.launch-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2;
}

.launch-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-family: 'Cairo Play', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    pointer-events: auto;
}

.launch-brand-pill em {
    font-style: normal;
    color: #2563eb;
}

.launch-skip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #0f172a;
    font-family: 'Cairo Play', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    pointer-events: auto;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.launch-skip-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.14);
}

/* Autoplay fallback overlay (only shown if browser blocks autoplay) */
.launch-fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(245, 247, 250, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3;
}

.launch-fallback.is-visible {
    display: flex;
}

.launch-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    font-family: 'Cairo Play', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

/* Razor-thin bottom progress bar */
.launch-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(15, 23, 42, 0.08);
    z-index: 2;
}

.launch-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 100%);
    transition: width 0.08s linear;
}

/* Subtle "Watch Intro" replay button in the main hero */
.hero-eyebrow-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.hero-eyebrow-row .hero-eyebrow {
    margin-bottom: 0;
}

.watch-intro-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--accent-color);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.watch-intro-btn:hover {
    border-color: var(--accent-color);
    background: var(--accent-soft);
}

@media (max-width: 640px) {
    .launch-topbar {
        padding: 0.9rem 1rem;
    }
    .launch-brand-pill {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    .launch-skip-btn {
        font-size: 0.82rem;
        padding: 0.45rem 0.9rem;
    }
}
