/* Layout: white pages with a quiet green identity. Brand green carries headings, buttons and one tinted panel per section;
   everything else is ink on white. Shared by every page of the Fahem site. Light only, by request. */
:root {
  color-scheme: light;
  --white: #ffffff;
  --paper: #f6f8f4;          /* tinted section ground */
  --mint: #e7f0e2;           /* phone panels, chips */
  --line: #dde5d8;
  --ink: #15211a;            /* text */
  --muted: #56645a;
  --green: #1b4c2e;          /* Fahem brand green */
  --green-2: #2c6b42;        /* hover */
  --leaf: #4f9a3e;           /* large highlights and marks */
  --leaf-ink: #3a7a2d;       /* the same green, dark enough for small text (AA on white) */
  --red-ink: #8a5a50;        /* "old way" column: muted, not alarming */
  --display: "Zain", "Segoe UI", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--white); }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--green); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }

/* One language at a time; both stay in the HTML so search engines read both. */
html[lang="ar"] [data-lang="en"], html[lang="en"] [data-lang="ar"] { display: none !important; }

.shell { max-width: 1120px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.narrow { max-width: 760px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--white); }
.site-head .shell { display: flex; align-items: center; gap: 12px 28px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; line-height: 1; margin-inline-end: auto; text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand .word { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--green); }
html[lang="en"] .brand .word { font-size: 24px; }
.head-cta { padding: 7px 18px; font-size: 15px; }
@media (max-width: 760px) { .site-head .head-cta { display: none; } }   /* the dock covers phones */
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; padding: 7px 12px; border-radius: 8px; }
.site-nav a:hover { background: var(--paper); }
.site-nav a[aria-current="page"] { color: var(--green); background: var(--mint); }
.lang { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 14px; }
.lang:hover { border-color: var(--green); color: var(--green); }
@media (max-width: 720px) {
  .site-nav { order: 3; width: 100%; overflow-x: auto; margin-inline: -4px; }
  .site-nav a { white-space: nowrap; }
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); color: var(--green); text-wrap: balance; margin: 0; }
h1 { font-weight: 800; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.12; letter-spacing: -.005em; }
h1 em { font-style: normal; color: var(--leaf); }
h2 { font-weight: 800; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; }
h3 { font-weight: 700; font-size: 21px; line-height: 1.3; color: var(--ink); }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--leaf-ink); letter-spacing: .02em; margin: 0; }
.lead { font-size: 17px; color: var(--muted); max-width: 36em; margin: 0; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 36px; }

/* ---------- hero ---------- */
.hero { padding-block: 56px 0; }
.hero .shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: end; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; padding-bottom: 64px; min-width: 0; }
/* Facts read as a checked list, not as buttons. */
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.checks li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.5' fill='none' stroke='%231b4c2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
.get-anchor { scroll-margin-top: 96px; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { display: block; line-height: 0; border-radius: 9px; transition: transform .15s; }
.badge:hover { transform: translateY(-2px); }
.badge.apple img { height: 48px; width: auto; display: block; }
.badge.google { overflow: hidden; height: 48px; }
.badge.google img { height: 71px; width: auto; display: block; margin: -11.5px; }
.get { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; }
.qr { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 6px 6px; }
.qr .code { width: 54px; height: 54px; flex: none; line-height: 0; }
.qr .code svg { width: 100%; height: 100%; display: block; }
.qr span { font-size: 13px; font-weight: 500; line-height: 1.35; max-width: 10em; color: var(--muted); }
.toast { margin: 0; font-size: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; color: var(--muted); }

/* Phones rise out of a green panel and are cropped by its bottom edge. */
.stage { position: relative; height: 540px; background: linear-gradient(180deg, var(--mint) 0%, #d6e6cd 100%); border-radius: 28px 28px 0 0; overflow: hidden; }
.stage::before { content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 280px; aspect-ratio: 1; border-radius: 50%; border: 36px solid rgba(27, 76, 46, .06); }
.phone { border: 8px solid #101612; border-bottom: 0; border-radius: 46px 46px 0 0; overflow: hidden; background: #101612; box-shadow: 0 24px 60px rgba(21, 33, 26, .22); }
.phone img { display: block; width: 100%; height: auto; border-radius: 38px 38px 0 0; }
.stage .phone { position: absolute; width: 270px; }
.stage .front { inset-inline-start: 50%; margin-inline-start: -175px; top: 48px; z-index: 2; }
.stage .back { inset-inline-start: 50%; margin-inline-start: 20px; top: 104px; width: 232px; z-index: 1; opacity: .96; }
@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero .shell { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero-copy { padding-bottom: 28px; }
  .qr { display: none; }
  .stage { height: 400px; }
  .stage .phone { width: 220px; }
  .stage .front { margin-inline-start: -150px; top: 36px; }
  .stage .back { width: 190px; margin-inline-start: 6px; top: 84px; }
}

/* ---------- sections ---------- */
.band { padding-block: 80px; }
.band.tint { background: var(--paper); border-block: 1px solid var(--line); }
@media (max-width: 860px) { .band { padding-block: 56px; } }

/* Two audiences, side by side */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.path { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 20px; align-items: end; text-decoration: none; color: inherit; background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 28px 28px 0; overflow: hidden; transition: border-color .2s, transform .2s; }
.path:hover { border-color: var(--green); transform: translateY(-3px); }
.path .txt { display: flex; flex-direction: column; gap: 8px; padding-bottom: 28px; min-width: 0; }
.path p { margin: 0; color: var(--muted); }
.path .go { font-weight: 600; color: var(--green); margin-top: 6px; }
.path .phone { border-width: 6px; border-radius: 26px 26px 0 0; box-shadow: none; }
.path .phone img { border-radius: 20px 20px 0 0; }
@media (max-width: 760px) { .paths { grid-template-columns: minmax(0, 1fr); } .path { grid-template-columns: minmax(0, 1fr) 104px; padding: 22px 22px 0; } .path .txt { padding-bottom: 22px; } }

/* Screen tour */
.reel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card .window { height: 380px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; background: var(--mint); border-radius: 22px; padding-top: 30px; }
.card .phone { width: 210px; flex: none; border-width: 6px; border-radius: 34px 34px 0 0; box-shadow: 0 14px 34px rgba(21, 33, 26, .18); }
.card .phone img { border-radius: 28px 28px 0 0; }
.card p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 860px) {
  .reel-wrap { margin-inline: calc(var(--gutter) * -1) calc(var(--gutter-r) * -1); }
  .reel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-left: var(--gutter); padding-right: var(--gutter-r); padding-bottom: 6px; }
  .card { flex: 0 0 76%; scroll-snap-align: center; }
  .card .window { height: 340px; }
}

/* Steps: a real sequence, so numbered */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--green); padding-top: 18px; }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--leaf); }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 36px; margin: 0; padding: 0; list-style: none; }
.features li { display: flex; flex-direction: column; gap: 4px; }
.features li::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--leaf); margin-bottom: 8px; }
.features p { margin: 0; color: var(--muted); }

/* Questions */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding-block: 18px; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 44em; }

/* Old way vs with Fahem */
.compare { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.compare .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.compare .row + .row { border-top: 1px solid var(--line); }
.compare .row > span { display: flex; align-items: center; gap: 12px; padding: 18px 24px; min-width: 0; }
.compare .head > span { font-size: 14px; font-weight: 600; letter-spacing: .02em; padding-block: 12px; color: var(--muted); background: var(--paper); }
.compare .head > span + span { color: var(--white); background: var(--green); }
.compare .old { color: var(--red-ink); }
.compare .new { background: #f3f8f0; color: var(--ink); font-weight: 600; }
.compare .old::before, .compare .new::before { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1; }
.compare .old::before { content: "✕"; background: #f4ebe8; color: var(--red-ink); }
.compare .new::before { content: "✓"; background: var(--green); color: var(--white); }
@media (max-width: 640px) {
  .compare .head { display: none; }
  .compare .row { grid-template-columns: minmax(0, 1fr); }
  .compare .row > span { padding: 12px 18px; }
  .compare .old { padding-bottom: 6px; font-size: 15px; }
}

/* Closing call */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; background: var(--green); color: var(--white); border-radius: 24px; padding: 36px 40px; }
.cta h2 { color: var(--white); flex: 1 1 320px; min-width: 0; }
.button { display: inline-block; text-decoration: none; border: 0; background: var(--white); color: var(--green); border-radius: 999px; padding: 11px 24px; font-weight: 600; font-size: 16px; }
.button:hover { background: var(--mint); }
.button.solid { background: var(--green); color: var(--white); }
.button.solid:hover { background: var(--green-2); }
@media (max-width: 760px) { .cta { padding: 28px 24px; } }

/* ---------- long-form pages (policy, contact) ---------- */
.page-head { padding-block: 56px 36px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head .shell { display: flex; flex-direction: column; gap: 10px; }
.meta { margin: 0; color: var(--muted); font-size: 14px; }
.prose { padding-block: 48px 80px; }
.prose h2 { font-size: 23px; color: var(--ink); margin: 40px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #2b382f; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--ink); }
.note { border: 1px solid #e6c9a8; background: #fdf6ee; color: #6b4519; border-radius: 12px; padding: 12px 16px; margin: 0 0 24px; font-weight: 500; }
.toc { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: block; font-size: 14px; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; background: var(--white); }
.toc a:hover { border-color: var(--green); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 40px; }
.contact-card { border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.contact-card .label { font-size: 14px; font-weight: 600; color: var(--leaf-ink); letter-spacing: .02em; }
.contact-card .value { font-size: 20px; font-weight: 600; color: var(--ink); direction: ltr; unicode-bidi: isolate; user-select: all; overflow-wrap: anywhere; }
html[lang="ar"] .contact-card .value { text-align: right; }
.contact-card p { margin: 0; color: var(--muted); font-size: 15px; }
.copy { align-self: flex-start; margin-top: 6px; border: 1px solid var(--line); background: var(--white); color: var(--green); border-radius: 999px; padding: 4px 14px; font-size: 14px; font-weight: 600; }
.copy:hover { border-color: var(--green); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--paper); padding-block: 44px 36px; font-size: 15px; }
.site-foot .cols { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-brand { margin-bottom: 12px; }
.foot-brand img { height: 26px; }
.foot-brand .word { font-size: 24px; }
.site-foot p { margin: 0; color: var(--muted); max-width: 22em; }
.site-foot h3 { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.site-foot a { color: var(--ink); text-decoration: none; }
.site-foot a:hover { color: var(--green); text-decoration: underline; }
.site-foot .ltr { direction: ltr; unicode-bidi: isolate; }
.site-foot .base { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-foot .about { grid-column: 1 / -1; } }

/* Phone-only download bar, shown once the hero's badges scroll away */
.dock { position: fixed; inset: auto 0 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(21, 33, 26, .08);
  padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter); font-weight: 600; color: var(--green); }
.dock .button { padding: 9px 22px; }
@media (min-width: 761px) { .dock { display: none !important; } }
@media (max-width: 760px) { body:has(.dock:not([hidden])) .site-foot { padding-bottom: 96px; } }

@media (prefers-reduced-motion: reduce) { .badge, .path { transition: none; } .badge:hover, .path:hover { transform: none; } }
