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

:root {
  --navy:       #0F1F3D;
  --deep:       #F1F5F9;
  --teal:       #1B7A6B;
  --teal-light: #22a08a;
  --gold:       #B8860B;
  --gold-light: #D4A017;
  --white:      #FFFFFF;
  --text:       #0F1F3D;
  --gray:       #64748b;
  --gray-light: #475569;
  --surface:    rgba(0, 0, 0, 0.025);
  --border:     rgba(0, 0, 0, 0.09);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Arabic font */
[dir="rtl"] body { font-family: 'Cairo', sans-serif; }

/* ── Background gradient mesh ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 5% 95%, rgba(27, 122, 107, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 95% 5%, rgba(184, 134, 11, 0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.page { position: relative; z-index: 1; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

.nav-start {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.menu-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.menu-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--gray-light);
  display: block;
  transition: fill 0.2s;
}

.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--teal); }
.menu-btn:hover svg, .menu-btn[aria-expanded="true"] svg { fill: var(--teal); }

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  /* Logical property: anchored to the button, so it opens toward the
     left in LTR and the right under dir="rtl". */
  inset-inline-start: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 31, 61, 0.10);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
}

/* The `hidden` attribute's UA display:none loses to .nav-menu's display:flex. */
.nav-menu[hidden] { display: none; }

.nav-menu a {
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--gray-light);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-menu a:hover, .nav-menu a:focus-visible {
  background: var(--surface);
  color: var(--teal);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-family: 'Inter', sans-serif;
}

/* Small "for institutions" tag beside the wordmark so a visitor coming
   from the consumer page sees at once that this is the partner site. */
.logo-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(27, 122, 107, 0.08);
  border: 1px solid rgba(27, 122, 107, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

[dir="rtl"] .logo-text { font-family: 'Cairo', sans-serif; letter-spacing: 0; }
[dir="rtl"] .logo-tag { letter-spacing: 0; text-transform: none; }

.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-cta, .lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray-light);
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}

.lang-toggle {
  padding: 9px 14px;
  color: var(--gray);
  font-size: 13px;
}

.nav-cta:hover, .lang-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ── Above-fold layout (centered) ── */
.above-fold {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: calc(100vh - 200px);
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; }

h1 {
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
}

[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.4; }

h1 .accent { color: var(--gold); }

.hero-sub {
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--gray);
  line-height: 1.7;
  font-weight: 400;
  margin: 0;
  max-width: 720px;
}

/* Primary + secondary CTA pair, reused in the hero and the closing section. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s, border-color 0.2s, color 0.2s;
  letter-spacing: -0.01em;
}

[dir="rtl"] .btn-primary, [dir="rtl"] .btn-secondary { letter-spacing: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--teal) 100%);
  border: none;
  color: var(--white);
}

.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray-light);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* Award badge — social proof under the hero CTAs. */
.award {
  display: flex;
  align-items: center;
  gap: 14px;
  align-self: center;
  background: rgba(27, 122, 107, 0.07);
  border: 1px solid rgba(27, 122, 107, 0.18);
  border-radius: 14px;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.award:hover,
.award:focus-visible {
  background: rgba(27, 122, 107, 0.12);
  border-color: rgba(27, 122, 107, 0.4);
}

.award-logo {
  width: 58px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.award-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: start;
}

.award-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--teal);
}

.award-meta {
  font-size: 12.5px;
  color: var(--gray);
  line-height: 1.45;
}

/* ── Section shell ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 48px;
  text-align: center;
}

.section h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

[dir="rtl"] .section h2 { letter-spacing: 0; }

/* A section with no lead paragraph keeps the same gap to its cards as one with. */
.section h2 + .cards { margin-top: 48px; }

.section-lead {
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--gray);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto 48px;
}

/* ── Engine cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: start;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(212, 160, 23, 0.4);
  transform: translateY(-2px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(212, 160, 23, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg { fill: var(--gold); width: 28px; height: 28px; }

.card h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

[dir="rtl"] .card h3 { letter-spacing: 0; }

.card p {
  color: var(--gray);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ── Partnership split (we provide / you provide) ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: start;
}

.split-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
}

.split-col.ours { border-color: rgba(27, 122, 107, 0.3); }
.split-col.yours { border-color: rgba(212, 160, 23, 0.35); }

.split-col .eyebrow { display: block; margin-bottom: 8px; }
.split-col.yours .eyebrow { color: var(--gold); }

.split-col h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

[dir="rtl"] .split-col h3 { letter-spacing: 0; }

.split-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.split-col li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gray-light);
}

.split-col li strong { color: var(--text); font-weight: 600; }

.tick {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.ours .tick { background: rgba(27, 122, 107, 0.14); }
.yours .tick { background: rgba(212, 160, 23, 0.16); }
.tick svg { width: 12px; height: 12px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ours .tick svg { stroke: var(--teal); }
.yours .tick svg { stroke: var(--gold); }

/* ── Data-flow strip ── */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.flow-node {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
}

.flow-node.engine {
  border-color: rgba(27, 122, 107, 0.4);
  background: rgba(27, 122, 107, 0.05);
}

.flow-node .flow-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.flow-node .flow-meta {
  display: block;
  font-size: 12.5px;
  color: var(--gray);
  line-height: 1.45;
}

.flow-arrow {
  color: var(--gray);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.flow-arrow svg { width: 22px; height: 22px; fill: var(--gray); }
[dir="rtl"] .flow-arrow svg { transform: scaleX(-1); }

/* ── Integration steps ── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: start;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(27, 122, 107, 0.12);
  color: var(--teal);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

[dir="rtl"] .step h3 { letter-spacing: 0; }

.step p { color: var(--gray); font-size: 14px; line-height: 1.6; }

/* ── Closing CTA ── */
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 760px;
  margin: 0 auto;
}

.cta-card h2 { margin-bottom: 12px; }

.cta-card .section-lead { margin-bottom: 28px; }

/* Shown only when a mailto: click visibly went nowhere (no mail app
   registered on the visitor's machine), so the address is never lost. */
.mail-fallback {
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
  line-height: 1.6;
  text-align: center;
}

.mail-fallback[hidden] { display: none; }
.mail-fallback a { color: var(--teal); text-decoration: none; font-weight: 600; }
.mail-fallback a:hover { text-decoration: underline; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer p { font-size: 13px; color: var(--gray); }

.footer-legal { display: flex; flex-direction: column; gap: 4px; max-width: 520px; }

footer a {
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

footer a:hover { color: var(--gold); }

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

/* ── Menu: page links, divider, current page ── */
.nav-menu a[aria-current="page"] {
  background: rgba(27, 122, 107, 0.08);
  color: var(--teal);
}

.nav-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}

/* ── Sub-page hero: same look as the home hero, without its full-screen height ── */
.above-fold.compact {
  min-height: auto;
  padding: 40px 24px 24px;
}

/* ── Products ── */
.product { text-align: start; }

.product-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 36px;
  max-width: 760px;
}

.product-head h2 { margin-bottom: 0; }

.product-head .section-lead { margin: 0; max-width: none; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(27, 122, 107, 0.08);
  border: 1px solid rgba(27, 122, 107, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.pill.gold {
  color: var(--gold);
  background: rgba(212, 160, 23, 0.10);
  border-color: rgba(212, 160, 23, 0.3);
}

[dir="rtl"] .pill { letter-spacing: 0; text-transform: none; }

.cards.two { grid-template-columns: repeat(2, 1fr); }

.product + .product { border-top: 1px solid var(--border); }

/* ── Pricing tiers ── */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: start;
  align-items: stretch;
}

.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
}

.tier.featured {
  background: var(--white);
  border-color: rgba(212, 160, 23, 0.55);
  box-shadow: 0 12px 32px rgba(15, 31, 61, 0.08);
}

.tier-badge {
  position: absolute;
  top: -12px;
  inset-inline-start: 28px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--teal) 100%);
  color: var(--white);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 12px;
}

/* .tier scoped so it outranks .section h2. */
.tier .tier-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}

[dir="rtl"] .tier .tier-name { letter-spacing: 0; }

.tier-for {
  color: var(--gray);
  font-size: 14.5px;
  line-height: 1.6;
  min-height: 3.2em;
}

.tier-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 4px;
}

.tier-price-note { font-size: 13px; color: var(--gray); margin-bottom: 24px; }

.tier ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex-grow: 1;
}

.tier li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--gray-light);
}

.tier .tick { background: rgba(27, 122, 107, 0.14); }
.tier .tick svg { stroke: var(--teal); }

.tier .cta-row .btn-primary, .tier .cta-row .btn-secondary { flex: 1; }

/* ── FAQ ── */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: start;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
}

.faq details p {
  color: var(--gray);
  font-size: 14.5px;
  line-height: 1.65;
  margin-top: 10px;
}

@media (max-width: 1000px) {
  .tiers { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .tier-for { min-height: 0; }
}

@media (max-width: 768px) {
  .cards.two { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .above-fold { min-height: auto; padding: 32px 24px 56px; gap: 20px; }
  .split { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { justify-content: center; }
  .flow-arrow svg { transform: rotate(90deg); }
  [dir="rtl"] .flow-arrow svg { transform: rotate(90deg); }
  .cards.three { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
}

@media (max-width: 600px) {
  nav { padding: 20px 24px; }
  .logo-tag { display: none; }
  .section { padding: 56px 24px; }
  .cards, .steps { grid-template-columns: 1fr; gap: 16px; }
  .cta-card { padding: 32px 22px; }
  footer { flex-direction: column; align-items: flex-start; }
  [dir="rtl"] footer { align-items: flex-end; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
}
