/* ===================================
   INTRO ANIMATION - CLEANFOLDZ
   Vanilla CSS Implementation
   =================================== */

/* Intro Animation Container */
.intro-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}

.intro-animation.hidden {
    display: none;
}

/* Background Overlay - Phase 1 */
.intro-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10;
    opacity: 1;
    animation: fadeOutBackground 5.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes fadeOutBackground {
    0%, 50%, 60% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Sliding Panels Container */
.intro-panels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

/* Individual Panels */
.intro-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* Left Panel - Slides to left */
.intro-panel-left {
    left: 0;
    animation: slideLeft 2.8s cubic-bezier(0.22, 1, 0.36, 1) 5.2s forwards;
}

@keyframes slideLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Right Panel - Slides to right */
.intro-panel-right {
    right: 0;
    animation: slideRight 2.8s cubic-bezier(0.22, 1, 0.36, 1) 5.2s forwards;
}

@keyframes slideRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Brand Content Container */
.intro-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    opacity: 0;
    animation: fadeInContent 0.4s ease 0.1s forwards;
}

@keyframes fadeInContent {
    to {
        opacity: 1;
    }
}

/* Brand Wrapper */
.intro-brand-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Brand Name - Phase 1-2 */
.intro-brand-name {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 4rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(2px);
    animation: brandNameAnimation 4.0s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
    text-align: center;
}

@keyframes brandNameAnimation {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(2px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0px);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
        filter: blur(0px);
    }
}

/* Brand Name Colors */
.intro-clean {
    color: #29abe2;
    display: inline-block;
    transition: all 0.3s ease;
    margin-left: -0.15em;
}

.intro-foldz {
    color: #6aa82f;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Accent Line - Below Tagline */
.intro-accent-line {
    width: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(41, 171, 226, 0.5), rgba(106, 168, 47, 0.5));
    opacity: 0;
    margin-top: 8px;
    animation: accentLineAnimation 0.5s cubic-bezier(0.22, 1, 0.36, 1) 4.5s forwards;
}

@keyframes accentLineAnimation {
    to {
        width: 80px;
        opacity: 1;
    }
}

/* Tagline - Phase 3 */
.intro-tagline {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.125rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(26, 26, 26, 0.9);
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: taglineAnimation 4.3s cubic-bezier(0.22, 1, 0.36, 1) 3.9s forwards;
}

@keyframes taglineAnimation {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(0);
    }
}

/* Responsive Typography */
@media (min-width: 768px) {
    .intro-brand-name {
        font-size: 5rem;
    }
    
    .intro-tagline {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .intro-brand-name {
        font-size: 6rem;
    }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .intro-brand-name {
        font-size: 3rem;
    }
    
    .intro-tagline {
        font-size: 1rem;
        letter-spacing: 0.1em;
    }
    
    .intro-brand-wrapper {
        gap: 16px;
        padding: 0 20px;
    }
}
