/* Global Styles - Premium Polish + Mobile Fix + Creative Intro */
@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    /* Modern 2026 Mode (Day/Clean) */
    --color-bg: #FAFAF9;
    --color-text: #1F2937;
    --color-text-light: #555;
    --color-primary: #D97706;
    /* Amber */
    --color-secondary: #0D9488;
    /* Teal */
    --color-surface: #FFFFFF;
    --color-phone-border: #1F2937;
    --bg-texture: none;

    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.1);

    --font-heading: 'El Messiri', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

/* Premium Vintage Mode (Midnight Gold) */
body.vintage-mode {
    --color-bg: #0F172A;
    /* Deep Navy/Charcoal */
    --color-text: #FDE68A;
    /* Soft Gold */
    --color-text-light: #CBD5E1;
    /* Muted Blue-Grey */
    --color-primary: #F59E0B;
    /* Rich Gold */
    --color-secondary: #14B8A6;
    /* Emerald Teal */
    --color-surface: #1E293B;
    /* Lighter charcoal */
    --color-phone-border: #475569;
    /* Slate */
    --bg-texture: url("https://www.transparenttextures.com/patterns/stardust.png");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    background-image: var(--bg-texture);
    color: var(--color-text);
    direction: rtl;
    line-height: 1.6;
    transition: background-color 0.8s, color 0.8s, background-image 0s;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

#main-content {
    transition: opacity 0.5s ease;
}

#main-content {
    transition: opacity 0.5s ease;
}

/* Navbar - Refined Layout */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    /* Very subtle glass */
    backdrop-filter: blur(12px);
    z-index: 900;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    /* Always visible */
    transition: transform 0.3s ease;
}

/* Reveal nav after loader */


.nav-start {
    flex: 1;
}

.nav-center {
    flex: 0;
}

.nav-end {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-download-btn {
    background: var(--color-text);
    color: #fff;
    /* Force White Text in Light Mode */
    border: none;
    padding: 10px 24px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-body);
    transition: transform 0.2s, background-color 0.5s;
}

body.vintage-mode .nav-download-btn {
    color: var(--color-bg);
}

.nav-download-btn:hover {
    transform: scale(1.05);
    background: var(--color-primary);
    color: #fff;
}

/* Theme Switch */
.theme-switch-container {
    display: flex;
    align-items: center;
    background: rgba(100, 100, 100, 0.2);
    padding: 5px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-switch-container input {
    display: none;
}

.switch-label {
    width: 60px;
    height: 30px;
    background: transparent;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2px;
}

.switch-label .icon-moon,
.switch-label .icon-sun {
    font-size: 16px;
    width: 28px;
    text-align: center;
    color: #fff;
    z-index: 1;
    user-select: none;
}

body:not(.vintage-mode) .icon-moon {
    color: #ccc;
}

body:not(.vintage-mode) .icon-sun {
    color: #F59E0B;
}

.switch-toggle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#time-switch:checked+.switch-label .switch-toggle {
    transform: translateX(30px);
    background: #FDE68A;
}


/* Hero Section */
.hero-app {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 60px;
    position: relative;
    gap: 60px;
}

.hero-text {
    flex: 1;
    max-width: 650px;
    z-index: 2;
}

/* Hero Video - Creative Portal */
.hero-video-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
}

.video-portal {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 9/16;
    border-radius: 60px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px -10px rgba(217, 119, 6, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s, box-shadow 0.5s;
    background: #000;
    animation: floatVideo 6s ease-in-out infinite;
}

@keyframes floatVideo {

    0%,
    100% {
        transform: perspective(1000px) rotateY(-5deg) translateY(0);
    }

    50% {
        transform: perspective(1000px) rotateY(-5deg) translateY(-20px);
    }
}

.video-portal:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    box-shadow: 0 30px 80px -10px rgba(13, 148, 136, 0.4);
}

.video-portal video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.vintage-mode .video-portal {
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.2);
    border: 2px solid rgba(253, 230, 138, 0.3);
}

.main-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-text);
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 45px;
    max-width: 500px;
}

.app-badges {
    display: flex;
    gap: 20px;
}

.badge-store {
    display: flex;
    align-items: center;
    background: var(--color-text);
    color: var(--color-bg);
    border: 1px solid transparent;
    padding: 12px 24px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

/* Dark mode update for button outline - HIGH CONTRAST FIX */
body.vintage-mode .badge-store {
    border: 2px solid var(--color-primary);
    background: rgba(0, 0, 0, 0.3);
    color: var(--color-primary);
}

body.vintage-mode .badge-store i,
body.vintage-mode .badge-store .badge-text {
    color: var(--color-primary) !important;
}

body.vintage-mode .badge-store:hover {
    background: var(--color-primary);
    color: #000 !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

body.vintage-mode .badge-store:hover i,
body.vintage-mode .badge-store:hover .badge-text {
    color: #000 !important;
}

.badge-store:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button.badge-store i {
    color: #ffffff;
    font-size: 2.2rem;
    margin-right: 15px;
}

.badge-text {
    color: #ffffff;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}


/* STICKY LAYOUT */
.sticky-container {
    position: relative;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.sticky-visual {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.phone-frame {
    width: 320px;
    height: 650px;
    background: #000;
    border-radius: 48px;
    border: 4px solid var(--color-phone-border);
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: all 0.5s;
}

body.vintage-mode .phone-frame {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}

.screen-content {
    background: #fff;
    height: 100%;
    border-radius: 42px;
    overflow: hidden;
    position: relative;
    transition: filter 0.8s;
}

body.vintage-mode .screen-content {
    filter: sepia(0.2) contrast(1.1) brightness(0.9);
}

.screen-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: #000;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 20;
}

.app-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    padding-top: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-screen.active {
    opacity: 1;
    z-index: 5;
}


/* Scroll Sections */
.scroll-sections {
    width: 50%;
}

.scroll-step {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    opacity: 0.2;
    transform: scale(0.95);
    transition: all 0.6s ease-out;
}

.scroll-step.active {
    opacity: 1;
    transform: scale(1);
}

.step-content {
    background: var(--color-surface);
    padding: 50px;
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border for dark mode */
}

.icon-box {
    width: 64px;
    height: 64px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    margin-bottom: 25px;
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.3);
}

.step-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--color-text);
    line-height: 1.2;
}

.step-content p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    line-height: 1.7;
}


/* Download Section */
.download-cta {
    padding: 120px 5%;
    text-align: center;
    background: var(--color-surface);
}

.download-cta h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 40px;
    color: var(--color-text);
}

.app-badges.large {
    justify-content: center;
}

/* Footer */
footer {
    padding: 40px;
    text-align: center;
    color: var(--color-text-light);
    border-top: 1px solid rgba(100, 100, 100, 0.1);
}


/* Mobile Responsive */
@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .nav-start,
    .nav-end {
        flex: auto;
        text-align: center;
        justify-content: center;
    }

    .nav-center {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .sticky-container {
        flex-direction: column;
    }

    .sticky-visual {
        display: flex;
        width: 100%;
        height: auto;
        position: sticky;
        top: 80px;
        padding: 20px 0;
        z-index: 5;
        background: transparent;
        pointer-events: none;
    }

    .phone-frame {
        width: 240px;
        height: 480px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .scroll-sections {
        width: 100%;
        position: relative;
        z-index: 6;
    }

    .scroll-step {
        min-height: 80vh;
        padding: 20px 0;
        opacity: 0.9;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
    }

    .step-content {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        margin-top: 300px;
        position: relative;
        padding: 30px;
    }

    body.vintage-mode .step-content {
        background: rgba(30, 41, 59, 0.95);
    }

    .hero-app {
        position: relative;
        overflow: hidden;
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
        gap: 30px;
    }

    .hero-video-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        max-height: none;
        z-index: 0;
        border-radius: 0;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .video-portal {
        max-width: 100%;
        height: 100%;
        border-radius: 0;
        transform: none !important;
        animation: none;
        box-shadow: none;
        border: none;
    }

    /* Overlay for readability */
    .video-portal::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4), var(--color-bg));
        z-index: 2;
    }

    .hero-text {
        margin-bottom: 20px;
        z-index: 10;
        position: relative;
    }

    /* Force White Text on Mobile for Video Background */
    .hero-text .main-title,
    .hero-text .subtitle,
    .hero-text .tagline {
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    }

    .hero-text .subtitle {
        color: #e5e7eb;
    }

    .app-badges {
        justify-content: center;
        flex-direction: column;
    }

    .main-title {
        font-size: 2.5rem;
    }
}