/* ═══════════════════════════════════════════════════════════════
   Cloud Aspire - Premium Welcome & Opening Animation
   High-End Technology Aesthetic | Pure CSS | Zero JavaScript
   ═══════════════════════════════════════════════════════════════ */

/* Main Overlay Container */
#ca-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 45%, #0f122c 0%, #080a18 55%, #03040a 100%);
    overflow: hidden;
    color: #ffffff;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    animation: caOverlayMaster 2.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: opacity, visibility;
}

/* Master Overlay Animation */
@keyframes caOverlayMaster {
    0% {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    82% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
        visibility: visible;
        pointer-events: auto;
    }
    98% {
        opacity: 0;
        transform: scale(1.02);
        filter: blur(4px);
        visibility: visible;
        pointer-events: auto;
    }
    100% {
        opacity: 0;
        transform: scale(1.02);
        filter: blur(6px);
        visibility: hidden;
        pointer-events: none;
    }
}

/* Background Ambient Lighting & Glow */
.ca-intro-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 59, 255, 0.28) 0%, rgba(79, 70, 229, 0.15) 40%, rgba(6, 182, 212, 0.05) 65%, transparent 80%);
    filter: blur(60px);
    border-radius: 50%;
    pointer-events: none;
    animation: caPulseAura 2.8s ease-in-out infinite alternate;
}

@keyframes caPulseAura {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.95;
    }
}

/* Subtle Geometric Grid / Texture */
.ca-intro-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: center center;
    mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
    pointer-events: none;
    opacity: 0.7;
}

/* Ambient Floating Particles (Pure CSS) */
.ca-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, #a78bfa, #6c3bff);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.8);
    opacity: 0;
}

.ca-p1 {
    width: 4px;
    height: 4px;
    top: 28%;
    left: 24%;
    animation: caParticleFloat1 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.ca-p2 {
    width: 3px;
    height: 3px;
    top: 68%;
    left: 78%;
    animation: caParticleFloat2 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s;
}

.ca-p3 {
    width: 5px;
    height: 5px;
    top: 35%;
    left: 74%;
    background: radial-gradient(circle, #38bdf8, #4f46e5);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
    animation: caParticleFloat3 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.15s;
}

.ca-p4 {
    width: 3px;
    height: 3px;
    top: 72%;
    left: 28%;
    background: radial-gradient(circle, #c084fc, #8b5cf6);
    animation: caParticleFloat1 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.3s;
}

.ca-p5 {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 56%;
    animation: caParticleFloat2 2.6s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.25s;
}

@keyframes caParticleFloat1 {
    0% { opacity: 0; transform: translateY(20px) scale(0.5); }
    25% { opacity: 0.85; }
    80% { opacity: 0.85; transform: translateY(-15px) scale(1); }
    100% { opacity: 0; transform: translateY(-25px) scale(0.6); }
}

@keyframes caParticleFloat2 {
    0% { opacity: 0; transform: translateY(15px) scale(0.6); }
    30% { opacity: 0.75; }
    80% { opacity: 0.75; transform: translateY(-20px) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.5); }
}

@keyframes caParticleFloat3 {
    0% { opacity: 0; transform: translateY(25px) scale(0.4); }
    35% { opacity: 0.9; }
    80% { opacity: 0.9; transform: translateY(-12px) scale(1.1); }
    100% { opacity: 0; transform: translateY(-22px) scale(0.6); }
}

/* Center Content Wrapper */
.ca-intro-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}

/* Brand Logo Container (Step 2: Fade + Scale) */
.ca-intro-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    opacity: 0;
    transform: scale(0.82) translateY(8px);
    animation: caLogoReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s;
}

@keyframes caLogoReveal {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(8px);
        filter: blur(8px);
    }
    60% {
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0px);
    }
}

/* Logo Icon / SVG Emblem */
.ca-intro-logo-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ca-intro-logo-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 20px rgba(108, 59, 255, 0.55)) drop-shadow(0 0 35px rgba(79, 70, 229, 0.35));
}

.ca-intro-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 100px;
    box-shadow: 0 0 40px rgba(108, 59, 255, 0.5), 0 12px 32px rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    margin-bottom: 22px;
    transition: transform 0.3s ease;
}

.ca-intro-logo-img {
    max-height: 52px;
    max-width: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Brand Name Text */
.ca-intro-brand-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 30%, #c4b5fd 75%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ca-intro-brand-title span.accent {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Welcome Title (Step 3: "Welcome to Cloud Aspire") */
.ca-intro-welcome {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin: 0 0 14px 0;
    opacity: 0;
    transform: translateY(16px);
    filter: blur(5px);
    animation: caWelcomeReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.65s;
    text-shadow: 0 2px 24px rgba(108, 59, 255, 0.3);
}

.ca-intro-welcome .highlight {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes caWelcomeReveal {
    0% {
        opacity: 0;
        transform: translateY(16px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Tagline (Step 4: "Building Digital Experiences. Growing Businesses.") */
.ca-intro-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #94a3b8;
    margin: 0;
    opacity: 0;
    transform: translateY(12px);
    animation: caTaglineReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.15s;
}

.ca-intro-tagline-separator {
    display: inline-block;
    margin: 0 8px;
    color: #6366f1;
    font-weight: 700;
    opacity: 0.8;
}

@keyframes caTaglineReveal {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* Elegant Bottom Progress Line (Step 6: Loading bar) */
.ca-intro-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    z-index: 20;
}

.ca-intro-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4f46e5 0%, #6c3bff 35%, #8b5cf6 70%, #38bdf8 100%);
    box-shadow: 0 0 16px rgba(108, 59, 255, 0.9), 0 0 8px rgba(56, 189, 248, 0.6);
    border-radius: 0 2px 2px 0;
    animation: caProgressLine 2.3s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.2s;
}

@keyframes caProgressLine {
    0% {
        width: 0%;
    }
    35% {
        width: 45%;
    }
    70% {
        width: 82%;
    }
    100% {
        width: 100%;
    }
}

/* Subtle Shimmer Ray at Top */
.ca-intro-shimmer-ray {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.3) 50%, transparent 100%);
    pointer-events: none;
    opacity: 0.8;
}

/* Mobile & Responsive Adjustments */
@media (max-width: 640px) {
    .ca-intro-bg-glow {
        width: 320px;
        height: 320px;
        filter: blur(40px);
    }
    .ca-intro-logo-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }
    .ca-intro-brand-title {
        font-size: 1.35rem;
    }
    .ca-intro-welcome {
        margin-bottom: 10px;
    }
    .ca-intro-tagline {
        font-size: 0.9rem;
        line-height: 1.45;
        padding: 0 8px;
    }
    .ca-intro-tagline-separator {
        display: block;
        margin: 2px 0;
        opacity: 0;
        height: 0;
    }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    #ca-intro-overlay {
        animation: caOverlayReduced 0.6s ease forwards;
    }
    @keyframes caOverlayReduced {
        0% { opacity: 1; visibility: visible; }
        80% { opacity: 0; visibility: visible; }
        100% { opacity: 0; visibility: hidden; pointer-events: none; }
    }
    .ca-intro-brand,
    .ca-intro-welcome,
    .ca-intro-tagline,
    .ca-intro-progress-bar,
    .ca-particle,
    .ca-intro-bg-glow {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}
