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

:root {
    --purple: #7c5cfc;
    --purple-light: #a78bfa;
    --purple-dark: #5b3fd9;
    --cyan: #22d3ee;
    --cyan-dark: #06b6d4;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-hover: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text: #f0f0f5;
    --text-dim: rgba(240, 240, 245, 0.6);
    --text-muted: rgba(240, 240, 245, 0.4);
    --shadow: rgba(0, 0, 0, 0.4);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #08080f;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body {
    font-family: 'Cairo', 'Inter', sans-serif;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============ BACKGROUND ============ */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -3;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) saturate(1.2) brightness(0.4);
    transform: scale(1.08);
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 8, 15, 0.3) 0%,
        rgba(8, 8, 15, 0.6) 40%,
        rgba(8, 8, 15, 0.85) 70%,
        #08080f 100%
    );
}

.bg-noise {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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)'/%3E%3C/svg%3E");
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ============ GLASS ============ */
.glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: all var(--transition);
}

.glass:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
}

/* ============ NAV ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    transition: all var(--transition);
}

.nav.scrolled {
    background: rgba(8, 8, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-icon {
    width: 22px;
    height: 22px;
    color: var(--purple-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--purple);
    transition: width var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    color: var(--text);
}

/* ============ HERO ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7rem 1.5rem 4rem;
}

.hero-inner {
    max-width: 780px;
    width: 100%;
    text-align: center;
}

.hero-glass {
    padding: 4rem 3.5rem;
    position: relative;
    overflow: hidden;
}

.hero-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.15), transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, var(--purple), var(--cyan-dark));
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: white;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title span {
    display: block;
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: white;
    box-shadow: 0 4px 24px rgba(124, 92, 252, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 92, 252, 0.5);
    color: white;
}

.btn-glass {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-glass:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    color: var(--text);
}

.btn-lg {
    padding: 0.95rem 2rem;
    font-size: 0.95rem;
}

.hero-specs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.spec {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 500;
}

.spec svg {
    color: var(--purple-light);
    opacity: 0.7;
}

.spec-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
}

/* ============ PREVIEW ============ */
.preview {
    padding: 2rem 0 6rem;
}

.preview-glass {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.preview-glow {
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.1), transparent 70%);
    pointer-events: none;
}

.preview-img {
    width: 100%;
    border-radius: var(--radius-sm);
    display: block;
    position: relative;
    z-index: 1;
}

/* ============ SECTION HEADER ============ */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
}

.section-sub {
    color: var(--text-dim);
    font-size: 1.05rem;
}

/* ============ FEATURES ============ */
.features {
    padding: 6rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    padding: 2.2rem 1.8rem;
    text-align: left;
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon-wrap {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.15), rgba(34, 211, 238, 0.08));
    border-radius: 14px;
    margin-bottom: 1.25rem;
    color: var(--purple-light);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ============ STEPS ============ */
.steps {
    padding: 6rem 0;
}

.steps-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.step-card {
    flex: 1;
    max-width: 280px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--purple-light);
    background: #08080f;
    padding: 0.2rem 0.8rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.step-icon {
    color: var(--purple-light);
    margin-bottom: 1.2rem;
    opacity: 0.8;
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.65;
}

.step-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0.4;
}

/* ============ DOWNLOAD ============ */
.download {
    padding: 4rem 0 6rem;
}

.download-glass {
    max-width: 700px;
    margin: 0 auto;
    padding: 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-glass::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 92, 252, 0.12), transparent 70%);
    pointer-events: none;
}

.download-content {
    position: relative;
    z-index: 1;
}

.download-glass h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.download-sub {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.download-btns {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ FOOTER ============ */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 1.5rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.footer-brand svg {
    color: var(--purple-light);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--purple-light);
}

.footer-links a svg {
    opacity: 0.6;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-bottom strong {
    color: var(--text-dim);
    font-weight: 600;
}

/* ============ RTL ============ */
html[dir="rtl"] .feature-card {
    text-align: right;
}

html[dir="rtl"] .step-arrow svg {
    transform: scaleX(-1);
}

html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.6rem;
    }

    .hero-glass {
        padding: 2.5rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-row {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .hero-specs {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .spec-sep {
        display: none;
    }

    .download-glass {
        padding: 2.5rem 1.5rem;
    }

    .download-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #08080f;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

::selection {
    background: var(--purple);
    color: white;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-glass {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.preview-glass {
    animation: fadeInUp 0.8s 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}