/* elmudir — Apple-style marketing site. Logical properties throughout, so the
   Arabic (RTL) page mirrors without overrides. Glass appears only on the
   floating layer: the nav bar, the mobile menu and the live-agent launcher. */

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --card: var(--surface-2);           /* cards on white sections */
  --label: #1d1d1f;                   /* 16.8:1 on white */
  --label-2: #6e6e73;                 /* 5.07:1 on white, 4.66:1 on #f5f5f7 */
  --label-3: #aeaeb2;                 /* decoration only, never text */
  --separator: rgb(0 0 0 / .12);
  --hairline: rgb(0 0 0 / .08);
  --fill: rgb(118 118 128 / .12);     /* segmented tracks, quiet buttons */
  --fill-2: rgb(118 118 128 / .2);
  --accent: #1a6bc4;                  /* white text on it: 5.32:1 */
  --accent-hover: #1f74d4;
  --accent-press: #155aa6;
  --accent-text: #1a6bc4;             /* links: 5.32:1 on white */
  --accent-soft: rgb(26 107 196 / .1);
  --success: #1e7e34;                 /* 5.14:1 on white */
  --success-soft: rgb(30 126 52 / .1);
  --success-strong: #17652a;           /* 5.6:1 on the segmented track */
  --warning: #a35200;                 /* 5.58:1 on white */
  --warning-soft: #fff4e5;
  --danger: #c4191c;
  --danger-soft: #fdecec;
  --seg-thumb: #ffffff;
  --glass: rgb(255 255 255 / .72);
  --glass-strong: rgb(250 250 252 / .88);
  --glass-border: rgb(0 0 0 / .08);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
  --shadow-2: 0 2px 6px rgb(0 0 0 / .05), 0 24px 60px rgb(0 0 0 / .12);
  --wa-bg: #efeae2; --wa-head: #f7f7f7; --wa-in: #ffffff; --wa-out: #d9fdd3;
  --wa-text: #111b21; --wa-time: #667781; --wa-link: #027eb5; --wa-qr: rgb(0 0 0 / .04);
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 24px;
  --radius-xl: 32px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 52px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --fs-hero: clamp(2.75rem, 1.5rem + 5.4vw, 5.75rem);
  --fs-h2: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  --fs-h3: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + .55vw, 1.5rem);
  --fs-body: 1.0625rem;
}
:root:lang(ar) {
  --font: "IBM Plex Sans Arabic", -apple-system, "SF Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --fs-hero: clamp(2.5rem, 1.45rem + 4.6vw, 5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #101012;
    --surface: #1c1c1e;
    --surface-2: #1c1c1e;
    --label: #f5f5f7;                 /* 19.3:1 on black */
    --label-2: #a1a1a6;               /* 6.6:1 on #1c1c1e */
    --label-3: #48484a;
    --separator: rgb(255 255 255 / .16);
    --hairline: rgb(255 255 255 / .1);
    --fill: rgb(118 118 128 / .24);
    --fill-2: rgb(118 118 128 / .36);
    --accent-hover: #2a7fdc;
    --accent-text: #4da3ff;           /* 6.5:1 on #1c1c1e */
    --accent-soft: rgb(77 163 255 / .16);
    --success: #30d158;
    --success-strong: #30d158;
    --success-soft: rgb(48 209 88 / .14);
    --warning: #ffb340;
    --warning-soft: rgb(255 179 64 / .14);
    --danger: #ff6961;
    --danger-soft: rgb(255 105 97 / .14);
    --seg-thumb: #636366;
    --glass: rgb(22 22 23 / .72);
    --glass-strong: rgb(30 30 32 / .86);
    --glass-border: rgb(255 255 255 / .1);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .3);
    --shadow-2: 0 2px 6px rgb(0 0 0 / .4), 0 24px 60px rgb(0 0 0 / .5);
    --wa-bg: #0b141a; --wa-head: #1f2c34; --wa-in: #202c33; --wa-out: #005c4b;
    --wa-text: #e9edef; --wa-time: #8696a0; --wa-link: #53bdeb; --wa-qr: rgb(255 255 255 / .06);
  }
}
@media (prefers-contrast: more) {
  :root { --label-2: #3a3a3c; --separator: rgb(0 0 0 / .4); --hairline: rgb(0 0 0 / .28); --accent-text: #0f4f99; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --label-2: #d1d1d6; --separator: rgb(255 255 255 / .45); --hairline: rgb(255 255 255 / .3); --accent-text: #8cc4ff; }
}

/* ── 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;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.47;
  color: var(--label);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
:root:lang(ar) body { line-height: 1.7; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
section[id], [id="top"] { scroll-margin-top: calc(var(--nav-h) + 8px); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--label); color: var(--bg);
  transform: translateY(-150%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }

.i {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.logo { fill: currentColor; flex: none; }
[dir="rtl"] .i-dir { transform: scaleX(-1); }

.shell { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.shell.narrow { width: min(820px, 100% - 2 * var(--gutter)); }
.section { padding-block: clamp(80px, 10vw, 140px); }
.tint { background: var(--bg-2); --card: var(--surface); }
.center { text-align: center; }
.fine { font-size: .8125rem; line-height: 1.5; color: var(--label-2); margin-top: 16px; }

/* Headlines: SF-like tracking for Latin, none for Arabic. */
:lang(en) h1 { letter-spacing: -.035em; line-height: 1.03; }
:lang(en) h2 { letter-spacing: -.025em; line-height: 1.08; }
:lang(en) h3 { letter-spacing: -.015em; line-height: 1.18; }
:lang(ar) h1 { line-height: 1.22; }
:lang(ar) h2 { line-height: 1.3; }
:lang(ar) h3 { line-height: 1.35; }

.section-head { max-width: 860px; margin-inline: auto; text-align: center; }
.eyebrow { font-size: .9375rem; font-weight: 600; color: var(--label-2); margin-block-end: 12px; }
.section-head h2, .workflow-copy h2 { font-size: var(--fs-h2); }
.lead { font-size: var(--fs-lead); line-height: 1.4; color: var(--label-2); margin-block-start: 18px; }
:lang(ar) .lead { line-height: 1.65; }

/* ── Buttons & links ──────────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px;
  border: 0; border-radius: 980px;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.25; text-align: center;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary { background: transparent; color: var(--accent-text); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-small { min-height: 32px; padding: 6px 14px; font-size: .875rem; }
.btn-small::after { content: ""; position: absolute; inset: -6px -2px; } /* 44px touch target */
.btn-large { min-height: 52px; padding: 14px 28px; }
.btn-block { display: flex; width: 100%; }
.btn-whatsapp { background: var(--surface); color: var(--label); box-shadow: inset 0 0 0 1px var(--separator); }
.btn-whatsapp:hover { background: var(--bg-2); }
.btn-whatsapp .logo { width: 20px; height: 20px; color: #25d366; }
.text-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-text); font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .i { width: 1em; height: 1em; stroke-width: 2.2; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--label);
  transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--fill); }
.icon-btn .i { width: 22px; height: 22px; }
.quiet-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 980px; background: transparent; color: var(--label-2); font-size: .9375rem;
}
.quiet-btn:hover { background: var(--fill); color: var(--label); }

/* ── Chips & segmented controls ───────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 980px; background: var(--card); color: var(--label);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: .9375rem; font-weight: 500; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--separator); }
.chip[aria-pressed="true"] { background: var(--label); color: var(--bg); box-shadow: none; }
.chip.is-small { min-height: 36px; padding: 6px 14px; font-size: .875rem; white-space: normal; text-align: start; line-height: 1.3; }

.segmented { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.segmented-legend { padding: 0; margin-block-end: 10px; font-size: .9375rem; color: var(--label-2); }
.segmented-track { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--fill); }
.segmented label { position: relative; display: flex; }
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 18px; border-radius: 9px;
  font-size: .9375rem; font-weight: 500; white-space: nowrap; color: var(--label);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.segmented input:checked + span {
  background: var(--seg-thumb); font-weight: 600;
  box-shadow: 0 3px 8px rgb(0 0 0 / .12), 0 1px 1px rgb(0 0 0 / .04);
}
.segmented input:focus-visible + span { outline: 3px solid var(--accent-text); outline-offset: 1px; }
.segmented.is-compact span { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.segmented .save { font-style: normal; font-size: .8125rem; font-weight: 600; color: var(--success-strong, var(--success)); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border-block-end: 1px solid var(--hairline);
}
.nav-bar {
  width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 28px; margin-inline: auto; font-size: .875rem; }
.nav-links a { color: var(--label-2); padding-block: 14px; transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--label); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang-link { font-size: .875rem; font-weight: 600; color: var(--label); padding: 12px 4px; }
.lang-link:hover { color: var(--accent-text); }
.menu-btn { display: none; margin-inline-end: -10px; }
.mobile-menu {
  position: absolute; inset-inline: 0; inset-block-start: 100%;
  height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  padding: 16px var(--gutter) 40px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  backdrop-filter: blur(30px) saturate(1.8);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav a {
  display: flex; align-items: center; min-height: 56px;
  font-size: 1.5rem; font-weight: 600; border-block-end: 1px solid var(--hairline);
}
.mobile-menu .btn { margin-block-start: 28px; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions { margin-inline-start: auto; gap: 8px; }
  .menu-btn { display: grid; }
}
@media (max-width: 440px) {
  .nav-actions .lang-link { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { padding-block-start: clamp(48px, 7vw, 96px); text-align: center; overflow: clip; }
.hero-copy { width: min(980px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 14px; border-radius: 980px; background: var(--fill);
  font-size: .875rem; font-weight: 600; line-height: 1.35; color: var(--label);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.hero h1 { font-size: var(--fs-hero); margin-block-start: 22px; }
.hero h1 > span { display: block; }
.hero h1 > span:first-child { color: var(--label-2); }
.hero-sub { max-width: 780px; margin: 26px auto 0; font-size: var(--fs-lead); line-height: 1.45; color: var(--label-2); }
:lang(ar) .hero-sub { line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-block-start: 36px; }
.hero-actions .text-link { font-size: 1.0625rem; min-height: 44px; }

.hero-stage {
  position: relative; display: grid; justify-items: center;
  width: min(1100px, 100% - 2 * var(--gutter)); margin: clamp(48px, 6vw, 80px) auto 0;
  padding-block-end: clamp(24px, 4vw, 56px);
}
.hero-stage::before {
  content: ""; position: absolute; inset: 8% 18% 0; z-index: -1;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
}
.phone {
  width: 320px; height: 620px; padding: 11px; border-radius: 54px;
  background: #1d1d1f; box-shadow: var(--shadow-2), inset 0 0 0 1.5px #48484a, inset 0 0 0 4px #1d1d1f;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 43px; overflow: hidden;
  display: flex; flex-direction: column; background: var(--wa-bg); color: var(--wa-text); text-align: start;
}
.phone-screen::before { /* the island */
  content: ""; position: absolute; inset-block-start: 11px; left: 50%; translate: -50% 0;
  width: 92px; height: 27px; border-radius: 20px; background: #000; z-index: 2;
}
.wa-head {
  display: flex; align-items: center; gap: 10px; padding: 50px 14px 10px;
  background: var(--wa-head); border-block-end: 1px solid var(--hairline);
}
.wa-avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: #8a5a44; color: #fff; font-weight: 700; font-size: 15px; flex: none;
}
.wa-title { display: flex; flex-direction: column; line-height: 1.25; }
.wa-title b { font-size: 15px; }
.wa-title small { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--wa-time); }
.wa-thread {
  flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px;
  font-size: 13.5px; line-height: 1.38; overflow: hidden;
}
:lang(ar) .wa-thread { line-height: 1.6; }
.bubble {
  max-width: 86%; padding: 6px 9px 5px; border-radius: 10px;
  background: var(--wa-in); box-shadow: 0 1px .5px rgb(0 0 0 / .13);
}
.bubble.is-customer { align-self: flex-end; background: var(--wa-out); border-start-end-radius: 3px; }
.bubble.is-agent { align-self: flex-start; border-start-start-radius: 3px; }
.bubble time { float: inline-end; margin-inline-start: 10px; margin-block-start: 5px; font-size: 10.5px; line-height: 1; color: var(--wa-time); }
.ticks { color: #53bdeb; letter-spacing: -2px; }
.bubble.is-doc { display: flex; align-items: center; gap: 10px; padding: 8px; }
.doc-icon {
  display: grid; place-items: center; width: 34px; height: 42px; border-radius: 5px; flex: none;
  background: #e2493b; color: #fff; font: 700 9.5px/1 Inter, system-ui, sans-serif; letter-spacing: .02em;
}
.doc-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.doc-text b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-text small { font-size: 11px; color: var(--wa-time); }
.quick-replies { display: flex; gap: 5px; margin-block-start: 7px; }
.qr {
  flex: 1; padding: 6px 4px; border-radius: 7px; text-align: center;
  background: var(--wa-qr); color: var(--wa-link); font-size: 12.5px; font-weight: 600;
}
.wa-system {
  align-self: center; display: inline-flex; align-items: center; gap: 6px; margin-block-start: 4px;
  padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 600;
  background: #e3f4e6; color: #17652a;
}
@media (prefers-color-scheme: dark) { .wa-system { background: #10331a; color: #7fe39a; } }
.live-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #30d158; flex: none; }

.callout {
  position: absolute; width: 288px; padding: 16px 18px; text-align: start;
  border-radius: var(--radius-m); background: var(--surface);
  box-shadow: var(--shadow-2), inset 0 0 0 1px var(--hairline);
  font-size: .875rem; line-height: 1.4;
}
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-block-end: 10px; }
.callout-title .i { color: var(--accent-text); }
.callout ol { list-style: none; padding: 0; display: grid; gap: 8px; }
.callout li { display: flex; align-items: center; gap: 8px; color: var(--label-2); }
.callout li .i { color: var(--success); width: 16px; height: 16px; stroke-width: 2.2; }
.callout li.is-wait { color: var(--label); font-weight: 500; }
.callout li.is-wait .i { color: var(--warning); }
.callout-steps { inset-inline-start: 2%; inset-block-start: 16%; }
.callout-erp { inset-inline-end: 2%; inset-block-end: 22%; }
.erp-app { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--label-2); }
.erp-row { display: flex; align-items: center; justify-content: space-between; margin-block: 12px 6px; font-size: 1.25rem; }
.erp-line { display: flex; justify-content: space-between; gap: 12px; color: var(--label-2); }
.erp-line b { color: var(--label); white-space: nowrap; }
.erp-by { display: flex; align-items: center; gap: 6px; margin-block-start: 12px; padding-block-start: 10px; border-block-start: 1px solid var(--hairline); font-size: .8125rem; color: var(--label-2); }
.erp-by .i { color: var(--success); }
.state-pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 980px;
  background: var(--success-soft); color: var(--success); font-size: .8125rem; font-weight: 600;
}
@media (max-width: 1000px) {
  .callout-steps { display: none; }
  .callout-erp { position: relative; inset: auto; width: min(320px, 100%); margin-block-start: -64px; }
}
@media (max-width: 380px) {
  .phone { width: 300px; height: 610px; }
}

/* The one orchestrated moment: the conversation plays once, then rests. */
@media (prefers-reduced-motion: no-preference) {
  .hero-stage [style*="--i"] {
    animation: rise .6s var(--ease-out) both;
    animation-delay: calc(var(--i) * .55s + .5s);
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ── Metrics ──────────────────────────────────────────────────────────────── */
.metrics { width: min(1180px, 100% - 2 * var(--gutter)); margin: clamp(56px, 7vw, 88px) auto 0; }
.metrics-title { font-size: .9375rem; font-weight: 600; color: var(--label-2); text-align: center; margin-block-end: 16px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--radius-l); background: var(--bg-2); }
.metric { display: flex; flex-direction: column; align-items: center; padding: 32px 24px; text-align: center; }
.metric + .metric { border-inline-start: 1px solid var(--hairline); }
.metric dt { order: 2; margin-block-start: 10px; font-size: .9375rem; font-weight: 500; line-height: 1.35; }
.metric-value { order: 1; font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.5rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
:lang(ar) .metric-value { letter-spacing: 0; font-size: clamp(2rem, 1.45rem + 2vw, 3.1rem); line-height: 1.2; }
.metric-context { order: 3; margin-block-start: 4px; font-size: .8125rem; color: var(--label-2); }
.metrics-note { text-align: center; }
@media (max-width: 900px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(3) { border-inline-start: 0; }
  .metric:nth-child(n + 3) { border-block-start: 1px solid var(--hairline); }
  .metric { padding: 24px 14px; }
}

/* ── Interactive demo ─────────────────────────────────────────────────────── */
.demo { overflow-x: clip; }
.demo-stage {
  display: grid; grid-template-columns: 1fr minmax(0, 700px) 1fr; grid-auto-flow: dense;
  align-items: center; gap: 12px 28px; margin-block-start: 56px;
}
.demo-questions { display: contents; }
.demo-questions .chip:nth-child(-n + 9) { grid-column: 1; justify-self: end; }
.demo-questions .chip:nth-child(n + 10) { grid-column: 3; justify-self: start; }
.demo-device { grid-column: 2; grid-row: 1 / span 9; }
.demo-screen {
  overflow: hidden; border: 10px solid #1d1d1f; border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow-2);
}
.demo-base {
  height: 14px; margin-inline: -7%; border-radius: 0 0 16px 16px;
  background: linear-gradient(#e3e3e8, #b8b8be); box-shadow: 0 10px 24px rgb(0 0 0 / .12);
}
@media (prefers-color-scheme: dark) { .demo-base { background: linear-gradient(#4a4a4e, #2c2c2e); } }
.demo-chrome {
  display: flex; align-items: center; gap: 12px; height: 34px; padding-inline: 14px;
  background: var(--surface-2); border-block-end: 1px solid var(--hairline);
  font-size: .75rem; font-weight: 600; color: var(--label-2);
}
.demo-chrome small { margin-inline-start: auto; font-size: .6875rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.traffic { display: inline-flex; gap: 6px; }
.traffic i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.traffic i:nth-child(2) { background: #febc2e; }
.traffic i:nth-child(3) { background: #28c840; }
.demo-channel { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-block-end: 1px solid var(--hairline); }
.demo-channel strong { font-size: .9375rem; }
.demo-channel small { margin-inline-start: auto; font-size: .8125rem; color: var(--label-2); }
.emblem {
  display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px;
  background: var(--emblem); color: #fff; font-size: 14px; font-weight: 700; line-height: 1;
}
.emblem.is-small { width: 20px; height: 20px; border-radius: 6px; font-size: 11px; }
.demo-content {
  display: flex; flex-direction: column; gap: 12px; min-height: 372px; padding: 16px;
  background: var(--bg-2); font-size: .9063rem; line-height: 1.45;
}
:lang(ar) .demo-content { line-height: 1.65; }
.demo-message {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .06);
}
.demo-message-body { min-width: 0; flex: 1; }
.demo-person {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--fill); font-size: .8125rem; font-weight: 600;
}
.demo-person.is-bot { background: var(--label); color: var(--bg); }
.demo-meta { display: flex; align-items: baseline; gap: 8px; font-size: .8125rem; }
.demo-meta span { font-size: .75rem; color: var(--label-2); }
.demo-steps { list-style: none; padding: 0; margin-block-start: 6px; font-size: .8125rem; color: var(--label-2); }
.demo-steps li { position: relative; padding-inline-start: 14px; }
.demo-steps li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--label-3); }
.demo-result { margin-block-start: 10px; padding-block-start: 10px; border-block-start: 1px solid var(--hairline); }
.demo-result-head { font-weight: 600; margin-block-end: 2px; }
.demo-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.demo-sources span { padding: 2px 9px; border-radius: 980px; background: var(--fill); font-size: .75rem; font-weight: 500; }
.demo-scope { margin-block-start: 8px; font-size: .75rem; color: var(--label-2); }
.demo-dock { display: flex; justify-content: center; gap: 6px; padding: 8px; border-block-start: 1px solid var(--hairline); background: var(--surface); }
.dock-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; transition: background-color .2s var(--ease); }
.dock-btn:hover { background: var(--fill); }
.dock-btn[aria-pressed="true"] { background: var(--fill-2); }
.demo-roles { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-block-start: 40px; }
.role-caption { font-size: .9375rem; color: var(--label-2); text-align: center; }
.demo-controls { display: flex; justify-content: center; gap: 8px; margin-block-start: 12px; }
.demo-anim { animation: appear .45s var(--ease-out) both; animation-delay: var(--delay, 0s); }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } }
.motion-paused .demo-anim { animation: none; }
@media (max-width: 1100px) {
  .demo-stage { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .demo-questions {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter);
  }
  .demo-questions::-webkit-scrollbar { display: none; }
  .demo-questions .chip { scroll-snap-align: start; flex: none; }
  .demo-device { width: 100%; max-width: 700px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .demo-screen { border-width: 6px; border-radius: 16px; }
  .demo-base { margin-inline: -3%; height: 10px; }
  .demo-content { padding: 10px; min-height: 420px; }
  .demo-channel small { display: none; }
  .demo-chrome small { display: none; }
  .segmented span { padding: 0 12px; font-size: .875rem; }
}

/* ── Integrations ─────────────────────────────────────────────────────────── */
.layer-tabs { display: flex; width: fit-content; max-width: 100%; margin: 40px auto 0; padding: 4px; border-radius: 14px; background: var(--fill); }
.layer-tabs [role="tab"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 11px; background: transparent; font-size: .9375rem; font-weight: 500;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.layer-tabs [aria-selected="true"] { background: var(--seg-thumb); font-weight: 600; box-shadow: 0 3px 8px rgb(0 0 0 / .12); }
.layer-tabs .i { color: var(--label-2); }
.layer-panel { margin-block-start: 36px; }
.layer-intro { max-width: 640px; margin: 0 auto 32px; text-align: center; color: var(--label-2); }
.int-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.int-group { padding: 28px; border-radius: var(--radius-l); background: var(--card); }
.int-group h3 { font-size: 1.1875rem; margin-block-end: 12px; }
.int-list { list-style: none; padding: 0; }
.int-tile { display: flex; align-items: center; gap: 14px; padding-block: 11px; border-block-end: 1px solid var(--hairline); }
.int-tile:last-child { border-block-end: 0; }
.int-tile b { display: block; font-size: .9688rem; font-weight: 600; line-height: 1.3; }
.int-tile small { display: block; font-size: .8125rem; color: var(--label-2); }
.app-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 11px;
  background: #fff; color: var(--tint);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08), 0 1px 2px rgb(0 0 0 / .06);
}
.app-icon .logo { width: 26px; height: 26px; }
.app-icon .logo.is-wide { width: 36px; height: 36px; }
.app-icon .i { width: 24px; height: 24px; stroke-width: 2; }
.app-icon.is-mono { background: var(--tint); color: #fff; font-size: 1.25rem; font-weight: 700; box-shadow: none; }
.app-icon.is-small { width: 26px; height: 26px; border-radius: 7px; }
.app-icon.is-small .logo { width: 18px; height: 18px; }
.infra-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.infra-card { padding: 28px; border-radius: var(--radius-l); background: var(--card); }
.infra-card h3 { font-size: 1.1875rem; margin-block: 16px 2px; }
.infra-role { font-size: .875rem; font-weight: 600; color: var(--label-2); margin-block-end: 8px; }
.infra-card p:last-child { font-size: .9375rem; color: var(--label-2); }
.int-footer { margin-block-start: 40px; }
@media (max-width: 560px) {
  .layer-tabs [role="tab"] { padding: 0 12px; font-size: .875rem; }
  .layer-tabs .i { display: none; }
  .int-group, .infra-card { padding: 22px 20px; }
}

/* ── Workflows ────────────────────────────────────────────────────────────── */
.workflow-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.workflow-copy .lead { margin-block-start: 16px; }
.workflow-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 28px; }
.workflow-tagline { margin-block-start: 20px; font-size: .9375rem; color: var(--label-2); }
.workflow-card { min-height: 392px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-l); background: var(--card); }
.workflow-meta { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.workflow-meta span:last-child { color: var(--label-2); }
.workflow-prompt { margin-block: 18px 20px; padding-block-end: 20px; border-block-end: 1px solid var(--hairline); font-size: 1.3125rem; font-weight: 500; line-height: 1.38; }
.workflow-steps { list-style: none; padding: 0; display: grid; gap: 14px; }
.workflow-steps li { display: flex; gap: 12px; }
.workflow-steps b { display: block; font-size: .9688rem; }
.workflow-steps span:not(.workflow-num) { display: block; font-size: .875rem; color: var(--label-2); }
.workflow-num { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--label); color: var(--bg); font-size: .8125rem; font-weight: 600; }
.workflow-output { margin-block-start: 22px; padding: 14px 16px; border-radius: 14px; background: var(--success-soft); color: var(--success); font-size: .9375rem; font-weight: 600; }
@media (max-width: 900px) { .workflow-grid { grid-template-columns: 1fr; } }

/* ── Product tiles ────────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block-start: 56px; }
.tile {
  display: flex; flex-direction: column; gap: 32px; overflow: hidden;
  padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-xl); background: var(--card);
}
.tile-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.tile-wide > * { flex: 1; min-width: 0; }
.tile h3 { font-size: var(--fs-h3); }
.tile p { margin-block-start: 12px; color: var(--label-2); }
.tile .text-link { margin-block-start: 18px; }
.viz-network { position: relative; height: 320px; }
.viz-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--separator); stroke-width: 1.5; stroke-dasharray: 4 6; }
.viz-center, .viz-node { position: absolute; translate: -50% -50%; white-space: nowrap; }
.viz-center {
  left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px;
  border-radius: 980px; background: var(--label); color: var(--bg); font-weight: 600; font-size: .9375rem;
  box-shadow: var(--shadow-2);
}
.viz-node { padding: 8px 14px; border-radius: 980px; background: var(--bg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--hairline); font-size: .875rem; font-weight: 500; }
.tint .viz-node { background: var(--bg-2); }
.n1 { left: 13%; top: 16%; } .n2 { left: 87%; top: 22%; } .n3 { left: 90%; top: 54%; }
.n4 { left: 15%; top: 84%; } .n5 { left: 86%; top: 85%; }
.audit-list { list-style: none; padding: 0; margin-block-start: auto; }
.audit-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 13px; border-block-end: 1px solid var(--hairline); font-size: .9375rem; }
.audit-list li:last-child { border-block-end: 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 980px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.pill .i { width: 14px; height: 14px; stroke-width: 2.2; }
.pill.is-ok { background: var(--success-soft); color: var(--success); }
.pill.is-warn { background: var(--warning-soft); color: var(--warning); }
.pill.is-info { background: var(--fill); color: var(--label); }
.viz-doors {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "a b" "c c" "d e";
  gap: 10px; margin-block-start: auto;
}
.door { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border-radius: 980px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); font-size: .875rem; font-weight: 600; }
.tint .door { background: var(--bg-2); }
.d1 { grid-area: a; } .d2 { grid-area: b; } .d3 { grid-area: d; } .d4 { grid-area: e; }
.door-card { grid-area: c; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; border-radius: var(--radius-m); background: var(--label); color: var(--bg); text-align: center; }
.door-card small { font-size: .75rem; opacity: .75; }
.door-card b { font-size: 1.0625rem; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .tile-wide { flex-direction: column; align-items: stretch; }
  .viz-network { height: 260px; }
}
@media (max-width: 480px) {
  .viz-node { font-size: .75rem; padding: 6px 10px; }
  .viz-center { padding: 12px 16px; font-size: .875rem; }
}

/* ── Trust (dark) ─────────────────────────────────────────────────────────── */
.dark {
  color-scheme: dark;
  --bg: #000; --bg-2: #000; --surface: #1c1c1e; --surface-2: #2c2c2e; --card: #1c1c1e;
  --label: #f5f5f7; --label-2: #a1a1a6; --label-3: #48484a;
  --separator: rgb(255 255 255 / .16); --hairline: rgb(255 255 255 / .1);
  --fill: rgb(118 118 128 / .24); --fill-2: rgb(118 118 128 / .36);
  --accent-text: #4da3ff; --accent-soft: rgb(77 163 255 / .16);
  --success: #30d158; --success-soft: rgb(48 209 88 / .14);
  --warning: #ffb340; --warning-soft: rgb(255 179 64 / .14);
  background: var(--bg); color: var(--label);
}
@media (prefers-color-scheme: dark) {
  .dark { --bg: #0b0b0d; border-block: 1px solid var(--hairline); }
}
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block-start: 56px; }
.badge-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(26px, 3.5vw, 40px); border-radius: var(--radius-xl); background: var(--card); }
.badge-card h3 { font-size: 1.5rem; }
.badge-card p { color: var(--label-2); }
.badge-gate { grid-column: 1 / -1; }
.badge-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.badge-icon .i { width: 26px; height: 26px; }
.badge-icon.is-wa { background: rgb(37 211 102 / .15); color: #25d366; }
.badge-icon .logo { width: 26px; height: 26px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: auto; padding-block-start: 6px; }
.tag { padding: 6px 12px; border-radius: 980px; background: var(--surface-2); font-size: .875rem; font-weight: 500; color: var(--label); }
.gate-flow { display: flex; align-items: stretch; gap: 12px; list-style: none; padding: 0; margin-block-start: 10px; }
.gate-step { flex: 1; display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--radius-m); background: var(--surface-2); font-weight: 600; }
.gate-num { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; font-size: .875rem; color: #000; }
.s1 .gate-num { background: #4da3ff; }
.s2 .gate-num { background: #ffb340; }
.s3 .gate-num { background: #30d158; }
.gate-arrow { display: grid; place-items: center; color: var(--label-2); }
.gate-arrow .i { width: 22px; height: 22px; }
.trust-lower { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; margin-block-start: 20px; }
.settings-card { padding: 6px 24px 10px; border-radius: var(--radius-xl); background: var(--card); }
.settings-head { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; border-block-end: 1px solid var(--hairline); }
.settings-card ul { list-style: none; padding: 0; }
.settings-card li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--hairline); }
.settings-card li:last-child { border-block-end: 0; }
.settings-card li b { display: block; font-size: .9688rem; }
.settings-card li small { display: block; font-size: .8125rem; color: var(--label-2); }
.setting-state { font-size: .875rem; color: var(--label-2); white-space: nowrap; }
.trust-points { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.trust-points li { padding: 26px; border-radius: var(--radius-xl); background: var(--card); }
.trust-points h3 { font-size: 1.1875rem; margin-block-end: 6px; }
.trust-points p { font-size: .9375rem; color: var(--label-2); }
@media (max-width: 900px) {
  .badges, .trust-lower { grid-template-columns: 1fr; }
  .gate-flow { flex-direction: column; }
  .gate-arrow .i, [dir="rtl"] .gate-arrow .i-dir { transform: rotate(90deg); }
}
@media (max-width: 560px) { .trust-points { grid-template-columns: 1fr; } }

/* ── ROI ──────────────────────────────────────────────────────────────────── */
.roi-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; margin-block-start: 56px; }
.card { padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius-xl); background: var(--card); }
.roi-inputs h3, .roi-results h3 { font-size: 1.0625rem; color: var(--label-2); font-weight: 600; }
.roi-field { padding-block: 22px; border-block-end: 1px solid var(--hairline); }
.roi-field:last-child { border-block-end: 0; padding-block-end: 4px; }
.roi-label-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-block-end: 12px; }
.roi-label-row label { font-size: 1rem; font-weight: 500; line-height: 1.35; max-width: 34ch; }
.roi-value { display: inline-flex; align-items: baseline; gap: 6px; flex: none; }
.roi-value input {
  width: 3.4em; padding: 0; border: 0; border-block-end: 1.5px solid transparent; border-radius: 0;
  background: transparent; text-align: end; direction: ltr;
  font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.roi-value input:hover, .roi-value input:focus { border-block-end-color: var(--separator); outline: none; }
.roi-value input:focus-visible { border-block-end-color: var(--accent-text); }
.roi-value input::-webkit-inner-spin-button, .roi-value input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.roi-unit { font-size: .9375rem; color: var(--label-2); }
.range-ends { display: flex; justify-content: space-between; margin-block-start: 4px; font-size: .75rem; color: var(--label-2); font-variant-numeric: tabular-nums; }

.slider {
  --slider-track-size: 6px;
  --slider-thumb-size: 28px;
  --slider-track-color: var(--fill-2);
  --slider-fill-color: var(--accent);
  --slider-direction: to right;
  --attr-min: 0; --attr-max: 100; --control-value: 50;
  --slider-progress: calc((var(--control-value) - var(--attr-min)) / (var(--attr-max) - var(--attr-min)) * 100%);
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; cursor: pointer;
}
.slider:dir(rtl) { --slider-direction: to left; }
.slider::-webkit-slider-runnable-track {
  height: var(--slider-track-size); border: 0; border-radius: 999px;
  background: linear-gradient(var(--slider-direction), var(--slider-fill-color) var(--slider-progress), var(--slider-track-color) var(--slider-progress));
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: var(--slider-thumb-size); height: var(--slider-thumb-size);
  margin-block-start: calc((var(--slider-track-size) - var(--slider-thumb-size)) / 2);
  border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgb(0 0 0 / .04), 0 3px 8px rgb(0 0 0 / .15), 0 3px 1px rgb(0 0 0 / .06);
}
.slider::-moz-range-track { height: var(--slider-track-size); border: 0; border-radius: 999px; background: var(--slider-track-color); }
.slider::-moz-range-progress { height: var(--slider-track-size); border-radius: 999px; background: var(--slider-fill-color); }
.slider::-moz-range-thumb {
  width: var(--slider-thumb-size); height: var(--slider-thumb-size); border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgb(0 0 0 / .04), 0 3px 8px rgb(0 0 0 / .15), 0 3px 1px rgb(0 0 0 / .06);
}
.slider:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 4px; border-radius: 8px; }

.roi-results { position: sticky; inset-block-start: calc(var(--nav-h) + 20px); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--hairline); }
.roi-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.roi-hero { display: flex; flex-direction: column; padding-block: 18px 22px; border-block-end: 1px solid var(--hairline); }
.roi-big { font-size: clamp(3.5rem, 2.4rem + 4vw, 5.5rem); font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.roi-big-label { margin-block-start: 8px; color: var(--label-2); }
.roi-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 13px; border-block-end: 1px solid var(--hairline); }
.roi-rows dt { font-size: .9375rem; color: var(--label-2); }
.roi-rows dd { display: inline-flex; align-items: center; gap: 6px; font-size: 1.0625rem; font-variant-numeric: tabular-nums; text-align: end; }
.roi-rows dd .i { width: 16px; height: 16px; color: var(--label-2); }
.roi-results .btn { margin-block-start: 24px; }
@media (max-width: 960px) {
  .roi-grid { grid-template-columns: 1fr; }
  .roi-results { position: static; }
}

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; margin-block-start: 40px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; margin-block-start: 44px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 34px 28px 30px; border-radius: var(--radius-xl); background: var(--card); }
.plan.is-featured { box-shadow: 0 0 0 2px var(--accent), var(--shadow-2); background: var(--surface); }
.plan-badge {
  position: absolute; inset-block-start: -13px; inset-inline-start: 28px;
  padding: 4px 12px; border-radius: 980px; background: var(--accent); color: #fff; font-size: .8125rem; font-weight: 600;
}
.plan h3 { font-size: 1.5rem; }
.plan-tagline { margin-block-start: 2px; font-size: .9375rem; color: var(--label-2); }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-block-start: 24px; }
.plan-amount { font-size: 2.75rem; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
:lang(ar) .plan-amount { letter-spacing: 0; }
.plan-per { font-size: .9375rem; color: var(--label-2); }
.plan-billing { min-height: 1.5em; margin-block-start: 6px; font-size: .8125rem; color: var(--label-2); }
.plan .btn { margin-block-start: 20px; }
.plan-limit { display: flex; align-items: center; gap: 8px; margin-block-start: 20px; font-size: .9375rem; font-weight: 600; }
.plan-limit .i { color: var(--label-2); }
.plan-ideal { margin-block-start: 12px; font-size: .9063rem; color: var(--label-2); }
.plan-ideal b { display: block; color: var(--label); font-weight: 600; }
.plan-features { list-style: none; padding: 18px 0 0; margin-block-start: 18px; border-block-start: 1px solid var(--hairline); display: grid; gap: 11px; font-size: .9375rem; line-height: 1.4; }
.plan-features li { display: flex; align-items: flex-start; gap: 10px; }
.plan-features .i { margin-block-start: .15em; color: var(--success); stroke-width: 2.2; }
.all-plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; list-style: none; padding: 0; margin-block-start: 40px; font-size: .9375rem; }
.all-plans li { display: inline-flex; align-items: center; gap: 8px; }
.all-plans .i { color: var(--success); }
@media (max-width: 1000px) {
  .plans { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

/* ── Contact form ─────────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; margin-block-start: 56px; }
.contact-card { position: relative; background: var(--card); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-block-end: 18px; min-width: 0; }
.field label { font-size: .9375rem; font-weight: 500; }
.optional { font-size: .8125rem; font-weight: 400; color: var(--label-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--separator); border-radius: var(--radius-s);
  background: var(--bg); font-size: 1.0625rem; line-height: 1.4;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.tint .field input, .tint .field select, .tint .field textarea { background: var(--bg-2); }
@media (prefers-color-scheme: dark) { .tint .field input, .tint .field select, .tint .field textarea { background: #2c2c2e; } }
.field input[dir="ltr"] { text-align: start; }
:lang(ar) .field input[dir="ltr"] { text-align: right; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.field ::placeholder { color: var(--label-2); opacity: .8; }
.select-wrap { position: relative; }
.field select.flash { animation: flash 1.8s var(--ease); }
@keyframes flash { 0%, 45% { border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); } }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; }
.select-wrap .i { position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--label-2); }
.field-error { display: none; font-size: .8125rem; font-weight: 500; color: var(--danger); }
.field-error::before { content: "⚠︎ "; }
.field input:user-invalid, .field.is-invalid input { border-color: var(--danger); background: var(--danger-soft); }
.field:has(input:user-invalid) .field-error, .field.is-invalid .field-error { display: block; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; }
.turnstile-slot:empty { display: none; }
.turnstile-slot { margin-block-end: 14px; }
.form-msg { margin-block-end: 14px; padding: 12px 14px; border-radius: var(--radius-s); font-size: .9375rem; font-weight: 500; }
.form-msg.is-ok { background: var(--success-soft); color: var(--success); }
.form-msg.is-error { background: var(--danger-soft); color: var(--danger); }
.form-msg.is-info { background: var(--fill); color: var(--label); }
.or-divider { display: flex; align-items: center; gap: 12px; margin-block: 16px; font-size: .8125rem; color: var(--label-2); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--separator); }
.contact-aside { padding-block-start: 8px; }
.contact-aside h3 { font-size: 1.3125rem; }
.next-steps { list-style: none; padding: 0; display: grid; gap: 18px; margin-block-start: 20px; }
.next-steps li { display: flex; align-items: flex-start; gap: 14px; }
.step-num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--label); color: var(--bg); font-size: .875rem; font-weight: 600; }
.direct { margin-block-start: 32px; padding-block-start: 24px; border-block-start: 1px solid var(--hairline); }
.direct p { font-size: .9375rem; color: var(--label-2); margin-block-end: 6px; }
.direct .text-link { gap: 8px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-list { margin-block-start: 48px; border-block-start: 1px solid var(--hairline); }
.faq-list details { border-block-end: 1px solid var(--hairline); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px;
  padding-block: 22px; list-style: none; cursor: pointer; font-size: 1.1875rem; font-weight: 600; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .i { color: var(--label-2); transition: transform .25s var(--ease); }
.faq-list details[open] summary .i { transform: rotate(180deg); }
.faq-list details p { max-width: 68ch; padding-block-end: 24px; color: var(--label-2); }
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    :root { interpolate-size: allow-keywords; }
    .faq-list details::details-content { block-size: 0; overflow: clip; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
    .faq-list details[open]::details-content { block-size: auto; }
  }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { padding-block: 56px 32px; background: var(--bg-2); font-size: .875rem; color: var(--label-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { max-width: 36ch; margin-block: 12px; }
.footer-brand a[dir] { color: var(--label); }
.site-footer nav h2 { margin-block-end: 8px; font-size: .875rem; font-weight: 600; color: var(--label); }
.site-footer nav a { display: block; padding-block: 5px; }
.footer-link { display: block; padding: 5px 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.footer-link:hover { color: var(--label); text-decoration: underline; }
.site-footer nav a:hover, .footer-brand a:hover { color: var(--label); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-block-start: 36px; padding-block-start: 20px; border-block-start: 1px solid var(--hairline); font-size: .8125rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ── Live agent: launcher + panel (floating layer, so glass is allowed) ──── */
.chat-launcher {
  position: fixed; z-index: 60;
  inset-block-end: calc(max(20px, env(safe-area-inset-bottom)) + var(--consent-offset, 0px));
  inset-inline-end: max(20px, env(safe-area-inset-right));
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 18px;
  border: 0; border-radius: 980px; color: #fff; font-size: .9375rem; font-weight: 600;
  background: rgb(29 29 31 / .82);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 10px 30px rgb(0 0 0 / .22), inset 0 0 0 1px rgb(255 255 255 / .12);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.chat-launcher:hover { transform: translateY(-2px); }
.chat-launcher .i { width: 20px; height: 20px; }
.chat-launcher[aria-expanded="true"] { opacity: 0; pointer-events: none; transform: scale(.9); }
@media (prefers-color-scheme: dark) { .chat-launcher { background: rgb(58 58 60 / .82); } }
.live-dot.is-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #30d158;
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot.is-pulse::after { animation: ping 1.8s var(--ease-out) infinite; }
}
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.8); opacity: 0; } }

.chat-panel {
  position: fixed; inset: auto; z-index: 70;
  inset-block-end: max(20px, env(safe-area-inset-bottom));
  inset-inline-end: max(20px, env(safe-area-inset-right));
  width: min(400px, 100vw - 40px); height: min(640px, 100dvh - 100px); max-height: none; max-width: none;
  margin: 0; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--glass-border); border-radius: 28px;
  color: var(--label); background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 30px 80px rgb(0 0 0 / .28);
  opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right;
  transition-property: opacity, transform, display, overlay;
  transition-duration: .28s; transition-timing-function: var(--ease-out);
  transition-behavior: allow-discrete;
}
[dir="rtl"] .chat-panel { transform-origin: bottom left; }
.chat-panel:not([open]) { display: none; }
:is(.chat-panel[open]):where(:not([data-closing])) {
  opacity: 1; transform: none;
  @starting-style { opacity: 0; transform: translateY(16px) scale(.97); }
}
.chat-panel::backdrop { background: rgb(0 0 0 / 0); transition: background-color .28s var(--ease), display .28s allow-discrete, overlay .28s allow-discrete; }
.chat-panel[open]::backdrop { background: rgb(0 0 0 / .32); @starting-style { background: rgb(0 0 0 / 0); } }
@media (max-width: 640px) {
  .chat-panel {
    inset-inline: 0; inset-block-end: 0; width: 100%; height: min(88dvh, 760px);
    border-radius: 28px 28px 0 0; border-block-end: 0; transform: translateY(40px);
  }
  :is(.chat-panel[open]):where(:not([data-closing])) { @starting-style { transform: translateY(40px); } }
}
.chat-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 12px 12px 16px; border-block-end: 1px solid var(--hairline); }
.chat-head img { width: 36px; height: 36px; border-radius: 50%; background: #fff; flex: none; }
.chat-head-text { min-width: 0; flex: 1; }
.chat-head h2 { font-size: 1.0625rem; line-height: 1.2; }
.chat-status { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--label-2); }
.chat-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--label-3); }
.chat-status[data-state="live"] .dot { background: #30d158; }
.chat-status[data-state="connecting"] .dot { background: #ffb340; }
.grabber { display: none; position: absolute; inset-block-start: 6px; left: 50%; translate: -50% 0; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); }
@media (max-width: 640px) { .grabber { display: block; } }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: .9375rem; line-height: 1.45; overflow-wrap: anywhere; }
:lang(ar) .msg { line-height: 1.65; }
.msg p + p, .msg p + ul, .msg ul + p { margin-block-start: 8px; }
.msg ul { padding-inline-start: 18px; }
.msg li + li { margin-block-start: 4px; }
.msg a { color: var(--accent-text); text-decoration: underline; }
.msg.is-bot { align-self: flex-start; background: var(--fill); border-end-start-radius: 6px; }
.msg.is-user { align-self: flex-end; background: var(--accent); color: #fff; border-end-end-radius: 6px; }
.msg.is-system { align-self: center; max-width: 94%; padding: 6px 10px; background: transparent; color: var(--label-2); font-size: .8125rem; text-align: center; }
.msg.is-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.msg.is-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--label-2); opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .msg.is-typing i { animation: blink 1.2s infinite; }
  .msg.is-typing i:nth-child(2) { animation-delay: .2s; }
  .msg.is-typing i:nth-child(3) { animation-delay: .4s; }
  .msg:not(.is-typing) { animation: appear .3s var(--ease-out) both; }
}
@keyframes blink { 50% { opacity: 1; } }
.menu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.quote-card { margin-block-start: 10px; overflow: hidden; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--label); }
.quote-card header { display: flex; align-items: center; gap: 10px; padding: 12px; border-block-end: 1px solid var(--hairline); }
.quote-card header b { display: block; font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-card header small { display: block; font-size: .75rem; color: var(--label-2); }
.quote-card .doc-icon { width: 30px; height: 38px; }
.quote-card dl { padding: 8px 12px; font-size: .8125rem; }
.quote-card dl div { display: flex; justify-content: space-between; gap: 12px; padding-block: 4px; }
.quote-card dt { color: var(--label-2); }
.quote-card dd { font-variant-numeric: tabular-nums; }
.quote-card .quote-total { margin-block-start: 4px; padding-block-start: 8px; border-block-start: 1px solid var(--hairline); font-weight: 700; }
.quote-card .quote-total dt { color: var(--label); }
.quote-gate { padding: 0 12px 12px; }
.quote-gate span { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: .875rem; font-weight: 600; cursor: default; }
.quote-gate small { display: block; margin-block-start: 6px; font-size: .75rem; color: var(--label-2); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 4px; }
.chat-chips[hidden] { display: none; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; }
.chat-form textarea {
  flex: 1; min-height: 44px; max-height: 120px; padding: 11px 16px; resize: none;
  border: 1px solid var(--separator); border-radius: 22px; background: var(--bg); font-size: 1rem; line-height: 1.35;
}
.chat-form textarea:focus { border-color: var(--accent-text); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.send-btn { background: var(--accent); color: #fff; }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:disabled { background: var(--fill); color: var(--label-2); cursor: default; }
.send-btn .i { width: 20px; height: 20px; }
.chat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px 14px; font-size: .75rem; line-height: 1.4; color: var(--label-2); }
.chat-foot a { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 32px; color: var(--label); font-weight: 600; }
.chat-foot .logo { width: 16px; height: 16px; color: #25d366; }

/* ── Consent banner (floating layer) ──────────────────────────────────────── */
.consent {
  position: fixed; z-index: 65;
  inset-inline: max(16px, env(safe-area-inset-left)); inset-block-end: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 16px 24px;
  width: min(760px, 100% - 32px); margin-inline: auto; padding: 18px 20px;
  border: 1px solid var(--glass-border); border-radius: var(--radius-l);
  background: var(--glass-strong); color: var(--label);
  -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: var(--shadow-2);
}
.consent[hidden] { display: none; }
.consent h2 { font-size: 1rem; margin-block-end: 4px; }
.consent p { font-size: .875rem; line-height: 1.5; color: var(--label-2); }
.consent p a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; gap: 8px; flex: none; }
.consent-actions .btn { min-width: 104px; }
@media (max-width: 640px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent-actions .btn { flex: 1; }
}
@media (prefers-reduced-transparency: reduce) {
  .consent { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ── Scroll reveal (decorative, so no fallback) ───────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .section-head, .tile, .badge-card, .plan, .int-group, .infra-card, .trust-points li, .workflow-card, .metrics-grid, .roi-grid > .card {
      animation: reveal auto linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(32px); } }

/* ── Accessibility preferences ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .demo-anim, .hero-stage [style*="--i"] { animation: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mobile-menu, .chat-panel { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chat-launcher { background: #1d1d1f; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .chip[aria-pressed="true"], .segmented input:checked + span, .layer-tabs [aria-selected="true"] { outline: 2px solid CanvasText; }
}
