/* ============================================
   Nabza OTP - Stripe-Inspired Landing Page
   ============================================ */

/* CSS Variables / Design Tokens */
:root {
    /* Brand Colors - Stripe-inspired */
    --blurple: #635bff;
    --blurple-light: #7a73ff;
    --blurple-dark: #4b44cc;
    --deep-navy: #0a2540;
    --navy-light: #1a3a5c;
    --navy-lighter: #425466;
    
    /* Neutrals */
    --white: #ffffff;
    --off-white: #f6f9fc;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Semantic Colors */
    --success: #00d4aa;
    --warning: #ffbb00;
    --error: #ff5757;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'IBM Plex Sans Arabic', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 100px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(99, 91, 255, 0.3);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(20px);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

/* RTL Support */
[dir="rtl"] {
    --font-primary: 'IBM Plex Sans Arabic', 'Inter', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--deep-navy);
    background: var(--white);
    overflow-x: hidden;
}

[dir="rtl"] body {
    font-family: var(--font-arabic);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--blurple);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.4);
}

.btn-primary:hover {
    background: var(--blurple-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--deep-navy);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

.btn-white {
    background: var(--white);
    color: var(--blurple);
    box-shadow: var(--shadow-lg);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.btn-full {
    width: 100%;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-navy);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--navy-lighter);
    transition: color var(--transition-fast);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.lang-icon {
    font-size: 1.1rem;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--deep-navy);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--off-white) 0%, var(--white) 50%, #f0f4ff 100%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.3) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.2) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: -14s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(99, 91, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 91, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(-30px, -20px) scale(1.02); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99, 91, 255, 0.1) 0%, rgba(99, 91, 255, 0.05) 100%);
    border: 1px solid rgba(99, 91, 255, 0.2);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blurple);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--deep-navy);
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--navy-lighter);
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hero-price {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

.hero-price strong {
    color: var(--blurple);
    font-weight: 700;
}

/* Code Terminal */
.hero-visual {
    perspective: 1000px;
}

.code-terminal {
    background: var(--deep-navy);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    overflow: hidden;
    transform: rotateY(-8deg) rotateX(5deg);
    transition: transform var(--transition-slow);
}

.code-terminal:hover {
    transform: rotateY(-2deg) rotateX(2deg);
}

[dir="rtl"] .code-terminal {
    transform: rotateY(8deg) rotateX(5deg);
}

[dir="rtl"] .code-terminal:hover {
    transform: rotateY(2deg) rotateX(2deg);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.875rem var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.terminal-body {
    padding: var(--space-xl);
}

.terminal-body pre {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--gray-300);
}

.code-keyword { color: #c792ea; }
.code-function { color: #82aaff; }
.code-string { color: #c3e88d; }
.code-property { color: #89ddff; }
.code-comment { color: #546e7a; font-style: italic; }

/* ============================================
   Stats Section
   ============================================ */
.stats {
    padding: var(--space-3xl) 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.stat-item {
    text-align: center;
    padding: var(--space-lg);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--deep-navy);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: var(--space-4xl) 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--off-white) 100%);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--deep-navy);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--navy-lighter);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--blurple);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-primary {
    background: linear-gradient(135deg, var(--blurple) 0%, var(--blurple-dark) 100%);
    border: none;
    color: var(--white);
    grid-column: span 1;
}

.feature-primary h3,
.feature-primary p {
    color: var(--white);
}

.feature-primary p {
    opacity: 0.9;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--deep-navy);
    margin-bottom: var(--space-md);
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--navy-lighter);
    line-height: 1.7;
}

.feature-highlight {
    margin-top: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing {
    padding: var(--space-4xl) 0;
    background: var(--deep-navy);
    position: relative;
    overflow: hidden;
}

.pricing::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.pricing .section-title,
.pricing .section-subtitle {
    color: var(--white);
}

.pricing .section-subtitle {
    opacity: 0.8;
}

.pricing-card {
    position: relative;
    max-width: 450px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: var(--shadow-2xl);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--blurple) 0%, var(--blurple-dark) 100%);
    color: var(--white);
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--gray-100);
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: var(--space-sm);
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-500);
}

.price {
    font-size: 4rem;
    font-weight: 800;
    color: var(--deep-navy);
    letter-spacing: -0.02em;
    line-height: 1;
}

.period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-500);
}

.pricing-tagline {
    font-size: 1rem;
    color: var(--navy-lighter);
}

.pricing-features {
    margin-bottom: var(--space-xl);
    text-align: start;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    font-size: 1rem;
    color: var(--deep-navy);
}

.check-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: var(--success);
}

.pricing-note {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, var(--blurple) 0%, var(--blurple-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: var(--space-md);
}

.cta p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.footer-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 400px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col a {
    font-size: 0.9375rem;
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.copyright {
    font-size: 0.875rem;
}

.footer-seo {
    font-size: 0.75rem;
    color: var(--gray-600);
    max-width: 600px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .hero-text {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        display: flex;
        justify-content: center;
    }
    
    .code-terminal {
        transform: rotateY(0) rotateX(5deg);
        max-width: 100%;
    }
    
    [dir="rtl"] .code-terminal {
        transform: rotateY(0) rotateX(5deg);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-primary {
        grid-column: span 2;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }
    
    .nav-links,
    .nav-actions {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-primary {
        grid-column: span 1;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }
    
    .terminal-body pre {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .pricing-card {
        padding: var(--space-lg);
    }
    
    .price {
        font-size: 3rem;
    }
}

/* Mobile Navigation (When Active) */
.nav.active .nav-links,
.nav.active .nav-actions {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-lg);
}

.nav.active .nav-links {
    gap: var(--space-md);
}

.nav.active .nav-actions {
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-100);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus States */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--blurple);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--blurple);
    color: var(--white);
}

