@font-face {
    font-family: 'Effra';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/Effra-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Effra';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/Effra-Medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Effra';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/Effra-Bold.ttf') format('truetype');
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple: #6A3DE8;
    --purple-dark: #4A25D9;
    --purple-light: #8B5CF6;
    --gold: #D4AF37;
    --dark: #0f081c;
    /* Very dark deep purple */
    --dark2: #160c2b;
    /* Slightly lighter deep purple */
    --dark3: #1d113a;
    /* Noticeable deep purple for cards */
    --text: #E8E8F0;
    --muted: rgba(255, 255, 255, 0.55);
    --border: rgba(106, 61, 232, 0.25);
    --glass: rgba(255, 255, 255, 0.04);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Effra', 'Cairo', 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
}

/* ── NOISE OVERLAY ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}

nav.nav-scrolled {
    padding: 16px 60px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(15, 8, 28, 0.85);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--purple), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-logo-img {
    height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(106, 61, 232, 0.5));
    transition: all 0.3s ease;
}

.nav-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(106, 61, 232, 0.8));
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

.nav-cta {
    padding: 10px 24px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(106, 61, 232, 0.4);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(106, 61, 232, 0.6);
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(106, 61, 232, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-glow2 {
    position: absolute;
    top: 20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(106, 61, 232, 0.15);
    border: 1px solid rgba(106, 61, 232, 0.4);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--purple-light);
    margin-bottom: 28px;
}

.hero-badge span {
    width: 7px;
    height: 7px;
    background: var(--purple-light);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: 0.5;
        transform: scale(1.4)
    }
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, var(--purple-light), var(--gold), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200%;
    animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: 0%
    }

    100% {
        background-position: 200%
    }
}

.hero p {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 16px 40px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 32px rgba(106, 61, 232, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(106, 61, 232, 0.6);
}

.btn-secondary {
    padding: 16px 40px;
    border-radius: 50px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.4);
}

/* STATS */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 70px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 2.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--purple-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ── PHONE MOCKUP ── */
.mockup-section {
    padding: 80px 60px;
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.mockup-text {
    flex: 1;
}

.mockup-text .section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--purple-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.mockup-text h2 {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.mockup-text p {
    color: var(--muted);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 28px;
}

.phone {
    flex: 0 0 280px;
    background: var(--dark3);
    border-radius: 40px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(106, 61, 232, 0.2);
    position: relative;
}

.phone-notch {
    width: 90px;
    height: 24px;
    background: var(--dark);
    border-radius: 0 0 16px 16px;
    margin: 0 auto 12px;
}

.phone-screen {
    padding: 0 0 20px;
}

/* Mini home screen inside phone */
.ph-appbar {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    padding: 12px 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ph-appbar-title {
    font-size: 0.75rem;
    font-weight: 700;
}

.ph-search {
    margin: -10px 12px 10px;
    background: var(--dark3);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.65rem;
    color: var(--muted);
    border: 1px solid var(--border);
}

.ph-section-title {
    padding: 6px 14px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ph-section-title span {
    color: var(--purple-light);
    font-size: 0.58rem;
}

.ph-card {
    margin: 4px 12px;
    background: var(--dark2);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}

.ph-card-img {
    height: 90px;
    background: linear-gradient(135deg, #1a1060, #2d1b8c, #6A3DE8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
}

.ph-badge-sponsored {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    border-radius: 20px;
    padding: 2px 7px;
    font-size: 0.5rem;
    font-weight: 700;
    color: #fff;
}

.ph-badge-partner {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.5rem;
    color: var(--gold);
}

.ph-card-body {
    padding: 8px 10px;
}

.ph-card-title {
    font-size: 0.62rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.ph-card-sub {
    font-size: 0.55rem;
    color: var(--muted);
}

.ph-timer {
    margin: 8px 12px;
    background: rgba(106, 61, 232, 0.1);
    border: 1px solid rgba(106, 61, 232, 0.3);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.58rem;
    color: var(--purple-light);
}

/* ── FEATURES SECTION ── */
.features {
    padding: 100px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header .label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--purple-light);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.6rem;
    font-weight: 900;
}

.section-header p {
    color: var(--muted);
    margin-top: 12px;
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(106, 61, 232, 0.06), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(106, 61, 232, 0.5);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(106, 61, 232, 0.3);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ── HOW IT WORKS ── */
.how {
    padding: 100px 60px;
    background: var(--dark2);
    position: relative;
    overflow: hidden;
}

.how::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

.how-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 60px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, var(--purple), var(--gold), var(--purple));
}

.step {
    text-align: center;
    position: relative;
}

.step-num {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    box-shadow: 0 8px 32px rgba(106, 61, 232, 0.4);
    position: relative;
    z-index: 1;
}

.step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

/* ── AD SYSTEM SECTION ── */
.ad-system {
    padding: 100px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.ad-timeline {
    display: flex;
    gap: 0;
    margin-top: 60px;
    background: var(--dark2);
    border-radius: 24px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.timeline-item {
    flex: 1;
    padding: 36px 28px;
    text-align: center;
    border-left: 1px solid var(--border);
    position: relative;
    transition: background 0.3s;
}

.timeline-item:first-child {
    border-left: none;
}

.timeline-item:hover {
    background: rgba(106, 61, 232, 0.05);
}

.timeline-item.active {
    background: rgba(106, 61, 232, 0.1);
}

.timeline-item.active::after {
    content: 'الآن';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--purple);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.t-icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.t-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.t-desc {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.6;
}

.t-time {
    margin-top: 12px;
    display: inline-block;
    background: rgba(106, 61, 232, 0.15);
    border: 1px solid rgba(106, 61, 232, 0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.72rem;
    color: var(--purple-light);
    font-weight: 600;
}

/* ── TECH STACK ── */
.tech {
    padding: 80px 60px;
    background: var(--dark2);
    position: relative;
}

.tech::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tech-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.tech-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 50px;
    justify-content: center;
}

.tech-pill {
    padding: 12px 28px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.tech-pill:hover {
    border-color: rgba(106, 61, 232, 0.5);
    background: rgba(106, 61, 232, 0.08);
}

.tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ── CTA ── */
.cta {
    padding: 120px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(106, 61, 232, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.cta p {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.cta-box {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    background: var(--dark2);
    border: 1px solid var(--border);
    border-radius: 60px;
    padding: 8px 8px 8px 24px;
}

.cta-box input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    width: 260px;
}

.cta-box input::placeholder {
    color: var(--muted);
}

/* ── FOOTER ── */
footer {
    padding: 40px 60px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--purple-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-logo-img {
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(106, 61, 232, 0.5));
}

footer p {
    color: var(--muted);
    font-size: 0.82rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

/* ── ANIMATIONS ── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    nav {
        padding: 16px 24px;
    }

    .nav-links {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
    }

    .steps::before {
        display: none;
    }

    .ad-timeline {
        flex-direction: column;
    }

    .timeline-item {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .timeline-item:first-child {
        border-top: none;
    }

    .mockup-section {
        flex-direction: column;
        padding: 60px 24px;
    }

    .features,
    .ad-system,
    .cta {
        padding: 60px 24px;
    }

    .how {
        padding: 60px 24px;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .stats {
        gap: 32px;
    }
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 8, 28, 0.85); /* var(--dark) with opacity */
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background-color: var(--dark2);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 2001; /* Ensure modal is above overlay background */
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark3); 
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin: 0;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.modal-close:hover {
    color: #ff4c4c;
    background: rgba(255, 76, 76, 0.1);
    transform: scale(1.1) rotate(90deg);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
    max-height: 50vh; /* Adjust height based on viewport */
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 3px;
}

.modal-body h4 {
    color: var(--gold);
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 16px;
}


@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
    }
    .modal-header {
        padding: 16px 20px;
    }
    .modal-body {
        padding: 20px;
        max-height: 65vh;
        font-size: 0.95rem;
    }
}

.social-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.social-links a {
    color: var(--muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
}

.social-links a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(106, 61, 232, 0.4);
}
