/* ═══════════════════════════════════
       RESET & VARIABLES
    ═══════════════════════════════════ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --purple: #6C63FF;
    --purple-dark: #4F46E5;
    --purple-light: #A89BF8;
    --purple-soft: rgb(238, 240, 255);
    --pink: #F48FB1;
    --red: #E53935;
    --white: #FFFFFF;
    --bg: #F8F7FF;
    --text: #0F0E1A;
    --text-muted: #6B6882;
    --card-bg: #FFFFFF;
    --border: rgba(108, 99, 255, 0.12);
    --shadow: 0 8px 40px rgba(108, 99, 255, 0.12);
    --shadow-lg: 0 24px 64px rgba(108, 99, 255, 0.18);
    --nav-h: 70px;
    --font-title: 'Poppins', sans-serif;
    --font-body: 'Sofia Sans', sans-serif;
    --radius: 16px;
    --radius-lg: 28px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ═══════════════════════════════════
           NAVBAR
        ═══════════════════════════════════ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 72px);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
    background: rgba(248, 247, 255, 0);
    backdrop-filter: blur(20px);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 800;
    color: var(--purple-dark);
}

.nav-logo img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--purple-dark);
    background: var(--purple-soft);
}

.nav-links .nav-cta {
    background: var(--purple);
    color: white;
    border-radius: 10px;
    padding: 9px 22px;
    margin-left: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-links .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.35);
    background: var(--purple-dark);
    color: white;
}

.nav-toggle {
    display: none;
    font-size: 28px;
    font-weight: 800;
    cursor: pointer;
    color: var(--purple-dark);
    z-index: 101;
}

/* ═══════════════════════════════════
           HERO
        ═══════════════════════════════════ */

.hero {
    min-height: 100vh;
    padding-top: var(--nav-h);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url("images/background-image.png");
    background-position: center;
    background-size: cover;
    position: relative;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 14, 26, 0.08);
    backdrop-filter: blur(4px);
    z-index: 0;
}

.hero>* {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(50px, 14vw, 80px);
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 20px;
    color: var(--text);
    word-wrap: break-word;
    max-width: 100%;
}

.mobile-break {
    display: none;
}

.hero-title-accent {
    color: var(--purple);
    display: inline-block;
}

#typed-word {
    border-right: 4px solid var(--purple);
    padding-right: 5px;
    animation: cursor 1s step-end infinite;
}

@keyframes cursor {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--purple);
    }
}

.hero-slogan {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: clamp(12px, 2vw, 14px) clamp(24px, 4vw, 28px);
    border-radius: 50px;
    font-size: clamp(13px, 1.5vw, 15px);
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--purple);
    color: white;
    box-shadow: 0 8px 28px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(108, 99, 255, 0.45);
    background: var(--purple-dark);
}

.btn-outline {
    background: transparent;
    color: var(--purple);
    border: 2px solid var(--purple);
}

.btn-outline:hover {
    transform: translateY(-3px);
    background: var(--purple-soft);
}

/* ═══════════════════════════════════
           SHARED SECTION STYLES
        ═══════════════════════════════════ */

.section {
    padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 72px);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--purple-dark);
    margin-bottom: 16px;
    background: var(--purple-soft);
    padding: 6px 16px;
    border-radius: 50px;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 20px;
}

.section-sub {
    font-size: clamp(16px, 1.5vw, 18px);
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 60px;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 {
    transition-delay: 0.1s;
}

.reveal-d2 {
    transition-delay: 0.2s;
}

.reveal-d3 {
    transition-delay: 0.3s;
}

.reveal-d4 {
    transition-delay: 0.4s;
}

/* ═══════════════════════════════════
           DOWNLOAD
        ═══════════════════════════════════ */
#download {
     display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 100vh;
    align-items: center;
    background: #0F0E1A;
    /* خلفية داكنة احترافية */
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(80px, 10vw, 140px) clamp(20px, 5vw, 72px);
}

/* تأثير التوهج في الخلفية */
.dl-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.15) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.dl-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* العناوين والنصوص */
#download .section-title {
    color: white;
    margin-bottom: 20px;
}

#download .section-sub {
    color: rgba(255, 255, 255, 0.6);
    max-width: 920px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* حاوية الزر الرئيسي (64-bit) */
.dl-main-wrapper {
    width: 100%;
    max-width: 500px;
    /* عرض متوازن ومحدد */
    margin-bottom: 30px;
}

/* تصميم الزر الرئيسي "الكبير" */
.dl-btn-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 30px;
    background: var(--purple);
    border-radius: 20px;
    color: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
    text-align: left;
}

.dl-btn-hero:hover {
    transform: scale(1.03) translateY(-5px);
    background: var(--purple-dark);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.5);
}

.dl-btn-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.dl-text-group {
    display: flex;
    flex-direction: column;
}

.dl-btn-main {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 800;
    line-height: 1.2;
}

.dl-btn-sub {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
}

/* النص المساعد الصغير */
.dl-helper-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* حاوية الزر الثانوي (32-bit) */
.dl-secondary-wrapper {
    width: 100%;
}

.dl-btn-alt {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dl-btn-alt:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

/* ═══════════════════════════════════
           CONTACT & FOOTER
        ═══════════════════════════════════ */

#contact {
    min-height: 100vh;

    background: white;
    text-align: center;
    /* توسيط النصوص */
    align-items: center;
    /* توسيط العناصر */
    display: flex;
    flex-direction: column;
    /* ترتيب العناصر عمودياً */

}

#contact .section-sub {
    max-width: 920px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 52px;
    line-height: 1.85;

}

.contact-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 50px;

}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    flex: 1 1 320px;
    max-width: 380px;
    min-height: 200px;
    padding: 40px 24px;
    border-radius: 28px;
    /* زوايا دائرية كبيرة لمظهر عصري */
    background: #FFFFFF;

    /* ظل ناعم متعدد الطبقات لإعطاء عمق حقيقي */
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 20px -5px rgba(0, 0, 0, 0.03);

    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

/* حاوية الأيقونة (الفقاعة) */
.icon-box {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    /* متناسقة مع الـ BorderRadius الخاص بك */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: var(--purple-soft);
    /* لون افتراضي */
    transition: all 0.4s ease;
}

.icon-box img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

/* تخصيص ألوان الفقاعة بناءً على الـ accent */
.contact-card[style*="#63b1d6"] .icon-box {
    background: rgba(99, 177, 214, 0.15);
}

.contact-card[style*="#e06b63"] .icon-box {
    background: rgba(224, 107, 99, 0.15);
}

/* ═════ تأثيرات عند تمرير الماوس (Hover) ═════ */

.contact-card:hover {
    transform: translateY(-12px);
    border-color: var(--card-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.contact-card:hover .icon-box {
    background: var(--card-accent);
    /* الفقاعة تتلون بالكامل */
    transform: scale(1.1) rotate(5deg);
}

.contact-card:hover .icon-box img {

    transform: scale(1.1);
}

.contact-label {
    font-size: 19px;
    font-weight: 800;
    /* خط أعرض للعناوين */
    color: var(--text);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════════════════════════════
           RESPONSIVE TWEAKS
        ═══════════════════════════════════ */

@media (max-width: 768px) {
    .mobile-break {
        display: block;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        opacity: 0;
        pointer-events: none;
        background: var(--bg);
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links .nav-cta {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        width: 50%;
    }

    .btn {
        width: 100%;
    }


    .dl-main-wrapper {
        max-width: 90% !important;
    }

    .dl-btn-hero {
        padding: 15px 20px;
        gap: 15px;
    }

    .dl-btn-main {
        font-size: 18px;
    }


    .contact-grid {
        gap: 14px;
    }

    .contact-card {
        width: 100%;
        max-width: 360px;
        min-height: 150px;
    }

    .contact-value {
        max-width: 100%;
    }

    /* Masquer les boutons de navigation sur mobile (le swipe est plus naturel) */
    .nav-btn {
        display: none;
    }
}