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

:root {
  --blue-900: #0f172a;
  --blue-800: #1e1b4b;
  --blue-700: #1e3a8a;
  --blue-600: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --green-500: #22c55e;
  --green-100: #dcfce7;
  --red-500:   #ef4444;
  --red-100:   #fee2e2;
  --yellow-500: #eab308;
  --yellow-100: #fef9c3;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-300: #cbd5e1;
  --gray-100: #f1f5f9;
  --gray-50:  #f8fafc;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(15,23,42,0.10);
  --shadow-lg: 0 12px 48px rgba(15,23,42,0.18);
  --font: 'Inter', 'Noto Sans Arabic', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { font-family: 'Noto Sans Arabic', 'Inter', sans-serif; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(15,23,42,0.99); }

.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.nav-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 40px; height: 40px; background: var(--blue-600); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-logo-icon.small { width: 36px; height: 36px; }
.nav-logo-icon svg { width: 24px; height: 24px; }
.nav-logo-name { font-weight: 700; font-size: 15px; color: var(--white); line-height: 1.2; }
.nav-logo-sub  { font-size: 11px; color: var(--blue-400); }

.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-link {
  color: rgba(255,255,255,0.72); font-size: 14px; font-weight: 500;
  text-decoration: none; padding: 6px 14px; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.08); }

.lang-switcher { display: flex; gap: 4px; margin-left: 16px; }
.lang-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--blue-600); border-color: var(--blue-500); color: var(--white);
}

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 24px; height: 2px; background: var(--white);
  border-radius: 2px; transition: all 0.3s;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: var(--blue-900); position: relative; overflow: hidden;
  padding: 100px 0 80px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18;
}
.blob-1 {
  width: 600px; height: 600px; background: var(--blue-600);
  top: -200px; right: -200px;
}
.blob-2 {
  width: 400px; height: 400px; background: #6366f1;
  bottom: -100px; left: -100px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3);
  color: var(--blue-400); font-size: 13px; font-weight: 600;
  padding: 8px 18px; border-radius: 100px; margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(40px, 6vw, 72px); font-weight: 800; line-height: 1.1;
  color: var(--white); margin-bottom: 20px; letter-spacing: -1px;
}
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 18px; color: rgba(255,255,255,0.65); max-width: 560px;
  margin: 0 auto 40px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.btn-primary-lg {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blue-600); color: var(--white); font-size: 16px; font-weight: 600;
  padding: 14px 28px; border-radius: 12px; text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(29,78,216,0.45);
}
.btn-primary-lg:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(29,78,216,0.55); }
.btn-ghost-lg {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.75); font-size: 16px; font-weight: 500;
  padding: 14px 24px; border-radius: 12px; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.15); transition: all 0.2s;
}
.btn-ghost-lg:hover { color: var(--white); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); }

.hero-stats { display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.stat-num { font-size: 28px; font-weight: 800; color: var(--white); }
.hero-stat span:last-child { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
.hero-stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.12); }

/* ── Section Shared ───────────────────────────────────────────────────────── */
.section-label {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--blue-600); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: var(--gray-900);
  margin-bottom: 16px; letter-spacing: -0.5px;
}
.section-desc { font-size: 17px; color: var(--gray-500); max-width: 560px; }

/* ── Verify Section ───────────────────────────────────────────────────────── */
.verify-section {
  padding: 96px 0; background: var(--gray-50);
}
.verify-section .container { text-align: center; }
.verify-section .section-desc { margin: 0 auto 48px; }

.verify-card {
  background: var(--white); border-radius: 24px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100); padding: 40px; max-width: 640px; margin: 0 auto 40px;
}

.verify-tabs {
  display: flex; gap: 4px; background: var(--gray-100);
  padding: 4px; border-radius: 12px; margin-bottom: 28px;
}
.verify-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; border: none; color: var(--gray-500); font-size: 14px; font-weight: 600;
  padding: 10px; border-radius: 9px; cursor: pointer; transition: all 0.2s;
}
.verify-tab.active { background: var(--white); color: var(--gray-900); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.verify-pane { display: none; }
.verify-pane.active { display: block; }

.input-group {
  display: flex; align-items: center;
  border: 2px solid var(--gray-300); border-radius: 14px;
  background: var(--white); transition: border-color 0.2s; margin-bottom: 14px;
  overflow: hidden;
}
.input-group:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59,130,246,0.12); }
.input-icon { padding: 0 14px; color: var(--gray-400); flex-shrink: 0; }
.verify-input {
  flex: 1; border: none; outline: none; font-size: 15px; font-family: var(--font);
  padding: 16px 0; background: transparent; color: var(--gray-900);
  font-family: 'Courier New', monospace;
}
.verify-input::placeholder { font-family: var(--font); color: var(--gray-400); }
.input-clear {
  padding: 0 14px; background: none; border: none;
  color: var(--gray-400); cursor: pointer; font-size: 16px;
  transition: color 0.2s;
}
.input-clear:hover { color: var(--gray-700); }

.verify-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--blue-600); color: var(--white); font-size: 16px; font-weight: 700;
  padding: 16px; border-radius: 12px; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s; letter-spacing: 0.3px;
}
.verify-btn:hover { background: #2563eb; transform: translateY(-1px); }
.verify-btn:active { transform: translateY(0); }
.verify-btn.btn-secondary { background: var(--gray-700); }
.verify-btn.btn-secondary:hover { background: var(--gray-900); }

.btn-spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite;
}

/* Scanner */
.scanner-container { margin-bottom: 16px; }
.scanner-frame {
  width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto 12px;
  border-radius: 16px; overflow: hidden; background: var(--gray-900);
  border: 2px solid var(--blue-500);
}
.scanner-hint { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; }
.scanner-note { font-size: 12px; color: var(--gray-400); margin-top: 12px; }

/* Result Area */
.result-area { margin-top: 24px; }
.result-card {
  border-radius: 16px; padding: 24px; text-align: left;
  border: 2px solid transparent; animation: fadeIn 0.4s ease;
}
.result-card.success {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}
.result-card.error {
  background: linear-gradient(135deg, #fff1f2, #fee2e2);
  border-color: #fca5a5;
}
.result-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.result-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.result-icon.ok { background: var(--green-500); color: white; }
.result-icon.err { background: var(--red-500); color: white; }
.result-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.result-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 2px; }

.result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px;
}
.result-field { background: rgba(255,255,255,0.7); border-radius: 10px; padding: 12px 14px; }
.result-field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--gray-500); font-weight: 600; display: block; margin-bottom: 4px; }
.result-field span { font-size: 14px; font-weight: 700; color: var(--gray-900); }

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result-btn {
  flex: 1; min-width: 120px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; border: none; text-decoration: none;
}
.result-btn.primary { background: var(--blue-600); color: white; }
.result-btn.primary:hover { background: #2563eb; }
.result-btn.ghost { background: rgba(0,0,0,0.06); color: var(--gray-700); }
.result-btn.ghost:hover { background: rgba(0,0,0,0.1); }

.type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 100px;
}
.type-payment  { background: #dbeafe; color: #1e40af; }
.type-loan     { background: #ede9fe; color: #5b21b6; }
.type-customer { background: #d1fae5; color: #065f46; }

/* Recent */
.recent-checks { max-width: 640px; margin: 0 auto; text-align: left; }
.recent-checks h4 { font-size: 14px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1px solid var(--gray-100); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 8px; cursor: pointer;
  transition: box-shadow 0.2s;
}
.recent-item:hover { box-shadow: var(--shadow); }
.recent-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.recent-dot.ok  { background: var(--green-500); }
.recent-dot.err { background: var(--red-500); }
.recent-code { flex: 1; font-family: monospace; font-size: 13px; color: var(--gray-700); }
.recent-time { font-size: 11px; color: var(--gray-400); }

/* ── How It Works ─────────────────────────────────────────────────────────── */
.how-section { padding: 96px 0; background: white; }
.how-section .container { text-align: center; }
.how-section .section-desc { margin: 0 auto 56px; }
.steps-grid {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.step-card {
  flex: 1; min-width: 220px; max-width: 280px;
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: 20px; padding: 32px 24px; text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
}
.step-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.step-num { font-size: 12px; font-weight: 800; color: var(--blue-500); letter-spacing: 1px; margin-bottom: 16px; }
.step-icon { width: 64px; height: 64px; background: var(--blue-50); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: var(--blue-600); }
.step-card h3 { font-size: 17px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.step-card p  { font-size: 14px; color: var(--gray-500); line-height: 1.6; }
.step-arrow { font-size: 24px; color: var(--gray-300); padding: 0 16px; }

/* ── About ────────────────────────────────────────────────────────────────── */
.about-section { padding: 96px 0; background: var(--blue-900); }
.about-section .section-label { color: var(--blue-400); }
.about-section .section-title { color: var(--white); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-text p { color: rgba(255,255,255,0.65); font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
.about-features { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.about-feature { display: flex; align-items: center; gap: 12px; }
.feature-check { width: 24px; height: 24px; background: var(--green-500); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.about-feature span { color: rgba(255,255,255,0.8); font-size: 15px; }

.about-card-demo {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; overflow: hidden; backdrop-filter: blur(8px);
}
.demo-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px; background: rgba(0,0,0,0.2); font-size: 13px;
  color: rgba(255,255,255,0.5); font-weight: 600;
}
.demo-dot { width: 12px; height: 12px; border-radius: 50%; }
.demo-dot.red    { background: #ef4444; }
.demo-dot.yellow { background: #eab308; }
.demo-dot.green  { background: #22c55e; }
.demo-header span { margin-left: 4px; }
.demo-body { padding: 24px; }
.demo-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; margin-bottom: 20px;
  font-size: 14px; font-weight: 700;
}
.demo-badge.verified { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.2); }
.demo-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.demo-row:last-child { border-bottom: none; }
.demo-row span { font-size: 13px; color: rgba(255,255,255,0.45); }
.demo-row strong { font-size: 13px; color: rgba(255,255,255,0.9); }
.demo-amount { color: #86efac !important; }
.demo-status { color: #60a5fa !important; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: #060b14; padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand-name { font-weight: 700; color: var(--white); }
.footer-brand-sub  { font-size: 12px; color: var(--gray-500); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--gray-500); font-size: 14px; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { color: var(--gray-500); font-size: 13px; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--gray-900); color: white; padding: 12px 24px;
  border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 999;
  box-shadow: var(--shadow-lg); animation: slideUp 0.3s ease;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── RTL ──────────────────────────────────────────────────────────────────── */
[dir="rtl"] .result-grid { direction: rtl; }
[dir="rtl"] .about-grid  { direction: rtl; }
[dir="rtl"] .input-icon  { order: 2; }
[dir="rtl"] .verify-input { text-align: right; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--blue-900); padding: 16px 24px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; }
  .hero { padding: 80px 0 64px; }
  .hero-title { font-size: 40px; }
  .steps-grid { flex-direction: column; align-items: stretch; }
  .step-arrow { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .verify-card { padding: 24px 20px; }
  .result-grid { grid-template-columns: 1fr; }
  .lang-switcher { margin-left: 0; }
}
