/* Style Reset & Fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #080b11;
    --bg-secondary: #0f1322;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-blue: #3b82f6;
    --glass-bg: rgba(15, 22, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(99, 102, 241, 0.4);
    --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Ambient Neon Glow Backdrops */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    mix-blend-mode: screen;
}

.orb-1 {
    top: -10%;
    right: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
    animation: float 25s infinite alternate ease-in-out;
}

.orb-2 {
    bottom: -10%;
    left: -5%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    animation: float 30s infinite alternate-reverse ease-in-out;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent-emerald) 0%, transparent 70%);
    animation: float 20s infinite alternate ease-in-out;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(4%, 5%) scale(1.1); }
    100% { transform: translate(-2%, -3%) scale(0.95); }
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(8, 11, 17, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-subtext {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-emerald);
    -webkit-text-fill-color: var(--accent-emerald);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-blue) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.nav-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: #ffffff;
}

/* Hero Section */
.hero-section {
    padding: 6rem 0 4rem;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-indigo) 20%, var(--accent-emerald) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.15));
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
}

/* Download Grid */
.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100%;
    margin-top: 1.5rem;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.25rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.download-card:hover:not(.disabled) {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
}

.download-card:hover:not(.disabled)::before {
    opacity: 1;
}

.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--text-primary);
    transition: var(--transition);
}

.download-card:hover:not(.disabled) .card-icon {
    background: var(--accent-indigo);
    color: #ffffff;
    transform: scale(1.05);
}

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

/* Card Text */
.card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.card-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.card-main {
    font-size: 1rem;
    font-weight: 700;
}

/* Disabled Coming Soon state */
.download-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(15, 22, 42, 0.25);
    border-color: rgba(255, 255, 255, 0.03);
}

.download-card.disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.download-card.disabled .card-icon {
    color: var(--text-secondary);
}

.badge-soon {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
}

/* Hero Graphic / Visuals */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.glow-ring {
    position: absolute;
    width: 110%;
    height: 110%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.mockup-container {
    position: relative;
    z-index: 1;
    border-radius: 40px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(99, 102, 241, 0.15);
    max-width: 480px;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: hover-anim 6s infinite ease-in-out;
}

.mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

@keyframes hover-anim {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Features Section */
.features-section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
}

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

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 
                0 0 20px rgba(99, 102, 241, 0.1);
}

.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #818cf8;
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--accent-indigo);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.feature-icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.feature-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Toast Messages for PWA */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    backdrop-filter: blur(12px);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    color: #f59e0b;
    width: 20px;
    height: 20px;
}

/* Footer Section */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
    background: rgba(8, 11, 17, 0.9);
}

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

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--text-primary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-desc {
        margin: 0 auto;
    }
    
    .hero-visual {
        order: -1;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
    
    .header-container {
        height: 70px;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
