/* ===================================================
   ARAFai — Loading Screen Styles
   index.css | Araf Studio 2026
   =================================================== */

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ── Loading Screen Container ── */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: loadingFadeIn 0.9s ease forwards,
               loadingFadeOut 0.7s ease 2.6s forwards;
}

/* ── Background Glows ── */
.l-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.l-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(66,133,244,0.12) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: glowDrift1 8s ease-in-out infinite;
}

.l-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.10) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    animation: glowDrift2 10s ease-in-out infinite;
}

.l-glow-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ── Main Content ── */
.l-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: relative;
    z-index: 2;
    animation: contentRise 1s ease 0.2s both;
}

/* ── Logo Ring ── */
.l-logo-ring {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.l-logo-wrap {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: var(--glass-2);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(66,133,244,0.2),
        0 0 80px rgba(139,92,246,0.12),
        var(--shadow-lg);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 3;
}

.l-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.l-logo-fallback {
    width: 100%;
    height: 100%;
    background: var(--grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

/* Rotating rings */
.l-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
}

.l-ring-1 {
    inset: 0;
    border-color: rgba(66,133,244,0.25) transparent rgba(139,92,246,0.25) transparent;
    animation: ringRotate1 3s linear infinite;
}

.l-ring-2 {
    inset: 6px;
    border-color: transparent rgba(99,102,241,0.2) transparent rgba(99,102,241,0.2);
    animation: ringRotate2 5s linear infinite reverse;
}

/* ── Text Group ── */
.l-text-group {
    text-align: center;
}

.l-brand {
    font-family: var(--fd);
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 8px;
}

.l-tagline {
    font-family: var(--fb);
    font-size: 0.8rem;
    color: var(--t3);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
}

/* ── Dots ── */
.l-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.l-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.l-dot:nth-child(1) { background: var(--blue);   animation-delay: 0s; }
.l-dot:nth-child(2) { background: var(--indigo);  animation-delay: 0.2s; }
.l-dot:nth-child(3) { background: var(--purple);  animation-delay: 0.4s; }

/* ── Credit ── */
.l-credit {
    position: absolute;
    bottom: 28px;
    font-family: var(--fb);
    font-size: 0.75rem;
    color: var(--t4);
    letter-spacing: 0.08em;
    z-index: 2;
}

/* ── Keyframes ── */
@keyframes loadingFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes loadingFadeOut {
    from { opacity: 1; visibility: visible; }
    to   { opacity: 0; visibility: hidden;  }
}

@keyframes contentRise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

@keyframes ringRotate1 {
    to { transform: rotate(360deg); }
}

@keyframes ringRotate2 {
    to { transform: rotate(360deg); }
}

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40%            { transform: scale(1.2); opacity: 1; }
}

@keyframes glowDrift1 {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(-30px, 20px); }
}

@keyframes glowDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(20px, -30px); }
}
