/* --- Lato Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&display=swap');

/* --- Basic Reset and Body Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: #424242;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    background-color: #f0f0f0;
    min-height: 200vh;
    overflow-x: hidden;
}

/* --- Prevent scrollbars while preloader is active --- */
body.preloader-active {
    overflow: hidden;
}

/* --- Styles for the main animation container (.enterprise-animate) --- */
.enterprise-animate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999; /* Ensure it's on top */
    overflow: hidden;
    background: #f49417;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: bottom left;
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    pointer-events: none; /* Allow clicks to pass through initially */
}

/* Class added by JS to start the shrink animation */
.enterprise-animate.start-shrink {
    animation: shrinkAndFade 1.5s ease-in forwards;
    pointer-events: auto; /* Restore pointer events during shrink for the animation end listener */
}

/* --- Styles for the inner content container (.hcl-enterprise) --- */
.hcl-enterprise {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 800px;
    background: transparent;
    overflow: hidden;
    padding: 40px 30px;
    text-align: center;
    height: auto;
}

/* --- Common text styles for fading --- */
.hcl-enterprise p.description-text,
.hcl-enterprise p#screen3-text,
.hcl-enterprise p#screen4-text {
    transition: opacity 0.5s ease-out;
    opacity: 0;
    pointer-events: none;
    font-size: 30px;
    color: #fff;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    white-space: normal;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.hcl-enterprise p.description-text#screen1-text {
    text-transform: uppercase;
}

/* --- Keyframes for the Shrink and Fade Animation --- */
@keyframes shrinkAndFade {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        visibility: visible;
    }
    70% {
        opacity: 0.1;
        transform: scale(0.05) rotate(-5deg);
        visibility: visible;
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(-10deg);
        visibility: hidden;
        z-index: -1; /* Ensure it goes behind content at the end */
    }
}

/* --- Optional: Styles for main content below the overlay --- */
.main-content {
    margin-top: 100vh;
    padding: 20px;
    text-align: center;
}
.main-content h2, .main-content p {
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hcl-enterprise {
        padding: 30px 20px;
        width: 95%;
        height: auto;
        max-height: 90vh;
    }
    .hcl-enterprise p.description-text,
    .hcl-enterprise p#screen3-text,
    .hcl-enterprise p#screen4-text {
        font-size: 24px;
        margin-bottom: 20px;
        max-width: 95%;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .hcl-enterprise {
        padding: 25px 15px;
    }
    .hcl-enterprise p.description-text,
    .hcl-enterprise p#screen3-text,
    .hcl-enterprise p#screen4-text {
        font-size: 18px;
        margin-bottom: 15px;
        white-space: normal;
    }
}