/* ==========================================================================
   شركة عيدكو التجارية — صفحة قيد الانتظار
   تصميم: ذهبي فاخر على خلفية داكنة | RTL | Full Animated
   ========================================================================== */

/* ===== متغيرات الألوان ===== */
:root {
    --gold-light: #ffe187;
    --gold: #d4af37;
    --gold-deep: #b8860b;
    --gold-dark: #8b6914;
    --bg-dark: #050505;
    --bg-dark-2: #0a0a0c;
    --text-light: #f5f0e1;
    --text-muted: #a89b7a;
}

/* ===== إعادة الضبط العامة ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    /* تدرج خلفية داكن عميق */
    background:
        radial-gradient(ellipse at 50% 35%, rgba(212, 175, 55, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(184, 134, 11, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 15% 70%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #050505 0%, #0a0a0c 50%, #050505 100%);
}

/* ==========================================================================
   خلفية الجسيمات (Canvas)
   ========================================================================== */
#particles-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================================================
   هالة ذهبية متوهجة (Aurora)
   ========================================================================== */
.aurora {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(
        circle,
        rgba(212, 175, 55, 0.12) 0%,
        rgba(212, 175, 55, 0.05) 30%,
        transparent 65%
    );
    z-index: 0;
    animation: aurora-pulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes aurora-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* ==========================================================================
   الشبكة المتوهجة
   ========================================================================== */
.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
    animation: grid-drift 20s linear infinite;
}

@keyframes grid-drift {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* ==========================================================================
   الحاوية الرئيسية
   ========================================================================== */
.loader-container {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 4rem;
    text-align: center;
}

/* ==========================================================================
   منطقة الشعار والحركة
   ========================================================================== */
.logo-stage {
    position: relative;
    width: 340px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ===== حلقات الدوران حول الشعار ===== */
.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    pointer-events: none;
}

.orbit-ring-1 {
    width: 320px;
    height: 320px;
    border-width: 1px;
    border-color: rgba(212, 175, 55, 0.15) transparent rgba(212, 175, 55, 0.15) transparent;
    animation: orbit-spin 8s linear infinite;
}

.orbit-ring-2 {
    width: 370px;
    height: 370px;
    border-width: 1px;
    border-color: transparent rgba(212, 175, 55, 0.2) transparent rgba(212, 175, 55, 0.2);
    animation: orbit-spin-reverse 12s linear infinite;
}

.orbit-ring-3 {
    width: 420px;
    height: 420px;
    border-width: 1px;
    border: 1px dashed rgba(212, 175, 55, 0.1);
    animation: orbit-spin 20s linear infinite;
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes orbit-spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* ===== الشعار ===== */
.logo-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.logo-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(212, 175, 55, 0.35) 0%,
        rgba(212, 175, 55, 0.1) 40%,
        transparent 70%
    );
    filter: blur(25px);
    animation: glow-breath 4s ease-in-out infinite;
}

@keyframes glow-breath {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
    animation: logo-float 5s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ==========================================================================
   تسلسل الدخول الأولي للشعار:
   1) يبدأ أسفل ومخفي وصغير
   2) يصعد للأعلى ويكبر ويلف
   ========================================================================== */

/* المرحلة الأولى: قبل الظهور — أسفل ومخفي */
.logo-wrapper.intro-hidden {
    opacity: 0;
    transform: translateY(180px) scale(0.4) rotate(-30deg);
}

/* المرحلة الثانية: الظهور والصعود والدوران */
.logo-wrapper.intro-in {
    animation: logo-intro 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes logo-intro {
    0% {
        opacity: 0;
        transform: translateY(180px) scale(0.4) rotate(-30deg);
    }
    40% {
        opacity: 1;
    }
    70% {
        transform: translateY(-20px) scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

/* ==========================================================================
   المحتوى النصي
   ========================================================================== */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    max-width: 900px;
    width: 100%;
    margin-top: 1rem;
}

/* العناصر تبدأ مخفية ثم تظهر بالتسلسل */
.brand-name,
.coming-soon,
.progress-wrapper,
.countdown,
.social-links {
    opacity: 0;
    transform: translateY(30px);
}

.reveal {
    animation: reveal-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== اسم الشركة ===== */
.brand-name {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 10px rgba(212, 175, 55, 0.3));
}

/* ===== "انتظرونا قريباً" ===== */
.coming-soon {
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: var(--text-muted);
    letter-spacing: 2px;
    position: relative;
}

.coming-soon::before,
.coming-soon::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.coming-soon::before { right: calc(100% + 18px); }
.coming-soon::after { left: calc(100% + 18px); }

/* ==========================================================================
   شريط التحميل
   ========================================================================== */
.progress-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-light));
    box-shadow: 0 0 15px rgba(212, 175, 65, 0.6);
    transition: width 0.3s ease;
    position: relative;
}

/* وميض متحرك على شريط التحميل */
.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progress-shimmer 1.8s linear infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percent {
    margin-top: 0.6rem;
    display: block;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1px;
}

/* ==========================================================================
   العداد التنازلي
   ========================================================================== */
.countdown {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    padding: 0.8rem 0.6rem;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.4);
}

.countdown-num {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--gold-light);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
    line-height: 1;
    margin-bottom: 0.3rem;
    /* monospace digits */
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
}

/* ==========================================================================
   روابط التواصل
   ========================================================================== */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.25);
    background: rgba(212, 175, 55, 0.04);
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.social-link:hover {
    transform: translateY(-6px) scale(1.1);
    border-color: var(--gold);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link i {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    transition: filter 0.35s ease;
}

/* أيقونات SVG مدمجة (ذهبية) */
.icon-fb {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M9.198 21.5h4v-8.01h3.604l.396-3.98h-4V7.5a1 1 0 0 1 1-1h3v-4h-3a5 5 0 0 0-5 5v2.01h-2l-.396 3.98h2.396v8.01Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.icon-ig {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M12 2.16c3.2 0 3.58.01 4.85.07 1.17.05 1.8.25 2.23.41.56.22.96.48 1.38.9.42.42.68.82.9 1.38.16.42.36 1.06.41 2.23.06 1.27.07 1.65.07 4.85s-.01 3.58-.07 4.85c-.05 1.17-.25 1.8-.41 2.23-.22.56-.48.96-.9 1.38-.42.42-.82.68-1.38.9-.42.16-1.06.36-2.23.41-1.27.06-1.65.07-4.85.07s-3.58-.01-4.85-.07c-1.17-.05-1.8-.25-2.23-.41a3.7 3.7 0 0 1-1.38-.9 3.7 3.7 0 0 1-.9-1.38c-.16-.42-.36-1.06-.41-2.23-.06-1.27-.07-1.65-.07-4.85s.01-3.58.07-4.85c.05-1.17.25-1.8.41-2.23.22-.56.48-.96.9-1.38.42-.42.82-.68 1.38-.9.42-.16 1.06-.36 2.23-.41 1.27-.06 1.65-.07 4.85-.07M12 0C8.74 0 8.33.01 7.05.07 5.78.13 4.9.33 4.14.63c-.79.3-1.46.72-2.12 1.38A5.9 5.9 0 0 0 .63 4.14c-.3.76-.5 1.64-.56 2.91C.01 8.33 0 8.74 0 12s.01 3.67.07 4.95c.06 1.27.26 2.15.56 2.91.3.79.72 1.46 1.38 2.12.66.66 1.33 1.08 2.12 1.38.76.3 1.64.5 2.91.56C8.33 23.99 8.74 24 12 24s3.67-.01 4.95-.07c1.27-.06 2.15-.26 2.91-.56a5.9 5.9 0 0 0 2.12-1.38 5.9 5.9 0 0 0 1.38-2.12c.3-.76.5-1.64.56-2.91.06-1.28.07-1.69.07-4.95s-.01-3.67-.07-4.95c-.06-1.27-.26-2.15-.56-2.91a5.9 5.9 0 0 0-1.38-2.12A5.9 5.9 0 0 0 19.86.63c-.76-.3-1.64-.5-2.91-.56C15.67.01 15.26 0 12 0Zm0 5.84a6.16 6.16 0 1 0 0 12.32 6.16 6.16 0 0 0 0-12.32ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm6.41-10.85a1.44 1.44 0 1 0 0 2.88 1.44 1.44 0 0 0 0-2.88Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.icon-x {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.icon-wa {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M.057 24l1.687-6.163a11.867 11.867 0 0 1-1.587-5.945C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 0 1 8.413 3.488 11.824 11.824 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884a9.86 9.86 0 0 0 1.51 5.26l-.999 3.648 3.978-.999zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.096 3.2 5.078 4.487.709.306 1.262.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.social-link:hover i {
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   التذييل
   ========================================================================== */
.footer {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0;
    animation: reveal-up 1s ease forwards;
    animation-delay: 3.5s;
}

.footer p {
    letter-spacing: 0.5px;
}

/* ==========================================================================
   الاستجابة (Responsive)
   ========================================================================== */
@media (max-width: 600px) {
    .logo-stage {
        width: 280px;
        height: 280px;
    }
    .logo-wrapper {
        width: 180px;
        height: 180px;
    }
    .orbit-ring-1 { width: 260px; height: 260px; }
    .orbit-ring-2 { width: 300px; height: 300px; }
    .orbit-ring-3 { width: 340px; height: 340px; }
    .countdown-item {
        min-width: 62px;
        padding: 0.6rem 0.4rem;
    }
    .countdown-num { font-size: 1.4rem; }
    .social-link { width: 42px; height: 42px; }
    .social-link i { width: 19px; height: 19px; }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .logo-wrapper.intro-hidden { opacity: 1; transform: none; }
}
