:root {
  --navy: #14213D;
  --navy-deep: #0B1326;
  --orange: #F47B34;
  --orange-deep: #EE5F2E;
  --bg: #FCF9F5;
  --surface: #FFFFFF;
  --tint: #FFF6EC;
  --border: #EDE3D6;
  --text: #14213D;
  --muted: #5B6577;
  --success: #1E9E63;
  --danger: #D32F2F;
  --radius: 16px;
}

.dark {
  --bg: #0B1326;
  --surface: #131E36;
  --tint: #1B2947;
  --border: #283A5E;
  --text: #F8FAFC;
  --muted: #CBD5E1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", "Cairo", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; direction: ltr; display: inline-block; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header: strict 3-zone single row */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-in {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--orange-deep); border-bottom-color: var(--orange); outline: none; }

.top-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms ease, border-color 160ms ease;
}
.btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #FFFFFF;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-deep); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 0.88rem; }

/* Sections & Rhythm */
section { padding: 56px 0; }
.hero { padding: 48px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: stretch;
}
.kicker {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--orange-deep);
  margin: 0 0 10px;
}
h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.22;
  font-weight: 800;
  text-wrap: balance;
}
.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 58ch;
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.meta-line {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.hero-card {
  background: linear-gradient(155deg, var(--navy), var(--navy-deep));
  color: #F8FAFC;
  border: 1px solid #283A5E;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.hero-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}
.hero-card-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.rate-list { display: grid; gap: 12px; }
.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.rate-name { font-weight: 700; font-size: 0.94rem; }
.rate-sub { font-size: 0.8rem; color: #CBD5E1; }
.rate-val { font-size: 1.15rem; font-weight: 800; color: #FBA03F; }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.stat-num { font-size: 1.65rem; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.stat-label { font-size: 0.88rem; color: var(--muted); margin: 0; }

.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  text-wrap: balance;
}
.section-head p { margin: 0; color: var(--muted); max-width: 65ch; }

/* Features bento */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.bento-wide { grid-column: span 2; }
.feat-idx { font-size: 0.86rem; font-weight: 700; color: var(--orange-deep); margin-bottom: 6px; }
.card h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Analytics & FX Section */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}
.fx-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.fx-table th, .fx-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-size: 0.93rem;
}
.fx-table th { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.fx-table tr:last-child td { border-bottom: none; }

.conv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.conv-res {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.conv-res strong { font-size: 1.25rem; color: var(--orange-deep); }

/* Bank status lines */
.bank-list { display: grid; gap: 10px; margin-top: 14px; }
.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.bank-row:last-child { border-bottom: none; }
.status-ok { color: var(--success); font-weight: 700; font-size: 0.88rem; }
.status-warn { color: var(--orange-deep); font-weight: 700; font-size: 0.88rem; }

/* Registration & Invite */
.reg-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  align-items: start;
}
.invite-banner {
  background: var(--tint);
  border: 1px solid var(--orange);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.invite-banner strong { color: var(--orange-deep); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.88rem; font-weight: 700; color: var(--text); }
input, select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.field-hint { font-size: 0.8rem; color: var(--muted); min-height: 1.2em; }

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tint);
  border: 1px solid var(--border);
}
.captcha-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 3px;
  direction: ltr;
  color: var(--navy);
}
.dark .captcha-code { color: #FBA03F; }

.alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.93rem;
  font-weight: 600;
  margin-top: 14px;
}
.alert-err { background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid var(--danger); color: var(--danger); }
.alert-ok { background: color-mix(in srgb, var(--success) 12%, transparent); border: 1px solid var(--success); color: var(--success); }

.success-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1.5px solid var(--success);
  background: var(--surface);
}
.success-card h3 { margin: 0 0 10px; color: var(--success); font-size: 1.3rem; }
.acc-highlight {
  margin: 16px 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--tint);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.steps-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.steps-list li { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.steps-list li:last-child { border-bottom: none; padding-bottom: 0; }
.steps-list strong { display: block; margin-bottom: 3px; }
.steps-list span { color: var(--muted); font-size: 0.92rem; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--orange-deep); }

.hidden { display: none !important; }

@media (max-width: 960px) {
  .hero-grid, .analytics-grid, .reg-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
}

@media (max-width: 720px) {
  .topbar-in { gap: 12px; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .form-grid, .conv-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
}
