﻿.intro-content-pending {
    opacity: 0;
    visibility: hidden;
}

#siteContent {
    transition: opacity 0.5s ease;
}

    #siteContent:not(.intro-content-pending) {
        opacity: 1;
        visibility: visible;
    }
body.intro-pending #pageWrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#pageWrapper {
    transition: opacity 0.5s ease;
}

body:not(.intro-pending) #pageWrapper {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.elatoos-intro {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1200px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

    .elatoos-intro::before {
        content: "";
        position: absolute;
        width: 550px;
        height: 550px;
        border-radius: 50%;
        background: rgba(0, 128, 100, 0.08);
        filter: blur(100px);
        animation: introGlow 4s ease-in-out infinite alternate;
    }

.intro-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Logo */

.intro-logo {
    position: relative;
    width: clamp(190px, 32vw, 330px);
    aspect-ratio: 1 / 1;
    opacity: 0;
    transform: scale(0.12) rotateY(-180deg) rotateX(25deg);
    transform-style: preserve-3d;
}

.intro-logo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

/* Logo entrance */

.elatoos-intro.logo-started .intro-logo {
    animation: logoEnter var(--logo-duration) cubic-bezier(.18,.85,.25,1.2) forwards;
}

/* Shine */

/* Shine - fixed mask, moving light only */

.intro-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    /* نوار نور */
    background: linear-gradient( 110deg, transparent 46%, rgba(255,255,255,0.2) 48%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0.2) 52%, transparent 54% );
    /* ماسک ثابت بر اساس تصویر لوگو */
    -webkit-mask-image: var(--logo-mask);
    mask-image: var(--logo-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    /* فقط گرادیان حرکت می‌کند */
    background-size: 250% 100%;
    background-position: 100% 0;
}

.elatoos-intro.shine-started .intro-shine {
    visibility: visible;
    animation: logoShine var(--shine-duration) linear forwards;
}

@keyframes logoShine {

    from {
        opacity: 1;
        background-position: 100% 0;
    }

    to {
        opacity: 1;
        background-position: 0% 0;
    }
}


/* Text */

.intro-message {
    min-height: 42px;
    direction: rtl;
    text-align: center;
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 800;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.elatoos-intro.text-started .intro-message {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor */

.typing-cursor {
    display: inline-block;
    margin-right: 3px;
    animation: cursorBlink 0.7s infinite;
}

/* Fade out */

.elatoos-intro.intro-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Animations */

@keyframes logoEnter {
    0% {
        opacity: 0;
        transform: scale(0.12) rotateY(-180deg) rotateX(25deg);
    }

    65% {
        opacity: 1;
        transform: scale(1.08) rotateY(15deg) rotateX(-5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotateY(0) rotateX(0);
    }
}


@keyframes cursorBlink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes introGlow {
    from {
        transform: scale(0.85);
        opacity: 0.5;
    }

    to {
        transform: scale(1.2);
        opacity: 1;
    }
}

@media(max-width:600px) {
    .intro-content {
        gap: 25px;
    }

    .intro-logo {
        width: 70vw;
        max-width: 230px;
    }
}
