/* ──────────────────────────────────────────────────────────────
   Maawa — Arabic (RTL) marketing pages
   Authored RTL-first rather than mirrored from the English design:
   logical properties throughout (inline-start/end, margin-inline),
   so nothing depends on a left/right flip.
   Palette and type scale taken from the English pages.
   ────────────────────────────────────────────────────────────── */

:root {
  --bg: #09090b;
  --surface: #161619;
  --surface-2: #0f0f12;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --ink: #fafafa;
  --muted: #9a9aa3;
  --muted-2: #6b6b74;
  --violet: #8b80e5;
  --teal: #46bbae;
  --pink: #ff005c;
  --radius: 14px;
  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Cairo', 'Inter', -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Arabic needs more leading than Latin at the same size */
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── header ─────────────────────────────────────────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-block-end: 1px solid var(--line-soft);
}
.bar .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-inline-end: auto;
}
.brand span { color: var(--violet); }
.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  flex-wrap: wrap;
}
.bar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  white-space: nowrap;
}
.bar nav a:hover { color: var(--ink); }
.bar nav a[hreflang] {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: var(--ink);
}

/* ── type ───────────────────────────────────────────────── */
h1, h2, h3 {
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  font-weight: 800;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1rem; color: var(--muted); max-width: 62ch; }
.lead { font-size: clamp(1.02rem, 2vw, 1.22rem); color: #c8c8cf; }

.eyebrow {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--violet);
  margin: 0 0 0.9rem;
  display: block;
}

section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section + section { border-block-start: 1px solid var(--line-soft); }

/* ── buttons ────────────────────────────────────────────── */
.btns { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-block-start: 1.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.97rem;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(255, 0, 92, 0.42); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ── cards ──────────────────────────────────────────────── */
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.15rem, 3vw, 1.7rem);
}
.card p { margin-block-end: 0; }
.card.link { text-decoration: none; display: block; color: inherit; }
.card.link:hover { border-color: var(--violet); }

.stat { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 1rem 1.1rem; }
.stat b { display: block; font-size: 1.45rem; font-weight: 800; color: var(--ink); line-height: 1.25; }
.stat span { font-size: 0.87rem; color: var(--muted-2); }

/* numbered steps — the marker sits on the inline-start edge, which
   is the right-hand side in RTL without any special-casing */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 0.9rem; }
ol.steps li { counter-increment: s; position: relative; padding-inline-start: 3rem; }
ol.steps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.15rem;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(139, 128, 229, 0.14);
  color: var(--violet);
  font-weight: 800; font-size: 0.95rem;
  font-family: ui-monospace, monospace;
}
ol.steps b { display: block; color: var(--ink); font-weight: 700; }

/* ── FAQ — visible on the page, which is what the FAQPage
   schema on each page describes ─────────────────────────── */
.faq { display: grid; gap: 0.6rem; max-width: 820px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
}
.faq details[open] { border-color: var(--violet); }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  margin-inline-start: auto;
  color: var(--violet);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 0.7rem 0 0; }

/* ── footer ─────────────────────────────────────────────── */
footer { border-block-start: 1px solid var(--line-soft); padding-block: 2.6rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .sp { margin-inline-start: auto; color: var(--muted-2); font-size: 0.87rem; }

/* Latin runs (emails, phone numbers, URLs, "Maawa OS") must stay LTR
   inside RTL text or the punctuation lands on the wrong end. */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

a:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}
