/* ==========================================================
   VIRAGE — First-visit language welcome modal
   ========================================================== */

/* Lock body scroll while the modal is open */
body.lang-welcome-open {
    overflow: hidden;
}

.lang-welcome {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 260ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.lang-welcome.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.lang-welcome__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 17, 21, 0.78);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.lang-welcome__card {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: #0F1115;
    border: 1px solid rgba(196, 123, 42, 0.45);
    border-radius: 6px;
    padding: 40px 32px 32px;
    text-align: center;
    color: #F2ECDE;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(8px) scale(0.98);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-welcome.is-visible .lang-welcome__card {
    transform: translateY(0) scale(1);
}
.lang-welcome__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #C47B2A;
    border-radius: 6px 6px 0 0;
}

.lang-welcome__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: #C47B2A;
    text-transform: uppercase;
}
.lang-welcome__brand-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C47B2A;
}

.lang-welcome__title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(20px, 3.6vw, 26px);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 10px;
    color: #F2ECDE;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px 12px;
}
.lang-welcome__sub {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: rgba(242, 236, 222, 0.6);
    margin: 0 0 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 4px 10px;
}
.lang-welcome__title-sep {
    color: rgba(242, 236, 222, 0.25);
    font-weight: 300;
}

.lang-welcome__grid {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 520px) {
    .lang-welcome__grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
}

.lang-welcome__btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 10px;
    background: rgba(242, 236, 222, 0.04);
    border: 1px solid rgba(242, 236, 222, 0.15);
    border-radius: 4px;
    color: #F2ECDE;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    transition:
        background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-welcome__btn:hover,
.lang-welcome__btn:focus-visible {
    background: rgba(196, 123, 42, 0.15);
    border-color: #C47B2A;
    transform: translateY(-2px);
    outline: none;
}
.lang-welcome__btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(196, 123, 42, 0.45);
}
.lang-welcome__btn:active {
    transform: translateY(0);
}

.lang-welcome__code {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #C47B2A;
}
.lang-welcome__name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(242, 236, 222, 0.8);
    line-height: 1.2;
    text-align: center;
}
.lang-welcome__btn[lang="ar"] .lang-welcome__name {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
    font-size: 15px;
    direction: rtl;
}

.lang-welcome__skip {
    background: transparent;
    border: 0;
    padding: 8px 12px;
    margin: 4px auto 0;
    color: rgba(242, 236, 222, 0.45);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-welcome__skip:hover,
.lang-welcome__skip:focus-visible {
    color: #C47B2A;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .lang-welcome,
    .lang-welcome__card,
    .lang-welcome__btn {
        transition: none !important;
    }
    .lang-welcome__card {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    .lang-welcome {
        padding: 16px;
    }
    .lang-welcome__card {
        padding: 32px 20px 24px;
    }
    .lang-welcome__title {
        font-size: 19px;
    }
    .lang-welcome__sub {
        font-size: 12px;
        margin-bottom: 22px;
    }
    .lang-welcome__btn {
        padding: 14px 8px;
    }
    .lang-welcome__code {
        font-size: 16px;
    }
    .lang-welcome__name {
        font-size: 12px;
    }
}
