/* Round 3 base (started from the live site's site/assets/base.css): brand kit 3 (brand-v3/kit.md §10, palette j) as
   tokens, the type, the language switch, the top row (mark + name + toggle), the WhatsApp button, the default example
   card, the five sections and the footer. Each page's page.css sets its own layout, ground and gesture on top. */
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("fonts/plex-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* palette j: cup ivory ground, cobalt body, tomato red the one accent, card sand, ink text. Red never directly on
     cobalt (an ivory chip between). WhatsApp green only on the button: #167C42 holds white text at 5.3:1
     (#25D366 is 2:1 with white). */
  --ivory: #F6F1E6; --cobalt: #1F49C9; --red: #CC2A22; --sand: #EBE2CE; --ink: #15151C; --paper: #FFFFFF;
  --slate: #5C5A66; --line: #DCD3C0; --wa: #167C42; --wa-text: #FFFFFF;
  /* roles: pages on cobalt or red swap these */
  --ground: var(--ivory); --text: var(--ink); --soft: var(--slate); --rule: var(--line); --accent: var(--red); --brand: var(--cobalt);
  --card: var(--sand); --card-text: var(--ink); --card-soft: var(--slate);
  --top: 56px; --pad: 20px; --col: 600px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 16px/1.55 "Plex Arabic", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
p, h1, h2, h3, ul, ol, dl, dd, table, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
i { font-style: normal; }
b { font-weight: 700; }
img { display: block; max-width: 100%; }
::selection { background: var(--cobalt); color: var(--ivory); }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

/* one language at a time; the sentence (.s-ar + .s-en/.s-fr) always shows both scripts */
html[data-l="ar"] .l-en, html[data-l="ar"] .l-fr,
html[data-l="en"] .l-ar, html[data-l="en"] .l-fr,
html[data-l="fr"] .l-ar, html[data-l="fr"] .l-en { display: none !important; }
[lang="ar"] { line-height: 1.75; letter-spacing: 0; }
bdi, .pr { unicode-bidi: isolate; direction: ltr; }
.ln { display: block; }

/* the brand pieces */
.tulip { display: block; width: 32px; height: 32px; flex: none; }
.icon { display: block; width: 40px; height: 40px; flex: none; }
.band { height: 40px; background: url("motif/band.svg") repeat-x left center / auto 100%; }
.mark { display: block; }
.photo { border-radius: 14px; object-fit: cover; background: var(--sand); }
.photo.round { border-radius: 50%; }

/* 1. the top row: mark + name (left), toggle (right); the lockup stays ≤ 28 px tall */
.top { position: relative; z-index: 5; }
.top-in { max-width: var(--col); margin: 0 auto; height: var(--top); padding: 0 calc(var(--pad) - 12px) 0 var(--pad); /* the toggle's last letter ends on the column edge */
  display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; }
.brand .mark { width: 28px; height: 28px; } /* the face-in-a-disc mark: 24 px is its minimum (kit §10) */
.brand .name { color: var(--brand); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; line-height: 1; }
.brand .name [lang="ar"] { line-height: 1; font-size: 20px; }
.toggle { display: flex; align-items: center; color: var(--soft); }
.toggle span { width: 1px; height: 14px; background: var(--rule); font-size: 0; } /* a rule, not text */
.toggle button { font: 500 14px/1 "Plex Arabic", sans-serif; color: var(--soft); background: none; border: 0;
  min-width: 40px; height: 44px; padding: 0 6px; cursor: pointer; }
.toggle button[lang="ar"] { font-size: 16px; }
.toggle button[aria-pressed="true"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 currentColor; }

/* screen 1 */
.hero { max-width: var(--col); margin: 0 auto; padding: 8px var(--pad) 16px; display: flex; flex-direction: column; gap: 14px; }

/* 2. the sentence: the largest text on the page; Arabic first, English (or French) under it at about 80% */
.sentence { font-weight: 600; color: var(--text); }
.sentence .s-ar { display: block; font-size: 24px; line-height: 1.4; text-align: right; }
.sentence .s-en, .sentence .s-fr { display: block; font-size: 19px; line-height: 1.3; letter-spacing: -0.02em; margin-top: 6px; text-align: left; }
html[data-l="fr"] .sentence .s-en, html:not([data-l="fr"]) .sentence .s-fr { display: none; }
html[data-l="en"] .sentence, html[data-l="fr"] .sentence { display: flex; flex-direction: column; }
html[data-l="en"] .sentence .s-en, html[data-l="fr"] .sentence .s-fr { order: -1; font-size: 24px; margin-top: 0; }
html[data-l="en"] .sentence .s-ar, html[data-l="fr"] .sentence .s-ar { font-size: 19px; margin-top: 6px; }

/* 3. the fit line */
.fit { font-size: 16px; color: var(--soft); line-height: 1.45; }
.fit [lang="ar"] { line-height: 1.6; }

/* 4. the example card (default shape; pages restyle it) */
.card { background: var(--card); color: var(--card-text); border-radius: 14px; padding: 12px 16px 10px; }
.card .tag { font-size: 14px; font-weight: 500; color: var(--card-soft); }
.card .row + .row { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.card .job { font-weight: 600; font-size: 16px; margin: 2px 0 4px; }
.card .prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card .prices b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.card .prices i { display: block; font-size: 14px; color: var(--card-soft); line-height: 1.35; }
.card .foot { font-size: 14px; color: var(--card-soft); margin-top: 8px; line-height: 1.4; }
html[dir="rtl"] .card .prices b { text-align: right; }

/* 5. the button with the free line under it. On a phone it sits under the example card on screen 1 and, once it has
   scrolled away, stays at thumb height at the bottom (.stuck, set by base.js). WhatsApp green only here. */
.bar { position: relative; z-index: 10; }
.bar.stuck { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ground);
  border-top: 1px solid var(--rule); padding: 10px var(--pad) calc(8px + env(safe-area-inset-bottom)); }
.bar.stuck { animation: bar-in .2s cubic-bezier(.22,.61,.36,1); }
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }
.bar-in { max-width: var(--col); margin: 0 auto; }
.wa { display: flex; align-items: center; justify-content: center; gap: 10px; height: 54px; border-radius: 12px;
  background: var(--wa); color: var(--wa-text); text-decoration: none; font-weight: 600; font-size: 18px; }
.wa .wa-glyph { width: 22px; height: 22px; flex: none; }
.wa:active { filter: brightness(.92); transform: translateY(1px); }
.wa:focus-visible { outline-color: var(--text); }
.free { text-align: center; font-size: 14px; line-height: 1.35; color: var(--soft); margin-top: 6px; }
.free [lang="ar"] { line-height: 1.6; }

/* below screen 1: five sections, each under one phone screen tall */
.below { max-width: var(--col); margin: 0 auto; padding: 28px var(--pad) 24px; display: grid; gap: 48px; }
.sec h2 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; line-height: 1.3; color: var(--text); }
.sec h3 { font-size: 19px; font-weight: 600; margin: 22px 0 8px; }
.sec p, .sec li { font-size: 16px; }
.sec .small { font-size: 14px; color: var(--soft); }
/* (a) steps, each marked by one tulip */
.steps { display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.steps .tulip { width: 36px; height: 36px; }
/* (b) who */
.who { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.who .photo { width: 120px; height: 120px; }
.who .lines .ln + .ln { margin-top: 6px; }
.who .co { font-size: 14px; color: var(--soft); }
/* (c) the four trades and the area */
.trades { display: grid; gap: 14px; }
.trades li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; }
.trades .tn { display: block; font-weight: 600; }
.trades .ts { display: block; font-size: 14px; color: var(--soft); }
.area { margin-top: 16px; font-weight: 500; }
/* (d) one price, line by line */
.lines { width: 100%; border-collapse: collapse; margin-top: 8px; }
.lines th, .lines td { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 16px; vertical-align: top; }
.lines th { font-weight: 400; text-align: start; }
.lines td { text-align: end; font-weight: 600; white-space: nowrap; padding-inline-start: 12px; }
.lines .total th, .lines .total td { font-weight: 700; border-bottom: 0; padding-top: 12px; }
.visit { margin-top: 8px; font-size: 14px; color: var(--soft); }
/* (e) how we earn and five questions */
.earn { font-weight: 500; }
.earn .ln + .ln { margin-top: 4px; }
.faq { display: grid; gap: 10px; }
.faq dt { font-weight: 600; }
.faq dd { color: var(--soft); }

/* the footer: the band, the Arabic name, the three languages */
.foot-band { margin-top: 24px; }
.foot-in { max-width: var(--col); margin: 0 auto; padding: 18px var(--pad) 28px; text-align: center; }
.foot-name { font-size: 23px; font-weight: 600; color: var(--brand); line-height: 1.4; }
.foot-langs { font-size: 14px; color: var(--soft); margin-top: 4px; direction: ltr; unicode-bidi: isolate; } /* reads عربي · English · Français in every language */
.foot-co { font-size: 14px; color: var(--soft); }
body.has-stuck .foot-in { padding-bottom: calc(var(--bar-h, 128px) + 32px); } /* room for the docked button (base.js measures it) */

@media (max-width: 380px) { .wa { font-size: 16px; } }
@media (min-width: 900px) {
  :root { --col: 1120px; --pad: 40px; }
  .sentence .s-ar { font-size: 38px; line-height: 1.4; }
  .sentence .s-en, .sentence .s-fr { font-size: 28px; }
  html[data-l="en"] .sentence .s-en, html[data-l="fr"] .sentence .s-fr { font-size: 38px; }
  html[data-l="en"] .sentence .s-ar, html[data-l="fr"] .sentence .s-ar { font-size: 28px; }
  .bar-in { max-width: 520px; }
  /* desktop: the bar stays fixed at the bottom */
  .bar-slot { display: contents; }
  .bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ground);
    border-top: 1px solid var(--rule); padding: 10px var(--pad) calc(8px + env(safe-area-inset-bottom)); }
  .bar.stuck { animation: none; }
  body { padding-bottom: 110px; }
  .below { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
  /* no movement; colour and opacity changes take 150 ms */
  *, *::before, *::after { animation-duration: 1ms !important; scroll-behavior: auto !important;
    transition: opacity .15s, color .15s, background-color .15s, border-color .15s, box-shadow .15s, fill .15s, stroke .15s !important; }
}
