:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eff6ff;
  --green-bg: #dcfce7;
  --green-text: #166534;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px -6px rgba(15, 23, 42, 0.08);
  --radius: 10px;
}

html[data-theme="dark"] {
  --bg: #090d16;
  --bg-alt: #0e1422;
  --surface: #111827;
  --surface-muted: #1e293b;
  --border: #1f2937;
  --border-strong: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --green-bg: rgba(34, 197, 94, 0.16);
  --green-text: #4ade80;
  --code-bg: #060912;
  --code-text: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 28px -8px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: "Inter", "Cairo", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: "Cairo", "Inter", system-ui, sans-serif;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
}

.brand-sub {
  color: var(--accent);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.87rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ctrl-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Compact Corporate Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-xs {
  height: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.84rem;
}

.btn-md {
  height: 40px;
  padding: 0 18px;
  font-size: 0.88rem;
}

.btn-full {
  width: 100%;
}

.btn-solid {
  background: var(--accent);
  color: #ffffff;
}

.btn-solid:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--surface-muted);
}

/* Hero 2-Column Enterprise Layout */
.hero-section {
  padding: 46px 0 42px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.eyebrow-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.hero-h1 {
  font-size: clamp(1.85rem, 3.1vw, 2.55rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.hero-lead {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Compact Enterprise Console Card */
.console-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.console-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.console-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-muted);
  padding: 3px;
  border-radius: 7px;
}

.c-tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
}

.c-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.console-body {
  padding: 14px;
}

.c-pane {
  display: none;
}

.c-pane.active {
  display: block;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.m-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.m-box small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
}

.m-box strong {
  font-size: 0.82rem;
  font-weight: 600;
}

.code-snippet {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  line-height: 1.55;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}

.c-kw { color: #93c5fd; }
.c-type { color: #67e8f9; }
.c-str { color: #86efac; }

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.mini-table th,
.mini-table td {
  padding: 8px 10px;
  text-align: start;
  border-bottom: 1px solid var(--border);
}

.mini-table th {
  font-size: 0.73rem;
  color: var(--text-light);
  font-weight: 600;
}

.mini-table tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.pill-green {
  background: var(--green-bg);
  color: var(--green-text);
}

.pill-blue {
  background: var(--accent-soft);
  color: var(--accent);
}

.gov-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gov-list li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
}

.gov-list strong {
  display: block;
  font-size: 0.82rem;
}

.gov-list span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Metrics Strip */
.metrics-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-item strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.stat-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Standard Compact Sections */
.section {
  padding: 52px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-header {
  max-width: 620px;
  margin-bottom: 28px;
}

.sec-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.sec-header h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.sec-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Cards Grids */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.corp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.corp-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.corp-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.corp-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.arch-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.tag-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tag-blue {
  background: var(--accent-soft);
  color: var(--accent);
}

.arch-panel h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.arch-panel p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.clean-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--text);
}

.clean-bullets li::before {
  content: "• ";
  color: var(--accent);
  font-weight: 700;
}

/* Editions / Plans */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.plan-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.plan-price {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 8px 0;
}

.plan-price span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.plan-card .clean-bullets {
  margin-bottom: 18px;
  flex: 1;
}

/* Download Strip */
.download-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.download-strip h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.download-strip p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.download-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* FAQ */
.faq-wrap {
  max-width: 820px;
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
}

.faq-box summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-box summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.05rem;
}

.faq-box[open] summary::after {
  content: "−";
}

.faq-box p {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Corporate Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 36px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 10px 0 8px;
  max-width: 280px;
}

.footer-mail {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-bottom {
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* Modal */
.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.modal-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 14px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

.modal-dialog h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.modal-dialog p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .cards-2,
  .cards-3,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cards-4,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    gap: 12px;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-controls .btn {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .cards-4,
  .metrics-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }
}
