/* d11 · The real chat, revision 2 (the owner's notes of 25 Nov 2026).
   Screen 1: the lockup, the sentence (Arabic first), the fit line, a real WhatsApp thread (Arabic on the Arabic page,
   Arabizi on the English and French pages) with two real photos the owner shares, then the button and the free line.
   The tulip print is no longer a divider: it is the page's ground, faint, moving slower than the content (page.js);
   every line of text sits on a plain ivory or sand panel, never on the print. On desktop the words sit on an ivory slab
   and the chat is a phone on the printed ground, pinned while its thread plays; the sections follow in two columns. */
:root {
  --own: #DCF5D2;              /* the owner's bubble: a pale WhatsApp-green tint (the button keeps the full green) */
  --wall: var(--sand);         /* the chat wall */
  --bub: var(--ivory);         /* the helper's bubble */
  --bub-shadow: 0 1px 1.5px rgba(21, 21, 28, .14);
  --tile: 168px;               /* one repeat of the print */
  --print-a: .075;             /* the print's strength on the ground: faint on phones */
}

/* ---------- the ground: ivory, the print over it at low strength; page.js moves it slower than the page ---------- */
html, body { background: var(--ivory); }
body { background: transparent; }
.ground, .drift { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ground .print { position: absolute; left: 0; right: 0; top: 0; height: calc(100% + var(--tile));
  background: url("/shared/motif/tile-clear.svg") 0 0 / var(--tile) var(--tile) repeat; opacity: var(--print-a); will-change: transform; }
.drift { display: none; }      /* desktop only: a second, nearer layer of single tulips */
main, .foot { position: relative; z-index: 1; }

/* ---------- screen 1 (phone): one plain ivory screen, as before; the chat fills what the words leave ---------- */
.screen { position: relative; display: flex; flex-direction: column; height: 100svh; background: var(--ivory); }
.screen .top { flex: none; }
.slab, .status { display: none; }
.hero { flex: 1 1 auto; min-height: 0; width: 100%; gap: 10px; padding-top: 0; padding-bottom: 10px; }
.fit { display: flex; flex-wrap: wrap; column-gap: .3em; }   /* each phrase whole: one line, or one phrase per line, both on the column edge */
.fit { font-size: 15px; line-height: 1.45; }
.fit [lang="ar"] { line-height: 1.6; }
.free .ln { display: inline; }
.free .ln + .ln::before { content: " "; }
.free { margin-top: 5px; }
.sentence .s-en .ln, .sentence .s-fr .ln { text-wrap: balance; }
/* phones, English or French first: the first script a size smaller (still the largest text) so the thread keeps its
   first bubble on screen 1 */
@media (max-width: 899px) {
  html[data-l="en"] .sentence .s-en, html[data-l="fr"] .sentence .s-fr { font-size: 21px; line-height: 1.28; }
  html[data-l="en"] .sentence .s-ar, html[data-l="fr"] .sentence .s-ar { font-size: 18px; margin-top: 4px; }
}

.chat { position: relative; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; margin-inline: -10px; border-radius: 18px;
  overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--wall); }
.chat-head { flex: none; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px; background: var(--cobalt); color: var(--ivory); }
.chat-head .photo { width: 34px; height: 34px; flex: none; box-shadow: 0 0 0 2px var(--ivory); background: var(--ivory); }
.who-is { display: flex; flex-direction: column; min-width: 0; }
.who-is .cn { font-size: 16px; font-weight: 600; line-height: 1.2; }
.who-is .cs { font-size: 14px; line-height: 1.25; }
.chat-head [lang="ar"] { line-height: 1.3; }

/* the wall is a window onto the thread: page.js keeps the newest bubble at its bottom edge, like WhatsApp. Its
   wallpaper is the print, faint, as WhatsApp's own wall carries a doodle print; the bubbles are opaque over it. */
.chat-body { flex: 1 1 0; min-height: 0; position: relative; overflow: hidden; }
.chat-body::before { content: ""; position: absolute; inset: 0; background: url("/shared/motif/tile-clear.svg") 0 0 / 120px 120px repeat; opacity: .06; }
.stack { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; padding: 8px 10px; }

/* ---------- bubbles (also in .chat-more, the reduced-motion end of the thread) ---------- */
.m { position: relative; max-width: 88%; padding: 5px 9px 6px; border-radius: 10px; background: var(--bub); color: var(--ink);
  font-size: 15px; line-height: 1.42; box-shadow: var(--bub-shadow); margin-top: 3px; }
.m [lang="ar"] { line-height: 1.6; }
.m.in { margin-right: auto; }                                   /* the helper: always on the left */
.m.out { margin-left: auto; background: var(--own); }          /* the owner: always on the right */
.m.tail { margin-top: 9px; }
.stack > .m:first-child { margin-top: 0; }
.m.in.tail { border-top-left-radius: 0; }
.m.out.tail { border-top-right-radius: 0; }
.m.tail::before { content: ""; position: absolute; top: 0; width: 8px; height: 11px; background: inherit; }
.m.in.tail::before { left: -7px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.m.out.tail::before { right: -7px; clip-path: polygon(0 0, 100% 0, 0 100%); }
/* the time (and the owner's read ticks) sit at the end of the last line, WhatsApp-style: a spacer keeps room for them */
.m .tx::after { content: ""; display: inline-block; width: 42px; height: 1px; }
.m.out .tx::after { width: 60px; }
.meta { position: absolute; bottom: 3px; right: 8px; display: flex; align-items: center; gap: 3px;
  font-size: 14px; line-height: 1.2; color: var(--slate); direction: ltr; }
.meta time { font-variant-numeric: tabular-nums; }
html[dir="rtl"] .meta { right: auto; left: 8px; } /* the end of an Arabic line is its left (physical: .meta itself runs ltr) */
.ticks { display: block; width: 17px; height: 11px; color: var(--cobalt); }
.m.short { min-width: 92px; }
/* Arabizi lines: Latin letters with numerals inside words (3, 7, 2); keep them from breaking mid-word */
.m [lang="apc-Latn"] { hyphens: none; overflow-wrap: normal; }

/* photo bubbles: the owner's two real photos, WhatsApp-style (rounded inside the bubble, the caption under, the time) */
.m.ph { width: min(78%, 280px); padding: 3px 3px 6px; }
.m.ph + .m.ph { margin-top: 3px; }
.pic { position: relative; margin: 0; border-radius: 8px; overflow: hidden; background: var(--line); height: var(--h, auto); }
.pic.wood { aspect-ratio: 780 / 426; }
.pic.robe { aspect-ratio: 780 / 585; }
.chat.fitted .pic { aspect-ratio: auto; }
/* the photo overscans its frame by 14 px top and bottom so page.js can move it inside (depth as the thread moves) */
.pic img { position: absolute; left: 0; top: -14px; width: 100%; height: calc(100% + 28px); max-width: none; object-fit: cover; }
.pic.wood img { object-position: 54% 62%; }
.pic.robe img { object-position: 50% 38%; }
.m.ph .tx { padding: 4px 6px 0; }

/* .tight (page.js, only when the four bubbles would not fit): the chat's type a step smaller, still 14 px */
.chat.tight .m { font-size: 14px; line-height: 1.36; padding: 4px 8px 5px; }
.chat.tight .m [lang="ar"] { line-height: 1.5; }
.chat.tight .m.ph { padding: 3px 3px 5px; }
.chat.tight .m.tail { margin-top: 6px; }
.chat.tight .chat-head { height: 44px; }

/* the date divider */
.day { align-self: center; margin: 12px 0 3px; padding: 1px 12px 2px; border-radius: 8px; background: var(--ivory); color: var(--slate);
  font-size: 14px; font-weight: 500; line-height: 1.5; box-shadow: var(--bub-shadow); }
.day [lang="ar"] { line-height: 1.6; }

/* the three prices inside one bubble, side by side; on scroll they land one by one (page.js) */
.m.offers { max-width: 96%; padding-bottom: 24px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.three li { display: flex; flex-direction: column; background: var(--paper); border-radius: 8px; padding: 5px 5px 6px; box-shadow: inset 0 0 0 1px var(--line); line-height: 1.3; }
.three li > * { display: block; }
.three .mh { font-size: 14px; font-weight: 600; color: var(--cobalt); }
.three .ar, .three i { font-size: 14px; color: var(--ink); }
.three b { font-size: 16px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; margin: 1px 0; }
.three q { font-size: 14px; color: var(--slate); quotes: none; margin-top: 2px; }
.three [lang="ar"] { line-height: 1.45; }
html[dir="rtl"] .three b { text-align: right; }
.m.offers .tx::after { display: none; }

/* short phones (390×700): the same screen, a little tighter, so the first bubble stays on it */
@media (max-height: 760px) and (max-width: 899px) {
  :root { --top: 50px; }
  .hero { gap: 7px; padding-bottom: 8px; }
  .sentence .s-ar { font-size: 23px; line-height: 1.35; }
  .sentence .s-en, .sentence .s-fr { margin-top: 2px; font-size: 18px; }
  html[data-l="en"] .sentence .s-en, html[data-l="fr"] .sentence .s-fr { font-size: 21px; }
  html[data-l="en"] .sentence .s-ar, html[data-l="fr"] .sentence .s-ar { font-size: 18px; }
  .chat-head { height: 44px; }
  .chat-head .photo { width: 30px; height: 30px; }
  .stack { padding: 6px 10px; }
  .m { padding: 4px 9px 5px; }
  .m.tail { margin-top: 7px; }
  .m.ph .tx { padding-top: 2px; }
  .wa { height: 50px; }
  .free { margin-top: 3px; }
}

/* reduced motion (or no GSAP): the rest of the thread follows the button, as one more stretch of the same chat */
.chat-more { position: relative; max-width: var(--col); margin: 0 auto; padding: 4px var(--pad) 0; background: var(--ivory); }
.chat-more .stack { position: static; background: var(--wall); border-radius: 18px; margin-inline: -10px; padding: 10px 10px 12px; box-shadow: 0 0 0 1px var(--line); }

/* ---------- below: the live page's order, each section a plain panel on the printed ground ---------- */
.below { gap: 14px; padding: 18px 12px 28px; }
.panel { border-radius: 22px; padding: 22px 18px 24px; }
.panel.ivory { background: var(--ivory); box-shadow: 0 0 0 1px var(--line); }
.panel.sand { background: var(--sand); }
.sec h2 { color: var(--cobalt); }
/* who answers you */
.who .nm { font-size: 20px; font-weight: 600; color: var(--cobalt); line-height: 1.3; margin-bottom: 4px; }
.who .nm [lang="ar"] { line-height: 1.5; }
.who .photo { background: var(--ivory); }
.ph-frame { display: block; }
/* how it works, how we earn */
/* how we earn: the same panel, under a rule (fix round 1: no card inside the card) */
.earn { margin-top: 20px; padding: 18px 0 0; border-top: 1px solid var(--line); font-weight: 500; }
.earn .ln:first-child { font-size: 19px; font-weight: 700; color: var(--cobalt); }
/* one price, line by line: the maker's written price on paper */
#price .lines { background: var(--paper); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
#price .lines th, #price .lines td { padding-inline: 16px; }
#price .lines td { padding-inline-start: 8px; }
#price .lines .total td { color: var(--cobalt); }
/* family abroad: one line, said big */
#family h2.fam { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; font-size: 22px; line-height: 1.35; text-align: start; }
#family { padding-block: 20px; }
#family .tulip { width: 44px; height: 44px; }
/* trades and the area */
.trades { gap: 0; }
.trades li { padding: 12px 0; }
.trades li + li { border-top: 1px solid var(--line); }
.area { color: var(--ink); }
.area .ln + .ln { margin-top: 2px; color: var(--soft); font-weight: 400; }
/* five questions */
.faq { gap: 14px; }
.faq dd { margin: 2px 0 0; }

/* the footer: ivory, the band (the print's only stripe now) on top */
.foot { background: var(--ivory); }
.foot-band { margin: 0 auto; height: 40px; }

/* ---------- desktop: a scroll scene. The words on an ivory slab, the chat a phone on the printed ground ---------- */
@media (min-width: 900px) {
  :root { --col: 1200px; --print-a: .11; --tile: 220px; }
  .drift { display: block; }
  /* the nearer layer: big, soft and faint, so it reads as depth in front of the tile, never as a second print */
  .drift i { position: absolute; top: 0; display: block; width: var(--s, 220px); height: var(--s, 220px); opacity: var(--o, .07);
    background: url("/shared/motif/single-cobalt.svg") center / contain no-repeat; filter: blur(2px); will-change: transform; }
  .drift i:nth-child(3n) { background-image: url("/shared/motif/single-red.svg"); }

  .screen { height: 100vh; background: none; }
  .slab { display: block; position: absolute; top: 0; bottom: 0; left: 0; width: min(50% + 72px, 100% - 528px); background: var(--ivory);
    box-shadow: 1px 0 0 var(--line); }
  .screen .top { position: relative; z-index: 2; }
  .top-in { max-width: var(--col); padding: 0 var(--pad); }
  /* the toggle sits over the print: give it its own ivory ground */
  .toggle { background: var(--ivory); border-radius: 999px; padding: 0 8px; box-shadow: 0 0 0 1px var(--line); }
  .toggle button { height: 40px; }

  .hero { position: relative; z-index: 1; max-width: var(--col); display: grid; grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-rows: 1fr auto auto auto 1.15fr; column-gap: 96px; row-gap: 22px; padding: 0 var(--pad) 28px; }
  .hero > .sentence { grid-column: 1; grid-row: 2; }
  .hero > .fit { grid-column: 1; grid-row: 3; font-size: 18px; max-width: 34em; }
  .hero > .bar-slot { grid-column: 1; grid-row: 4; }
  .sentence .s-ar { font-size: 44px; }
  html[data-l="en"] .sentence .s-en, html[data-l="fr"] .sentence .s-fr { font-size: 46px; line-height: 1.16; letter-spacing: -0.025em; }

  /* the phone: an ink bezel, the status bar in WhatsApp's header colour, a soft shadow on the printed ground */
  .hero > .chat { grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: center; width: 404px;
    height: min(100%, 780px); margin: 0; border: 11px solid var(--ink); border-radius: 50px;
    box-shadow: 0 0 0 1.5px rgba(21, 21, 28, .6), 0 34px 70px -18px rgba(21, 21, 28, .42), 0 12px 24px -10px rgba(21, 21, 28, .22); }
  .status { display: flex; flex: none; align-items: center; justify-content: space-between; height: 36px; padding: 4px 26px 0;
    background: var(--cobalt); color: var(--ivory); position: relative; }
  .status .clock { font-size: 14px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; }
  .status .island { position: absolute; left: 50%; top: 7px; width: 92px; height: 24px; margin-left: -46px; border-radius: 999px; background: var(--ink); }
  .status .sig { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
  .status .sig i { display: block; width: 3px; border-radius: 1px; background: currentColor; }
  .status .sig i:nth-child(1) { height: 4px; } .status .sig i:nth-child(2) { height: 6px; }
  .status .sig i:nth-child(3) { height: 8px; } .status .sig i:nth-child(4) { height: 11px; }
  .chat-head { height: 56px; }
  .chat-head .photo { width: 38px; height: 38px; }
  .m { font-size: 16px; }
  .m.ph { width: min(80%, 292px); box-shadow: 0 10px 22px -12px rgba(21, 21, 28, .35), var(--bub-shadow); }
  /* the photos overscan their frames by 44 px so the depth pan (page.js) can show */
  .pic img { top: -44px; height: calc(100% + 88px); }
  .pic.robe img { object-position: 80% 40%; } /* keep the window and the bed in the taller crop (re-review) */
  .stack { padding: 10px 12px; }

  .bar-in { max-width: 460px; margin: 0; }
  /* the button stays in flow beside the chat; page.js docks it once it has scrolled away */
  body { padding-bottom: 0; }
  .bar-slot { display: block; min-height: var(--bh, 0px); }
  .bar { position: relative; left: auto; right: auto; bottom: auto; background: none; border-top: 0; padding: 0; }
  .free { text-align: start; }
  body.dk .bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ivory); border-top: 1px solid var(--rule);
    padding: 10px var(--pad) calc(8px + env(safe-area-inset-bottom)); animation: bar-in .2s cubic-bezier(.22,.61,.36,1); }
  body.dk .bar-in { margin: 0 auto; }
  body.dk .free { text-align: center; }
  body.dk .foot-in { padding-bottom: 130px; }
  .chat-more { max-width: 540px; background: none; }
  .chat-more .stack { margin: 0; }

  /* the sections: two columns on a 12-column grid, panels on the printed ground */
  .below { max-width: var(--col); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px;
    padding: 140px var(--pad) 120px; align-items: start; }
  .panel { border-radius: 30px; padding: 44px 48px 48px; }
  .sec h2 { font-size: 34px; line-height: 1.2; margin-bottom: 22px; letter-spacing: -0.025em; }
  .sec h2 [lang="ar"] { line-height: 1.45; }
  .sec p, .sec li { font-size: 18px; }
  .sec .small, .visit { font-size: 15px; }

  /* who answers you: the helper's photo large, his words beside him */
  #who { grid-column: 1 / -1; display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: 1fr auto 1.4fr;
    column-gap: 64px; padding: 28px; }
  #who h2 { grid-column: 2; grid-row: 2; font-size: 44px; margin-bottom: 18px; }
  #who .who { display: contents; }
  #who .ph-frame { grid-column: 1; grid-row: 1 / -1; position: relative; width: 400px; height: 440px; border-radius: 22px; overflow: hidden; background: var(--ivory); }
  #who .ph-frame .photo { position: absolute; left: 0; top: -30px; width: 100%; height: calc(100% + 60px); max-width: none; border-radius: 0; object-fit: cover; object-position: 50% 30%; }
  #who .lines { grid-column: 2; grid-row: 3; align-self: start; max-width: 30em; }
  #who .lines .ln { font-size: 22px; line-height: 1.45; }
  #who .nm { font-size: 26px; }
  #who .lines .co { font-size: 16px; margin-top: 14px; }

  /* how + earn on the left, the price on the right (it drifts at its own pace: page.js) */
  #how { grid-column: 1 / span 7; }
  #price { grid-column: 8 / -1; margin-top: 72px; }
  .steps { gap: 22px; }
  .steps li { grid-template-columns: 48px 1fr; gap: 16px; }
  .steps .tulip { width: 44px; height: 44px; }
  .earn { margin-top: 30px; padding: 24px 0 0; }
  .earn .ln:first-child { font-size: 24px; }
  #price .lines th, #price .lines td { font-size: 17px; padding-block: 12px; }

  /* family: one line, said big */
  #family { grid-column: 1 / -1; padding: 56px 48px; }
  #family h2.fam { font-size: 40px; gap: 26px; }
  #family .tulip { width: 76px; height: 76px; }

  /* the four trades as four tiles, side by side */
  #trades { grid-column: 1 / -1; }
  /* fix round 1: four equal columns split by hairlines, not four cards inside the panel */
  #trades .trades { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  #trades .trades li { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-height: 0; padding: 6px 28px 0; border: 0; background: none; border-radius: 0; }
  #trades .trades li:first-child { padding-inline-start: 0; }
  #trades .trades li + li { box-shadow: inset 1px 0 0 var(--line); }
  [dir="rtl"] #trades .trades li + li { box-shadow: inset -1px 0 0 var(--line); }
  #trades .icon { width: 88px; height: 88px; }
  #trades .tn { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
  #trades .ts { font-size: 16px; line-height: 1.45; }
  #trades .area { margin-top: 26px; font-size: 18px; }

  /* five questions: the heading on its own column, the answers in two */
  #faq { grid-column: 1 / -1; display: grid; grid-template-columns: 4fr 8fr; column-gap: 48px; }
  #faq h2 { margin: 0; }
  #faq .faq { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .faq dd { font-size: 17px; }

  .foot-band { height: 48px; }
}
