/* محمد تسويق: page CSS on top of the kit (system.css, motion.css, layout.css).
   Few words and plenty of air: a big headline, one line, one button, the mark as the picture; the slogan alone
   on the dark band; the questions; a one-row footer. Only what the kit lacks: the client's fonts, the Arabic
   and right-to-left fixes, the mark, and the questions (chips, progress, thanks). */

/* ---------------------------------------------------------------- Arabic type */
/* Kufi letters reach high and low: more leading than a Latin face, no tracking (it breaks the joins) */
html[lang="ar"] body { line-height: 1.8; }
html[lang="ar"] :is(h1, h2, h3, h4, .t-lead, .nav__logo, .btn, .mo-wh__text) { letter-spacing: 0; hyphens: none; }
html[lang="ar"] h2 { line-height: 1.4; }
html[lang="ar"] h3 { line-height: 1.5; }
html[lang="ar"] .nav__logo { font-weight: 800; font-size: 20px; }
.mt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- right to left */
/* the kit is written left to right: its drawn arrows, the text-link arrow and a few margins turn round */
/* the drawn arrow points to the reading direction (its paths are drawn leftward in the markup):
   its stem grows from the right and its head moves 3px left */
html[dir="rtl"] .m-arrow { margin-right: 0; margin-left: -2px; }
html[dir="rtl"] .m-arrow__stem { transform-origin: calc(100% - 1px) 50%; }
html[dir="rtl"] :is(a, button):focus-visible > .m-arrow .m-arrow__head { transform: translateX(-3px); }
@media (hover: hover) and (pointer: fine) { html[dir="rtl"] :is(a, button):hover > .m-arrow .m-arrow__head { transform: translateX(-3px); } }
html[dir="rtl"] :is(.btn--arrow, .link):focus-visible::after { transform: translateX(-3px); }
html[dir="rtl"] .link::after { content: "\2190"; }
@media (hover: hover) and (pointer: fine) { html[dir="rtl"] .link:hover::after { transform: translateX(-3px); } }
/* a link's underline draws from the right, as the words run, and leaves to the left (motion.css draws it left to right) */
html[dir="rtl"]:not([data-motion="off"]) :is(.m-link, p a:not([class])) { background-position: left 0 bottom 0, 100% 100%; }
html[dir="rtl"]:not([data-motion="off"]) :is(.m-link, p a:not([class])):is(:hover, :focus-visible) { background-position: right 0 bottom 0, 100% 100%; }
html[dir="rtl"]:not([data-motion="off"]) .link, html[dir="rtl"]:not([data-motion="off"]) .link:is(:hover, :focus-visible) { background-position: 100% 100%, 100% 100%; }
html[dir="rtl"] .field__error::before { margin-right: 0; margin-left: var(--s-2); }
/* the bar holds the logo and one button: the button on the far (left) line at every width */
html[dir="rtl"] .nav .nav__actions { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .nav__logo .mt-mark { margin: 0; }

/* ---------------------------------------------------------------- the logo: the client's mark beside the name */
.mt-mark { flex: none; width: 1.5em; height: 1em; display: block; }
.mt-mark .mt-mark__ring { fill: var(--ink); }
.mt-mark .mt-mark__bar { fill: var(--p-accent); }

/* ---------------------------------------------------------------- the hero: one promise, one button */
html[lang="ar"] .hero h1 { font-size: clamp(38px, 3vw + 24px, 68px); line-height: 1.3; text-wrap: balance; max-width: none; }   /* two lines: «أكلك وين محلك» / «يخسر زباين.» */
.hero .hero__kicker { margin-bottom: var(--s-5); }
.hero .btn-row { margin-top: var(--s-7); }
.hero__text { align-self: center; }
/* the terms under the button: small, the dots between them in the logo's red */
html[lang="ar"] .hero .mt-terms { margin-top: var(--s-4); font-size: var(--t-small); line-height: 1.6; color: var(--muted); }
.mt-terms span { color: var(--p-accent); padding: 0 .3em; font-weight: 800; }
/* the kicker's dot is live: a soft red wave every 2.4 s */
@media screen and (prefers-reduced-motion: no-preference) {
  /* the kicker dot stays still: one thing moves on the first screen, and it is the button's arrow */
}
@keyframes mt-live { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--p-accent) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px color-mix(in oklab, var(--p-accent) 0%, transparent); } }

/* the main button: larger, ink, with the logo's red link along its foot (as a chosen answer has it); the link
   thickens on hover and focus, and the arrow, drawn whole, nudges toward the reading direction now and then */
.btn--cta { min-height: 60px; padding-inline: var(--s-6); font-size: 18px; font-weight: 700; box-shadow: inset 0 -5px 0 var(--p-accent); }
.btn--cta:is(:hover, :focus-visible) { box-shadow: inset 0 -9px 0 var(--p-accent); }
/* on the dark ground a white button dims only a little on hover (the kit's greyer tone read as switched off) */
html:not([data-motion="off"]) .btn--primary:hover { background: color-mix(in oklab, var(--action) 93%, var(--bg)); }
.btn--cta .m-arrow { width: 14px; height: 14px; }
.btn--cta .m-arrow__stem { opacity: 1; transform: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .btn--cta .m-arrow { animation: mt-nudge 3.2s cubic-bezier(.65, 0, .35, 1) 2.6s infinite; }
}
@keyframes mt-nudge { 0%, 72%, 100% { transform: none; } 82% { transform: translateX(-6px); } 92% { transform: none; } }

/* «كلّي وين», the hero's one button: unmistakably a button. A red pill (the logo's link) with a white disc at its end
   holding the arrow (the ring on the link's end), raised like a key: a light top edge, a shaded foot, a plain shadow.
   Calm at rest: only the arrow nudges toward the reading, once every 4.5 s. Pressed it squeezes in and deepens; let
   go it thumps and sends out a small wave while site.js glides the page to the questions. Its own --action keeps the kit's hover and press formulas
   red instead of white. The individual scale property carries the beat, so the kit's step (transform) still works */
.hero .btn.mt-go {
  --action: var(--p-accent); --action-ink: #fff;
  position: relative; justify-content: space-between; gap: var(--s-4);
  height: auto; min-height: 64px; min-width: 220px; padding-block: 9px; padding-inline: 30px 9px; border-radius: 999px;
  font-size: 19px; font-weight: 700; line-height: 1.2; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), inset 0 -3px 0 rgb(0 0 0 / .22), 0 8px 18px -10px rgb(0 0 0 / .55);
}
html:not([data-motion="off"]) .hero .btn.mt-go:hover, .hero .btn.mt-go:focus-visible {
  background: color-mix(in oklab, var(--p-accent) 88%, #fff);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -3px 0 rgb(0 0 0 / .22), 0 10px 22px -10px rgb(0 0 0 / .6);
}
.hero .btn.mt-go:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
html:not([data-motion="off"]) .hero .btn.mt-go:is(:active, .is-pressed), .hero .btn.mt-go:is(:active, .is-pressed) {
  background: color-mix(in oklab, var(--p-accent) 84%, #000);
  box-shadow: inset 0 2px 6px rgb(0 0 0 / .28), 0 4px 10px -8px rgb(0 0 0 / .5);
}
.mt-go__knob { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--p-accent); }
.hero .mt-go .mt-go__knob .m-arrow { width: 18px; height: 18px; margin: 0; stroke-width: 2; }
.mt-go__ring { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .hero .btn.mt-go {
    transition: background-color 150ms ease, box-shadow 150ms ease, scale 120ms cubic-bezier(.2, .8, .2, 1), transform 90ms ease; }
  html:not([data-motion="off"]) .hero .mt-go .mt-go__knob .m-arrow { animation: mt-step 4.5s cubic-bezier(.4, 0, .2, 1) 2s infinite; }
  html:not([data-motion="off"]) .hero .btn.mt-go:is(:active, .is-pressed) { animation: none; scale: .94; }
  html:not([data-motion="off"]) .mt-go:is(:active, .is-pressed, .is-burst) .mt-go__ring:not(.mt-go__burst) { animation: none; }
  html:not([data-motion="off"]) .hero .btn.mt-go.is-burst:not(.is-pressed) { animation: mt-thump 440ms cubic-bezier(.34, 1.56, .64, 1) both; }
  html:not([data-motion="off"]) .mt-go.is-burst .mt-go__burst { animation: mt-burst 760ms cubic-bezier(.2, .7, .3, 1) both; }
}
@keyframes mt-step { 0%, 14%, 100% { translate: 0 0; } 6% { translate: -4px 0; } }
@keyframes mt-thump { from { scale: .94; } 45% { scale: 1.03; } to { scale: 1; } }
@keyframes mt-burst {
  from { box-shadow: 0 0 0 0 rgb(232 73 42 / .55); }
  to { box-shadow: 0 0 0 16px rgb(232 73 42 / 0); }
}

/* the picture is the mark itself, large, on the ground one step up, no words: the white ring near the words, and the
   red link coming in from the frame's far edge to meet it (the bar runs out of the SVG's box; the frame clips it) */
.mt-heromark { position: relative; overflow: hidden; background: var(--p-surface); border-radius: var(--r-lg); min-height: 0; }
.mt-hm { position: absolute; right: 12%; top: 50%; width: 52%; max-width: 340px; height: auto; aspect-ratio: 1; overflow: visible; display: block;
         transform: translate(var(--mx, 0px), calc(-50% + var(--my, 0px))); transition: transform 700ms cubic-bezier(.22, 1, .36, 1); }
/* the mark is two strokes, drawn as a pen would (site.js, stroke-dasharray): the link from the frame's edge, then from
   its end the ring goes round. How far follows the scroll: at the top of the page the link and a quarter of the ring;
   going down the ring closes and sends out one red wave; coming back up it opens again. Square ends, so every stage
   is a clean geometric cut. Without script, or under reduced motion, both strokes stand whole: the logo as drawn */
.mt-hm__bar { fill: none; stroke: var(--p-accent); stroke-width: 16; }
.mt-hm__ring { fill: none; stroke: var(--p-ink); stroke-width: 17; }
.mt-hm__ripple { fill: none; stroke: var(--p-accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
@media screen and (prefers-reduced-motion: no-preference) {
  /* before the pen starts the frame is empty (the head line's classes: a script that never comes leaves the mark whole
     after 2.5 s) */
  html.m-enter:not(.mt-pen-late, [data-motion="off"]) .mt-hm :is(.mt-hm__bar, .mt-hm__ring) { stroke-dasharray: 0 999; }
  html:not([data-motion="off"]) .mt-heromark.is-closed .mt-hm__ripple { animation: mt-close 1s cubic-bezier(.2, .7, .3, 1) both; }
}
@keyframes mt-close { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }
@media (max-width: 1023px) {
  .mt-heromark { min-height: clamp(200px, 34svh, 360px); }
}
/* the narrowest phones (320 to 380): the headline a little smaller, so it stays two lines */
@media (max-width: 380px) { html[lang="ar"] .hero h1 { font-size: 34px; } }
/* a narrow laptop: the words take one more column, so the headline stays two lines */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero__grid > .hero__text { grid-column: 1 / span 6; }
  .hero__grid > .mt-heromark { grid-column: 8 / -1; }
}

/* ---------------------------------------------------------------- the slogan alone on the dark band */
/* without script it is ink with the strong words red; the kit's word-highlight moment (assets/moments) splits it
   into words that rest at half ink and turn to ink, the strong ones to red, as it is read */
#about > .wrap.mt-statement { justify-content: center; align-items: center; text-align: center; gap: var(--s-6); }
#about strong { font-weight: inherit; color: var(--p-accent); }
#about .mo-wh__text { font-size: clamp(38px, 4.6vw + 16px, 88px); line-height: 1.35; font-weight: 800; max-width: none; margin: 0; }
#about .mt-sign { margin: 0; color: var(--muted); font-size: var(--t-lead); }
.mt-statement__bar { display: block; width: clamp(96px, 12vw, 168px); height: 8px; background: var(--p-accent); }
/* it draws out from the middle while the slogan crosses the screen (where the browser runs scroll-driven animation;
   elsewhere it stands drawn) */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    html:not([data-motion="off"]) .mt-statement__bar { animation: mt-grow linear both; animation-timeline: view(); animation-range: entry 35% cover 50%; }
  }
}
@keyframes mt-grow { from { transform: scaleX(0); } to { transform: none; } }

/* ---------------------------------------------------------------- the questions */
/* the section on the logo's ink and the card one step up on it, edged with a fine line (a shadow does not read on
   dark): a real conversation, who asks and how far along, one or two questions a screen in large type, the answers as
   cards to tap */
main > section#start { background: var(--p-bg); height: auto; min-height: calc(var(--h, 1) * 100svh); }   /* it grows with a long screen of answers */
.mt-intro h2 { margin: 0; }
.mt-intro__sub { margin: var(--s-4) 0 0; color: var(--muted); font-size: var(--t-lead); }

.mt-card { --bg: var(--p-surface); --surface: var(--mt-raise); position: relative; background: var(--p-surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 28px 56px -28px rgb(0 0 0 / .6); font-family: var(--font-ui, var(--font-text)); }
.mt-card__head { position: relative; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); }
.mt-av { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--mt-ink); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; }   /* the page's profile picture */
.mt-av .mt-mark { width: 26px; height: 17px; }
.mt-av .mt-mark .mt-mark__ring { fill: #fff; }
.mt-who { display: grid; line-height: 1.45; min-width: 0; }
.mt-who b { font-size: 16px; font-weight: 700; }
.mt-who span { font-size: 13px; color: var(--muted); }
.mt-count { margin-inline-start: auto; flex: none; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-progress { position: absolute; inset-inline: 0; bottom: -1px; height: 3px; }
.mt-progress__bar { display: block; height: 100%; width: 10%; background: var(--p-accent); transition: width 420ms cubic-bezier(.22, 1, .36, 1); }
.mt-card.is-done .mt-count { visibility: hidden; }
.mt-card.is-done .mt-progress__bar { width: 100% !important; }

#intake.form { display: flex; flex-direction: column; min-height: 600px; padding: var(--s-6); }
.mt-step { display: grid; gap: var(--s-6); align-content: start; flex: 1 1 auto; }
.mt-step[hidden] { display: none; }
/* each question in large type: a conversation, not a form's small labels */
#intake .mt-q { display: block; width: 100%; margin: 0 0 var(--s-3); padding: 0; font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--ink); }
#intake .field { display: grid; gap: 0; }
#intake .field :is(input, textarea) { width: 100%; min-height: 56px; padding: 12px 16px; font: inherit; font-size: 17px; color: var(--ink); background: var(--mt-well);
  border: 1.5px solid var(--line-strong); border-radius: 12px; }
#intake .field textarea { min-height: 128px; resize: vertical; line-height: 1.7; }
#intake .field :is(input, textarea)::placeholder { color: color-mix(in oklab, var(--ink) 36%, transparent); }
html #intake .field :is(input, textarea):focus { outline: none; border-color: var(--p-ink); box-shadow: 0 0 0 4px color-mix(in oklab, var(--p-ink) 10%, transparent); }
#intake .field :is(input, textarea)[aria-invalid="true"] { border-color: var(--error, #b42318); }
.field input[type="tel"], .field input[dir="ltr"] { text-align: right; }
.mt-hint { margin: var(--s-2) 0 0; font-size: 14px; font-weight: 400; color: var(--muted); }
.mt-hint--top { margin: calc(-1 * var(--s-2)) 0 var(--s-3); }
#intake .field__error { margin-top: var(--s-2); }
.mt-opt { margin-inline-start: var(--s-2); padding: 1px 8px; border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted); vertical-align: 2px; }
.mt-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* answers as cards in two columns, each a well of the logo's ink on the card: a ring (one answer) or a box (several)
   beside the words; the chosen one lights up white, ink words, the logo's red link along its foot */
.mt-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.mt-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mt-chip { position: relative; display: block; min-width: 0; }
.mt-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.mt-chip span { display: flex; align-items: center; gap: 10px; height: 100%; min-height: 52px; padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: var(--mt-well); color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.35;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.mt-chip span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid color-mix(in oklab, var(--ink) 35%, transparent); background: transparent;
  transition: background 160ms ease, border-color 160ms ease; }
.mt-chip input[type="checkbox"] + span::before { border-radius: 5px; }
@media (hover: hover) and (pointer: fine) { .mt-chip:hover span { border-color: color-mix(in oklab, var(--ink) 60%, transparent); } }
.mt-chip input:checked + span { background: var(--mt-paper); border-color: var(--mt-paper); color: var(--mt-ink); box-shadow: inset 0 -4px 0 var(--p-accent); }
.mt-chip input[type="radio"]:checked + span::before { border-color: var(--mt-ink); background: radial-gradient(circle, var(--p-accent) 0 40%, var(--mt-paper) 45%); }
.mt-chip input[type="checkbox"]:checked + span::before { border-color: var(--p-accent); background: var(--p-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3L9.5 3.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.mt-chip input:focus-visible + span { outline: 2px solid var(--p-ink); outline-offset: 2px; }
.mt-chip input[aria-invalid="true"] + span { border-color: var(--error, #b42318); }
.mt-other { margin-top: var(--s-3); }
@media screen and (prefers-reduced-motion: no-preference) {
  .mt-chip input:checked + span { animation: mt-pop 280ms cubic-bezier(.34, 1.56, .64, 1); }
  .mt-thanks:not([hidden]) { animation: mt-step-next 420ms cubic-bezier(.2, .8, .2, 1) both; }
}
/* in Arabic the next question comes in from the left, where the reading goes; going back, from the right */
@keyframes mt-step-next { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes mt-step-back { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes mt-pop { from { transform: scale(.94); } to { transform: none; } }

/* a voice note instead of typing: a quiet pill with a microphone */
.mt-voice { justify-self: start; display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); padding: 8px 14px; border-radius: 999px;
  background: var(--mt-well); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.mt-voice:hover { background: color-mix(in oklab, var(--mt-well) 82%, var(--ink)); }
.mt-mic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.mt-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the buttons: next and send as the hero's button, the full width of the card; back a quiet word beside it */
.mt-actions { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-6); }
.mt-actions .mt-next { flex: 1 1 auto; min-height: 56px; font-size: 17px; }
.mt-actions .mt-prev { flex: none; min-height: 56px; padding-inline: var(--s-5); background: transparent; border-color: transparent; box-shadow: none; color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--line-strong); }
.mt-actions .mt-prev:hover { background: var(--mt-well); }
.mt-privacy { display: flex; gap: var(--s-2); align-items: center; justify-content: center; margin: var(--s-4) 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.mt-privacy svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mt-privacy a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
#intake .form__status { margin: var(--s-3) 0 0; text-align: center; }

/* after the send: a tick that draws itself, the name, the number the answer goes to */
.mt-thanks { display: grid; gap: var(--s-4); align-content: center; justify-items: center; text-align: center; min-height: 600px; padding: var(--s-7) var(--s-6); }
.mt-thanks[hidden] { display: none; }
.mt-done { width: 76px; height: 76px; border-radius: 50%; background: var(--mt-paper); display: grid; place-items: center; box-shadow: inset 0 -6px 0 var(--p-accent); }
.mt-done svg { width: 36px; height: 36px; fill: none; stroke: var(--mt-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 0; }
@media screen and (prefers-reduced-motion: no-preference) {
  .mt-thanks:not([hidden]) .mt-done svg { stroke-dashoffset: 24; animation: mt-tick 600ms cubic-bezier(.65, 0, .35, 1) 300ms forwards; }
}
@keyframes mt-tick { to { stroke-dashoffset: 0; } }
.mt-thanks h3 { font-size: 24px; font-weight: 800; margin: var(--s-2) 0 0; }
.mt-thanks p { margin: 0; max-width: 34ch; }
.mt-thanks [data-thanks-phone] { font-weight: 700; unicode-bidi: isolate; }
.mt-thanks .btn { margin-top: var(--s-3); }
.mt-preview { margin-top: var(--s-2); font-size: 13px; color: var(--muted); }

/* the start buttons land on the card itself, just under the bar */
#questions { scroll-margin-top: calc(var(--nav) + var(--s-4)); }

/* a narrow or short laptop screen: the card a little shorter */
@media (min-width: 1024px) and (max-width: 1279px), (min-width: 1024px) and (max-height: 860px) {
  #intake.form, .mt-thanks { min-height: 500px; }
  #intake.form { padding: var(--s-5) var(--s-6); }
  .mt-step { gap: var(--s-5); }
}
@media (max-width: 1023px) {
  #intake.form, .mt-thanks { min-height: 0; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  #start .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  #start .grid > .mt-intro { grid-column: 1 / span 5; }
  #start .grid > .mt-formcol { grid-column: 6 / -1; }
}
@media (max-width: 639px) {
  #start .grid > .mt-intro { margin-bottom: var(--s-5); }
  .mt-card { border-radius: 18px; }
  .mt-card__head { padding: var(--s-3) var(--s-4); }
  #intake.form { padding: var(--s-5) var(--s-4) var(--s-4); }
  .mt-thanks { padding: var(--s-7) var(--s-4); }
  #intake .mt-q { font-size: 18px; }
  .mt-chips { grid-template-columns: minmax(0, 1fr); gap: 8px; }   /* one answer a row on a phone: no word ever wraps */
  .mt-chip span { min-height: 54px; padding: 10px 16px; font-size: 16px; }
  .mt-thanks .btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .mt-progress__bar { transition: none; } }

/* ---------------------------------------------------------------- the footer: one row */
.mt-foot { border-top: 1px solid var(--line); padding: var(--s-7) 0; }
.mt-foot__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-5) var(--s-7); }
.mt-foot__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); list-style: none; margin: 0; padding: 0; }
.mt-foot__links a { color: var(--ink); text-decoration: none; font-size: var(--t-small); }
.mt-foot__legal { margin: 0; color: var(--muted); font-size: var(--t-small); }
@media (max-width: 639px) {
  .mt-foot__row { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- the privacy page */
/* one reading column on the right line, under the fixed bar; each point marked with the logo's red dot */
.mt-page { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-8); }
.mt-page h1 { font-size: var(--t-h2); font-weight: 800; line-height: 1.4; margin: 0 0 var(--s-5); max-width: 22ch; }
.mt-page .t-lead { margin: 0 0 var(--s-8); max-width: 60ch; line-height: 1.85; }
.mt-rules { display: grid; gap: var(--s-7); }
.mt-rules section { display: grid; gap: var(--s-4); }
.mt-rules h2 { font-size: var(--t-h3); font-weight: 800; line-height: 1.5; margin: 0; }
.mt-rules p { margin: 0; max-width: 65ch; }
.mt-rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); max-width: 65ch; }
.mt-rules li { position: relative; padding-inline-start: var(--s-5); }
.mt-rules li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .75em; width: 8px; height: 8px; border-radius: 50%; background: var(--p-accent); }
.mt-back { margin: var(--s-8) 0 0; }

/* ---------------------------------------------------------------- borrowed: the red word, a quiet second way, the example */
.hero h1 .mt-hl { color: var(--p-accent); }
.hero .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.hero .mt-wa { min-height: 60px; background: transparent; border-color: transparent; color: var(--ink); font-weight: 600; padding-inline: var(--s-2);
  text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; text-decoration-color: var(--p-accent); }
.hero .mt-wa:hover { background: var(--p-surface); }
@media (max-width: 639px) { .hero .btn-row { flex-direction: column; align-items: stretch; gap: var(--s-2); } .hero .mt-wa { min-height: 48px; } }

/* ---------------------------------------------------------------- the questions, rearranged and talking */
/* one centred column: the heading and its line over the card, the card in the middle of the screen with a slow red
   glow behind it, so the eye has one place to go */
main > section#start { overflow: clip; }
#start .grid { display: flex; flex-direction: column; align-items: center; }
#start .grid > .mt-intro { text-align: center; margin: 0 0 var(--s-7); max-width: 640px; }
#start .grid > .mt-formcol { position: relative; width: min(100%, 620px); margin: 0; }
#start .mt-intro h2 { font-size: clamp(32px, 2.4vw + 18px, 52px); }
.mt-formcol::before { content: ""; position: absolute; inset: -12% -18%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--p-accent) 34%, transparent), transparent 70%); filter: blur(24px); opacity: .8; }
.mt-formcol > .mt-card { z-index: 1; }
@media screen and (prefers-reduced-motion: no-preference) { .mt-formcol::before { animation: mt-breathe 6s ease-in-out infinite; } }
@keyframes mt-breathe { 0%, 100% { opacity: .45; transform: scale(.96); } 50% { opacity: .85; transform: scale(1.04); } }
@media (max-width: 1023px) { #start .grid > .mt-intro, #start .grid > .mt-formcol { grid-column: auto; } }
@media (max-width: 639px) { #start .grid > .mt-intro { margin-bottom: var(--s-5); } .mt-formcol::before { inset: -6% -10%; } }

/* the head: a live dot on the avatar, and «يكتب...» with three bouncing dots while a question is on its way */
.mt-av { position: relative; }
.mt-av::after { content: ""; position: absolute; inset-inline-end: -1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--p-accent); border: 2px solid var(--p-surface); }
.mt-typing { display: none; align-items: center; gap: 3px; font-size: 13px; color: var(--p-accent); font-weight: 600; }
.mt-typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: mt-dots 900ms ease-in-out infinite; }
.mt-typing i:nth-of-type(1) { margin-inline-start: 4px; }
.mt-typing i:nth-of-type(2) { animation-delay: 150ms; } .mt-typing i:nth-of-type(3) { animation-delay: 300ms; }
@keyframes mt-dots { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.mt-card.is-typing .mt-who__line { display: none; }
.mt-card.is-typing .mt-typing { display: inline-flex; }

/* each question writes itself in from the right after «يكتب...», then the answers rise under it one by one */
@media screen and (prefers-reduced-motion: no-preference) {
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) .mt-q { animation: mt-write 520ms steps(18, end) 460ms both; }
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) :is(.mt-hint, .field > input, .field > textarea, .mt-voice, .mt-chip) { animation: mt-rise 380ms cubic-bezier(.2, .8, .2, 1) 900ms both; }
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) .mt-chip:nth-child(2) { animation-delay: 960ms; }
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) .mt-chip:nth-child(3) { animation-delay: 1020ms; }
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) .mt-chip:nth-child(4) { animation-delay: 1080ms; }
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) .mt-chip:nth-child(n+5) { animation-delay: 1140ms; }
  .mt-step:is(.mt-in-next, .mt-in-back, .mt-first) .field + .field .mt-q { animation-delay: 700ms; }
}
@keyframes mt-write { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

/* typing: the field you are in lights its edge red; the next button sleeps until this screen is answered, then wakes */
html #intake .field :is(input, textarea):focus { border-color: var(--p-accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--p-accent) 18%, transparent); }
.mt-actions .mt-next:not(.is-ready) { opacity: .45; box-shadow: none; }
.mt-actions .mt-next { transition: opacity 240ms ease, box-shadow 240ms ease, transform 240ms ease; }
@media screen and (prefers-reduced-motion: no-preference) {
  .mt-actions .mt-next.is-ready { animation: mt-wake 520ms cubic-bezier(.34, 1.56, .64, 1); }
  .mt-actions .mt-next.is-ready .m-arrow { animation: mt-nudge 1.8s cubic-bezier(.65, 0, .35, 1) .6s infinite; }
}
@keyframes mt-wake { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: none; } }
@keyframes mt-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- the chat in the hero */
/* a WhatsApp-like chat on the raised ground: the head (avatar, name, «يكتب...»), a date-like chip saying it is an
   example, Mohammed's messages from the right with a small tail; the second breaks off under a fade with «كمّل القراية» */
.mt-chatpanel { display: grid; align-items: center; justify-items: center; background: var(--p-surface); border-radius: var(--r-lg); padding: var(--s-6); min-height: 0; }
.mt-chat { width: min(100%, 440px); border-radius: 20px; background: var(--p-bg); border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
.mt-chat__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--p-surface); border-bottom: 1px solid var(--line); }
.mt-chat__state { font-size: 13px; color: var(--muted); }
html.mt-chat-js .mt-chat__state { color: var(--p-accent); }
.mt-chat__body { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5) var(--s-4) var(--s-6); min-height: 340px;
  background-image: radial-gradient(color-mix(in oklab, var(--ink) 5%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }
.mt-chat__day { justify-self: center; padding: 3px 12px; border-radius: 999px; background: var(--p-surface); color: var(--muted); font-size: 12px; }
.mt-msg { position: relative; justify-self: start; max-width: 88%; padding: 10px 14px 22px; border-radius: 4px 16px 16px 16px; background: var(--p-surface); color: var(--ink); font-size: 15px; line-height: 1.75; }
html[dir="rtl"] .mt-msg { border-radius: 16px 4px 16px 16px; }
.mt-msg p { margin: 0; }
.mt-msg__time { position: absolute; bottom: 5px; inset-inline-end: 12px; font-size: 11px; color: var(--muted); }
.mt-msg__bar { display: block; width: 36px; height: 4px; background: var(--p-accent); margin: 2px 0 8px; }
.mt-msg b { font-weight: 700; }
/* the second message breaks off: its last lines fade out, and the way on sits where the words stop */
.mt-msg--cut { padding-bottom: 14px; }
.mt-msg--cut p { max-height: 5.25em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.mt-msg__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--p-accent); font-weight: 700; font-size: 15px; text-decoration: none; }
.mt-msg__more:hover { text-decoration: underline; text-underline-offset: 5px; }
.mt-msg__more .m-arrow { width: 13px; height: 13px; }
.mt-msg__more .m-arrow__stem { opacity: 1; transform: none; }
.mt-msg--typing { display: none; gap: 4px; padding: 14px 16px; }
.mt-msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: mt-dots 900ms ease-in-out infinite; }
.mt-msg--typing i:nth-child(2) { animation-delay: 150ms; } .mt-msg--typing i:nth-child(3) { animation-delay: 300ms; }
/* with script: the messages wait and pop in like arriving messages (from their corner, a little overshoot) */
html.mt-chat-js .mt-chatpanel .mt-msg:not(.mt-msg--typing):not(.is-in) { display: none; }
html.mt-chat-js .mt-chatpanel .mt-msg--typing.is-in { display: inline-flex; animation: mt-pop-in 320ms cubic-bezier(.34, 1.56, .64, 1) both; }
html.mt-chat-js .mt-chatpanel .mt-msg.is-in:not(.mt-msg--typing) { animation: mt-pop-in 460ms cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes mt-pop-in { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
.mt-msg { transform-origin: 100% 0; }
@media screen and (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .mt-msg__more .m-arrow { animation: mt-nudge 2s cubic-bezier(.65, 0, .35, 1) 1s infinite; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .hero__grid > .mt-chatpanel { grid-column: 7 / -1; } .mt-chatpanel { padding: var(--s-4); } }
/* a phone and a tablet: the headline with its button and terms, then the chat under them */
@media (max-width: 1023px) {
  .hero .hero__grid > .hero__text { display: contents; }
  .hero .hero__grid > * , .hero .hero__text > * { grid-column: 1 / -1; }
  .hero .hero__kicker { order: 1; } .hero h1 { order: 2; } .hero .btn-row { order: 3; } .hero .mt-terms { order: 4; }
  .hero .mt-chatpanel { order: 5; margin-top: var(--s-7); }   /* the promise and its button stay together; the example follows */
  .mt-chatpanel { padding: 0; background: none; }
  .mt-chat { width: 100%; }
  .mt-chat__body { min-height: 350px; }   /* room for both messages, so nothing below jumps when the second arrives */
}
/* the chat is never cut: on a phone and a tablet the hero grows to hold it (the kit squeezes its picture to fit) */
@media (max-width: 1023px) {
  .hero > .wrap, .hero > .wrap > .hero-text { height: auto; }
  .hero > .wrap { grid-template-rows: auto; }
  .hero--split .hero__media.mt-chatpanel { flex: none; height: auto; min-height: 0; overflow: visible; border-radius: 0; }
}

/* While «كلّي وين» is on screen the nav's «ابدي ببلاش» waits out of sight (site.js sets html.mt-hero-cta), so the
   first screen asks one thing; past the hero it fades in and stays. privacy.html has no hero, so it always shows */
.nav .nav__actions .btn { transition: opacity 260ms ease, translate 260ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0s; }
html.mt-hero-cta .nav .nav__actions .btn { opacity: 0; translate: 0 -6px; visibility: hidden; pointer-events: none;
  transition: opacity 200ms ease, translate 200ms ease, visibility 0s linear 200ms; }
