/* Website esaaf.net (deploy/staging/landing/README.md). One file for the three pages in Arabic (right to left) and
   English. Logical properties (inline-start/-end) so the same rules work in both directions. No script. */

@font-face {
  font-family: "Esaaf Display";
  src: url("/assets/fonts/Cairo-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Esaaf Text";
  src: url("/assets/fonts/IBMPlexSansArabic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Esaaf Text";
  src: url("/assets/fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --red: #D63A2E;
  --red-deep: #A92B21;
  --red-tint: #FCEBE9;
  --ink: #172033;
  --ink-soft: #4A5468;
  --paper: #FFFFFF;
  --mist: #F1F4F8;
  --line: #DCE2EB;
  --green: #1D7A4C;
  --green-tint: #E6F4EC;
  --blue: #1E88E5;
  --soon: #7A5B00;
  --soon-tint: #FFF3CC;
  --night: #121A2B;
  --radius: 14px;
  --page: 1160px;
  --gutter: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Esaaf Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
[lang="ar"] body, body[lang="ar"] { font-size: 19px; line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: "Esaaf Display", "Esaaf Text", system-ui, sans-serif; font-weight: 800; margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.15; letter-spacing: -0.01em; }
[lang="ar"] h1 { line-height: 1.35; letter-spacing: 0; }
h2 { font-size: clamp(27px, 3.4vw, 40px); line-height: 1.25; }
[lang="ar"] h2 { line-height: 1.45; }
h3 { font-size: 21px; line-height: 1.35; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: 1.12em; color: var(--ink-soft); max-width: 36em; }
.muted { color: var(--ink-soft); }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Emergency line: always first, never red (red is the brand), never hidden */
.sos {
  background: var(--night);
  color: #fff;
  font-size: 16px;
}
.sos .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 9px; }
.sos p { line-height: 1.4; }
.sos a {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 4px 16px; border-radius: 999px;
  background: #fff; color: var(--night); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.sos a b { font-family: "Esaaf Display", sans-serif; font-size: 20px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 58px; height: auto; display: block; }
.brand span { font-family: "Esaaf Display", sans-serif; font-size: 32px; line-height: 1; color: var(--red); padding-bottom: 4px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 16px; color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); background: var(--mist); }
.nav a[aria-current="page"] { color: var(--red-deep); background: var(--red-tint); }
.lang {
  font-weight: 600; font-size: 16px; text-decoration: none; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px;
}
.lang:hover { border-color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 10px 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 18px; text-decoration: none; line-height: 1.2; text-align: center;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn.is-off { background: var(--mist); color: var(--ink-soft); border-color: var(--line); cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Store badges: not links until the apps are in the stores */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 150px; min-height: 54px; padding: 6px 18px; border-radius: 12px;
  border: 1.5px dashed var(--line); background: var(--mist); color: var(--ink-soft); line-height: 1.25;
}
.store b { color: var(--ink); font-size: 18px; }
.store small { font-size: 14px; }

.soon {
  display: inline-block; vertical-align: middle;
  font-family: "Esaaf Text", sans-serif; font-size: 14px; font-weight: 600; line-height: 1.5;
  padding: 1px 10px; border-radius: 999px; background: var(--soon-tint); color: var(--soon); white-space: nowrap;
}
h1 .soon, h2 .soon, h3 .soon { font-size: 15px; margin-inline-start: 8px; position: relative; top: -0.2em; }

/* Hero */
.hero { padding-block: 56px 72px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero .lead { margin-top: 18px; }
.hero .actions { margin-top: 28px; }
.hero .stores { margin-top: 18px; }
.hero-art { display: flex; justify-content: center; position: relative; }

/* Phone frame around the app pictures */
.phone {
  width: 300px; max-width: 74vw; aspect-ratio: 393 / 852;
  padding: 9px; border-radius: 46px; background: #10131A;
  box-shadow: 0 2px 0 1px #2A2F3A inset, 0 34px 60px -28px rgba(23, 32, 51, 0.55);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 38px; background: var(--mist); }
.phone.small { width: 228px; }

/* Sections */
section { padding-block: 72px; }
section.alt { background: var(--mist); }
.head { max-width: 46em; margin-bottom: 36px; }
.head p { margin-top: 12px; color: var(--ink-soft); }

/* What the app does: icon list, two columns */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; }
.features li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: start; }
.features h3 { margin-bottom: 4px; }
.features p { color: var(--ink-soft); }
.icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--red-tint); color: var(--red-deep);
}
.icon svg { width: 28px; height: 28px; }

/* Three steps joined by the route line */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; position: relative; }
.steps::before {
  content: ""; position: absolute; inset-inline: 16%; top: 21px; height: 0;
  border-top: 5px dashed var(--red); opacity: 0.55;
}
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.steps .dot {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-family: "Esaaf Display", sans-serif; font-size: 22px;
  box-shadow: 0 0 0 7px var(--paper);
}
section.alt .steps .dot { box-shadow: 0 0 0 7px var(--mist); }
.steps li:first-child .dot { background: var(--blue); }
.steps p { color: var(--ink-soft); max-width: 22em; }
.steps .phone { margin-top: 8px; }

/* FAQ */
.faq { max-width: 50em; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 1.05em;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mist); font-size: 22px; line-height: 1; color: var(--red-deep);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 20px; color: var(--ink-soft); max-width: 42em; }

/* Call-out band */
.band { background: var(--ink); color: #fff; border-radius: 24px; padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band p { color: #C9D1E0; margin-top: 8px; max-width: 34em; }

/* Operators: kinds, steps, commission, portal */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a { text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 16px; background: var(--paper); }
.chips a:hover { border-color: var(--ink-soft); }
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--paper); }
.kind { padding: 28px; scroll-margin-top: 24px; }
.kind + .kind { border-inline-start: 1px solid var(--line); }
.kind h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kind ul, .ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.kind li, .ticks li { position: relative; padding-inline-start: 26px; color: var(--ink-soft); }
.kind li::before, .ticks li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 0.62em; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
}
.join { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 46em; counter-reset: join; }
.join li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; padding-bottom: 26px; position: relative; }
.join li::before {
  counter-increment: join; content: counter(join, var(--digits, decimal));
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--red); color: var(--red-deep);
  font-family: "Esaaf Display", sans-serif; font-size: 20px; position: relative; z-index: 1;
}
[lang="ar"] .join { --digits: arabic-indic; }
.join li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 22px; top: 46px; bottom: 0; border-inline-start: 3px dashed var(--line);
}
.join h3 { margin-top: 8px; margin-bottom: 4px; }
.join p { color: var(--ink-soft); }
.join li:last-child::before { background: var(--green); border-color: var(--green); color: #fff; }

.money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); font-size: 17px; }
.table th, .table td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.rate { font-family: "Esaaf Display", sans-serif; font-size: 22px; color: var(--red-deep); }
.note { font-size: 16px; color: var(--ink-soft); margin-top: 12px; }

.browser { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -34px rgba(23, 32, 51, 0.5); background: var(--paper); }
.browser::before {
  content: ""; display: block; height: 26px; border-bottom: 1px solid var(--line); background-color: var(--mist);
  background-image: radial-gradient(circle at 16px 50%, #D3D9E3 5px, transparent 6px), radial-gradient(circle at 34px 50%, #D3D9E3 5px, transparent 6px), radial-gradient(circle at 52px 50%, #D3D9E3 5px, transparent 6px);
}
.browser img { display: block; width: 100%; }
.portal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 44px; align-items: center; }
.portal .ticks { margin-top: 20px; }

.later { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.later li { border: 1.5px dashed #D9C27A; border-radius: 18px; padding: 22px; background: #FFFCF2; }
.later h3 { margin-bottom: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.later p { color: var(--ink-soft); }

/* Doctors: a sketch of the planned profile, plainly marked as not built */
.sketch {
  width: 300px; max-width: 80vw; border-radius: 26px; border: 2px dashed #D9C27A; background: #FFFCF2; padding: 22px;
  display: grid; gap: 14px; position: relative;
}
.sketch .who { display: flex; gap: 14px; align-items: center; }
.sketch .avatar { width: 64px; height: 64px; border-radius: 50%; background: #F1E2B0; flex: none; }
.sketch .bar { height: 12px; border-radius: 6px; background: #EFE2BA; }
.sketch .bar.w60 { width: 60%; } .sketch .bar.w40 { width: 40%; } .sketch .bar.w80 { width: 80%; }
.sketch .row { display: flex; gap: 8px; flex-wrap: wrap; }
.sketch .pill { height: 28px; width: 76px; border-radius: 999px; background: #F5EBCB; }
.sketch .soon { position: absolute; top: -14px; inset-inline-end: 18px; font-size: 15px; }
.sketch .cta { height: 44px; border-radius: 999px; background: #F0D9D6; }

/* Footer */
.foot { background: var(--night); color: #C9D1E0; padding-block: 48px 36px; font-size: 16px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot .brand span { color: #fff; }
.foot .brand img { background: #fff; border-radius: 12px; padding: 4px 6px; }
.foot h2 { font-family: "Esaaf Text", sans-serif; font-weight: 600; font-size: 16px; color: #fff; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: #fff; }
.foot .fine { grid-column: 1 / -1; border-top: 1px solid #2C3650; padding-top: 18px; font-size: 14px; color: #93A0B8; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot .sos-note { margin-top: 14px; color: #fff; }
.foot .sos-note b { font-family: "Esaaf Display", sans-serif; font-size: 22px; }

.wa svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .hero .wrap, .money, .portal { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 36px 56px; }
  .hero-art { margin-top: 8px; }
  .kinds { grid-template-columns: minmax(0, 1fr); }
  .kind + .kind { border-inline-start: 0; border-top: 1px solid var(--line); }
  .later { grid-template-columns: minmax(0, 1fr); }
  .foot .wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  [lang="ar"] body, body[lang="ar"] { font-size: 18px; }
  section { padding-block: 52px; }
  .top .wrap { gap: 10px 16px; padding-block: 10px; }
  .nav { order: 3; width: 100%; margin-inline-start: 0; justify-content: space-between; gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 15px; }
  .lang { margin-inline-start: auto; }
  .brand img { width: 50px; }
  .brand span { font-size: 28px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* steps: one below the other, the route runs down the start side */
  .steps { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .steps::before { inset-inline: auto; inset-inline-start: 21px; top: 20px; bottom: 40px; height: auto; border-top: 0; border-inline-start: 5px dashed var(--red); }
  .steps li { align-items: flex-start; text-align: start; padding-inline-start: 0; }
  .steps .phone { align-self: center; }
  .band { padding: 28px 22px; }
  .kind { padding: 22px 18px; }
  .sos .wrap { font-size: 15px; }
  .btn { width: 100%; }
  .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a, .chips a { transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
}

.btn-light { border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); }
.sketch .lines { flex: 1; display: grid; gap: 8px; }
.narrow { max-width: 40em; }
.actions.spaced { margin-top: 28px; }
