/* Mosaid landing page (mosaid.ma). Plain CSS, no build step.
   Colours come from design/tokens.css. Layout uses logical properties (inline-start / end) so dir="rtl" works.
   Fonts: Outfit (headings) and IBM Plex Sans / Plex Sans Arabic (text), SIL OFL 1.1, self-hosted in fonts/. */

@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url(fonts/outfit-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url(fonts/outfit-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 800; font-display: swap; src: url(fonts/outfit-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Plex"; font-weight: 400 500; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
/* Arabic: only regular and bold are loaded; 500 falls back to 400 and 600 to 700 (keeps the page light). */
@font-face { font-family: "Plex"; font-weight: 700 900; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --indigo: #3B2BF5;
  --indigo-hover: #2D1FD0;
  --indigo-press: #2217A3;
  --indigo-300: #A49DFB;
  --indigo-100: #E7E5FE;
  --indigo-50: #F3F2FF;
  --ink: #0E0E14;
  --ink-2: #1B1A2E;
  --paper: #F3F3F8;
  --surface-2: #F8F8FC;
  --line: #DADBE6;
  --text-2: #3E4052;
  --muted: #5A5C70;
  --white: #fff;

  --head: "Outfit", "Plex", system-ui, sans-serif;
  --body: "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1184px;
  --gutter: 48px;
  --r-s: 10px;   /* buttons, chips */
  --r-m: 16px;   /* cards */
  --r-l: 20px;   /* nav boxes, big panels */
  --nav-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--head); letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-s); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: var(--r-s); font: 500 14px/1.1 var(--body); transition: background-color .2s, color .2s, transform .2s var(--ease); white-space: nowrap; }
.btn--lg { padding: 15px 20px; font-size: 16px; }
.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-hover); }
.btn--primary:active { background: var(--indigo-press); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2A2A3A; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--indigo-100); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
[dir="rtl"] .link-arrow .icon, [dir="rtl"] .arrow-flip { transform: scaleX(-1); }
[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(3px); }

/* ---------- Announcement bar ---------- */
.announce { padding: 8px 8px 0; }
.announce a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: 12px; background: var(--indigo-100); color: var(--indigo-press); font-size: 14px; font-weight: 500; text-align: center; }
.announce a:hover { background: #D9D6FD; }

/* ---------- Navigation: three boxes (logo, links, action) ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding: 7px 8px 0; }
.nav__row { display: flex; gap: 6px; align-items: stretch; height: var(--nav-h); }
.nav__box { background: #fff; border-radius: var(--r-l); display: flex; align-items: center; transition: box-shadow .25s; }
.nav.is-stuck .nav__box { box-shadow: 0 1px 0 rgba(14, 14, 20, .06), 0 6px 20px rgba(14, 14, 20, .06); }
.nav__logo { padding-inline: 12px; }
.nav__logo img { height: 44px; width: auto; }
.nav__links { flex: 1; justify-content: space-between; padding-inline: 18px 12px; position: relative; }
.nav__menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__item > a, .nav__item > button { display: inline-flex; align-items: center; gap: 4px; padding: 10px 10px; border-radius: var(--r-s); font-size: 14px; font-weight: 500; }
.nav__item > a:hover, .nav__item > button:hover, .nav__item > button[aria-expanded="true"] { background: var(--paper); }
.nav__item .chev { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.nav__item > button[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav__login { font-size: 14px; font-weight: 500; padding: 10px 12px; border-radius: var(--r-s); }
.nav__login:hover { background: var(--paper); }
.nav__cta { padding-inline: 6px; }
.nav__burger { display: none; width: 60px; justify-content: center; }
.nav__burger .icon { width: 24px; height: 24px; }

/* mega menu */
.mega { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; background: #fff; border-radius: var(--r-l); box-shadow: 0 12px 40px rgba(14, 14, 20, .12), 0 0 0 1px rgba(14, 14, 20, .04); padding: 22px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s var(--ease), visibility 0s .18s; }
.mega--wide { inset-inline-end: 16%; }
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s var(--ease); }
.mega h3 { font: 500 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 4px 10px 12px; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega a { display: grid; grid-template-columns: 20px 1fr; column-gap: 12px; padding: 8px 10px; border-radius: 12px; }
.mega a:hover, .mega a:focus-visible { background: var(--paper); }
.mega .icon { color: var(--indigo); margin-top: 2px; }
.mega strong { font-size: 14px; font-weight: 500; line-height: 1.35; }
.mega span { grid-column: 2; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* mobile panel */
.mpanel { display: none; }

/* ---------- Hero ---------- */
.hero { background: var(--paper); margin-top: calc(-1 * (var(--nav-h) + 7px)); padding-top: calc(var(--nav-h) + 7px); position: relative; }
.hero__inner { text-align: center; padding-block: 26px 64px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.badge img { width: 22px; height: 22px; }
.hero__h1 { margin: 30px 0 0; font-weight: inherit; }
.hero__kicker, .hero__title { display: block; }
.hero__kicker { margin-top: 0; font: 500 clamp(26px, 2.7vw, 36px)/1.1 var(--head); letter-spacing: -0.02em; }
.hero__title { margin-top: 22px; font: 800 clamp(48px, 8.8vw, 126px)/.86 var(--head); letter-spacing: -0.035em; text-transform: uppercase; }
.hero__sub { max-width: 640px; margin: 26px auto 0; font-size: 20px; line-height: 1.3; color: var(--ink); }
.hero__cta { margin-top: 40px; }

.hero__stage { position: relative; padding: 48px var(--gutter) 0; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background:
  radial-gradient(60% 80% at 20% 30%, rgba(164, 157, 251, .55), transparent 60%),
  radial-gradient(50% 70% at 85% 70%, rgba(59, 43, 245, .55), transparent 65%),
  linear-gradient(160deg, #1C1590 0%, #0E0E14 75%); }
.hero__bg::after { content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.shot { position: relative; max-width: var(--wrap); margin: 0 auto; background: #fff; border-radius: var(--r-l) var(--r-l) 0 0; padding: 18px 22px 26px; box-shadow: 0 0 0 8px rgba(255, 255, 255, .28), 0 30px 80px rgba(0, 0, 0, .35); font-size: 13px; text-align: start; }

/* marquee bar pinned to the bottom of the screen while the hero is in view */
.strip { position: sticky; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); overflow: hidden; height: 60px; display: flex; align-items: center; }
.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__set { display: flex; align-items: center; gap: 56px; padding-inline-end: 56px; }
.strip .marquee__set span { display: inline-flex; align-items: center; gap: 8px; font: 600 16px/1 var(--head); color: var(--ink); white-space: nowrap; }
.strip .icon { color: var(--indigo); }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
.marquee:hover { animation-play-state: paused; }

/* ---------- Dashboard mock (our own drawing, demo data) ---------- */
.ask { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 14px; }
.ask__dot { width: 22px; height: 22px; border-radius: 7px 7px 7px 2px; background: var(--indigo); flex: none; }
.ask .icon { margin-inline-start: auto; width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 22px; }
.chips span { padding: 6px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.demo-tag { font: 600 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; }
.dash { display: grid; grid-template-columns: 1.25fr 1.25fr 1fr 1fr; gap: 10px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.tile--big { grid-row: span 2; }
.tile__label { font: 600 10.5px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile__num { font: 600 26px/1.05 var(--head); letter-spacing: -0.02em; }
.tile--big .tile__num { font-size: 32px; }
.tile__meta { font-size: 11.5px; color: var(--muted); }
.up { color: var(--indigo); font-weight: 600; }
.bars { margin-top: auto; display: flex; align-items: flex-end; gap: 5px; height: 96px; }
.bars i { flex: 1; background: var(--indigo); border-radius: 3px 3px 0 0; opacity: .9; }
.bars i:nth-child(odd) { background: var(--indigo-300); }
.donut { margin: auto; width: 128px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--indigo) 0 68%, var(--indigo-300) 68% 86%, var(--line) 86%); display: grid; place-items: center; }
.donut b { width: 92px; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 600 18px/1.1 var(--head); text-align: center; }
.donut small { display: block; font: 400 10px/1.2 var(--body); color: var(--muted); }
.meter { height: 6px; border-radius: 6px; background: var(--paper); overflow: hidden; margin-top: auto; }
.meter i { display: block; height: 100%; background: var(--indigo); border-radius: 6px; }
.dash__low { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.list { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.list h4 { margin: 0 0 6px; font: 600 10.5px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--paper); font-size: 12.5px; }
.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--indigo-100); color: var(--indigo-press); white-space: nowrap; }
.pill--draft { background: #FFF4BF; color: #6B4400; border: 1px dashed #6B4400; }

/* ---------- Generic section heads ---------- */
.sec { padding-block: 112px 0; }
.h2 { font: 600 clamp(32px, 3.9vw, 50px)/1.02 var(--head); letter-spacing: -0.025em; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.center { text-align: center; }
.center .lead { max-width: 620px; margin: 18px auto 0; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.arrows { display: flex; gap: 8px; }
.arrows button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.arrows button:hover { background: var(--paper); border-color: var(--muted); }
.arrows button:disabled { opacity: .4; cursor: default; }

/* ---------- Sectors grid ---------- */
.sectors { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 48px; }
.sector { height: 82px; border: 1px solid var(--line); border-radius: var(--r-m); display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 17px/1.2 var(--head); transition: border-color .2s, background .2s; padding: 12px; text-align: center; }
.sector .icon { width: 26px; height: 26px; color: var(--indigo); }
.sector:hover { border-color: var(--indigo-300); background: var(--indigo-50); }
.wide-pill { margin-top: 8px; height: 68px; border: 1px solid var(--line); border-radius: var(--r-m); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 500; text-align: center; padding: 8px 16px; }

/* ---------- Feature cards (2 x 2) ---------- */
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; min-height: 236px; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; transition: box-shadow .25s, transform .25s var(--ease); }
.feat:hover { box-shadow: 0 12px 30px rgba(14, 14, 20, .08); transform: translateY(-2px); }
.feat__text { padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.feat__text h3 { font: 500 20px/1.25 var(--head); letter-spacing: -0.01em; }
.feat__text p { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.feat__text .link-arrow { margin-top: auto; }
.feat__pic { background: var(--paper); padding: 22px 0 0 18px; overflow: hidden; display: flex; }
[dir="rtl"] .feat__pic { padding: 22px 18px 0 0; }
.mini { background: #fff; border-radius: 10px 0 0 0; border: 1px solid var(--line); border-inline-end: 0; border-bottom: 0; padding: 12px; font-size: 11.5px; flex: 1; box-shadow: 0 6px 20px rgba(14,14,20,.06); }
[dir="rtl"] .mini { border-radius: 0 10px 0 0; }
.mini__title { font: 600 15px/1.2 var(--head); margin-bottom: 8px; }
.mini .row { font-size: 11.5px; padding: 5px 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 6px; text-align: center; font-size: 10.5px; }
.cal b { font-weight: 500; color: var(--muted); }
.cal i { font-style: normal; padding: 4px 0; border-radius: 4px; }
.cal .on { background: var(--indigo); color: #fff; }
.cal .soft { background: var(--indigo-100); }
.faces { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.faces i { width: 34px; height: 34px; border-radius: 50%; background: var(--indigo-100); position: relative; overflow: hidden; }
.faces i::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--indigo-300); top: 6px; inset-inline-start: 10px; }
.faces i::after { content: ""; position: absolute; width: 26px; height: 16px; border-radius: 50% 50% 0 0; background: var(--indigo-300); bottom: -4px; inset-inline-start: 4px; }
.faces i.off { opacity: .35; }

/* ---------- Dark AI section ---------- */
.ai { background: var(--ink); color: #fff; margin-top: 112px; padding-block: 104px; }
.ai .lead { color: #C9CAD8; }
.ai__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 56px; align-items: start; }
.tabs { border-top: 1px solid rgba(255, 255, 255, .25); }
.tab { border-bottom: 1px solid rgba(255, 255, 255, .25); position: relative; }
.tab__btn { width: 100%; text-align: start; padding: 22px 0 20px; display: grid; gap: 12px; justify-items: start; }
.tag { display: inline-block; padding: 4px 9px; border-radius: 7px; background: rgba(164, 157, 251, .22); color: var(--indigo-300); font: 600 13px/1.2 var(--body); }
.tab__title { font: 500 20px/1.3 var(--head); color: rgba(255, 255, 255, .5); transition: color .2s; }
.tab.is-active .tag { background: var(--indigo-300); color: var(--ink); }
.tab.is-active .tab__title, .tab__btn:hover .tab__title { color: #fff; }
.tab__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.tab.is-active .tab__body { grid-template-rows: 1fr; }
.tab__body > div { overflow: hidden; }
.tab__body p { font-size: 15px; line-height: 1.6; color: #C9CAD8; max-width: 520px; }
.tab__body .link-arrow { margin: 14px 0 22px; color: #fff; }
.tab__bar { position: absolute; bottom: -1px; inset-inline-start: 0; height: 2px; width: 0; background: var(--indigo-300); }
.tab.is-active .tab__bar { animation: grow var(--tab-ms, 6000ms) linear forwards; }
.tabs.is-paused .tab__bar { animation-play-state: paused; }
@keyframes grow { to { width: 100%; } }
.ai__panel { background: var(--paper); border-radius: var(--r-l); min-height: 460px; padding: 40px 36px; display: grid; place-items: center; position: sticky; top: 96px; }
.scene { display: none; width: 100%; max-width: 380px; color: var(--ink); font-size: 13px; }
.scene.is-active { display: block; animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.card { background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(14, 14, 20, .08); padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card__num { font: 600 22px/1.2 var(--head); }
.card small { color: var(--muted); font-size: 12px; }
.paper { height: 150px; border-radius: 10px; background: repeating-linear-gradient(#fff 0 14px, #EDEDF4 14px 16px); border: 1px solid var(--line); position: relative; }
.paper::after { content: ""; position: absolute; inset: 18px 40% auto 16px; height: 20px; background: var(--ink); opacity: .12; border-radius: 4px; }
.pin { display: flex; gap: 8px; justify-content: center; margin: 14px 0 4px; }
.pin i { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
.pin i.empty { background: none; border: 2px solid #85879C; }
.speak { width: 56px; height: 56px; border-radius: 50% 50% 50% 8px; background: var(--indigo); display: grid; place-items: center; color: #fff; margin-inline: auto; }
.speak .icon { width: 26px; height: 26px; }
.wave { display: flex; gap: 4px; align-items: center; justify-content: center; height: 40px; margin-top: 14px; }
.wave i { width: 5px; border-radius: 3px; background: var(--indigo); }
.ai__cta { text-align: center; margin-top: 64px; }

/* ---------- Connectors ---------- */
.conn { overflow: hidden; margin-top: 56px; position: relative; }
.conn .marquee { animation-duration: 50s; }
.conn .marquee__set { gap: 24px; padding-inline-end: 24px; }
.ctile { width: 68px; height: 68px; border-radius: 16px; border: 1px solid var(--line); display: grid; place-items: center; text-align: center; font: 600 10.5px/1.1 var(--head); background: #fff; flex: none; padding: 4px; }
.ctile .icon { width: 24px; height: 24px; color: var(--indigo); margin: 0 auto 4px; }
.ctile:nth-child(3n) { background: var(--indigo-50); }
.ctile:nth-child(4n) { background: var(--ink); color: #fff; border-color: var(--ink); }
.ctile:nth-child(4n) .icon { color: var(--indigo-300); }
.conn__hub { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.conn__hub img { width: 168px; height: 168px; border-radius: 38px; box-shadow: 0 0 0 18px #fff, 0 20px 50px rgba(59, 43, 245, .35); }
.conn__inner { height: 200px; display: flex; align-items: center; }
.conn-cta { text-align: center; margin-top: 56px; }

/* ---------- Facts band ---------- */
.facts { background: var(--indigo); color: #fff; margin-top: 112px; padding-block: 40px; }
.fact { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 10px; }
.fact + .fact { border-top: 1px solid rgba(255, 255, 255, .22); }
.fact b { font: 800 clamp(64px, 9vw, 124px)/1 var(--head); letter-spacing: -0.03em; }
.fact b[lang="ar"] { font-family: var(--body); font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.fact span { font: 600 clamp(18px, 1.9vw, 24px)/1.25 var(--head); text-align: end; max-width: 420px; }

/* ---------- Sliders ---------- */
.slider { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.slider::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; flex: none; }
.story { width: 100%; display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r-m); overflow: hidden; background: var(--paper); min-height: 520px; }
.story__text { padding: 34px 34px 32px; display: flex; flex-direction: column; gap: 22px; }
.story__label { display: inline-flex; align-items: center; gap: 8px; font: 600 18px/1 var(--head); }
.story__label .icon { width: 26px; height: 26px; color: var(--indigo); }
.story__big { font: 500 27px/1.28 var(--head); letter-spacing: -0.01em; max-width: 480px; }
.story ul { margin: auto 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; }
.story li { display: flex; gap: 10px; align-items: baseline; }
.story li::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 2px; background: var(--indigo); transform: translateY(-1px); }
.story__pic { position: relative; overflow: hidden; }
.mosaic { background: var(--indigo); position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, 1fr); align-content: start; gap: 0; }
.mosaic i { aspect-ratio: 1; }
.mosaic i { background: var(--c, var(--indigo)); }
.mosaic i:nth-child(3n) { --c: var(--indigo-300); }
.mosaic i:nth-child(4n) { --c: var(--ink); }
.mosaic i:nth-child(5n) { --c: var(--indigo-100); }
.mosaic i:nth-child(7n) { --c: #fff; border-radius: 50% 50% 0 0; }
.mosaic i:nth-child(11n) { border-radius: 0 50% 50% 50%; --c: var(--indigo-300); }
.mosaic i:nth-child(13n) { border-radius: 50% 0 0 0; }
.story__pic .stamp { position: absolute; inset-inline-start: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; border-radius: 16px; padding: 16px 18px; width: min(300px, 80%); box-shadow: 0 20px 50px rgba(14, 14, 20, .3); font-size: 13px; }
[dir="rtl"] .story__pic .stamp { transform: translate(50%, -50%); }
.more { text-align: center; margin-top: 48px; }

.apps .slider { margin-inline-end: calc(-1 * var(--gutter)); padding-inline-end: var(--gutter); }
.app { width: 310px; height: 340px; border-radius: var(--r-m); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 12px; color: var(--ink); }
.app__art { position: absolute; inset: 0; }
/* Our own flowing-line texture (img/flow.svg), shown at a different crop / tint on each card. */
.app__art { background: #3B2BF5 url(img/flow.svg) center / cover no-repeat; }
.app__art.t2 { background-size: 170%; background-position: 80% 20%; }
.app__art.t3 { background-size: 140%; background-position: 10% 70%; filter: hue-rotate(14deg); }
.app__art.t4 { background-size: 220%; background-position: 40% 90%; }
.app__art.t5 { background-size: 160%; background-position: 95% 55%; filter: hue-rotate(-10deg); }
.app__art.t6 { background-size: 200%; background-position: 25% 10%; filter: saturate(1.2); }
.app:hover .app__art, .app:focus-visible .app__art { transform: scale(1.04); }
.app__art { transition: transform .5s var(--ease); }
/* "Who built it" headline: large, black, breaks with hyphens on narrow screens. */
.h2.built { max-width: 900px; font-size: clamp(34px, 3.9vw, 50px); -webkit-hyphens: manual; hyphens: manual; }
.app__card { position: relative; background: #fff; border-radius: 14px; padding: 16px 18px; width: 100%; display: grid; gap: 10px; transition: transform .3s var(--ease); }
.app:hover .app__card { transform: translateY(-6px); }
.app__card .icon { width: 28px; height: 28px; color: var(--indigo); }
.app__card h3 { font: 500 20px/1.25 var(--head); }
.app__card p { font-size: 14px; color: var(--text-2); line-height: 1.45; display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; }
.app__card p .icon { width: 18px; height: 18px; color: var(--ink); }

/* ---------- Closing CTA + footer ---------- */
.end { margin-top: 128px; overflow: hidden; }
.giant { display: block; width: 100%; height: auto; margin-bottom: -4.5%; user-select: none; } /* logo drawn as is; the card only covers the logo's own clear space */
.final { position: relative; background: var(--indigo); color: #fff; border-radius: var(--r-m); padding: 22px 20px 20px; }
.final h2 { font: 800 clamp(40px, 6.2vw, 88px)/.88 var(--head); letter-spacing: -0.03em; text-transform: uppercase; max-width: 900px; }
.final p { margin: 24px 0 26px; font-size: 18px; }
.foot { padding-block: 40px 32px; }
.foot__cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-top: 40px; }
.foot h3 { font: 500 12.5px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.foot ul a:hover { color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; }
.foot__base { display: flex; align-items: flex-end; gap: 40px; margin-top: 72px; }
.foot__base img { width: 300px; height: auto; margin-inline-start: -24px; margin-bottom: -18px; }
.foot__legal { font-size: 13px; color: var(--muted); display: grid; gap: 8px; }
.foot__legal nav { display: flex; gap: 14px; color: var(--ink); font-size: 14px; }
.foot__lang { margin-inline-start: auto; display: flex; gap: 6px; }
.foot__lang a { padding: 8px 12px; border-radius: var(--r-s); border: 1px solid var(--line); font-size: 14px; }
.foot__lang .soon { padding: 8px 12px; font-size: 14px; color: var(--muted); }
.foot__lang .soon small { font-size: 11px; }
.foot__lang a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Demo dialog ---------- */
dialog.demo { border: 0; border-radius: var(--r-l); padding: 0; width: min(560px, calc(100% - 24px)); box-shadow: 0 30px 80px rgba(0,0,0,.35); color: var(--ink); }
dialog.demo::backdrop { background: rgba(14, 14, 20, .55); }
.form { padding: 28px; display: grid; gap: 14px; }
.form h2 { font: 600 28px/1.1 var(--head); }
.form p { color: var(--text-2); font-size: 15px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; padding: 11px 12px; border-radius: var(--r-s); border: 1px solid #85879C; background: #fff; color: var(--ink); width: 100%; }
.form textarea { min-height: 96px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.form .note { font-size: 12.5px; color: var(--muted); }
.x { position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.x:hover { background: var(--paper); }

/* ---------- Arabic page (ar.html) ----------
   Outfit has no Arabic letters, so Arabic falls back to Plex Sans Arabic (same family name "Plex").
   Arabic letters join: never add letter-spacing, never uppercase; give lines more air. */
:lang(ar) { letter-spacing: 0 !important; }
html:lang(ar) body { font-size: 17.5px; line-height: 1.75; }
html:lang(ar) .hero__kicker { font-weight: 600; line-height: 1.4; }
html:lang(ar) .hero__title { font-weight: 700; line-height: 1.15; margin-top: 8px; }
html:lang(ar) .hero__sub { line-height: 1.6; }
html:lang(ar) .h2 { font-weight: 700; line-height: 1.35; }
html:lang(ar) .final h2 { font-weight: 700; line-height: 1.2; }
html:lang(ar) .fact b { font-weight: 700; line-height: 1.3; }
html:lang(ar) .fact b:lang(fr) { font-family: var(--head); font-weight: 800; line-height: 1; }
html:lang(ar) .feat__text h3, html:lang(ar) .app__card h3, html:lang(ar) .tab__title, html:lang(ar) .story__big { font-weight: 600; line-height: 1.5; }
html:lang(ar) .story__big { font-size: 25px; }
html:lang(ar) .mega strong { font-weight: 600; }
html:lang(ar) .tile__label, html:lang(ar) .demo-tag, html:lang(ar) .list h4, html:lang(ar) .mega h3, html:lang(ar) .foot h3 { font-size: 12.5px; }
html:lang(ar) .ctile { font-size: 11.5px; }
html:lang(ar) .announce a { font-size: 14.5px; }

/* Sections below the first screen are laid out only when they come near the screen (big win for Arabic text). */
.sec, .ai, .facts, .end, .foot { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* ---------- "Parlez à notre équipe" form (form.js) ---------- */
.fld { display: grid; gap: 6px; align-content: start; }
.fld__l { font-size: 14px; font-weight: 500; }
.fld__l small { font-weight: 400; color: var(--muted); }
.star { color: #C81E3A; }
.err { min-height: 0; font-size: 13px; color: #9E1029; }
.err:empty { display: none; }
.form [aria-invalid="true"] { border-color: #C81E3A; box-shadow: 0 0 0 1px #C81E3A; }
.form input::placeholder { color: #6F7186; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { font-size: 14px; color: var(--text-2); }
.form__msg:empty { display: none; }
.form__msg.is-bad { color: #9E1029; font-weight: 500; }
.form .note a { text-decoration: underline; text-underline-offset: 2px; }
.alert { display: none; margin: 0; padding: 12px 14px; border-radius: var(--r-s); background: #FDE6EA; color: #9E1029; font-size: 14px; border: 1px solid #C81E3A; }
.alert:target { display: block; }
.done { padding: 28px 0 8px; outline: none; }
.done h2 { font: 600 26px/1.2 var(--head); }
.done p { margin-top: 10px; }
.demo-page { background: #fff; border-radius: var(--r-l); margin-top: 24px; }
dialog.demo { max-height: calc(100dvh - 24px); overflow-y: auto; }

/* reveal on scroll (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Backgrounds (2026-11-20): colour with character, text contrast kept AA ----------
   Hero: a light aurora (indigo, violets, a touch of warm light) that drifts very slowly. Only a
   transform is animated (GPU, no layout, no CLS); it stops for prefers-reduced-motion.
   Sections: tinted bands that fade in and out of white, so no hard line between sections.
   Measured with landing/tools/contrast.mjs on the real pixels (desktop + phone). */
.hero { background: linear-gradient(170deg, #E6E0FF 0%, #EDE6FF 45%, #FBEDE6 100%); isolation: isolate; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; inset: -25% -15% 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 44% at 10% 20%, rgba(120, 104, 255, .62), transparent 70%),
    radial-gradient(34% 42% at 90% 12%, rgba(255, 168, 128, .62), transparent 70%),
    radial-gradient(44% 50% at 78% 58%, rgba(59, 43, 245, .38), transparent 72%),
    radial-gradient(40% 46% at 22% 70%, rgba(176, 140, 255, .62), transparent 70%),
    radial-gradient(28% 30% at 55% 30%, rgba(255, 255, 255, .55), transparent 72%);
  animation: aurora 32s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes aurora {
  0%   { transform: translate3d(-3%, -2%, 0) rotate(-4deg) scale(1.04); }
  50%  { transform: translate3d(2%, 1%, 0) rotate(2deg) scale(1.10); }
  100% { transform: translate3d(4%, 3%, 0) rotate(5deg) scale(1.06); }
}
.hero__bg { background:
  radial-gradient(45% 70% at 88% 8%, rgba(255, 176, 140, .28), transparent 65%),
  radial-gradient(60% 80% at 18% 28%, rgba(164, 157, 251, .55), transparent 60%),
  radial-gradient(50% 70% at 82% 72%, rgba(59, 43, 245, .60), transparent 65%),
  linear-gradient(160deg, #22179E 0%, #150F55 55%, #0E0E14 100%); }
.badge { background: rgba(255, 255, 255, .8); border-color: rgba(59, 43, 245, .2); }

/* Section tones: each band fades in from white and back out. */
.tone-lilac { background: linear-gradient(180deg, #FFFFFF 0%, #EEEAFF 38%, #F1EDFF 72%, #FFFFFF 100%); }
.tone-warm  { background: radial-gradient(55% 40% at 50% 4%, rgba(255, 186, 150, .40), transparent 70%), radial-gradient(45% 40% at 0% 70%, rgba(164, 157, 251, .28), transparent 70%), linear-gradient(180deg, #FFFFFF 0%, #FAF7FF 60%, #FFFFFF 100%); }
.tone-glow  { background: radial-gradient(40% 52% at 50% 66%, rgba(140, 125, 255, .50), transparent 72%), linear-gradient(180deg, #FFFFFF 0%, #F3F0FF 55%, #FFFFFF 100%); }
.tone-sand  { background: linear-gradient(180deg, #FFFFFF 0%, #FFF1E7 42%, #F8F1FF 75%, #FFFFFF 100%); }
.tone-lilac .sector, .tone-lilac .wide-pill, .tone-warm .feat { background: #fff; }
.tone-warm .feat__pic { background: #F3F1FB; }

/* Dark Said section: deep indigo to black with a faint glow behind the title. */
.ai { background:
  radial-gradient(50% 38% at 50% 0%, rgba(90, 70, 255, .38), transparent 70%),
  radial-gradient(40% 40% at 90% 85%, rgba(164, 157, 251, .14), transparent 70%),
  linear-gradient(180deg, #17115A 0%, #0F0B33 45%, #0B0A18 100%); }
.facts { background: radial-gradient(60% 120% at 100% 0%, rgba(164, 120, 255, .45), transparent 60%), linear-gradient(120deg, #3B2BF5 0%, #3A22D6 55%, #2A1AAE 100%); }
.final { background: radial-gradient(55% 90% at 100% 100%, rgba(255, 170, 140, .30), transparent 60%), radial-gradient(50% 80% at 0% 0%, rgba(164, 157, 251, .35), transparent 60%), linear-gradient(135deg, #3B2BF5 0%, #3222D0 60%, #2A1AAE 100%); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .nav__menu .nav__item:nth-child(n+4) { display: none; }
  .dash { grid-template-columns: 1fr 1fr; }
  .tile--big { grid-row: auto; }
  .feats { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; --nav-h: 52px; }
  body { font-size: 16px; }
  .nav__links, .nav__cta { display: none; }
  .nav__row { justify-content: space-between; }
  .nav__logo img { height: 38px; }
  .nav__burger { display: flex; }
  /* closed panel is display:none so the page does not lay it out at load */
  .mpanel { position: fixed; inset: 0; z-index: 60; background: #fff; padding: 74px 16px 24px; overflow-y: auto; }
  .mpanel.is-open { display: block; animation: panel-in .2s var(--ease); }
  @keyframes panel-in { from { opacity: 0; transform: translateY(-8px); } }
  .nav.menu-open { z-index: 70; position: fixed; inset: 0 0 auto; }
  .nav__row { pointer-events: none; }
  .nav__box { pointer-events: auto; }
  .mpanel details { border-bottom: 1px solid var(--line); }
  .mpanel summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; font: 600 20px/1.2 var(--head); cursor: pointer; }
  .mpanel summary::-webkit-details-marker { display: none; }
  .mpanel details[open] summary .chev { transform: rotate(180deg); }
  .mpanel ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
  .mpanel ul a { display: block; padding: 10px 4px; font-size: 16px; }
  .mpanel > a { display: block; padding: 16px 4px; border-bottom: 1px solid var(--line); font: 600 20px/1.2 var(--head); }
  .mpanel .btn { width: 100%; margin-top: 20px; }
  .announce a { font-size: 12.5px; }
  .hero__inner { padding-block: 44px 40px; }
  .badge { font-size: 12px; }
  .hero__h1 { margin-top: 26px; }
  .hero__kicker { font-size: 26px; }
  .hero__title { font-size: clamp(40px, 13vw, 60px); line-height: .9; }
  .hero__sub { font-size: 16px; margin-top: 18px; }
  .hero__cta { margin-top: 26px; }
  .hero__stage { padding: 28px 16px 0; }
  /* the dashboard drawing keeps its desktop layout and is shown smaller, like a picture */
  .shot { width: 880px; max-width: none; zoom: .4; margin-inline: auto; }
  .shot .dash { grid-template-columns: 1.25fr 1.25fr 1fr 1fr; }
  .shot .tile--big { grid-row: span 2; }
  .strip { height: 52px; }
  .strip .marquee__set { gap: 36px; padding-inline-end: 36px; }
  .sec { padding-top: 80px; }
  .h2 { font-size: 34px; }
  .sectors { grid-template-columns: 1fr 1fr; margin-top: 32px; }
  .sector { height: 92px; font-size: 15px; flex-direction: column; gap: 6px; }
  .feats { margin-top: 32px; gap: 16px; }
  .feat { grid-template-columns: 1fr; min-height: 0; }
  .feat__pic { height: 210px; }
  .ai { margin-top: 80px; padding-block: 72px; }
  .ai__grid { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
  .ai__panel { position: static; min-height: 340px; padding: 24px 18px; order: 2; }
  .conn__inner { height: 150px; }
  .ctile { width: 60px; height: 60px; border-radius: 14px; font-size: 9.5px; }
  .ctile .icon { width: 22px; height: 22px; margin-bottom: 4px; }
  .conn__hub img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 0 0 10px #fff, 0 14px 40px rgba(59,43,245,.35); }
  .facts { margin-top: 80px; padding-block: 24px; }
  .fact { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 18px; }
  .fact span { text-align: start; }
  .head-row { flex-direction: column; align-items: flex-start; margin-bottom: 28px; }
  .story { grid-template-columns: 1fr; min-height: 0; }
  .story__text { padding: 24px 20px; }
  .story__big { font-size: 22px; }
  .story__pic { height: 300px; }
  .app { width: 270px; height: 320px; }
  .h2.built { font-size: 40px; line-height: 1.02; -webkit-hyphens: auto; hyphens: auto; }
  html:lang(ar) .h2.built { font-size: 32px; line-height: 1.4; }
  .end { margin-top: 88px; }
  .final h2 { font-size: 40px; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__base { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 48px; }
  .foot__base img { width: 240px; margin-inline-start: -18px; }
  .foot__lang { margin-inline-start: 0; }
  .form .two { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  html:lang(ar) .hero__title { font-size: clamp(40px, 12vw, 56px); }
  html:lang(ar) .story__big { font-size: 21px; }
  html:lang(ar) .final h2 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}
