/**
 * Website Launch Ceremony Styles
 *
 * @package Infinity_Space_Theme
 */

@import url("https://fonts.googleapis.com/css2?family=Mona+Sans:wght@300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap");

.launch-wrapper {
    font-family: 'Quicksand', 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, rgba(224, 242, 254, 0.85) 0%, rgba(243, 232, 255, 0.7) 35%, rgba(253, 242, 248, 0.6) 65%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background 1.5s ease;
}

/* Subtle cosmic grid & starry atmosphere */
.launch-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(rgba(0, 154, 255, 0.12) 1px, transparent 1px),
        radial-gradient(rgba(147, 51, 234, 0.08) 1px, transparent 1px);
    background-size: 32px 32px, 48px 48px;
    background-position: 0 0, 16px 16px;
    pointer-events: none;
    opacity: 0.8;
}

/* Ambient glow orb behind center stage */
.launch-center-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 154, 255, 0.25) 0%, rgba(99, 102, 241, 0.15) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    transition: all 1s ease;
    z-index: 1;
}

.launch-wrapper.is-launching .launch-center-glow {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.45) 0%, rgba(236, 72, 153, 0.25) 50%, transparent 75%);
    filter: blur(40px);
}

/* Top Action Bar (Branding, Sound & Fullscreen) */
.launch-top-bar {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

.launch-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 154, 255, 0.25);
    border-radius: 9999px;
    box-shadow: 0 4px 20px rgba(0, 154, 255, 0.08);
    font-size: 0.85rem;
    font-weight: 700;
    color: #009aff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.launch-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.launch-ctrl-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.launch-ctrl-btn:hover {
    transform: scale(1.08);
    background: #ffffff;
    border-color: #009aff;
    color: #009aff;
    box-shadow: 0 6px 20px rgba(0, 154, 255, 0.2);
}

/* ==========================================================================
   HANDS PRESENTATION & ANIMATIONS (Framing viewport edges naturally)
   ========================================================================== */
.launch-hands-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

/* Robot Hand - Left Edge */
.launch-hand-robot {
    position: absolute;
    left: 0;
    top: 50%;
    width: 520px;
    height: 360px;
    transform: translateY(-50%) translateX(-30px);
    transition: all 1s ease;
    filter: drop-shadow(0 20px 35px rgba(0, 154, 255, 0.2));
    animation: robotLevitate 6s ease-in-out infinite;
}

.launch-hand-robot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

/* Human Hand - Right Edge */
.launch-hand-human {
    position: absolute;
    right: 0;
    top: 68%;
    width: 480px;
    height: 480px;
    transform: translateY(-50%) translateX(30px);
    transition: all 1s ease;
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.12));
    animation: humanLevitate 6s ease-in-out infinite 0.5s;
}

.launch-hand-human img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: right center;
}

@keyframes robotLevitate {
    0%, 100% {
        transform: translateY(-50%) translateX(-30px) rotate(0deg);
    }
    50% {
        transform: translateY(-50%) translateX(-15px) rotate(1deg);
    }
}

@keyframes humanLevitate {
    0%, 100% {
        transform: translateY(-50%) translateX(30px) rotate(0deg);
    }
    50% {
        transform: translateY(-50%) translateX(15px) rotate(-1deg);
    }
}

/* ==========================================================================
   WHEN LAUNCH SEQUENCE IS TRIGGERED (HANDS REMAIN FRAMING THE SIDES)
   ========================================================================== */
.launch-wrapper.is-launching .launch-hand-robot {
    filter: drop-shadow(0 25px 45px rgba(0, 154, 255, 0.45));
}

.launch-wrapper.is-launching .launch-hand-human {
    filter: drop-shadow(0 25px 45px rgba(147, 51, 234, 0.35));
}

.launch-wrapper.is-launched .launch-hand-robot {
    filter: drop-shadow(0 30px 55px rgba(0, 154, 255, 0.35));
}

.launch-wrapper.is-launched .launch-hand-human {
    filter: drop-shadow(0 30px 55px rgba(147, 51, 234, 0.25));
}

/* ==========================================================================
   CENTER STAGE & LAUNCH CONTROLLER
   ========================================================================== */
.launch-center-stage {
    position: relative;
    z-index: 20;
    text-align: center;
    max-width: 860px;
    padding: 0 1.5rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Prominent Infinity Space Logo */
.launch-logo-container {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.75rem;
    perspective: 1000px;
}

.launch-brand-logo {
    width: 380px;
    max-width: 85vw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 154, 255, 0.22));
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.launch-wrapper.is-launching .launch-brand-logo {
    transform: scale(1.06);
    filter: drop-shadow(0 12px 35px rgba(0, 154, 255, 0.5));
}

.launch-wrapper.is-launched .launch-brand-logo {
    transform: scale(1.08);
    filter: drop-shadow(0 14px 40px rgba(0, 170, 255, 0.55));
}

.launch-subtitle {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #475569;
    max-width: 580px;
    margin: 0 auto 2.5rem;
    font-weight: 500;
    transition: all 0.4s ease;
}

/* 3D Big Launch Button */
.launch-trigger-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.launch-trigger-aura {
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle, rgba(0, 154, 255, 0.6) 0%, rgba(99, 102, 241, 0.4) 50%, transparent 75%);
    border-radius: 9999px;
    filter: blur(14px);
    animation: auraPulse 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes auraPulse {
    0%, 100% {
        transform: scale(0.96);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.launch-trigger-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 3.25rem;
    background: linear-gradient(135deg, #009aff 0%, #0062ff 50%, #4338ca 100%);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 12px 30px rgba(0, 102, 255, 0.45),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.launch-trigger-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 18px 40px rgba(0, 102, 255, 0.6),
        0 4px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.launch-trigger-btn:active {
    transform: translateY(1px) scale(0.98);
}



/* When launch is in progress (countdown mode) */
.launch-wrapper.is-launching .launch-trigger-btn {
    pointer-events: none;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 0 35px rgba(14, 165, 233, 0.8);
    transform: scale(1.1);
}

/* ==========================================================================
   SUCCESS CELEBRATION STATE
   ========================================================================== */
.launch-success-panel {
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.launch-wrapper.is-launched .launch-trigger-container,
.launch-wrapper.is-launched .launch-subtitle-pre {
    display: none !important;
}

.launch-wrapper.is-launched .launch-success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.launch-congrats-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.6rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 9999px;
    color: #15803d;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.12);
}

.enter-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.15rem 2.8rem;
    background: linear-gradient(135deg, #009aff 0%, #0284c7 100%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 9999px;
    box-shadow: 0 12px 30px rgba(0, 154, 255, 0.45);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.enter-site-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 18px 40px rgba(0, 154, 255, 0.6);
}



/* Confetti Fullscreen Canvas */
#launchConfettiCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .launch-hand-robot {
        width: 380px;
        height: 260px;
        transform: translateY(-50%) translateX(-40px);
    }
    .launch-hand-human {
        width: 350px;
        height: 350px;
        transform: translateY(-50%) translateX(40px);
    }
    .launch-brand-logo {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .launch-hand-robot,
    .launch-hand-human {
        display: none;
    }
    .launch-brand-logo {
        width: 250px;
        max-width: 78vw;
    }
    .launch-trigger-btn {
        padding: 1rem 2.2rem;
        font-size: 1.1rem;
    }
    .launch-top-bar {
        top: 1rem;
        left: 1rem;
        right: 1rem;
    }
}
