:root {
    --primary-navy: #1E3A5F;
    --primary-navy-light: #2D4A6F;
    --ocean-teal: #0891B2;
    --soft-blue: #3B82F6;
    --sea-green: #10B981;
    --coral-red: #EF4444;
    --amber: #F59E0B;
    --slate-gray: #64748B;
    --background: #F1F5F9;
    --surface: #F8FAFC;
    --surface-container: #E2E8F0;
    --primary-container: #DBEAFE;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --white: #FFFFFF;
    --font-display: 'Noto Kufi Arabic', sans-serif;
    --font-body: 'Noto Kufi Arabic', sans-serif;
    --shadow-sm: 0 1px 2px rgba(30, 58, 95, 0.05);
    --shadow-md: 0 4px 12px rgba(30, 58, 95, 0.08);
    --shadow-lg: 0 12px 32px rgba(30, 58, 95, 0.12);
    --shadow-xl: 0 24px 48px rgba(30, 58, 95, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--background); color: var(--text-primary); line-height: 1.8; overflow-x: hidden; direction: rtl; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-lg { padding: 120px 0; }
.text-center { text-align: center; }
.hidden { display: none !important; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.4; color: var(--primary-navy); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
p { color: var(--text-secondary); font-size: 1.125rem; }
.lead { font-size: 1.25rem; color: var(--text-secondary); max-width: 640px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 32px; font-family: var(--font-display); font-size: 1rem; font-weight: 600; text-decoration: none; border-radius: var(--radius-md); border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-primary { background: var(--primary-navy); color: var(--white); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--primary-navy-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: transparent; color: var(--primary-navy); border: 2px solid var(--primary-navy); }
.btn-secondary:hover { background: var(--primary-navy); color: var(--white); }
.btn-lg { padding: 20px 40px; font-size: 1.125rem; }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(30, 58, 95, 0.08); transition: all 0.3s ease; }
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--primary-navy); }
.nav-logo img { width: 40px; height: 40px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 10px 16px; font-size: 0.9375rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm); transition: all 0.2s ease; }
.nav-link:hover { color: var(--primary-navy); background: var(--surface-container); }
.nav-cta { margin-right: 16px; }
.nav-lang { display: flex; align-items: center; gap: 8px; margin-right: 16px; }
.nav-lang a { padding: 6px 12px; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); text-decoration: none; border-radius: var(--radius-sm); transition: all 0.2s ease; }
.nav-lang a:hover, .nav-lang a.active { color: var(--primary-navy); background: var(--surface-container); }
.nav-mobile-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-mobile-toggle svg { width: 24px; height: 24px; color: var(--primary-navy); }

@media (max-width: 768px) {
    .nav-links { position: fixed; top: 72px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 24px; gap: 8px; border-bottom: 1px solid var(--surface-container); transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all 0.3s ease; }
    .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .nav-link { width: 100%; padding: 16px; }
    .nav-cta { margin: 16px 0 0 0; width: 100%; }
    .nav-cta .btn { width: 100%; }
    .nav-mobile-toggle { display: block; }
    .nav-lang { margin-right: 0; }
}

.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 72px; background: linear-gradient(180deg, var(--white) 0%, var(--background) 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -20%; width: 80%; height: 150%; background: radial-gradient(ellipse at center, rgba(8, 145, 178, 0.08) 0%, transparent 70%); pointer-events: none; }
.hero-waves { position: absolute; bottom: 0; left: 0; right: 0; height: 200px; overflow: hidden; }
.hero-waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; animation: wave 20s linear infinite; }
.hero-waves svg:nth-child(2) { opacity: 0.5; animation-delay: -5s; animation-duration: 15s; }
@keyframes wave { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 968px) { .hero-content { grid-template-columns: 1fr; text-align: center; } .hero-content .lead { margin: 0 auto; } }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--primary-container); color: var(--primary-navy); font-size: 0.875rem; font-weight: 600; border-radius: var(--radius-full); margin-bottom: 24px; }
.hero-badge svg { width: 16px; height: 16px; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .highlight { background: linear-gradient(135deg, var(--ocean-teal) 0%, var(--soft-blue) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero .lead { margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 968px) { .hero-buttons { justify-content: center; } }

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone-mockup { position: relative; width: 280px; height: 580px; background: var(--primary-navy); border-radius: 40px; padding: 12px; box-shadow: var(--shadow-xl); transform: perspective(1000px) rotateY(5deg) rotateX(2deg); }
.phone-screen { width: 100%; height: 100%; background: var(--white); border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; }
.phone-notch { width: 120px; height: 28px; background: var(--primary-navy); border-radius: 0 0 16px 16px; margin: 0 auto; }
.phone-content { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 16px; direction: rtl; }
.phone-header { text-align: center; }
.phone-greeting { font-size: 0.75rem; color: var(--text-muted); }
.phone-balance-label { font-size: 0.625rem; color: var(--text-muted); margin-top: 12px; }
.phone-balance { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--primary-navy); }
.phone-stats { display: flex; gap: 8px; justify-content: center; font-size: 0.625rem; }
.phone-stat { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--surface); border-radius: var(--radius-sm); }
.phone-stat.income { color: var(--sea-green); }
.phone-stat.expense { color: var(--coral-red); }
.phone-transactions { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.phone-transactions-title { font-size: 0.625rem; font-weight: 600; color: var(--text-muted); }
.phone-tx { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border-radius: var(--radius-sm); }
.phone-tx-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.phone-tx-info { flex: 1; min-width: 0; }
.phone-tx-merchant { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-tx-category { font-size: 0.625rem; color: var(--text-muted); }
.phone-tx-amount { font-size: 0.75rem; font-weight: 700; }
.phone-tx-amount.expense { color: var(--coral-red); }
.phone-tx-amount.income { color: var(--sea-green); }

@media (max-width: 968px) {
    .hero-visual { margin-top: 40px; }
    .phone-mockup { width: 200px; height: 420px; border-radius: 28px; padding: 8px; transform: none; }
    .phone-screen { border-radius: 22px; }
    .phone-notch { width: 80px; height: 20px; border-radius: 0 0 10px 10px; }
    .phone-content { padding: 12px; gap: 10px; }
    .phone-balance { font-size: 1.5rem; }
    .phone-balance-label { margin-top: 8px; }
    .phone-stats { font-size: 0.5rem; }
    .phone-stat { padding: 3px 6px; }
    .phone-transactions-title { font-size: 0.5rem; }
    .phone-tx { padding: 6px; gap: 6px; }
    .phone-tx-icon { width: 24px; height: 24px; font-size: 10px; }
    .phone-tx-merchant { font-size: 0.625rem; }
    .phone-tx-category { font-size: 0.5rem; }
    .phone-tx-amount { font-size: 0.625rem; }
}

.banks { background: var(--white); border-top: 1px solid var(--surface-container); border-bottom: 1px solid var(--surface-container); }
.banks-label { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); margin-bottom: 32px; }
.banks-grid { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.bank-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0.6; transition: opacity 0.3s ease; }
.bank-logo:hover { opacity: 1; }
.bank-icon { width: 64px; height: 64px; background: var(--surface); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--primary-navy); }
.bank-name { font-size: 0.75rem; color: var(--text-muted); }

.features { background: var(--white); }
.features-header { max-width: 640px; margin: 0 auto 64px; }
.features-header h2 { margin-bottom: 16px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 968px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card { padding: 32px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid transparent; transition: all 0.3s ease; }
.feature-card:hover { border-color: var(--surface-container); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-icon { width: 56px; height: 56px; background: var(--primary-container); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.feature-icon svg { width: 28px; height: 28px; color: var(--primary-navy); }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.feature-card p { font-size: 1rem; color: var(--text-secondary); }

.how-it-works { background: linear-gradient(180deg, var(--background) 0%, var(--white) 100%); }
.how-header { max-width: 640px; margin: 0 auto 64px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps::before { content: ''; position: absolute; top: 40px; left: 12.5%; right: 12.5%; height: 2px; background: var(--surface-container); }
@media (max-width: 968px) { .steps { grid-template-columns: repeat(2, 1fr); } .steps::before { display: none; } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { text-align: center; position: relative; }
.step-number { width: 80px; height: 80px; background: var(--white); border: 2px solid var(--primary-navy); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--primary-navy); position: relative; z-index: 1; }
.step h3 { font-size: 1.25rem; margin-bottom: 12px; }
.step p { font-size: 1rem; }

.privacy-highlight { background: var(--primary-navy); color: var(--white); position: relative; overflow: hidden; }
.privacy-highlight::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity: 0.5; }
.privacy-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 968px) { .privacy-content { grid-template-columns: 1fr; text-align: center; } }
.privacy-highlight h2 { color: var(--white); margin-bottom: 24px; }
.privacy-highlight p { color: rgba(255, 255, 255, 0.8); font-size: 1.25rem; margin-bottom: 32px; }
.privacy-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.privacy-list li { display: flex; align-items: center; gap: 16px; font-size: 1.125rem; color: rgba(255, 255, 255, 0.9); }
@media (max-width: 968px) { .privacy-list { align-items: center; } }
.privacy-list svg { width: 24px; height: 24px; color: var(--sea-green); flex-shrink: 0; }
.privacy-visual { display: flex; justify-content: center; }
.shield-icon { width: 200px; height: 200px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.shield-icon::before { content: ''; position: absolute; inset: -20px; border: 2px dashed rgba(255, 255, 255, 0.2); border-radius: 50%; animation: rotate 30s linear infinite; }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.shield-icon svg { width: 100px; height: 100px; color: var(--white); }
@media (max-width: 968px) { .privacy-visual { order: -1; } .shield-icon { width: 150px; height: 150px; } .shield-icon svg { width: 75px; height: 75px; } }

.cta { background: var(--white); }
.cta-card { background: linear-gradient(135deg, var(--primary-container) 0%, var(--surface) 100%); border-radius: var(--radius-xl); padding: 80px; text-align: center; position: relative; overflow: hidden; }
.cta-card::before { content: ''; position: absolute; top: -50%; left: -20%; width: 60%; height: 150%; background: radial-gradient(ellipse at center, rgba(30, 58, 95, 0.05) 0%, transparent 70%); pointer-events: none; }
.cta-card h2 { margin-bottom: 16px; position: relative; }
.cta-card p { max-width: 500px; margin: 0 auto 32px; position: relative; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }
.google-play-badge { height: 56px; transition: transform 0.3s ease; }
.google-play-badge:hover { transform: scale(1.05); }
@media (max-width: 640px) { .cta-card { padding: 48px 24px; } }

.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--surface-container); }
.faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 24px 0; background: none; border: none; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--primary-navy); text-align: right; cursor: pointer; }
.faq-question svg { width: 24px; height: 24px; transition: transform 0.3s ease; flex-shrink: 0; margin-right: auto; margin-left: 16px; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer p { padding-bottom: 24px; }

.footer { background: var(--primary-navy); color: var(--white); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
@media (max-width: 968px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { max-width: 300px; }
.footer-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--white); margin-bottom: 16px; }
.footer-logo img { width: 40px; height: 40px; background: white; border-radius: 8px; padding: 4px; }
.footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 1rem; line-height: 1.6; }
.footer-section h4 { color: var(--white); font-size: 0.875rem; font-weight: 600; margin-bottom: 20px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: rgba(255, 255, 255, 0.6); text-decoration: none; font-size: 0.9375rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-copyright { color: rgba(255, 255, 255, 0.4); font-size: 0.875rem; }
.footer-social { display: flex; gap: 16px; }
.footer-social a { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.1); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--white); transition: all 0.2s ease; }
.footer-social a:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; }

.page { display: none; min-height: 100vh; padding-top: 72px; }
.page.active { display: block; }

.page-hero { background: linear-gradient(180deg, var(--white) 0%, var(--background) 100%); padding: 80px 0 60px; text-align: center; }
.page-hero h1 { margin-bottom: 16px; }
.page-content { padding: 60px 0 80px; }

.prose { color: var(--text-secondary); line-height: 1.8; }
.prose h2 { color: var(--primary-navy); font-size: 1.5rem; margin: 40px 0 16px; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { color: var(--primary-navy); font-size: 1.25rem; margin: 32px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose ul { margin: 16px 0; padding-right: 24px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--ocean-teal); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose strong { color: var(--text-primary); }
.last-updated { font-size: 0.875rem; color: var(--text-muted); font-style: italic; margin-bottom: 32px; }

.scroll-top { position: fixed; bottom: 24px; left: 24px; width: 48px; height: 48px; background: var(--primary-navy); color: var(--white); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999; }
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--primary-navy-light); transform: translateY(-4px); }
.scroll-top svg { width: 24px; height: 24px; }
