/* ==========================================================================
   Nfaker (نفكّر) — shared styles
   Light theme, warm paper background, Arabic-first RTL.
   No libraries, no JavaScript, light-only (no dark-mode variants).
   ========================================================================== */

:root {
  /* Warm paper rather than pure white, so large areas of background read soft
     next to near-black type instead of glaring. */
  --bg: #f7f5f1;
  --card: #ffffff;
  --border: #e6e1d8;
  --border-strong: #111111;

  --text: #111111;
  --text-body: #4a4640;
  --text-muted: #6b665e;
  --text-dim: #928c83;

  /* Accent is black. No gold, no colour — hierarchy comes from weight and size. */
  --ink: #111111;
  --ink-soft: #2a2a2a;

  --radius-card: 24px;
  --radius-btn: 999px;
  --max-width: 1000px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: "Tajawal", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- header ---------- */

.site-header {
  padding-block: 30px 10px;
}

/* RTL: the logo sits at the top-RIGHT, which is the inline start here. */
.brand {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
}

.brand-name {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Tiny Latin lockup under the Arabic wordmark. Wide tracking keeps it reading
   as a mark rather than as body copy at this size. */
.brand-sub {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  direction: ltr;
  text-align: right;
}

/* ---------- pill label ---------- */

.pill {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.7;
}

/* ---------- hero ---------- */

.hero {
  padding-block: 72px 64px;
  text-align: center;
}

.hero .pill {
  margin-bottom: 26px;
}

.hero h1 {
  margin: 0;
  max-width: 15em;
  margin-inline: auto;
  color: var(--text);
  font-size: clamp(2.3rem, 6.4vw, 4rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero .lead {
  margin: 24px auto 0;
  max-width: 33em;
  color: var(--text-body);
  font-size: clamp(1.02rem, 2.1vw, 1.16rem);
  font-weight: 400;
  line-height: 2;
  text-wrap: pretty;
}

/* ---------- store buttons ---------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  /* Disabled on purpose until the apps ship — the tag says so in Arabic. */
  cursor: not-allowed;
  opacity: 0.55;
}

.store-btn .soon {
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-btn);
  font-size: 0.72rem;
  font-weight: 500;
}

/* ---------- sections ---------- */

.section {
  padding-block: 40px 64px;
}

.section-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(1.6rem, 3.8vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.4;
  text-align: center;
}

.section-sub {
  margin: 0 auto 44px;
  max-width: 34em;
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
  text-wrap: pretty;
}

/* ---------- the cycle ---------- */

.cycle {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  /* Very soft lift, not a drop shadow — the border carries the edge. */
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.03), 0 8px 24px rgba(17, 17, 17, 0.035);
}

.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.step p {
  margin: 0;
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.95;
  text-wrap: pretty;
}

/* ---------- note ---------- */

.note {
  margin-top: 36px;
  padding: 26px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  color: var(--text-body);
  font-size: 0.98rem;
  text-align: center;
  text-wrap: pretty;
}

.note strong {
  color: var(--text);
  font-weight: 800;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 24px;
  padding-block: 34px 48px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.footer-mail {
  color: var(--text-muted);
  font-size: 0.93rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.footer-links a:hover,
.footer-mail:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.copyright {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.87rem;
}

/* ---------- legal documents (privacy / terms) ---------- */

/* Narrower than .wrap: long-form prose wants a shorter measure than the
   three-column grid on the landing page. */
.legal-wrap {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 24px;
}

.legal {
  padding-block: 56px 8px;
}

.legal h1 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: clamp(1.9rem, 4.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.legal .updated {
  margin: 0 0 28px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.legal .intro {
  margin: 0 0 8px;
  color: var(--text-body);
  font-size: 1.05rem;
  line-height: 2;
  text-wrap: pretty;
}

.legal h2 {
  margin: 40px 0 12px;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.6;
}

.legal p {
  margin: 0 0 14px;
  color: var(--text-body);
  line-height: 2;
  text-wrap: pretty;
}

.legal ul {
  margin: 0 0 14px;
  padding-inline-start: 1.35em;
  color: var(--text-body);
}

.legal li {
  margin-bottom: 10px;
  line-height: 2;
  text-wrap: pretty;
}

.legal a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}

.legal a:hover {
  background: var(--ink);
  color: #ffffff;
}

/* Divider between the Arabic and English halves of the same document. */
.legal-divider {
  max-width: 720px;
  margin: 56px auto;
  border: 0;
  border-top: 1px solid var(--border);
}

/* The English half only. Flipping direction here — not on <html> — keeps the
   Arabic above it untouched and the shared header/footer still RTL. */
.legal-en {
  direction: ltr;
  text-align: left;
}

.legal-en ul {
  padding-inline-start: 1.25em;
}

.legal-footer-nav {
  padding-block: 8px 8px;
  text-align: center;
}

/* ---------- skeleton pages (privacy / terms) ---------- */

.page {
  padding-block: 88px 64px;
  text-align: center;
}

.page h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(2rem, 5.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page .lead {
  margin: 0 auto;
  max-width: 31em;
  color: var(--text-body);
  text-wrap: pretty;
}

.back-link {
  display: inline-block;
  margin-top: 36px;
  padding: 12px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  background: var(--ink);
  color: #ffffff;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .cycle {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 48px 44px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}
