/* ========================================
   assets/css/loading.css
   ======================================== */

/* ----- Reset & Base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
}

/* ----- Fonts ----- */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold.woff2') format('woff2');
    font-weight: bold;
    font-display: swap;
}

.logo-font {
    font-family: 'Vazir', 'Playfair Display', serif;
}

/* ========================================
   لودر اصلی
   ======================================== */
#loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ----- محتوای اصلی ----- */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 20px;
}

/* ----- لوگو ----- */
.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text {
    font-size: clamp(4rem, 12vw, 6rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #000000;
    opacity: 0;
    animation: logoReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo-underline {
    width: 0;
    height: 2px;
    background: #000000;
    margin-top: 6px;
    animation: underlineGrow 0.8s ease-out 0.8s forwards;
}

@keyframes underlineGrow {
    0% {
        width: 0;
        opacity: 0;
    }

    100% {
        width: 70%;
        opacity: 0.3;
    }
}

/* ----- شعار با فونت بولد ----- */
.tagline {
    font-family: 'Vazir', sans-serif;
    font-weight: bold;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(0, 0, 0, 0.8);
    letter-spacing: 0.2em;
    opacity: 0;
    animation: fadeInUp 0.6s ease 1s forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- حلقه پیشرفت مینیمال و لوکس ----- */
.progress-ring-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: fadeIn 0.6s ease 1.2s forwards;
}

.progress-ring {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06);
    stroke-width: 2;
}

.progress-ring-fill {
    fill: none;
    stroke: #000000;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 163.36;
    /* 2 * PI * 26 */
    stroke-dashoffset: 163.36;
    transition: stroke-dashoffset 0.3s ease;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* ----- ریسپانسیو ----- */
@media (max-width: 480px) {
    .loader-content {
        gap: 18px;
    }

    .progress-ring-wrapper {
        width: 48px;
        height: 48px;
    }

    .progress-ring {
        width: 48px;
        height: 48px;
    }

    .progress-ring-bg,
    .progress-ring-fill {
        stroke-width: 1.8;
    }
}