/* ==========================================================================
   LOGIX CINEMATIC PAGE TRANSITION SYSTEM
   Deep Navy Organic Curved Wipe & Brand Identity Presentation
   ========================================================================== */

:root {
    --logix-trans-navy: #070D1E;
    --logix-trans-blue: #2563EB;
    --logix-trans-cyan: #38BDF8;
}

/* Master Fixed Overlay Layer - Non-blocking */
#logix-page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999999;
    pointer-events: none !important;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    display: none !important;
}

#logix-page-transition.is-active {
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

/* Instant-cover state disabled to prevent click blocking or page freeze */
html.logix-transitioning-in #logix-page-transition {
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    display: none !important;
}

/* Fullscreen SVG Container for Organic Morphing Curve */
.logix-trans-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 1;
}

.logix-trans-path {
    fill: var(--logix-trans-navy);
}

/* Stage 2 Content: Centered Brand Mark & Oversized Watermark */
.logix-trans-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.logix-trans-stage.is-visible {
    opacity: 1;
}

/* Stage 2 - Oversized Outlined Typography in Background */
.logix-trans-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.logix-outline-word {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(8rem, 23vw, 26rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.08);
    text-stroke: 1.5px rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    position: relative;
    /* Subtle horizontal light sweep across letters */
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(56, 189, 248, 0.24) 48%,
        rgba(255, 255, 255, 0.06) 55%,
        rgba(255, 255, 255, 0.02) 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: logixShimmerSweep 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transform: scale(1.02);
}

@keyframes logixShimmerSweep {
    0% {
        background-position: -125% 0;
    }
    100% {
        background-position: 125% 0;
    }
}

/* Stage 2 - Center Official Logix Brand Mark */
.logix-trans-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    pointer-events: none;
}

/* Subtle Electric Blue Ambient Light Pulse */
.logix-trans-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.42) 0%, rgba(37, 99, 235, 0.18) 55%, transparent 75%);
    filter: blur(18px);
    pointer-events: none;
    animation: logixPulseGlow 1.8s ease-in-out infinite alternate;
}

@keyframes logixPulseGlow {
    0% {
        transform: scale(0.92);
        opacity: 0.75;
    }
    100% {
        transform: scale(1.18);
        opacity: 1;
    }
}

.logix-trans-logo {
    width: 58px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.5));
    display: block;
    position: relative;
    z-index: 2;
}

.logix-trans-brandname {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    display: flex;
    align-items: baseline;
    user-select: none;
    position: relative;
    z-index: 2;
}

.logix-trans-dot {
    color: var(--logix-trans-blue);
    font-size: 1.6rem;
    line-height: 1;
    margin-inline-start: 1px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .logix-outline-word {
        font-size: clamp(4.2rem, 19vw, 8.5rem);
        letter-spacing: 0.08em;
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
        text-stroke: 1px rgba(255, 255, 255, 0.1);
    }

    .logix-trans-logo {
        width: 48px;
    }

    .logix-trans-brandname {
        font-size: 1.25rem;
    }

    .logix-trans-glow {
        width: 105px;
        height: 105px;
        filter: blur(14px);
    }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
    .logix-outline-word {
        animation: none !important;
    }
    .logix-trans-glow {
        animation: none !important;
    }
    #logix-page-transition {
        transition: opacity 0.2s ease !important;
    }
}
