
:root {
  --header-bg: rgba(255, 255, 255, 0.96);
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f7f9fc;
  --surface-2: #edf3f8;
  --text: #142033;
  --muted: #667386;
  --border: #d9e2ec;
  --primary: #173f67;
  --primary-2: #245b8d;
  --link: #0a66c2;
  --focus: #ffbf47;
  --shadow: 0 10px 28px rgba(20, 32, 51, 0.08);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --surface: #152131;
    --surface-2: #1c2b3e;
    --text: #f4f7fb;
    --muted: #b8c3d1;
    --border: #33445a;
    --primary: #8fc5f0;
    --primary-2: #b8ddfa;
    --link: #83bdff;
    --focus: #ffd166;
    --shadow: 0 12px 30px rgba(0,0,0,.24);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.75;
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--link);
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(1120px, calc(100% - 24px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg, var(--bg));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 800;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #153e66, #2c6da8);
  box-shadow: var(--shadow);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

.nav-links {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 4px;
}

.nav-links.is-open { display: flex; }

.nav-links a {
  display: block;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.nav-links a:hover {
  background: var(--surface);
  color: var(--link);
}

.language-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lang-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.lang-button[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.hero {
  padding: 44px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 28px;
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: .92rem;
  font-weight: 750;
}

h1, h2, h3 {
  color: var(--text);
  line-height: 1.3;
  text-wrap: balance;
}

h1 {
  margin: 16px 0 14px;
  font-size: clamp(2.2rem, 11vw, 4.5rem);
  letter-spacing: -.03em;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.55rem, 7vw, 2.35rem);
}

h3 { font-size: 1.12rem; }

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 4.8vw, 1.18rem);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.button-primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
}

.phone-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}

.phone-screen {
  min-height: 360px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
}

.metric {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  margin-bottom: 11px;
}

.metric strong {
  display: block;
  font-size: clamp(1.15rem, 5vw, 1.4rem);
  overflow-wrap: anywhere;
}

.section { padding: 44px 0; }

.section-muted {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.grid-3,
.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card,
.legal-header,
.legal-block {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card p,
.muted,
.meta { color: var(--muted); }

.legal-layout {
  display: grid;
  gap: 18px;
  padding: 24px 0 56px;
}

.legal-block p,
.legal-block li {
  font-size: clamp(1rem, 4vw, 1.08rem);
}

.legal-block h2 {
  margin-top: 28px;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
}

.legal-block h2:first-child { margin-top: 0; }

.ar { direction: rtl; text-align: right; }
.en { direction: ltr; text-align: left; }

.language-section[hidden] { display: none !important; }

.notice {
  padding: 14px;
  border-inline-start: 4px solid #14815d;
  border-radius: 12px;
  background: var(--surface);
}

.site-footer {
  padding: 28px 0 38px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a { color: var(--muted); }

@media (min-width: 600px) {
  .container { width: min(1120px, calc(100% - 40px)); }
  .actions { grid-template-columns: repeat(2, minmax(0, max-content)); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .support-grid { grid-template-columns: repeat(2, 1fr); }
  .card, .legal-header, .legal-block { padding: 24px; }
}

@media (min-width: 860px) {
  .nav {
    grid-template-columns: auto 1fr;
  }

  .menu-toggle { display: none; }

  .nav-links {
    grid-column: auto;
    display: flex !important;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    padding: 0;
  }

  .nav-links a { padding-inline: 11px; }

  .hero {
    padding: 76px 0 54px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 42px;
  }

  .grid-3 { grid-template-columns: repeat(3, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

@media (min-width: 1180px) {
  .container { width: min(1120px, calc(100% - 64px)); }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .language-controls {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .legal-header,
  .legal-block,
  .card {
    box-shadow: none;
    background: #fff;
  }

  .language-section[hidden] { display: block !important; }
}

.apps-grid{display:grid;grid-template-columns:1fr;gap:18px}.app-card{display:flex;flex-direction:column;min-height:100%;padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}.app-card-header{display:flex;align-items:center;gap:14px;margin-bottom:12px}.app-icon{width:58px;height:58px;flex:0 0 58px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#153e66,#2c6da8);color:#fff;font-size:1.35rem;font-weight:900}.app-card h3{margin:0;font-size:1.3rem}.app-status{margin-top:4px;color:var(--muted);font-size:.92rem}.app-card p{margin-top:6px;color:var(--muted)}.app-card .actions{margin-top:auto;padding-top:12px}.placeholder-card{border-style:dashed;box-shadow:none}.site-intro{max-width:780px}@media(min-width:640px){.apps-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:980px){.apps-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Arabic compatibility: use fonts built into iOS/macOS and avoid web-font dependencies. */
[lang="ar"],
[dir="rtl"],
.ar,
:lang(ar) {
  font-family: Tahoma, "Geeza Pro", "Al Bayan", Damascus, "Arial Unicode MS", Arial, sans-serif !important;
  font-variant-ligatures: normal;
  -webkit-font-smoothing: antialiased;
  unicode-bidi: plaintext;
}

[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
.ar h1, .ar h2, .ar h3 {
  font-family: Tahoma, "Geeza Pro", "Al Bayan", Damascus, "Arial Unicode MS", Arial, sans-serif !important;
  font-weight: 700;
  letter-spacing: 0;
}

/* Avoid newer CSS-only typography features on older WebKit. */
h1, h2, h3 { text-wrap: normal; }


/* Simple legal pages: intentionally conservative for broad Safari/WebKit compatibility */
.simple-legal {
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.simple-legal .site-header {
  position: static;
  background: #ffffff;
  border-bottom: 1px solid #d9d9d9;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.simple-legal .container {
  width: 92%;
  max-width: 880px;
}

.simple-legal .legal-document {
  padding: 36px 0 64px;
}

.simple-legal .legal-document h1 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: 0;
}

.simple-legal .legal-document .updated {
  margin: 0 0 28px;
  color: #666666;
  font-size: 15px;
}

.simple-legal .legal-document h2 {
  margin: 30px 0 10px;
  font-size: 21px;
  line-height: 1.35;
}

.simple-legal .legal-document p,
.simple-legal .legal-document li {
  font-size: 17px;
  line-height: 1.65;
}

.simple-legal .legal-document ul {
  padding-left: 24px;
}

.simple-legal .legal-document a {
  color: #0057b8;
  text-decoration: underline;
}

.simple-legal .site-footer {
  background: #ffffff;
  border-top: 1px solid #d9d9d9;
  color: #666666;
}

.simple-legal .nav-links a,
.simple-legal .brand {
  color: #111111;
}

.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.app-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-card.placeholder {
  border-style: dashed;
  box-shadow: none;
}

.app-card .app-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #153e66, #2c6da8);
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
}

.app-card .app-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.app-card .card-actions {
  margin-top: auto;
  padding-top: 18px;
}

@media (min-width: 640px) {
  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .apps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --header-bg: rgba(17, 17, 19, 0.96);
  }

  .site-header {
    background: var(--header-bg);
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }
}

/* FINAL LEGAL PAGE CONTRAST FIX
   Legal pages intentionally stay light in every system appearance so App Review
   always sees readable black text on a white background. */
body.simple-legal {
  color-scheme: light;
  background: #ffffff;
  color: #111111;
}

body.simple-legal .site-header,
body.simple-legal .legal-document,
body.simple-legal .site-footer {
  background: #ffffff;
  color: #111111;
}

body.simple-legal .site-header {
  border-bottom-color: #d9d9d9;
}

body.simple-legal .brand,
body.simple-legal .nav-links a,
body.simple-legal .menu-toggle,
body.simple-legal .legal-document h1,
body.simple-legal .legal-document h2,
body.simple-legal .legal-document h3,
body.simple-legal .legal-document p,
body.simple-legal .legal-document li {
  color: #111111;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

body.simple-legal .legal-document .updated,
body.simple-legal .site-footer,
body.simple-legal .footer-links a {
  color: #666666;
}

body.simple-legal .legal-document a {
  color: #0057b8;
}

body.simple-legal .menu-toggle {
  background: #f7f7f7;
  border-color: #d9d9d9;
}

@media (prefers-color-scheme: dark) {
  body.simple-legal,
  body.simple-legal .site-header,
  body.simple-legal .legal-document,
  body.simple-legal .site-footer {
    background: #ffffff;
    color: #111111;
  }

  body.simple-legal .brand,
  body.simple-legal .nav-links a,
  body.simple-legal .menu-toggle,
  body.simple-legal .legal-document h1,
  body.simple-legal .legal-document h2,
  body.simple-legal .legal-document h3,
  body.simple-legal .legal-document p,
  body.simple-legal .legal-document li {
    color: #111111;
  }
}

