:root {
  --ink: #10251f;
  --green: #0d3f34;
  --green-2: #165b4a;
  --mint: #cfe0d8;
  --cream: #f4f0e6;
  --paper: #fbf9f3;
  --gold: #f2c864;
  --coral: #ef7657;
  --line: rgba(16, 37, 31, 0.16);
  --shadow: 0 30px 80px rgba(16, 37, 31, 0.13);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body { font-family: "Noto Kufi Arabic", var(--sans); }
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 { font-family: "Noto Kufi Arabic", var(--sans); letter-spacing: -0.035em; }

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.skip-link { position: fixed; inset: 12px auto auto 12px; z-index: 100; padding: 10px 14px; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 48px;
  min-height: 76px;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(16, 37, 31, 0.1);
  background: rgba(251, 249, 243, 0.9);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--gold); color: var(--green); font: 26px/1 var(--serif); }
.desktop-nav { display: flex; justify-content: center; gap: 34px; font-size: 14px; font-weight: 600; }
.desktop-nav a, .site-footer a { position: relative; }
.desktop-nav a::after, .site-footer a::after { content: ""; position: absolute; inset: auto 0 -5px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform 180ms ease; }
.desktop-nav a:hover::after, .site-footer a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-switch { display: inline-flex; gap: 8px; align-items: center; border: 0; background: transparent; color: var(--green); cursor: pointer; font-weight: 700; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 13px; font-weight: 700; transition: transform 180ms ease, box-shadow 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--gold); color: var(--ink); box-shadow: 0 12px 30px rgba(220, 171, 53, 0.24); }
.button-dark { background: var(--green); color: #fff; }
.button-outline { border: 1px solid var(--green); background: transparent; color: var(--green); }
.button-small { min-height: 42px; padding: 0 17px; font-size: 14px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.login-link { font-size: 14px; font-weight: 700; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  gap: clamp(40px, 6vw, 100px);
  min-height: calc(100vh - 76px);
  padding: 7vw 4vw;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(242, 200, 100, 0.22), transparent 28%),
    linear-gradient(130deg, #fbf9f3 0 55%, #edf1ea 55% 100%);
}
.hero-copy { max-width: 660px; }
.eyebrow { margin: 0 0 18px; color: var(--coral); font-size: 13px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.045em; line-height: 0.98; }
h1 { margin-bottom: 28px; font-size: clamp(58px, 6.4vw, 104px); }
h2 { margin-bottom: 22px; font-size: clamp(48px, 5vw, 78px); }
h1 em, h2 em { color: var(--green-2); font-weight: 400; }
.hero-lede { max-width: 600px; margin-bottom: 32px; color: #52645e; font-size: clamp(18px, 1.5vw, 22px); }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 52px; color: #596a64; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.trust-row span { display: flex; align-items: center; gap: 8px; }
.trust-row span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); }

.product-frame { transform: rotate(1.2deg); min-width: 720px; border: 1px solid rgba(16, 37, 31, 0.15); border-radius: 22px; overflow: hidden; background: #fffdf8; box-shadow: var(--shadow); }
.frame-topbar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; height: 70px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.mini-brand { font-weight: 700; }
.mini-brand strong { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 7px; border-radius: 8px; background: var(--gold); }
.cabinet-pill { padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px; color: #5f6d68; font-size: 13px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: white; font-size: 12px; }
.frame-body { display: grid; grid-template-columns: 82px 1fr; min-height: 500px; }
.frame-sidebar { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 28px; background: var(--green); }
.frame-sidebar span { width: 24px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.35); }
.frame-sidebar span.active { width: 38px; height: 30px; background: var(--gold); }
.frame-content { padding: 34px; }
.frame-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; }
.frame-heading small, .attention-card small { color: #75827d; font-size: 10px; letter-spacing: 0.14em; font-weight: 800; }
.frame-heading h2 { margin: 4px 0 0; font-size: 38px; }
.status-chip { padding: 6px 11px; border: 1px solid #89b6a5; border-radius: 999px; color: var(--green-2); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.metric-grid small { display: block; color: #6e7a76; }
.metric-grid strong { display: block; margin: 5px 0 1px; font: 34px/1 var(--serif); }
.metric-grid span { color: var(--green-2); font-size: 10px; }
.workspace-grid { display: grid; grid-template-columns: 1.6fr .7fr; gap: 14px; margin-top: 14px; }
.progress-card, .attention-card { padding: 20px; border-radius: 15px; background: var(--cream); }
.card-title { display: flex; justify-content: space-between; margin-bottom: 22px; font-size: 12px; }
.client-progress { display: grid; grid-template-columns: 100px 1fr 34px; align-items: center; gap: 10px; margin: 16px 0; font-size: 10px; }
.client-progress i { height: 6px; border-radius: 6px; overflow: hidden; background: #d7ddd7; }
.client-progress b { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.attention-card { display: flex; flex-direction: column; justify-content: center; background: #f9e9e2; }
.attention-card strong { font: 58px/1 var(--serif); color: var(--coral); }
.attention-card p { margin: 8px 0 0; font-size: 11px; }

.proof-strip { display: grid; grid-template-columns: repeat(3, auto) 1fr; align-items: center; gap: clamp(28px, 5vw, 80px); padding: 32px 4vw; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--cream); }
.proof-strip div { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.proof-strip strong { font: 36px/1 var(--serif); }
.proof-strip span { color: #68756f; font-size: 12px; }
.proof-strip p { max-width: 480px; margin: 0 0 0 auto; font-size: 14px; }

.section { padding: clamp(90px, 10vw, 150px) 5vw; }
.section-heading { max-width: 760px; margin-bottom: 68px; }
.section-heading > p:last-child, .workflow-intro > p:last-child { max-width: 640px; color: #68756f; font-size: 18px; }
.solution { background: var(--paper); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-card { min-height: 330px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fffdf8; }
.feature-card-dark { color: white; background: var(--green); }
.feature-card-wide { grid-column: span 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; background: var(--cream); }
.feature-number { color: var(--coral); font-size: 12px; font-weight: 800; }
.feature-card h3 { margin: 90px 0 14px; font: 34px/1.05 var(--serif); }
.feature-card p { color: #68756f; }
.feature-card-dark p { color: rgba(255,255,255,.72); }
.feature-tag { display: inline-block; margin-top: 12px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.portal-preview { align-self: center; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.portal-line { display: block; width: 74%; height: 7px; margin-bottom: 10px; border-radius: 8px; background: #dde4df; }
.portal-line.strong { width: 42%; background: var(--green); }
.portal-drop { display: grid; place-items: center; height: 130px; margin-top: 20px; border: 1px dashed #8ea79c; border-radius: 12px; }
.portal-drop b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--mint); }
.portal-drop i { width: 58%; height: 6px; border-radius: 8px; background: #e2e7e3; }

.workflow { display: grid; grid-template-columns: .85fr 1.15fr; gap: 10vw; background: var(--cream); }
.workflow-intro { position: sticky; top: 130px; align-self: start; }
.workflow-list { margin: 0; padding: 0; list-style: none; }
.workflow-list li { display: grid; grid-template-columns: 60px 1fr; gap: 28px; padding: 34px 0; border-top: 1px solid var(--line); }
.workflow-list li:last-child { border-bottom: 1px solid var(--line); }
.workflow-list > li > span { color: var(--coral); font-size: 12px; font-weight: 800; }
.workflow-list h3 { margin: 0 0 8px; font: 38px/1 var(--serif); }
.workflow-list p { margin: 0; color: #68756f; }

.security { background: #dfe8e1; }
.security-card { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; padding: clamp(44px, 6vw, 90px); border-radius: 28px; color: white; background: var(--green); box-shadow: var(--shadow); }
.eyebrow.light { color: var(--gold); }
.security-card h2 { font-size: clamp(46px, 5vw, 76px); }
.security-card h2 em { color: var(--mint); }
.security-points article { display: grid; grid-template-columns: 34px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.security-points article > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--green); background: var(--gold); font-weight: 800; }
.security-points h3 { margin: 0 0 7px; font-size: 18px; }
.security-points p { margin: 0; color: rgba(255,255,255,.68); font-size: 14px; }

.final-cta { text-align: center; background: var(--paper); }
.final-cta h2 { max-width: 900px; margin-inline: auto; }
.final-cta > p:not(.eyebrow) { max-width: 620px; margin: 0 auto 32px; color: #68756f; font-size: 18px; }
.final-cta .button { margin-bottom: 18px; }
.final-cta small { display: block; color: #68756f; }
.access-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.site-footer { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto auto; align-items: center; gap: 36px; padding: 34px 4vw; color: rgba(255,255,255,.72); background: #092e27; }
.footer-brand { color: white; }
.site-footer p { max-width: 480px; margin: 0; font-size: 13px; }
.site-footer nav { display: flex; gap: 22px; font-size: 13px; }
.site-footer small { white-space: nowrap; }

.legal-main { min-height: 75vh; padding: 80px max(5vw, calc((100vw - 1080px) / 2)); }
.legal-hero { max-width: 800px; margin-bottom: 60px; }
.legal-hero h1 { font-size: clamp(52px, 7vw, 90px); }
.legal-copy { display: grid; grid-template-columns: 250px 1fr; gap: 70px; }
.legal-copy aside { position: sticky; top: 120px; align-self: start; color: #68756f; font-size: 13px; }
.legal-copy article { max-width: 760px; }
.legal-copy section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-copy h2 { margin-bottom: 14px; font: 34px/1.1 var(--serif); }
.legal-copy h3 { margin-bottom: 8px; }
.legal-copy p, .legal-copy li { color: #53645e; }
.legal-copy a { color: var(--green-2); text-decoration: underline; }
[data-lang-section="ar"] { display: none; }
html[lang="ar"] [data-lang-section="fr"] { display: none; }
html[lang="ar"] [data-lang-section="ar"] { display: block; }

@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .hero { grid-template-columns: 1fr; }
  .product-frame { min-width: 0; width: 100%; transform: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-strip { grid-template-columns: repeat(3, 1fr); }
  .proof-strip p { grid-column: 1 / -1; margin: 0; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-header { min-height: 68px; padding-inline: 20px; }
  .header-actions .login-link { display: none; }
  .hero { padding: 72px 20px; min-height: auto; background: radial-gradient(circle at 20% 10%, rgba(242,200,100,.25), transparent 28%), var(--paper); }
  h1 { font-size: clamp(52px, 16vw, 72px); }
  h2 { font-size: clamp(44px, 13vw, 60px); }
  .trust-row { margin-top: 38px; }
  .product-frame { margin-top: 20px; }
  .frame-topbar { grid-template-columns: 1fr auto; }
  .cabinet-pill { display: none; }
  .frame-body { grid-template-columns: 46px 1fr; min-height: 410px; }
  .frame-content { padding: 20px 14px; overflow: hidden; }
  .metric-grid { grid-template-columns: repeat(3, 145px); overflow: hidden; }
  .workspace-grid { grid-template-columns: 1fr; }
  .attention-card { display: none; }
  .proof-strip { grid-template-columns: 1fr; gap: 18px; }
  .proof-strip p { grid-column: auto; }
  .section { padding: 84px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card-wide { grid-column: auto; grid-template-columns: 1fr; }
  .feature-card { min-height: 290px; }
  .feature-card h3 { margin-top: 64px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow-intro { position: static; }
  .security-card { grid-template-columns: 1fr; padding: 38px 24px; }
  .site-footer { grid-template-columns: 1fr; padding: 40px 20px; }
  .site-footer nav { flex-direction: column; gap: 10px; }
  .legal-main { padding: 60px 20px; }
  .legal-copy { grid-template-columns: 1fr; gap: 24px; }
  .legal-copy aside { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
