/* ==========================================================================
   Jiwar Advanced Industries — site styles
   Design language: Stripe DESIGN.md (blue-tinted neutrals, blurple pills,
   light display type, one animated gradient hero, diagonal seams).
   ========================================================================== */

/* ---------- Tokens: light (default) ---------- */
:root {
  --primary: #533afd;
  --primary-active: #4032c8;
  --primary-soft: #e8e9ff;
  --primary-faint: #f5f5ff;

  --ink: #061b31;
  --body: #50617a;
  --muted: #64748d;
  --quiet: #7d8ba4;

  --canvas: #ffffff;
  --surface-soft: #f6f9fc;
  --surface-subdued: #f8fafd;
  --surface-card: #ffffff;
  --hairline: #e5edf5;
  --hairline-strong: #d4dee9;

  --surface-dark: #0d1738;
  --surface-dark-elevated: #122054;
  --on-dark: #ffffff;
  --on-dark-muted: #95a4ba;
  --link-on-dark: #b4d8ff;

  --overlay-light: #ffffffa6;
  --nav-veil: rgba(255, 255, 255, 0.72);

  --g-pink: #fb76fa;
  --g-orange: #ff6118;
  --g-yellow: #ffcf5e;
  --g-blue: #0073e6;
  --stat-violet: #8a35df;
  --success: #00d66f;
  --warning: #f5a623;

  --shadow-card:
    0 1px 1px rgba(6, 27, 49, 0.04),
    0 4px 8px -2px rgba(6, 27, 49, 0.06),
    0 16px 32px -12px rgba(6, 27, 49, 0.12);
  --shadow-frame:
    0 2px 4px rgba(6, 27, 49, 0.04),
    0 12px 24px -6px rgba(6, 27, 49, 0.10),
    0 40px 80px -20px rgba(50, 50, 93, 0.25),
    0 30px 60px -30px rgba(0, 0, 0, 0.30);

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 16px;
  --r-pill: 999px;

  --container: 1140px;
  --nav-h: 64px;
  --seam: 6deg;

  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Source Code Pro", ui-monospace, SFMono-Regular, monospace;

  color-scheme: light;
}

/* ---------- Tokens: dark ---------- */
html[data-theme="dark"] {
  --primary: #7a6bff;
  --primary-active: #9488ff;
  --primary-soft: rgba(122, 107, 255, 0.16);
  --primary-faint: rgba(122, 107, 255, 0.08);

  --ink: #f2f5fb;
  --body: #b3bfd2;
  --muted: #95a4ba;
  --quiet: #7d8ba4;

  --canvas: #0a1230;
  --surface-soft: #0d1738;
  --surface-subdued: #101c44;
  --surface-card: #122054;
  --hairline: rgba(180, 216, 255, 0.10);
  --hairline-strong: rgba(180, 216, 255, 0.18);

  --surface-dark: #060c22;
  --surface-dark-elevated: #0f1a44;

  --overlay-light: rgba(255, 255, 255, 0.12);
  --nav-veil: rgba(10, 18, 48, 0.72);

  --shadow-card:
    0 1px 1px rgba(0, 0, 0, 0.3),
    0 16px 32px -12px rgba(0, 0, 0, 0.5);
  --shadow-frame:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 40px 80px -20px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
html[lang="ar"] body { font-weight: 400; line-height: 1.75; }

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-active); }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--primary); color: #fff; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r-pill);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 300;
  margin: 0;
}
.display {
  font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; }
.h4 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.5; color: var(--body); }
.eyebrow {
  display: inline-block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 14px;
}
/* Arabic must never be tracked or it breaks letter joining */
html[lang="ar"] .display,
html[lang="ar"] .h2,
html[lang="ar"] .h3,
html[lang="ar"] .h4 { letter-spacing: 0; }
html[lang="ar"] .display { line-height: 1.25; }
html[lang="ar"] .h2 { line-height: 1.3; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
  will-change: transform;
}
.btn .chev { transition: transform .2s ease; display: inline-block; }
html[dir="rtl"] .btn .chev { transform: scaleX(-1); }
.btn:hover .chev { transform: translateX(3px); }
html[dir="rtl"] .btn:hover .chev { transform: scaleX(-1) translateX(3px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-active); color: #fff; }
.btn-ghost { background: var(--overlay-light); color: var(--ink); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--surface-card); color: var(--ink); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }

.link-arrow { font-weight: 500; display: inline-flex; gap: 4px; align-items: center; font-size: 15px; }
.link-arrow .chev { transition: transform .2s ease; display: inline-block; }
html[dir="rtl"] .link-arrow .chev { transform: scaleX(-1); }
.link-arrow:hover .chev { transform: translateX(3px); }
html[dir="rtl"] .link-arrow:hover .chev { transform: scaleX(-1) translateX(3px); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--r-pill);
  padding: 4px 12px 4px 4px;
  font-size: 13px;
  font-weight: 500;
}
html[dir="rtl"] .badge { padding: 4px 4px 4px 12px; }
.badge-dot {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 2px 10px;
  font-size: 12px;
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  background: linear-gradient(90deg, var(--g-pink), var(--primary), var(--g-blue));
  transform-origin: left center;
  transform: scaleX(0);
}
html[dir="rtl"] .progress { transform-origin: right center; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nav.is-scrolled {
  background: var(--nav-veil);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; }
.brand-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .02em; margin-top: -2px; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  transition: background-color .2s ease;
}
.nav-links a:hover { background: var(--primary-faint); color: var(--ink); }
.nav-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  background: var(--overlay-light);
  backdrop-filter: blur(8px);
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  transition: background-color .2s ease, border-color .2s ease;
}
.icon-btn:hover { background: var(--surface-card); border-color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-btn { font-size: 14px; font-weight: 500; width: auto; padding: 0 14px; }

.theme-btn .i-moon { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: none; }
html[data-theme="dark"] .theme-btn .i-moon { display: block; }

.menu-btn { display: none; }
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform .3s ease, background-color .3s ease;
}
.menu-btn span::before,
.menu-btn span::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-btn span::before { top: -5px; }
.menu-btn span::after { top: 5px; }
.nav.is-open .menu-btn span { background: transparent; }
.nav.is-open .menu-btn span::before { transform: translateY(5px) rotate(45deg); }
.nav.is-open .menu-btn span::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 140px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0 0 0 0;
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
}
html[dir="rtl"] .hero-bg { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 78%); }
.hero-bg canvas {
  width: 100%;
  height: 100%;
  filter: blur(48px) saturate(140%);
  transform: scale(1.15);
  opacity: .9;
}
.hero-bg::after {
  /* legibility veil on the text side */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--canvas) 0%, color-mix(in srgb, var(--canvas) 80%, transparent) 38%, transparent 70%),
    linear-gradient(180deg, transparent 70%, color-mix(in srgb, var(--canvas) 30%, transparent));
}
html[dir="rtl"] .hero-bg::after {
  background:
    linear-gradient(270deg, var(--canvas) 0%, color-mix(in srgb, var(--canvas) 80%, transparent) 38%, transparent 70%),
    linear-gradient(180deg, transparent 70%, color-mix(in srgb, var(--canvas) 30%, transparent));
}
html[data-theme="dark"] .hero-bg canvas { opacity: .55; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-copy .badge { margin-bottom: 24px; }
.hero-copy .display { margin-bottom: 24px; }
.hero-copy .lead { max-width: 34rem; margin: 0 0 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note svg { width: 16px; height: 16px; color: var(--success); flex: none; }

/* split words for the title animation */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.split-word > span { display: inline-block; will-change: transform; }

/* ---------- Mockups (product UI as imagery) ---------- */
.mockups {
  position: relative;
  height: 520px;
  perspective: 1400px;
}
.frame {
  position: absolute;
  background: var(--surface-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-frame);
  border: 1px solid var(--hairline);
  overflow: hidden;
  color: var(--ink);
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 500;
}
.frame-dots { display: flex; gap: 5px; margin-inline-end: 6px; }
.frame-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--hairline-strong); display: block; }

.frame-dash { inset-inline-start: 0; top: 30px; width: 76%; }
.dash-body { padding: 16px; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  background: var(--surface-subdued);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 10px;
}
.kpi span { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.kpi strong { display: block; font-size: 20px; font-weight: 400; color: var(--ink); margin-top: 4px; letter-spacing: -0.01em; }
.kpi strong em { font-style: normal; font-size: 11px; color: var(--success); margin-inline-start: 4px; }
.chart {
  background: var(--surface-subdued);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px;
}
.chart-head { font-size: 12px; color: var(--muted); margin-bottom: 10px; display: flex; justify-content: space-between; }
.bars {
  height: 110px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: end;
  direction: ltr;
}
.bar-col {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 18px;
}
.bar-col small { position: absolute; bottom: 0; inset-inline: 0; text-align: center; }
.bar {
  width: 100%;
  max-width: 34px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--g-blue)));
  transform-origin: bottom;
}
.bar-col:nth-child(4) .bar { background: linear-gradient(180deg, var(--g-pink), var(--primary)); }
.bar-col small { font-size: 10px; color: var(--quiet); }

.frame-chat { inset-inline-end: 0; top: 0; width: 52%; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--primary), var(--g-pink));
  flex: none;
}
.chat-head b { display: block; font-size: 13px; font-weight: 500; }
.chat-head small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.chat-head small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.chat-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  background:
    radial-gradient(circle at 20% 10%, var(--primary-faint), transparent 60%),
    var(--surface-card);
}
.bubble {
  max-width: 86%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
}
.bubble.me {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-end-end-radius: 4px;
}
.bubble.bot {
  align-self: flex-start;
  background: var(--surface-subdued);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-end-start-radius: 4px;
}
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 10px 12px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); display: block; animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.frame-meet { inset-inline-end: 6%; bottom: 0; width: 58%; background: var(--surface-dark); border-color: rgba(255,255,255,.08); color: var(--on-dark); }
.frame-meet .frame-bar { border-color: rgba(255,255,255,.08); color: var(--on-dark); }
.frame-meet .frame-dots i { background: rgba(255,255,255,.2); }
.live {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  background: rgba(234, 34, 97, .18);
  color: #ff7aa8;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ea2261; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(234,34,97,.6); } 70% { box-shadow: 0 0 0 8px rgba(234,34,97,0); } 100% { box-shadow: 0 0 0 0 rgba(234,34,97,0); } }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.tile {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  position: relative;
  background: linear-gradient(135deg, #1b2a66, #122054);
}
.tile:nth-child(2) { background: linear-gradient(135deg, #3b1f6e, #1b2a66); }
.tile:nth-child(3) { background: linear-gradient(135deg, #123f66, #122054); }
.tile:nth-child(4) { background: linear-gradient(135deg, #5b2a4e, #1b2a66); }
.tile:nth-child(5) { background: linear-gradient(135deg, #1b2a66, #23306e); }
.tile:nth-child(6) { background: linear-gradient(135deg, #2a3f7a, #122054); }
.tile .avatar { width: 28px; height: 28px; font-size: 11px; }
.tile.speaking { box-shadow: 0 0 0 2px var(--success); }
.tile .mic {
  position: absolute;
  inset-inline-start: 5px;
  bottom: 5px;
  display: flex;
  gap: 2px;
  align-items: end;
  height: 10px;
}
.tile .mic i { width: 2px; background: var(--success); border-radius: 1px; display: block; height: 30%; }

/* ---------- Marquee ---------- */
.marquee {
  direction: ltr;
  overflow: hidden;
  border-block: 1px solid var(--hairline);
  background: var(--canvas);
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; gap: 48px; padding-inline-end: 48px; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g-pink), var(--primary));
}

/* ---------- Sections ---------- */
.section { padding: 112px 0; position: relative; }
.section-head { max-width: 46rem; margin-bottom: 56px; }
.section-head .lead { margin-top: 18px; }
.section-head.center { text-align: center; margin-inline: auto; }

.band-soft { background: var(--surface-soft); }

/* diagonal seam band */
.band-skew { position: relative; isolation: isolate; }
.band-skew::before {
  content: "";
  position: absolute;
  inset: -60px 0;
  z-index: -1;
  background: inherit;
  background: var(--band-bg, var(--surface-soft));
  transform: skewY(calc(var(--seam) * -1));
}
html[dir="rtl"] .band-skew::before { transform: skewY(var(--seam)); }
.band-skew { background: transparent; }

/* ---------- Feature cards ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease;
  --mx: 50%;
  --my: 0%;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--primary) 12%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 35%, var(--hairline)); }
.card:hover::after { opacity: 1; }
.card p { margin: 0; flex: 1; }
.card .link-arrow { margin-top: 6px; }
.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 6px;
}
.icon svg { width: 22px; height: 22px; }

/* ---------- Platform (dark band) ---------- */
.band-dark {
  --band-bg: var(--surface-dark);
  color: var(--on-dark-muted);
}
.band-dark h2, .band-dark h3 { color: var(--on-dark); }
.band-dark .eyebrow { color: var(--link-on-dark); }
.band-dark .lead { color: var(--on-dark-muted); }

.platform {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
.tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  margin-top: 32px;
  flex-wrap: wrap;
}
.tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--on-dark-muted);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  transition: color .25s ease;
}
.tab[aria-selected="true"] { color: var(--surface-dark); }
.tab-indicator {
  position: absolute;
  z-index: 0;
  top: 4px;
  height: calc(100% - 8px);
  border-radius: var(--r-pill);
  background: #fff;
  transition: none;
}
.role-panel {
  background: var(--surface-dark-elevated);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
}
.role-screen {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  padding: 24px;
  min-height: 300px;
}
.role-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.role-top .avatar { width: 40px; height: 40px; font-size: 15px; }
.role-top b { color: var(--on-dark); font-weight: 500; display: block; }
.role-top small { color: var(--on-dark-muted); font-size: 12px; }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.role-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  color: #dbe4f3;
  font-size: 15px;
}
.role-list li .check {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 214, 111, .14);
  color: var(--success);
}
.role-list li .check svg { width: 13px; height: 13px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 88px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.stat strong {
  display: block;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--g-pink), #b9a8ff 50%, var(--link-on-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  direction: ltr;
  width: max-content;
}
.stat span { display: block; margin-top: 10px; font-size: 15px; color: var(--on-dark-muted); }

/* ---------- How we work (timeline) ---------- */
.steps { position: relative; display: grid; gap: 0; max-width: 760px; }
.steps-line {
  position: absolute;
  inset-inline-start: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.steps-line i {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--g-pink), var(--primary), var(--g-blue));
  transform-origin: top;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 18px 0 34px;
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  color: var(--primary);
  font-weight: 500;
  font-size: 15px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-card);
}
.step-num { transition: background-color .4s ease, color .4s ease, border-color .4s ease, transform .4s cubic-bezier(.2,.7,.2,1); }
.step.is-active .step-num {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
  transform: scale(1.06);
  box-shadow: 0 0 0 6px var(--primary-soft);
}
.step h3 { margin: 10px 0 8px; }
.step p { margin: 0; max-width: 34rem; }

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: start;
}
.how-grid .section-head { position: sticky; top: calc(var(--nav-h) + 40px); }

/* ---------- Why ---------- */
.why-card { padding: 32px; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 56px;
  align-items: start;
}
.about p { margin: 0 0 18px; font-size: 17px; }
.facts {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 8px 24px;
}
.fact { padding: 18px 0; border-bottom: 1px solid var(--hairline); display: grid; gap: 4px; }
.fact:last-child { border-bottom: 0; }
.fact span { font-size: 13px; color: var(--muted); }
.fact b, .fact a { font-weight: 400; color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.fact a:hover { color: var(--primary); }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 72px 56px;
  background: var(--surface-dark);
  color: var(--on-dark-muted);
  isolation: isolate;
}
.cta canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  filter: blur(40px) saturate(140%);
  opacity: .6;
  transform: scale(1.2);
}
.cta h2 { color: #fff; max-width: 34rem; }
.cta p { color: #dbe4f3; max-width: 34rem; margin: 18px 0 32px; font-size: 18px; }
.cta .btn-ghost { background: rgba(255,255,255,.14); color: #fff; }
.cta .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer (stays light per system) ---------- */
.footer {
  background: var(--surface-soft);
  padding: 72px 0 32px;
  font-size: 14px;
  border-top: 1px solid var(--hairline);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer h4 { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: var(--body); }
.footer a:hover { color: var(--primary); }
.footer-brand p { margin: 14px 0 0; max-width: 22rem; color: var(--muted); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

/* ---------- Legal pages ---------- */
.legal-hero {
  padding: calc(var(--nav-h) + 72px) 0 56px;
  background:
    radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--g-pink) 22%, transparent), transparent 60%),
    radial-gradient(50% 100% at 0% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 60%),
    var(--surface-soft);
  border-bottom: 1px solid var(--hairline);
}
.legal-hero .lead { margin-top: 16px; }
.legal-meta { margin-top: 18px; font-size: 14px; color: var(--muted); }
.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
  padding: 64px 0 112px;
}
.toc { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; font-size: 14px; }
.toc b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 12px; }
.toc ol { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; color: var(--muted); }
.toc a { color: var(--body); }
.toc a:hover { color: var(--primary); }
.prose { max-width: 46rem; color: var(--body); font-size: 16.5px; }
.prose h2 {
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 48px 0 14px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
html[lang="ar"] .prose h2 { letter-spacing: 0; line-height: 1.4; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 28px 0 10px; font-weight: 400; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul, .prose ol { padding-inline-start: 22px; margin: 0 0 16px; }
.prose strong { color: var(--ink); font-weight: 500; }
.callout {
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--hairline));
  background: var(--primary-faint);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 24px 0;
}
.callout p:last-child { margin: 0; }

/* language-specific blocks used on legal pages */
html[lang="ar"] .only-en,
html[lang="en"] .only-ar { display: none !important; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: var(--shadow-card);
  background: var(--surface-card);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid, .platform, .about, .how-grid { grid-template-columns: 1fr; }
  .how-grid .section-head { position: static; }
  .mockups { height: 480px; max-width: 620px; width: 100%; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
}

@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    inset-inline: 12px;
    flex-direction: column;
    background: var(--surface-card);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-frame);
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease;
  }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }
  .nav.is-open .nav-links { opacity: 1; pointer-events: auto; transform: none; }
  .nav.is-open { background: var(--nav-veil); backdrop-filter: blur(16px); }
  .nav-cta { display: none; }
}

@media (max-width: 672px) {
  .section { padding: 80px 0; }
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-bottom: 96px; }
  .mockups { height: 420px; }
  .frame-dash { width: 92%; top: 110px; }
  .frame-chat { width: 70%; top: 0; }
  .frame-meet { width: 72%; inset-inline-end: 0; }
  .cta { padding: 48px 24px; border-radius: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { height: 44px; }
  .brand-name small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
