@font-face {
    font-family: 'SF Arabic Rounded';
    src: url('files/SF-Arabic-Rounded 2.ttf') format('truetype');
    font-display: swap;
}

:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #E1306C;
    --accent-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --accent-glow: rgba(220, 39, 67, 0.4);
    --surface: #0a0a0a;
    --surface-glass: rgba(20, 20, 20, 0.6);
    --border: #1a1a1a;

    --font-heading: 'SF Arabic Rounded', 'Outfit', sans-serif;
    --font-body: 'SF Arabic Rounded', 'Inter', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Custom Scrollbar removed as per user request */

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    font-weight: 600;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.4s var(--ease-out-expo);
    backdrop-filter: blur(0px);
    /* Starts clear */
    border-bottom: 1px solid transparent;
    /* Fix for flash: Always have border, just invisible */
}

nav.scrolled {
    padding: 16px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    /* Slightly more visible for elegance */
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(188, 24, 136, 0.3);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out-expo);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.cta-button {
    background: #fff;
    color: #000;
    padding: 12px 28px;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.cta-button.secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #fff;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 28px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s var(--ease-out-expo);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 80px;
    /* Below navbar */
    left: 20px;
    /* Align to the button (Left in RTL) */
    right: auto;
    /* Don't stretch */
    width: 260px;
    /* Compact width */
    height: auto;
    background: rgba(15, 15, 15, 0.6);
    /* More transparent for glassy feel */
    backdrop-filter: blur(15px);
    /* Reduced blur to avoid solid look */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    z-index: 1500;
    padding: 24px;

    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    text-align: center;
}

.mobile-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-link:hover,
.mobile-link:active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.mobile-cta {
    margin-top: 10px;
    text-align: center;
}

.hero {
    display: flex;
    align-items: flex-start;
    padding-top: 130px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #050505 100%);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    filter: blur(100px);
    animation: pulse 4s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes pulse {
    0% {
        opacity: 0.15;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 10;
    margin-top: 0;
    /* Removed offset to fix "large top space" issue, relying on flex-center */
    /* Offset for navbar handled by flex align-items: center */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s var(--ease-out-expo) 0.5s forwards;
    padding-top: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.hero-title {
    position: relative;
    z-index: 10;
    /* Ensure on top of image */
    font-size: clamp(32px, 8vw, 84px);
    line-height: 1.1;
    margin-bottom: 12px;
    /* Reduced from 24px to bring subtitle closer */
    color: #ffffff;
    /* Solid white */
    letter-spacing: -0.04em;
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.1));
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-screen {
    width: 100%;
    max-width: 380px;
    /* Increased size */
    height: auto;
    display: block;
    margin: 0 auto -100px;
    /* Increased negative margin to pull title UP further */

    /* Fade out bottom (more than half now) */
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);

    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    border-radius: 24px;
    transform: perspective(1000px) rotateX(5deg);
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 0.3s forwards;
    position: relative;
    z-index: 1;
    /* Behind title */
}

.hero-subtitle {
    font-size: clamp(14px, 2.5vw, 20px);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 24px;
    /* Reduced from 48px to bring buttons closer */
    font-weight: 300;
}

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

/* Feature Grid */
.features {
    padding: 60px 0 120px;
    /* Reduced top padding to close gap with hero */
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-uptitle {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    display: block;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.card-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    /* Invert black icons to white for dark mode visibility */
    filter: brightness(0) invert(1) drop-shadow(0 0 5px var(--accent-glow));
    transition: transform 0.3s ease;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.features-more-text {
    text-align: center;
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
}

/* Privacy Section */
.privacy {
    padding: 60px 0 120px;
    position: relative;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.privacy-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s ease;
}

.privacy-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.privacy-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.privacy-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.privacy-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.disclaimer {
    background: rgba(255, 180, 0, 0.05);
    border: 1px solid rgba(255, 180, 0, 0.15);
    border-radius: 20px;
    padding: 36px;
    text-align: center;
}

.disclaimer h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #ffb400;
}

.disclaimer p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    background: #080808;
    color: var(--text-muted);
    font-size: 14px;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* hero-title now uses clamp() */
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card {
        padding: 20px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .card-icon-img {
        width: 24px;
        height: 24px;
    }

    .card h3 {
        font-size: 16px;
    }

    .card p {
        font-size: 13px;
    }

    /* hero-title now uses clamp() */

    .nav-links,
    .desktop-only {
        display: none;
    }

    .hero-actions {
        flex-direction: row;
        /* Keep side by side */
        gap: 10px;
        /* Smaller gap */
        align-items: center;
        padding: 0 10px;
        width: 100%;
        justify-content: center;
    }

    .cta-button {
        width: auto;
        flex: 1;
        /* Share space equally */
        max-width: none;
        text-align: center;
        padding: 12px 6px;
        /* Smaller padding */
        font-size: 13px;
        /* Smaller font to prevent wrapping */
        white-space: nowrap;
        /* Force single line */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .privacy-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .privacy-card {
        padding: 24px;
    }

    .privacy-card h3 {
        font-size: 16px;
    }

    .privacy-card p {
        font-size: 13px;
    }

    .disclaimer {
        padding: 24px;
    }

    .disclaimer h3 {
        font-size: 16px;
    }

    .disclaimer p {
        font-size: 13px;
    }
}