/* =========================================================
   Manal Apps: the whole look of the site lives in this file.
   Colours: Dark Blue #1A0089, White Chocolate #EFE7DB,
            Portland Orange #FF5E33, June Bud #B7CF4F, White.
   Contrast notes (checked):
   - Dark blue on cream 12:1, on white 14:1, on lime 8.6:1, on orange 4.9:1
   - White on dark blue 14:1
   - Orange is never used for text (too light on cream).
   ========================================================= */

/* ---------- Fonts (stored on this site, nothing loads from Google) ---------- */
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Aref Ruqaa"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/aref-ruqaa-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Aref Ruqaa"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/assets/fonts/aref-ruqaa-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oranienbaum"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/oranienbaum-latin-400-normal.woff2") format("woff2");
}

/* ---------- Design tokens ---------- */
:root {
  --blue: #1A0089;
  --cream: #EFE7DB;
  --orange: #FF5E33;
  --lime: #B7CF4F;
  --white: #FFFFFF;

  --line: 2px solid var(--blue);
  --shadow: 10px 10px 0 var(--blue);
  --shadow-sm: 4px 4px 0 var(--blue);

  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-head-en: "Oranienbaum", Georgia, "Times New Roman", serif;
  --font-head-ar: "Aref Ruqaa", "IBM Plex Sans Arabic", serif;

  --max: 1120px;
  --read: 720px;
}

/* ---------- Language switch: show only the current language ---------- */
html[lang="en"] [data-l="ar"],
html[lang="ar"] [data-l="en"] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--blue);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
html[lang="ar"] body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-inline-start: 1.3em; }
li + li { margin-top: .35em; }
strong { font-weight: 700; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 400; line-height: 1.15; text-wrap: balance; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-family: var(--font-head-en); }
/* Aref Ruqaa only for the big Arabic headings */
html[lang="ar"] h1, html[lang="ar"] h2 { font-family: var(--font-head-ar); font-weight: 700; line-height: 1.45; }
html[lang="ar"] h3 { font-family: var(--font-body); font-weight: 700; line-height: 1.5; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.2rem); }
h2 { font-size: clamp(1.75rem, 3.8vw, 2.5rem); }
h3 { font-size: 1.55rem; }
html[lang="ar"] h1 { font-size: clamp(2.1rem, 5.6vw, 3.7rem); }
html[lang="ar"] h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
html[lang="ar"] h3 { font-size: 1.25rem; }

a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--orange); }
a:hover { text-decoration-color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -100px; z-index: 10;
  background: var(--white); border: var(--line); padding: 8px 14px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: clamp(18px, 4vw, 36px); }
.wrap.read { max-width: calc(var(--read) + 2 * clamp(18px, 4vw, 36px)); }

/* ---------- Header ---------- */
.site-header { border-bottom: var(--line); background: var(--cream); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--blue); text-decoration: none; margin-inline-end: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; background: var(--orange); border: var(--line); box-shadow: 3px 3px 0 var(--blue); }
.brand-name { font-family: var(--font-head-en); font-size: 1.6rem; line-height: 1; }
html[lang="ar"] .brand-name { font-family: var(--font-head-ar); font-weight: 700; font-size: 1.5rem; line-height: 1.3; }
.nav { display: flex; gap: 6px 22px; align-items: center; }
.nav a { font-weight: 600; text-decoration: none; padding: 8px 2px; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--orange); }
.lang-btn {
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  min-height: 44px; padding: 8px 16px; cursor: pointer;
  color: var(--blue); background: var(--white); border: var(--line); border-radius: 0; box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.lang-btn:hover { background: var(--lime); }
.lang-btn:active { transform: translate(4px, 4px); box-shadow: none; }
@media (max-width: 560px) {
  .nav { order: 3; width: 100%; border-top: var(--line); padding-top: 6px; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 22px;
  font: inherit; font-weight: 700; line-height: 1.25; text-decoration: none; text-align: center;
  color: var(--blue); background: var(--orange); border: var(--line); border-radius: 0; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--blue); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn.white { background: var(--white); }
.btn.lime { background: var(--lime); }
.btn .sub { display: block; font-weight: 400; font-size: .85rem; }

/* Little arrow that points the right way in both languages */
.arrow::after { content: "\2192"; display: inline-block; margin-inline-start: .4em; }
html[lang="ar"] .arrow::after { content: "\2190"; }

/* ---------- Hero (home) ---------- */
.hero { padding-block: clamp(44px, 8vw, 96px) clamp(36px, 6vw, 72px); border-bottom: var(--line); }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.hero h1 { max-width: 16em; }
html[lang="ar"] .hero h1 { max-width: 13em; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 34em; }
.hero-art {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px;
  width: 100%; max-width: 330px; justify-self: center; padding: 0 10px 10px 0;
}
.hero-art span { aspect-ratio: 1; border: var(--line); box-shadow: var(--shadow); }
.hero-art span:nth-child(1) { background: var(--orange); }
.hero-art span:nth-child(2) { background: var(--white); }
.hero-art span:nth-child(3) { background: var(--lime); }
.hero-art span:nth-child(4) {
  border-style: dashed; box-shadow: none; position: relative;
}
.hero-art span:nth-child(4)::before,
.hero-art span:nth-child(4)::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--blue);
  width: 34%; height: 4px; transform: translate(-50%, -50%);
}
.hero-art span:nth-child(4)::after { width: 4px; height: 34%; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.5fr 1fr; } }
@media (max-width: 559px) { .hero-art { display: none; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(40px, 7vw, 80px); }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; border-bottom: var(--line); padding-bottom: 10px; margin-bottom: 34px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }

/* ---------- App cards ---------- */
.grid { display: grid; gap: 34px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--white); border: var(--line); box-shadow: var(--shadow); padding: 24px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card.is-link:hover { transform: translate(-3px, -3px); box-shadow: 13px 13px 0 var(--blue); }
.card.is-link:active { transform: translate(6px, 6px); box-shadow: 4px 4px 0 var(--blue); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-icon { width: 72px; height: 72px; border: var(--line); background: var(--white); }
.card h3 { margin: 4px 0 0; }
.card p { margin: 0; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--blue); outline-offset: 5px; }
.card .more { margin-top: auto; padding-top: 8px; font-weight: 700; }
.card .mini-links { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }
.tag {
  display: inline-block; padding: 0 10px; border: var(--line); background: var(--orange);
  font-size: .85rem; font-weight: 700; line-height: 1.9; white-space: nowrap;
}

.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { margin: 0; padding: 0 10px; border: var(--line); background: var(--lime); font-size: .85rem; font-weight: 700; line-height: 1.9; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .95rem; margin-bottom: 22px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-inline: 10px; }
.crumbs [aria-current="page"] { font-weight: 700; }

/* ---------- App page ---------- */
.app-hero { padding-block: clamp(32px, 6vw, 64px); border-bottom: var(--line); }
.app-hero-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 720px) { .app-hero-grid { grid-template-columns: auto 1fr; gap: 44px; } }
.app-icon-lg { width: 132px; height: 132px; border: var(--line); box-shadow: var(--shadow); background: var(--white); }
.app-hero h1 { margin-bottom: .25em; }
.facts { list-style: none; margin: 18px 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-weight: 600; }
.facts li { margin: 0; }
.facts li + li::before { content: "\00B7"; margin-inline: 12px; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); counter-reset: feat; }
.features li { margin: 0; counter-increment: feat; background: var(--white); border: var(--line); box-shadow: var(--shadow); padding: 22px; }
.features li::before {
  content: counter(feat, decimal-leading-zero);
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px;
  background: var(--lime); border: var(--line); font-weight: 700;
}
.features h3 { font-size: 1.4rem; margin-bottom: .3em; }
html[lang="ar"] .features h3 { font-size: 1.15rem; }
.features p { margin: 0; }

.shots { display: flex; gap: 26px; overflow-x: auto; padding: 4px 14px 22px 4px; scroll-snap-type: x mandatory; }
.shot {
  flex: 0 0 clamp(170px, 42vw, 230px); aspect-ratio: 9 / 19.5; scroll-snap-align: start;
  display: grid; place-items: center; text-align: center; padding: 16px;
  background: var(--white); border: 2px dashed var(--blue); font-weight: 600;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot.filled { border-style: solid; padding: 0; box-shadow: var(--shadow); }

.two-up { display: grid; gap: 34px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.prose { max-width: 42em; }

/* ---------- Privacy + text pages ---------- */
.page-head { padding-block: clamp(32px, 6vw, 64px) 28px; }
.updated { font-weight: 600; margin: 0; }
.summary {
  background: var(--lime); border: var(--line); box-shadow: var(--shadow);
  padding: 22px 24px; margin-bottom: 44px;
}
.summary h2 { font-size: 1.6rem; margin-bottom: .4em; }
html[lang="ar"] .summary h2 { font-size: 1.5rem; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-inline-start: 32px; }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em;
  width: 16px; height: 16px; background: var(--blue);
}
.policy section { padding-block: 10px 18px; border-top: var(--line); }
.policy h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: .6em; }
html[lang="ar"] .policy h2 { font-size: clamp(1.4rem, 2.8vw, 1.8rem); }
.service-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 16px; }
.service-list li { margin: 0; background: var(--white); border: var(--line); padding: 16px 18px; }
.service-list b { display: block; }
.note { background: var(--white); border: var(--line); border-inline-start-width: 10px; padding: 14px 18px; }

/* ---------- Support ---------- */
.contact-card { background: var(--white); border: var(--line); box-shadow: var(--shadow); padding: clamp(22px, 4vw, 34px); }
.email-big { font-size: clamp(1.15rem, 4.2vw, 1.6rem); font-weight: 700; word-break: break-all; }
.faq details { background: var(--white); border: var(--line); margin-bottom: 16px; }
.faq summary {
  cursor: pointer; list-style: none; padding-block: 16px; padding-inline: 18px 56px; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center; border: var(--line); background: var(--lime); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; background: var(--orange); }
.faq details[open] summary { border-bottom: var(--line); }
.faq .answer { padding: 16px 18px 4px; }

/* ---------- 404 ---------- */
.not-found { padding-block: clamp(60px, 12vw, 140px); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: var(--white); margin-top: clamp(40px, 7vw, 80px); padding-block: 40px 30px; }
.site-footer a { color: var(--white); text-decoration-color: var(--lime); }
.site-footer a:hover { text-decoration-color: var(--white); }
.site-footer :focus-visible { outline-color: var(--lime); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.footer-grid h2 { font-size: 1.3rem; margin-bottom: .5em; }
html[lang="ar"] .footer-grid h2 { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.also { display: inline-block; background: var(--lime); color: var(--blue); padding: 0 8px; font-weight: 700; margin-bottom: 6px; }
.footer-bottom { border-top: 2px solid var(--white); margin-top: 32px; padding-top: 18px; font-size: .95rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-bottom p { margin: 0; }

/* ---------- Small helpers ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.pt-0 { padding-top: 0; }

/* ---------- App idea card (home) ---------- */
.idea-card {
  display: grid; gap: 22px; align-items: center;
  background: var(--lime); border: var(--line); box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 40px);
}
.idea-card h2 { margin-bottom: .35em; }
.idea-card .btn { justify-self: start; }
@media (min-width: 820px) { .idea-card { grid-template-columns: 1fr auto; gap: 40px; } }
