/* ============================================================
   VAG Digital Intelligence Engineering — Platform Design System
   Unique visual language: Deep forest + gold + evidence mono
   ============================================================ */
:root {
  --bg: #071F18;
  --bg-elevated: #0A2E22;
  --card: #102E23;
  --card-hover: #143528;
  --border: #1E4A36;
  --border-strong: #2A5C45;
  --gold: #D4AF37;
  --gold-dim: rgba(212, 175, 55, 0.14);
  --gold-glow: rgba(212, 175, 55, 0.22);
  --emerald: #10B981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --blue: #60A5FA;
  --blue-dim: rgba(96, 165, 250, 0.12);
  --text: #E8F0EB;
  --text-soft: #C7D8CD;
  --muted: #9AB8A3;
  --muted-2: #6B8A76;
  --danger: #EF4444;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --nav-h: 68px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.rtl { direction: rtl; font-family: 'IBM Plex Sans Arabic', var(--font); }
.mono { font-family: var(--mono); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(7, 31, 24, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 11px;
  font-weight: 700; letter-spacing: -0.02em; font-size: 15px;
  white-space: nowrap;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 50%;
  display: block; object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.25);
}
.logo-mark-lg {
  width: 56px; height: 56px; border-radius: 50%;
  display: block; object-fit: contain;
}
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 13.5px; color: var(--muted); font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: rgba(30,74,54,0.5);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.lang-toggle button {
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--muted); transition: all .15s;
}
.lang-toggle button.active {
  background: var(--gold); color: var(--bg);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  border: 1px solid transparent;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: #e0c04a; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,175,55,0.25); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-emerald { background: var(--emerald); color: var(--bg); }
.btn-emerald:hover { background: #34d399; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; border: 1px solid;
}
.badge-gold { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.badge-emerald { border-color: var(--emerald); color: var(--emerald); background: var(--emerald-dim); }
.badge-blue { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.badge-muted { border-color: var(--border); color: var(--muted); background: rgba(30,74,54,0.35); }

/* ---------- HERO ---------- */
.hero {
  padding: 72px 0 88px; position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; pointer-events: none; border-radius: 50%;
  filter: blur(80px);
}
.hero-glow-1 {
  top: -140px; right: -60px; width: 480px; height: 480px;
  background: rgba(212,175,55,0.11);
}
.hero-glow-2 {
  bottom: -100px; left: -40px; width: 380px; height: 380px;
  background: rgba(16,185,129,0.07);
}
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hero h1 {
  font-size: clamp(34px, 5.2vw, 54px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.06;
  max-width: 880px; margin-bottom: 18px;
}
.hero h1 .gold { color: var(--gold); }
.hero-lead {
  font-size: 17.5px; color: var(--text-soft);
  max-width: 620px; margin-bottom: 32px; line-height: 1.7;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 52px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; max-width: 920px;
}
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px 14px;
}
.stat-value { font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* ---------- SECTIONS ---------- */
section { padding: 80px 0; }
.section-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.15;
  margin-bottom: 14px; max-width: 720px;
}
.section-desc {
  font-size: 15.5px; color: var(--muted);
  max-width: 600px; margin-bottom: 40px; line-height: 1.7;
}
.bg-elevated { background: rgba(10, 46, 34, 0.4); }

/* ---------- CARDS ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px;
  transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: rgba(212,175,55,0.4); transform: translateY(-2px); background: var(--card-hover); }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--gold-dim); display: grid; place-items: center;
  margin-bottom: 16px; font-size: 18px;
}
.card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.card p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

/* ---------- UNIQUE DIFFERENTIATORS ---------- */
.diff-band {
  background: linear-gradient(135deg, var(--card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border); border-radius: 22px;
  padding: 36px 32px; position: relative; overflow: hidden;
}
.diff-band::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 260px; height: 260px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}
.diff-list { display: grid; gap: 14px; margin-top: 24px; }
.diff-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(7,31,24,0.55); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.diff-item .num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
  background: var(--gold); color: var(--bg);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.diff-item h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.diff-item p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---------- PHASES / TIMELINE ---------- */
.phase-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
}
.phase {
  background: rgba(7,31,24,0.6); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 16px;
}
.phase-num { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; color: var(--gold); margin-bottom: 5px; }
.phase-title { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.phase-meta { font-size: 12px; color: var(--muted); }

/* ---------- TRUST GRID ---------- */
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
}
.trust-item {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 12px; text-align: center;
}
.trust-item .label { font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.trust-item .sub { font-size: 11px; color: var(--muted); }

/* ---------- STEPS ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 18px;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--bg);
  font-weight: 800; font-size: 13px; margin-bottom: 14px;
}
.step h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---------- PILOT BOX ---------- */
.pilot-box {
  background: var(--card); border: 1px solid var(--gold);
  border-radius: 22px; padding: 36px 32px;
  box-shadow: 0 0 48px rgba(212,175,55,0.08);
}
.pilot-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; }
.checklist { margin-top: 18px; }
.checklist li {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 13.5px; color: var(--text-soft); margin-bottom: 11px;
}
.checklist li::before {
  content: '✓'; color: var(--emerald); font-weight: 700; flex-shrink: 0; margin-top: 1px;
}

/* ---------- CTA BAND ---------- */
.cta-band {
  background: linear-gradient(135deg, #102E23 0%, #0A2E22 50%, #102E23 100%);
  border: 1.5px solid var(--gold); border-radius: 22px;
  padding: 44px 36px; text-align: center;
  box-shadow: 0 0 50px rgba(212,175,55,0.1);
}
.cta-band h2 {
  font-size: clamp(24px, 3vw, 30px); font-weight: 700;
  letter-spacing: -0.03em; margin-bottom: 10px;
}
.cta-band p { color: var(--muted); max-width: 500px; margin: 0 auto 24px; font-size: 15px; }

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border); padding: 44px 0 28px; margin-top: 20px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px;
}
.footer-brand p {
  font-size: 13px; color: var(--muted); margin-top: 12px;
  max-width: 280px; line-height: 1.6;
}
.footer-col h5 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 9px;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 14px; padding-top: 22px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.footer-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.footer-tags span {
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
}

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
  padding: 56px 0 48px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16,46,35,0.5) 0%, transparent 100%);
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 12px;
}
.page-hero p { font-size: 16px; color: var(--muted); max-width: 560px; }

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 12px 14px;
  background: var(--bg-elevated); color: var(--gold);
  font-size: 11px; letter-spacing: 0.08em; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 14px; border-bottom: 1px solid rgba(30,74,54,0.5);
  color: var(--text-soft);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(16,46,35,0.4); }

/* ---------- DOWNLOAD CARDS ---------- */
.download-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: border-color .2s;
}
.download-card:hover { border-color: var(--gold); }
.download-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--gold-dim); display: grid; place-items: center;
  font-size: 22px; flex-shrink: 0;
}
.download-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.download-card p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

/* ---------- DASHBOARD MOCK ---------- */
.dash-layout {
  display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--nav-h));
}
.dash-sidebar {
  background: var(--bg-elevated); border-right: 1px solid var(--border);
  padding: 20px 12px; display: flex; flex-direction: column; gap: 4px;
}
.dash-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13px; color: var(--muted); font-weight: 500;
  transition: all .15s;
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: rgba(30,74,54,0.6); color: var(--text);
}
.dash-nav-item.active { border-left: 3px solid var(--gold); }
.dash-main { padding: 24px 28px; overflow-y: auto; }
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.dash-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px;
}
.dash-kpi {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.dash-kpi .label { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.dash-kpi .value { font-size: 24px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.dash-kpi .delta { font-size: 12px; color: var(--emerald); margin-top: 2px; }
.dash-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.dash-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.evidence-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(30,74,54,0.4);
  font-size: 12.5px;
}
.evidence-row:last-child { border-bottom: none; }
.evidence-hash {
  font-family: var(--mono); font-size: 11px; color: var(--muted-2);
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.live { background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
.status-dot.warn { background: #F59E0B; }
.status-dot.ok { background: var(--blue); }

/* ---------- MOBILE ---------- */
.mobile-menu-btn { display: none; padding: 8px; }
@media (max-width: 960px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-stats, .grid-3, .grid-4, .steps, .pilot-grid, .footer-grid, .dash-kpis {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2, .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
}
@media (max-width: 600px) {
  .hero { padding: 48px 0 64px; }
  .hero-stats, .steps, .grid-3, .grid-4, .dash-kpis { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .diff-band, .pilot-box, .cta-band { padding: 24px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- LANG CONTENT TOGGLE ---------- */
[data-lang="ar"] { display: none; }
body.lang-ar [data-lang="en"] { display: none; }
body.lang-ar [data-lang="ar"] { display: block; }
span[data-lang="ar"] { display: none; }
body.lang-ar span[data-lang="en"] { display: none; }
body.lang-ar span[data-lang="ar"] { display: inline; }
span[data-lang="en"] { display: inline; }
body.lang-ar .inline-ar { display: inline; }
body.lang-ar .inline-en { display: none; }
.inline-ar { display: none; }
body.lang-ar .nav-links,
body.lang-ar .badge-row,
body.lang-ar .hero-cta,
body.lang-ar .footer-tags,
body.lang-ar .trust-grid,
body.lang-ar .phase-grid,
body.lang-ar .grid-2,
body.lang-ar .grid-3,
body.lang-ar .grid-4,
body.lang-ar .steps,
body.lang-ar .pilot-grid,
body.lang-ar .diff-list,
body.lang-ar .checklist,
body.lang-ar .dash-kpis,
body.lang-ar .footer-grid {
  /* keep flex/grid as-is */
}
body.lang-ar [data-lang="ar"].inline { display: inline; }
body.lang-ar [data-lang="en"].inline { display: none; }
[data-lang="ar"].inline { display: none; }
[data-lang="en"].inline { display: inline; }
