/* =========================================================================
   Avci — Welcome / language-select splash
   ========================================================================= */
@font-face {
    font-family: 'Ubuntu Arabic';
    src: url('../fonts/alfont_com_Ubuntu-Arabic_R.ttf') format('truetype');
    font-weight: 100 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Ubuntu Arabic';
    src: url('../fonts/alfont_com_Ubuntu-Arabic_B.ttf') format('truetype');
    font-weight: 600 900; font-style: normal; font-display: swap;
}

:root {
    --primary: #F4AE42;
    --primary-dark: #D18A1F;
    --primary-soft: #FCE4BD;
    --ink: #14110D;
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.welcome-body {
    font-family: 'Ubuntu Arabic', system-ui, sans-serif;
    min-height: 100svh;
    background:
        radial-gradient(120% 90% at 50% -10%, #2a2118 0%, #17130d 55%, #0e0b07 100%);
    color: #fff;
    display: grid;
    place-items: center;
    padding: 28px 18px calc(18px + env(safe-area-inset-bottom));
    overflow: hidden;
    position: relative;
}

/* ---- animated background ---- */
.welcome-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.w-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; animation: drift 12s var(--ease) infinite alternate; }
.w-blob-1 { width: 360px; height: 360px; background: var(--primary); top: -120px; inset-inline-start: -90px; }
.w-blob-2 { width: 300px; height: 300px; background: var(--primary-dark); bottom: -120px; inset-inline-end: -80px; animation-delay: -4s; }
.w-blob-3 { width: 220px; height: 220px; background: #FFD79A; top: 45%; inset-inline-start: 55%; opacity: .22; animation-delay: -7s; }
@keyframes drift {
    from { transform: translate(0,0) scale(1); }
    to   { transform: translate(30px,-26px) scale(1.12); }
}
.w-float {
    position: absolute; font-size: 2rem; color: var(--primary);
    opacity: .14; transition: transform .35s var(--ease);
    animation: bob 7s var(--ease) infinite alternate;
}
@keyframes bob { from { translate: 0 0; } to { translate: 0 -18px; } }

/* ---- layout ---- */
.welcome-wrap {
    position: relative; z-index: 1;
    width: 100%; max-width: 460px;
    display: flex; flex-direction: column; align-items: center;
    gap: 26px;
}

.welcome-card {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-radius: 32px;
    padding: 34px 24px 30px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    animation: cardIn .7s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }

.brand-ring {
    width: 132px; height: 132px; margin: 0 auto 18px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(from 0deg, var(--primary), var(--primary-dark), #FFD79A, var(--primary));
    padding: 5px;
    /* gentle weightless float (drifts like it's in space), plus a soft pulsing glow */
    animation: popIn .8s var(--ease-spring) both, floatSpace 6s ease-in-out 0.8s infinite, ringGlow 4s ease-in-out 0.8s infinite;
}
@keyframes popIn { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes floatSpace {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(6px, -10px) rotate(1.4deg); }
    50%  { transform: translate(0, -16px) rotate(0deg); }
    75%  { transform: translate(-6px, -10px) rotate(-1.4deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes ringGlow {
    0%, 100% { box-shadow: 0 12px 40px rgba(244,174,66,.35); }
    50%      { box-shadow: 0 20px 55px rgba(244,174,66,.55); }
}
.welcome-logo {
    width: 100%; height: 100%; border-radius: 50%;
    border: 4px solid var(--ink); background: var(--ink);
    object-fit: cover;
}

.welcome-title { font-size: clamp(1.7rem, 7vw, 2.2rem); font-weight: 900; letter-spacing: -.02em; }
.welcome-tagline { color: rgba(255,255,255,.66); margin-top: 6px; font-size: .98rem; }

.lang-prompt {
    display: flex; align-items: center; gap: 12px; justify-content: center;
    margin: 24px 0 16px; color: rgba(255,255,255,.7);
    font-weight: 700; font-size: .82rem; letter-spacing: .04em;
}
.lang-prompt i { color: var(--primary); }
.lp-line { height: 1px; flex: 1; max-width: 60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); }

/* ---- language cards ---- */
.lang-grid { display: flex; flex-direction: column; gap: 12px; }
.lang-card {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.05);
    border: 1.5px solid rgba(255,255,255,.12);
    color: #fff; text-decoration: none;
    transition: transform .3s var(--ease-spring), background .25s var(--ease), border-color .25s, box-shadow .25s;
    animation: rowIn .6s var(--ease) both;
    overflow: hidden;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.lang-card::before {
    content: ""; position: absolute; inset: 0; opacity: 0;
    background: linear-gradient(120deg, rgba(244,174,66,.18), rgba(244,174,66,0));
    transition: opacity .3s var(--ease);
}
.lang-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: 0 14px 36px rgba(244,174,66,.28); background: rgba(255,255,255,.09); }
.lang-card:hover::before { opacity: 1; }
.lang-card:active { transform: scale(.97); }

.lc-code {
    flex: 0 0 auto; width: 50px; height: 50px; border-radius: 14px;
    display: grid; place-items: center; font-weight: 900; font-size: 1.05rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--ink);
    box-shadow: 0 6px 18px rgba(244,174,66,.4);
}
.lc-text { flex: 1; text-align: start; min-width: 0; }
.lc-label { display: block; font-weight: 800; font-size: 1.18rem; }
.lc-sub { display: block; color: rgba(255,255,255,.6); font-size: .82rem; margin-top: 2px; }
.lc-go {
    margin-inline-start: auto; flex: 0 0 auto;
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255,255,255,.08); color: var(--primary);
    transition: transform .3s var(--ease-spring), background .25s;
}
[dir="rtl"] .lc-go i { transform: scaleX(-1); }
.lang-card:hover .lc-go { background: var(--primary); color: var(--ink); transform: scale(1.1); }

/* ---- ArtCode credit ---- */
.artcode-credit {
    display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
    justify-content: center;
    padding: 12px 20px; border-radius: 50px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
    text-decoration: none; color: rgba(255,255,255,.75);
    transition: transform .25s var(--ease-spring), background .25s, border-color .25s;
    animation: rowIn .7s .6s var(--ease) both;
}
.artcode-credit:hover { transform: translateY(-2px); background: rgba(255,255,255,.08); border-color: rgba(244,174,66,.4); }
.ac-by { font-size: .82rem; font-weight: 600; }
.ac-logo { height: 26px; width: auto; display: block; }
.ac-cta { width: 100%; text-align: center; font-size: .74rem; color: rgba(255,255,255,.5); font-weight: 600; }
.ac-cta i { font-size: .68rem; margin-inline-start: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
    .brand-ring, .welcome-logo { animation: popIn .4s both; }
}

@media (min-width: 480px) {
    .lc-sub { font-size: .85rem; }
}
