/* Qimma Labs · direction C (Contour)
   Dark is the main look; light follows the visitor's device setting.
   Layout is mobile-first; the desktop layout starts at 820px. */

/* Fonts are self-hosted (SIL Open Font License, see assets/fonts). */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("fonts/noto-kufi-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-600.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/plex-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("fonts/plex-arabic-600.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --bg: #111827;
  --band: #0D1320;
  --text: #F3F4F6;
  --muted: #AEB5C0;
  --body: #D1D5DB;
  --line: #2B3443;
  --contour: #263041;
  --accent: #6E97FF;
  --accent-text: #6E97FF;
  --btn-bg: #6E97FF;
  --btn-text: #111827;
  --ghost: #AEB5C0;
  --focus: #6E97FF;
  --logo-ink: #F3F4F6;
  --logo-blue: #6E97FF;
  --toggle-on: #F3F4F6;
  --toggle-on-text: #111827;

  --chat-bg: #0B141A;
  --chat-border: #0B141A;
  --wa-top: #202C33;
  --wa-name: #E9EDEF;
  --wa-avatar: #3B4A54;
  --wa-avatar-text: #E9EDEF;
  --in-bg: #202C33;
  --in-text: #E9EDEF;
  --out-bg: #005C4B;
  --out-text: #E9EDEF;
  --meta: #AEB5C0;
  --meta-out: #C7E3DC;
  --day-bg: #182229;
  --day-text: #AEB5C0;

  --font-latin: "Archivo", "Noto Kufi Arabic", system-ui, sans-serif;
  --font-arabic: "Noto Kufi Arabic", "Archivo", system-ui, sans-serif;
  --pad: 20px;
  --radius: 2px;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F7F6F2;
    --band: #EFEDE7;
    --text: #111827;
    --muted: #5B6472;
    --body: #374151;
    --line: #D9DAD6;
    --contour: #DEDDD6;
    --accent: #2F6BFF;
    --accent-text: #1F55E0;
    --btn-bg: #2F6BFF;
    --btn-text: #FFFFFF;
    --ghost: #111827;
    --focus: #1F55E0;
    --logo-ink: #111827;
    --logo-blue: #2F6BFF;
    --toggle-on: #111827;
    --toggle-on-text: #FFFFFF;

    --chat-bg: #EFEAE2;
    --chat-border: #DCD6CB;
    --wa-top: #F0F2F5;
    --wa-name: #111827;
    --wa-avatar: #DFE5E7;
    --wa-avatar-text: #3B4A54;
    --in-bg: #FFFFFF;
    --in-text: #111827;
    --out-bg: #D9FDD3;
    --out-text: #111827;
    --meta: #5B6472;
    --meta-out: #4B5563;
    --day-bg: #FFFFFF;
    --day-text: #5B6472;

    color-scheme: light;
  }
}

@media (min-width: 820px) {
  :root { --pad: 64px; }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-latin);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body {
  font-family: var(--font-arabic);
  line-height: 1.9;
}

/* Arabic is applied by script before first paint; this hides the
   English text for that instant, and shows the page anyway after 1.5 s. */
html.i18n-wait body {
  visibility: hidden;
  animation: i18n-reveal 0s linear 1.5s forwards;
}
@keyframes i18n-reveal { to { visibility: visible; } }

h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Latin headings use Archivo's wide cut; Arabic ignores it. */
h1, h2, h3, .num, .milestone, .hero-bar {
  font-variation-settings: "wdth" 116;
}

h1 {
  font-size: clamp(2.625rem, 1.4rem + 4.2vw, 5.25rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2.375rem, 1.7rem + 2.4vw, 4rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.5rem, 1.25rem + 0.7vw, 1.875rem);
  line-height: 1.15;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
}

html[lang="ar"] h1 {
  font-size: clamp(2.125rem, 1.1rem + 3.4vw, 4.25rem);
  line-height: 1.55;
  letter-spacing: 0;
}
html[lang="ar"] h2 {
  font-size: clamp(1.875rem, 1.35rem + 1.9vw, 3.125rem);
  line-height: 1.5;
  letter-spacing: 0;
}
html[lang="ar"] h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem);
  line-height: 1.5;
}

.lead {
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  color: var(--muted);
}
html[lang="ar"] .lead { font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); }

.lead-body {
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  color: var(--body);
}

.muted { color: var(--muted); }

.num {
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  color: var(--accent-text);
  font-variation-settings: "wdth" 125;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html[lang="ar"] .btn { font-size: 1rem; }

.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--text)); }

.btn-ghost { border-color: var(--ghost); background: transparent; color: var(--text); font-weight: 600; }
.btn-ghost:hover { border-color: var(--text); }

.btn-outline { border-color: var(--accent); background: transparent; color: var(--text); font-weight: 600; }
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.text-link:hover { text-decoration-thickness: 3px; }

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.logo-mark { width: 38px; height: 24px; }
.logo-ink { stroke: var(--logo-ink); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.logo-peak { stroke: var(--logo-blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo-node { fill: var(--logo-blue); }
.logo-word {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.logo-word b { font-weight: 700; }
.logo-word span { font-weight: 400; color: var(--muted); }

.main-nav { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-switch { display: none; }

.lang-toggle,
.lang-switch button {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}
[lang="ar"].lang-toggle,
.lang-switch [lang="ar"] { font-family: var(--font-arabic); font-size: 14px; }
[lang="en"].lang-toggle,
.lang-switch [lang="en"] { font-family: var(--font-latin); }

.lang-switch button {
  padding: 0 8px;
  color: var(--muted);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.lang-switch [lang="ar"] { text-underline-offset: 10px; }
.lang-switch button[aria-pressed="true"] {
  color: var(--text);
  font-weight: 700;
  text-decoration-line: underline;
}
.lang-switch button:hover { color: var(--text); }

.header-cta { display: none; }

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding-block: 8px 24px;
}
.mobile-menu nav a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}
.mobile-menu .btn { margin-top: 20px; }

@media (min-width: 820px) {
  .header-row { padding-block: 18px; }
  .logo { gap: 10px; }
  .logo-mark { width: 46px; height: 29px; }
  .logo-word { font-size: 21px; }

  .main-nav {
    display: flex;
    gap: clamp(20px, 2.5vw, 36px);
    font-weight: 500;
  }
  .main-nav a {
    padding-block: 12px;
    text-decoration: none;
    text-underline-offset: 8px;
  }
  .main-nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
  html[lang="ar"] .main-nav { font-size: 15px; }

  .header-actions { gap: 12px; }
  .lang-switch { display: flex; align-items: center; }
  .lang-toggle { display: none; }
  .header-cta { display: inline-flex; min-height: 48px; padding: 0 20px; font-size: 1rem; }
  html[lang="ar"] .header-cta { font-size: 15px; }
  .menu-button { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 40px 0;
}
.hero-content h1 { max-width: 13.5em; }
html[lang="ar"] .hero-content h1 { max-width: 13em; }
.hero-content .lead { max-width: 580px; margin-top: 24px; }

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
}

.hero-art {
  order: 2;
  width: 100%;
  height: 250px;
  margin-top: 24px;
}
.hero-art .contours path {
  fill: none;
  stroke: var(--contour);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.hero-art .climb {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.hero-art .node { fill: var(--accent); }
.hero-art .node { r: 10; }
.hero-art .summit { r: 13; }

[dir="rtl"] .hero-art,
[dir="rtl"] .steps-line { transform: scaleX(-1); }

@media (prefers-reduced-motion: no-preference) {
  .hero-art .climb {
    stroke-dasharray: 1;
    animation: climb 1.8s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s both;
  }
  .hero-art .node {
    animation: node-in 0.4s ease-out both;
  }
  .hero-art .node:nth-of-type(1) { animation-delay: 0.9s; }
  .hero-art .node:nth-of-type(2) { animation-delay: 1.3s; }
  .hero-art .summit { animation-delay: 1.9s; }
}
@keyframes climb { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes node-in { from { opacity: 0; } to { opacity: 1; } }

.hero-bar {
  order: 3;
  position: relative;
  z-index: 1;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.hero-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-variation-settings: "wdth" 125;
}
html[lang="ar"] .hero-bar-row { font-size: 13px; letter-spacing: 0; text-transform: none; }
.hero-bar-row span + span { display: none; }

@media (min-width: 820px) {
  .hero { min-height: 820px; }
  .hero-content { padding-block: 112px 72px; }
  .hero-content .lead { margin-top: 28px; }
  .hero-buttons { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

  .hero-art {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 62%;
    height: 100%;
    margin: 0;
  }
  .hero-art .climb { stroke-width: 2.4; }
  .hero-art .node { r: 5.5; }
  .hero-art .summit { r: 7; }

  .hero-bar-row { padding-block: 20px; font-size: 13px; letter-spacing: 0.18em; }
  .hero-bar-row span + span { display: inline; }
  html[lang="ar"] .hero-bar-row { font-size: 14px; }
}

/* ---------- Sections ---------- */

.section {
  border-top: 1px solid var(--line);
  padding-block: 64px 72px;
}
.band { background: var(--band); }

.section > .container > h2 { margin-bottom: 32px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  margin-bottom: 32px;
}
.section-head h2 { margin: 0; }
.section-head p { max-width: 400px; color: var(--muted); }

@media (min-width: 820px) {
  .section { padding-block: 128px 136px; }
  .section > .container > h2 { margin-bottom: 64px; }
  .section-head { margin-bottom: 64px; }
  .section-head p { font-size: 1.0625rem; }
}

/* Services */

.services {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 64px;
}
.services li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 16px;
  padding-block: 24px 28px;
  border-top: 1px solid var(--line);
}
.services .num { padding-top: 10px; }
.services p {
  max-width: 460px;
  margin-top: 10px;
  color: var(--body);
}

.quote-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.quote-row p {
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  font-weight: 500;
}
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }

@media (min-width: 820px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services li { padding-block: 32px 44px; }
  .services p { font-size: 1.0625rem; }
}

/* How we work: a vertical line on phones, a climbing line on desktop */

.steps-wrap { position: relative; }
.steps-line { display: none; }

.steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
/* Each step draws the line down to the next dot. */
.steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: -51px;
  inset-inline-start: 6px;
  width: 2px;
  background: var(--accent);
}
.steps li {
  position: relative;
  padding-inline-start: 40px;
}
.step-dot {
  position: absolute;
  top: 4px;
  inset-inline-start: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
}
.steps li:last-child .step-dot {
  top: 2px;
  inset-inline-start: -2px;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--accent);
}
.steps h3 { margin-top: 6px; font-weight: 800; font-variation-settings: "wdth" 116; }
.step-body { margin-top: 8px; color: var(--body); }
.milestone {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  font-variation-settings: "wdth" 100;
}

@media (min-width: 820px) {
  .steps-line {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 320px;
    overflow: visible;
  }
  .steps-climb, .steps-base { fill: none; vector-effect: non-scaling-stroke; }
  .steps-climb { stroke: var(--accent); stroke-width: 2; }
  .steps-base { stroke: var(--line); stroke-width: 1; }

  .steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .steps li:not(:last-child)::before { display: none; }
  .steps li { padding-inline: 0 40px; }
  .step-dot,
  .steps li:last-child .step-dot {
    position: static;
    display: block;
    width: 14px;
    height: 14px;
    margin-inline-start: -7px;
  }
  .steps li:last-child .step-dot {
    width: 18px;
    height: 18px;
    margin-top: -2px;
    margin-inline-start: -9px;
    box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--accent);
  }
  /* The dots climb 90px per step; the text lines up underneath. */
  .steps li:nth-child(1) { padding-top: 270px; }
  .steps li:nth-child(2) { padding-top: 180px; }
  .steps li:nth-child(3) { padding-top: 90px; }
  .steps li:nth-child(4) { padding-top: 0; }
  .steps li:nth-child(1) .num { margin-top: 64px; }
  .steps li:nth-child(2) .num { margin-top: 154px; }
  .steps li:nth-child(3) .num { margin-top: 244px; }
  .steps li:nth-child(4) .num { margin-top: 330px; }
  .steps h3 { margin-top: 8px; }
  .step-body { margin-top: 12px; font-size: 1.0625rem; }
  .milestone { margin-top: 20px; padding-top: 12px; }
}

/* Qimma Desk: intro, then the product itself (WhatsApp + the dashboard), then three steps */

.desk-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}
.product-name { font-size: 14px; color: var(--accent-text); }
.desk-text h2 { margin: 16px 0 0; }
.desk-text .lead-body { margin-top: 24px; }
.desk-text .muted { margin-top: 16px; }
.desk-side { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }

.facts { align-self: stretch; border-bottom: 1px solid var(--line); }
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { line-height: 1.5; }

.desk-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.stage-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-text);
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variation-settings: "wdth" 100;
}

/* WhatsApp side */

.chat { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
}
.chat-switch {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.chat-switch button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
}
.chat-switch [lang="ar"] { font-family: var(--font-arabic); font-size: 14px; }
.chat-switch [lang="en"] { font-family: var(--font-latin); }
.chat-switch button[aria-pressed="true"] { background: var(--toggle-on); color: var(--toggle-on-text); }

.wa {
  border: 1px solid var(--chat-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--chat-bg);
  font-family: var(--font-latin);
}
.wa[lang="ar"] { font-family: var(--font-arabic); }

.wa-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--wa-top);
}
.wa-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wa-avatar);
  color: var(--wa-avatar-text);
  font-size: 13px;
  font-weight: 600;
}
.wa-who { display: flex; flex-direction: column; line-height: 1.3; }
.wa-name { font-size: 15px; font-weight: 600; color: var(--wa-name); }
.wa-phone { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--meta); }
.wa[dir="rtl"] .wa-phone { text-align: right; }

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 14px 24px;
  font-size: 15px;
  line-height: 1.4;
}
.wa[lang="ar"] .chat-body { line-height: 1.75; }

.chat-day {
  align-self: center;
  margin-bottom: 6px;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--day-bg);
  color: var(--day-text);
  font-size: 13px;
}

.bubble {
  max-width: 82%;
  padding: 9px 13px 7px;
  border-radius: 10px;
}
.bubble.in {
  align-self: flex-start;
  border-start-start-radius: 2px;
  background: var(--in-bg);
  color: var(--in-text);
}
.bubble.out {
  align-self: flex-end;
  border-start-end-radius: 2px;
  background: var(--out-bg);
  color: var(--out-text);
}
.bubble-time {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  text-align: end;
  color: var(--meta);
}
.bubble.out .bubble-time { color: var(--meta-out); }

/* Qimma Desk app: a faithful, scaled-down picture of the product's Today screen.
   Its colours are the product's own, so it follows light and dark like the site. */

.desk-app { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.app {
  --a-ground: #0E1524;
  --a-surface: #141D30;
  --a-line: #27334E;
  --a-text: #EEF1F6;
  --a-muted: #A3ADBE;
  --a-accent: #6E97FF;
  --a-ink: #EEF1F6;
  --a-ink-text: #0E1524;
  --a-amber: #F5A524;
  --a-needs: #2A2414;
  --a-needs-line: #4A3E22;
  --a-needs-text: #E8C77B;
  --a-ok: #143A2B;
  --a-ok-text: #9BE5BA;
  --a-dot: #3FBF7F;
  --a-break: #111A2B;
  --a-active: #0E1524;

  display: flex;
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: 8px;
  background: var(--a-ground);
  color: var(--a-text);
  font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  cursor: default;
}
@media (prefers-color-scheme: light) {
  .app {
    --a-ground: #F3F4F6;
    --a-surface: #FFFFFF;
    --a-line: #D3D7DE;
    --a-text: #111827;
    --a-muted: #555E6C;
    --a-accent: #2F6BFF;
    --a-ink: #111827;
    --a-ink-text: #FFFFFF;
    --a-needs: #FFF4DC;
    --a-needs-line: #EDD9A8;
    --a-needs-text: #6B4E0E;
    --a-ok: #E2F4E9;
    --a-ok-text: #17633A;
    --a-dot: #2E9E62;
    --a-break: #F7F8FA;
    --a-active: #F3F4F6;
  }
}
html[lang="ar"] .app {
  font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.6;
}
.app b { font-weight: 600; }
.app .mono {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.app svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
[dir="rtl"] .app .flip-rtl { transform: scaleX(-1); }

.app-side {
  display: none;
  flex: 0 0 196px;
  flex-direction: column;
  gap: 18px;
  padding: 18px 12px;
  background: var(--a-surface);
  border-inline-end: 1px solid var(--a-line);
}
.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 6px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: -0.02em;
}
html[lang="ar"] .app-logo { font-family: "IBM Plex Sans Arabic", sans-serif; letter-spacing: 0; }
.app-logo b { font-weight: 700; }
.app-logo > span > span { color: var(--a-muted); }
.app .app-ink { stroke: var(--a-text); stroke-width: 3.4; }
.app .app-peak { stroke: var(--a-accent); stroke-width: 2.6; }

.app-biz {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border: 1px solid var(--a-line);
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.35;
}
.app-biz span { font-size: 11.5px; color: var(--a-muted); }

.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding-inline: 10px;
  border-radius: 6px;
  color: var(--a-muted);
}
.app-nav > span > span { flex: 1; }
.app-nav > .is-on { background: var(--a-active); color: var(--a-text); font-weight: 600; }
.app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--a-amber);
  color: #111827;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.app-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--a-line);
  font-size: 12px;
}
.app-status > span { display: flex; align-items: center; gap: 8px; }
.app .dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--a-dot); }

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 20px;
}
.app-head { display: flex; flex-direction: column; gap: 2px; }
.app-date {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-muted);
}
html[lang="ar"] .app-date { font-family: inherit; font-size: 12px; letter-spacing: 0; }
.app-title { font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
html[lang="ar"] .app-title { line-height: 1.4; letter-spacing: 0; }
.app-sum { color: var(--a-muted); }

.app-needs,
.app-appts {
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: 6px;
  background: var(--a-surface);
}

.needs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--a-needs);
  border-bottom: 1px solid var(--a-needs-line);
}
.needs-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--a-amber);
  color: #111827;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 500;
}
.needs-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.needs-text b { font-size: 16px; }
.needs-text span { font-size: 12.5px; color: var(--a-needs-text); }

.needs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "who wait" "what what";
  gap: 6px 16px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--a-line);
}
.needs-head + .needs-row { border-top: 0; }
.needs-row .who { grid-area: who; display: flex; flex-direction: column; line-height: 1.35; }
.needs-row .what { grid-area: what; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.needs-row .wait { grid-area: wait; display: flex; flex-direction: column; line-height: 1.3; text-align: end; }
.needs-row .app-btn { grid-area: btn; display: none; }
.who .mono { font-size: 11.5px; font-weight: 400; color: var(--a-muted); }
[dir="rtl"] .app .who .mono, [dir="rtl"] .app .wa-phone { text-align: right; }
.quote { font-size: 14px; }
.quote[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; line-height: 1.6; }
[dir="ltr"] .quote[dir="rtl"] { text-align: left; }
.why { font-size: 12px; color: var(--a-muted); }
.wait b { font-family: "IBM Plex Mono", monospace; font-weight: 500; }
html[lang="ar"] .wait b { font-family: inherit; font-weight: 600; }
.wait span { font-size: 11.5px; color: var(--a-muted); }
.app-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding-inline: 14px;
  border-radius: 6px;
  background: var(--a-ink);
  color: var(--a-ink-text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.appts-title { padding: 12px 14px; font-size: 16px; font-weight: 600; }
.appt {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 8px 14px;
  border-top: 1px solid var(--a-line);
}
.appt .s, .appt .c-with, .appt.cols { display: none; }
.appt.cols {
  min-height: 0;
  padding-block: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-muted);
}
html[lang="ar"] .appt.cols { font-family: inherit; font-size: 11.5px; letter-spacing: 0; }
.appt .t { white-space: nowrap; }
.appt .t b { font-size: 13.5px; }
.appt .t > span { font-size: 11px; color: var(--a-muted); }
.appt .c { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.appt .meta {
  font-size: 11.5px;
  color: var(--a-muted);
}
.appt .meta .mono { font-weight: 400; }
.appt .meta strong { color: var(--a-text); font-weight: 600; }
.appt .s { font-size: 12.5px; }
.appt .w { font-size: 12.5px; color: var(--a-muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding-inline: 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill.ok { background: var(--a-ok); color: var(--a-ok-text); }

.appt-now {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
html[lang="ar"] .appt-now { font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.appt-now i { flex: 1; border-top: 1.5px solid var(--a-text); }
.appt-break {
  padding: 7px 14px;
  border-top: 1px solid var(--a-line);
  background: var(--a-break);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: var(--a-muted);
}
html[lang="ar"] .appt-break { font-family: inherit; font-size: 12px; }

.appt.is-new {
  margin: 6px 8px 8px;
  padding-inline: 8px;
  border: 2px solid var(--a-accent);
  border-radius: 6px;
}
.new-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

/* The three steps under the product picture */

.desk-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 48px;
  margin-top: 40px;
}
.desk-steps li {
  display: flex;
  gap: 14px;
  padding-block: 20px 24px;
  border-top: 1px solid var(--line);
}
.desk-steps .marker { margin-top: 2px; }
.desk-steps h3 { font-size: clamp(1.1875rem, 1.1rem + 0.3vw, 1.3125rem); }
html[lang="ar"] .desk-steps h3 { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); }
.desk-steps p { margin-top: 8px; font-size: 15px; color: var(--body); }

@media (min-width: 640px) {
  .app-main { padding: 20px 20px 22px; }
  .needs-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) auto auto;
    grid-template-areas: "who what wait btn";
  }
  .needs-row .wait { text-align: start; }
  .needs-row .app-btn { display: inline-flex; }
  .appt { grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1.1fr) auto; }
  .appt .s, .appt.cols { display: grid; }
  .appt .s { display: block; }
}

@media (min-width: 820px) {
  .desk-intro {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 96px;
  }
  .facts > div { grid-template-columns: 130px minmax(0, 1fr); }
  .facts dd { font-size: 1.0625rem; }
  .desk-stage { margin-top: 72px; }
  .chat { max-width: 480px; }
  .desk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; }
}

@media (min-width: 1100px) {
  /* Side by side: the dashboard runs under the WhatsApp chat, which overlaps its end edge. */
  .desk-stage {
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 0;
    align-items: start;
  }
  .desk-app {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-inline-end: 320px;
  }
  /* keep the dashboard's content clear of the part the chat covers */
  .app-main { padding-inline-end: 104px; }
  .chat {
    position: relative;
    z-index: 2;
    grid-column: 2;
    grid-row: 1;
    max-width: none;
  }
  .wa { box-shadow: 0 24px 60px rgba(4, 8, 18, 0.45); }
  .app-side { display: flex; }
  .appt { grid-template-columns: 70px minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; }
  .appt .c-with { display: block; }
  .appt.cols .c-with { display: block; }
}
@media (min-width: 1100px) and (prefers-color-scheme: light) {
  .wa { box-shadow: 0 24px 60px rgba(17, 24, 39, 0.14); }
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.about-grid h2 { margin: 0; }
.aside {
  margin-top: 24px;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--accent);
  color: var(--muted);
}

.principles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 48px;
  margin-top: 40px;
}
.principles li {
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
}
.principles h3 {
  margin-top: 10px;
  font-size: clamp(1.3125rem, 1.2rem + 0.3vw, 1.375rem);
}
html[lang="ar"] .principles h3 { font-size: clamp(1.25rem, 1.15rem + 0.3vw, 1.375rem); }
.principles p:not(.num) {
  margin-top: 10px;
  font-size: 15px;
  color: var(--body);
}

@media (min-width: 820px) {
  .about-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 96px;
  }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; }
  .principles p:not(.num) { font-size: 1rem; }
}

/* Contact */

.contact-title { max-width: 960px; margin-bottom: 0 !important; }
#contact .lead { max-width: 620px; margin-top: 24px; }

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
  padding-block: 28px;
  border-block: 1px solid var(--line);
}
.email {
  font-family: var(--font-latin);
  font-size: clamp(1.75rem, 0.9rem + 3.6vw, 3.75rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  font-variation-settings: "wdth" 100;
}
.email:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 10px; }
.copy-button { min-height: 48px; padding: 0 18px; font-size: 15px; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}
.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
}
.socials > span { font-size: 14px; }
.socials a {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  font-family: var(--font-latin);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.socials a:hover > span:first-child { text-decoration: underline; text-decoration-color: var(--accent); }
.socials .handle { font-size: 13px; font-weight: 400; color: var(--muted); }

@media (min-width: 820px) {
  .email-row { margin-top: 64px; }
}

/* Footer */

.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 24px 32px;
  font-size: 14px;
  color: var(--muted);
}
@media (min-width: 820px) {
  .footer-row { padding-block: 28px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.i18n-wait body { visibility: visible; }
}
