/* ========================================
   1. Design System & Variables
   پایه‌ریزی سیستم طراحی برای یکپارچگی
======================================== */
:root {
    /* Color Palette */
    --color-primary: #8b5cf6;
    --color-primary-hover: #7c3aed;
    --color-primary-soft: rgba(139, 92, 246, 0.15);
    
    --bg-main: #020203;       /* مشکی خالص‌تر برای عمق */
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(18, 18, 23, 0.7);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(139, 92, 246, 0.5);

    /* Spacing System (8pt Grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 64px;
    
    /* Component Props */
    --header-height: 72px;
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 9999px;
    
    /* Typography */
    --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

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

a { text-decoration: none; color: inherit; transition: all 0.2s ease-in-out; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

/* ========================================
   2. Layout & Containers
======================================== */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 2;
}

/* Background Effects */
.noise-overlay {
    position: fixed; inset: 0; pointer-events: none; z-index: 50;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

.ambient-light {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
    pointer-events: none; z-index: 0;
}

/* ========================================
   3. Components: Buttons & Inputs
   (Touch-friendly & Consistent)
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 52px; /* Fixed height for touch consistency */
    padding: 0 var(--space-xl);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn:active { transform: scale(0.96); } /* Click feedback */

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    color: var(--text-secondary);
    height: 44px; /* Slightly smaller for secondary actions */
    padding: 0 var(--space-md);
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-surface); }

/* ========================================
   4. Component: Header
======================================== */
.glass-header {
    position: fixed;
    top: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - var(--space-md) * 2);
    max-width: 1200px;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xs); /* Inner padding handled by children */
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
}

.header-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
}

.logo-img { height: 32px; width: auto; }

.nav-desktop {
    display: flex;
    gap: 32px;
}
.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--color-primary); transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

/* ========================================
   5. Sections & Cards (The Core UI)
======================================== */
section {
    padding: var(--space-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}
.text-gradient {
    background: linear-gradient(135deg, #fff 30%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Cards (Glassmorphism Perfected) */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px; /* Generous padding */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-card::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.03), transparent 40%);
    opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}
.glass-card:hover::before { opacity: 1; }
.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4);
}

/* Icon Box Style */
.icon-box {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}

/* Badge Style */
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    color: #c4b5fd;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
}
.badge-dot { width: 6px; height: 6px; background: #8b5cf6; border-radius: 50%; box-shadow: 0 0 8px #8b5cf6; }

/* ========================================
   6. Hero Section Specifics
======================================== */
.hero-section {
    min-height: 100vh;
    padding-top: 140px; /* Space for header */
    display: flex;
    align-items: center;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.03em;
}
.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 90%;
    line-height: 1.8;
}

/* Visual Mockup Card */
.mockup-card {
    background: linear-gradient(165deg, rgba(30,30,35,0.9), rgba(10,10,12,0.95));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: -20px 40px 80px rgba(0,0,0,0.6);
    transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.4s ease-out;
}
.mockup-card:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }

/* ========================================
   7. Responsive Design (Mobile First Thinking)
======================================== */

/* Tablet & Mobile */
@media (max-width: 1024px) {
    :root { --space-2xl: 48px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero-content { margin: 0 auto; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; }
}

/* Mobile Specific */
@media (max-width: 768px) {
    :root { --header-height: 64px; --space-lg: 20px; }
    
    .container { padding: 0 var(--space-md); }
    
    /* Header adjustments */
    .glass-header { 
        width: calc(100% - var(--space-md));
        top: var(--space-sm);
        padding: 0;
    }
    .header-inner { padding: 0 var(--space-md); }
    .nav-desktop, .login-text { display: none; }
    
    /* Better Touch Targets */
    .btn-mobile-icon {
        width: 44px; height: 44px;
        padding: 0;
        border-radius: 50%; /* Circular button on mobile */
        display: flex; align-items: center; justify-content: center;
    }
    .btn-mobile-icon span { display: none; } /* Hide text */
    
    /* Hero adjustments */
    .hero-section { padding-top: 120px; padding-bottom: 48px; }
    .hero-title { font-size: 2.5rem; }
    
    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: var(--space-md);
    }
    .hero-btns .btn { width: 100%; }

    /* Grid adjustments */
    .bento-grid, .access-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-md);
    }
    
    /* Footer */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 48px;
    }
    .footer-links {
        flex-direction: column;
        gap: 24px;
    }
    .footer-links a {
        padding: 8px 0; /* Larger touch area for links */
        display: block;
    }
}


