/* ============================================================
   Ubility — marketing site styles
   Themes via [data-theme] · RTL-safe via logical properties
   ============================================================ */

:root {
  --cyan: #2ec9e9;
  --magenta: #f013b8;
  --blue: #2f4fe0;
  --violet: #7c5cff;
  --green: #16b981;

  --grad-brand: linear-gradient(120deg, #2ec9e9 0%, #7c5cff 50%, #f013b8 100%);
  --grad-btn: linear-gradient(120deg, #2f4fe0, #7c5cff);

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --container: 1180px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="light"] {
  --bg: #f7f9fd;
  --bg-alt: #eef2fa;
  --surface: #ffffff;
  --surface-2: #f2f5fb;
  --text: #101828;
  --text-soft: #46536b;
  --text-faint: #7a869c;
  --border: #e3e9f4;
  --shadow: 0 12px 40px rgba(23, 43, 99, .10);
  --shadow-sm: 0 4px 14px rgba(23, 43, 99, .07);
  --header-bg: rgba(247, 249, 253, .82);
  --blob-opacity: .5;
  --edge: #c3cde3;
}

[data-theme="dark"] {
  --bg: #070b17;
  --bg-alt: #0b1122;
  --surface: #0f1730;
  --surface-2: #141d3a;
  --text: #eef2fb;
  --text-soft: #a7b2cc;
  --text-faint: #6d7893;
  --border: #1e2a4d;
  --shadow: 0 16px 48px rgba(0, 0, 0, .45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .35);
  --header-bg: rgba(7, 11, 23, .8);
  --blob-opacity: .32;
  --edge: #2c3a66;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .35s var(--ease), color .35s var(--ease);
}

:lang(ar) body,
body:lang(ar) { font-family: 'Tajawal', 'Inter', system-ui, sans-serif; }

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.15;
  letter-spacing: -.015em;
  font-weight: 700;
}
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) h4 {
  font-family: 'Tajawal', sans-serif;
  letter-spacing: 0;
  line-height: 1.35;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Background decor ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
  animation: blobFloat 18s var(--ease) infinite alternate;
}
.blob-1 { width: 480px; height: 480px; background: #2ec9e955; top: -140px; inset-inline-start: -120px; }
.blob-2 { width: 420px; height: 420px; background: #f013b833; top: 30%; inset-inline-end: -160px; animation-delay: -6s; }
.blob-3 { width: 520px; height: 520px; background: #7c5cff33; bottom: -180px; inset-inline-start: 30%; animation-delay: -12s; }

@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.12); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 75%);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .35s;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 34px; width: auto; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }

.nav-links { display: flex; gap: 26px; margin-inline-start: auto; }
.nav-links a {
  font-size: .92rem; font-weight: 500; color: var(--text-soft);
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; bottom: -6px; inset-inline-start: 0;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--grad-brand);
  transition: width .25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav-links + .nav-actions { margin-inline-start: 0; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 600;
  color: var(--text-soft);
  border: 1px solid var(--border);
  transition: all .2s;
}
.lang-btn:hover { color: var(--text); border-color: var(--text-faint); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .22s var(--ease);
  z-index: 50;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  padding: 8px 12px; border-radius: 8px;
  font-size: .9rem; cursor: pointer;
  transition: background .15s;
}
.lang-menu li:hover { background: var(--surface-2); }
.lang-menu li.active { color: var(--blue); font-weight: 600; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all .25s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-faint); transform: rotate(15deg); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: .92rem;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-btn); color: #fff;
  box-shadow: 0 6px 20px rgba(84, 87, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(84, 87, 255, .45); }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-2px); }
.btn-ghost { color: var(--text-soft); padding-inline: 12px; }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

.arrow-ic { transition: transform .2s var(--ease); }
.btn:hover .arrow-ic { transform: translateX(4px); }
[dir="rtl"] .arrow-ic { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arrow-ic { transform: scaleX(-1) translateX(4px); }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s var(--ease); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 60px;
  min-height: 92vh;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  position: relative; flex-shrink: 0;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--green);
  animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(.4); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 560px;
  margin-bottom: 30px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }

.hero-trust { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-trust li {
  display: flex; align-items: center; gap: 7px;
  font-size: .85rem; color: var(--text-faint); font-weight: 500;
}
.hero-trust svg { color: var(--green); flex-shrink: 0; }

/* --- Hero visual / flow card --- */
.hero-visual { position: relative; }

.flow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardFloat 7s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.flow-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.win-dots i:first-child { background: #ff5f57; }
.win-dots i:nth-child(2) { background: #febc2e; }
.win-dots i:nth-child(3) { background: #28c840; }
.flow-title { font-size: .8rem; font-weight: 600; color: var(--text-faint); font-family: 'Space Grotesk', monospace; }
.live-chip {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--green);
  background: color-mix(in srgb, var(--green) 12%, transparent);
  padding: 4px 10px; border-radius: 999px;
}

.flow-svg { width: 100%; height: auto; display: block; }

/* SVG nodes */
.fnode rect {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
  filter: drop-shadow(0 3px 8px rgba(20, 40, 90, .08));
}
[data-theme="dark"] .fnode rect { fill: var(--surface-2); }
.fnode-main rect { stroke: var(--violet); stroke-width: 2; }

.fnode { animation: nodePop .6s var(--ease) both; }
.n1 { animation-delay: .15s; }
.n2 { animation-delay: .35s; }
.n3 { animation-delay: .55s; }
.n4 { animation-delay: .75s; }
.n5 { animation-delay: .95s; }
@keyframes nodePop {
  from { opacity: 0; transform: scale(.85); transform-origin: center; }
  to { opacity: 1; transform: scale(1); }
}

.ntitle { font: 700 .82rem 'Inter', sans-serif; fill: var(--text); }
.nsub { font: 500 .68rem 'Inter', sans-serif; fill: var(--text-faint); }
.nic-glyph { font-size: 12px; }

.nic.ic-cyan { fill: color-mix(in srgb, var(--cyan) 18%, transparent); stroke: var(--cyan); }
.nic.ic-magenta { fill: color-mix(in srgb, var(--magenta) 15%, transparent); stroke: var(--magenta); }
.nic.ic-blue { fill: color-mix(in srgb, var(--blue) 15%, transparent); stroke: var(--blue); }
.nic.ic-violet { fill: color-mix(in srgb, var(--violet) 15%, transparent); stroke: var(--violet); }
.nic.ic-green { fill: color-mix(in srgb, var(--green) 15%, transparent); stroke: var(--green); }

.edge {
  fill: none;
  stroke: var(--edge);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: dashFlow 1.2s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -12; } }

.edge-dot { fill: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); }
.edge-dot.dot-v { fill: var(--violet); filter: drop-shadow(0 0 6px var(--violet)); }
.edge-dot.dot-c { fill: var(--blue); filter: drop-shadow(0 0 6px var(--blue)); }
.edge-dot.dot-m { fill: var(--green); filter: drop-shadow(0 0 6px var(--green)); }

/* Chat overlay */
.chat-pop {
  position: absolute;
  bottom: 18px; inset-inline-end: 18px;
  width: min(300px, 78%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-row { font-size: .8rem; line-height: 1.45; padding: 7px 11px; border-radius: 11px; max-width: 95%; }
.chat-row.user {
  align-self: flex-end;
  background: var(--grad-btn); color: #fff;
  border-end-end-radius: 3px;
  min-height: 1.4em;
}
.chat-row.bot {
  align-self: flex-start;
  background: var(--surface-2); color: var(--text);
  border-end-start-radius: 3px;
  display: inline-flex; align-items: baseline;
  min-height: 1.4em;
}
.caret {
  display: inline-block; width: 2px; height: 1em;
  background: var(--magenta);
  margin-inline-start: 2px;
  animation: caretBlink .8s step-end infinite;
  align-self: center;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* Floating chips */
.float-chip {
  position: absolute;
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem; font-weight: 700;
  box-shadow: var(--shadow-sm);
  animation: chipFloat 5s ease-in-out infinite;
}
.chip-a { top: -34px; inset-inline-start: -14px; }
.chip-b { bottom: 30%; inset-inline-start: -34px; animation-delay: -2.5s; }
@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-block: 34px 10px;
}
.stat {
  text-align: center;
  padding: 26px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.stat-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.1rem; font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-min { font-size: 1.2rem; }
.stat-label { font-size: .85rem; color: var(--text-faint); font-weight: 500; }

/* ---------- Clients ---------- */
.clients { padding-block: 46px 10px; }
.clients-title {
  text-align: center;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 28px;
}
:lang(ar) .clients-title { letter-spacing: 0; }
.clients-marquee .marquee-track { animation-duration: 58s; }
.client-chip {
  display: grid; place-items: center;
  height: 74px; min-width: 156px;
  padding: 14px 28px;
  background: #fff; /* white in both themes so logos always read */
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease);
}
.client-chip:hover { transform: translateY(-3px); }
.client-chip img {
  max-height: 44px; max-width: 128px;
  width: auto; height: auto;
  filter: grayscale(1); opacity: .8;
  transition: filter .25s, opacity .25s;
}
.client-chip:hover img { filter: none; opacity: 1; }

/* ---------- AI models ---------- */
.section-models { padding-top: 40px; }
.models-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  max-width: 880px; margin-inline: auto;
}
.model-chip {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700; font-size: .95rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.model-chip:hover { transform: translateY(-4px); border-color: var(--violet); box-shadow: var(--shadow); }
.model-chip .app-dot { width: 30px; height: 30px; }
.model-chip .app-dot img { width: 18px; height: 18px; }
.models-note {
  text-align: center;
  color: var(--text-faint);
  font-size: .92rem;
  margin-top: 26px;
}

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
  transition: background .35s;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 14px;
}
:lang(ar) .eyebrow { letter-spacing: 0; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-bottom: 14px; }
.section-head p { color: var(--text-soft); font-size: 1.05rem; }

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.steps { display: flex; flex-direction: column; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  top: 20px; bottom: 20px;
  inset-inline-start: 34px;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--violet), var(--magenta));
  opacity: .35;
}

.step { display: flex; gap: 22px; padding-block: 18px; position: relative; }
.step-time {
  flex-shrink: 0;
  width: 68px; height: 40px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: 'Space Grotesk', monospace;
  font-weight: 700; font-size: .88rem;
  color: var(--text-soft);
  z-index: 1;
  transition: all .3s;
}
.step:hover .step-time { border-color: var(--violet); color: var(--violet); transform: scale(1.08); }
.step-live .step-time { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 15%, transparent); }
.step-body h3 { font-size: 1.08rem; margin-bottom: 5px; }
.step-body p { font-size: .93rem; color: var(--text-soft); max-width: 420px; }

.how-shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  transition: transform .4s var(--ease);
}
.how-shot:hover { transform: scale(1.015); }
.how-shot img { width: 100%; }
.how-shot figcaption {
  padding: 13px 18px;
  font-size: .84rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* ---------- Features ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
  position: relative;
  overflow: hidden;
}
.feat-card::before {
  content: "";
  position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: 0 0;
  transition: transform .4s var(--ease);
}
.feat-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); }
.feat-card:hover::before { transform: scaleX(1); }

.feat-ic {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 13px;
  margin-bottom: 18px;
}
.ic-cyan-bg   { background: color-mix(in srgb, var(--cyan) 14%, transparent); color: #189ab8; }
.ic-blue-bg   { background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); }
.ic-magenta-bg{ background: color-mix(in srgb, var(--magenta) 11%, transparent); color: var(--magenta); }
.ic-violet-bg { background: color-mix(in srgb, var(--violet) 13%, transparent); color: var(--violet); }
.ic-green-bg  { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }
.ic-slate-bg  { background: color-mix(in srgb, var(--text-faint) 14%, transparent); color: var(--text-soft); }
[data-theme="dark"] .ic-cyan-bg { color: var(--cyan); }

.feat-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feat-card p { font-size: .92rem; color: var(--text-soft); }

/* ---------- Product tour ---------- */
.tour {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}
.tour-tabs { display: flex; flex-direction: column; gap: 12px; }
.tour-tab {
  text-align: start;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all .25s var(--ease);
}
.tour-tab strong { display: block; font-size: .98rem; margin-bottom: 4px; font-family: 'Space Grotesk', sans-serif; }
:lang(ar) .tour-tab strong { font-family: 'Tajawal', sans-serif; }
.tour-tab span { font-size: .84rem; color: var(--text-faint); }
.tour-tab:hover { border-color: var(--text-faint); }
.tour-tab.active {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 15%, transparent);
}
.tour-tab.active strong { color: var(--violet); }

.tour-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  aspect-ratio: 1920 / 985;
}
.tour-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.03);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.tour-img.active { opacity: 1; transform: scale(1); }

/* ---------- Use cases ---------- */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.uc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.uc-card:hover { transform: translateY(-7px) rotate(-.3deg); box-shadow: var(--shadow); }
.uc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.uc-ic { font-size: 1.7rem; }
.uc-metric {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .03em;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
[data-theme="dark"] .uc-metric { color: #8fa8ff; }
.uc-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.uc-card p { font-size: .92rem; color: var(--text-soft); }

/* ---------- Enterprise ---------- */
.enterprise-wrap {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: center;
}
.ent-copy h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 14px; }
.ent-lead { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 34px; }

.ent-list { display: flex; flex-direction: column; gap: 24px; }
.ent-list li { display: flex; gap: 18px; align-items: flex-start; }
.ent-ic {
  font-size: 1.4rem;
  width: 48px; height: 48px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.ent-list h3 { font-size: 1.05rem; margin-bottom: 4px; }
.ent-list p { font-size: .92rem; color: var(--text-soft); }

.ent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardFloat 8s ease-in-out infinite;
}
.ent-card-head {
  padding: 13px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: 'Space Grotesk', monospace;
  font-size: .82rem; font-weight: 600;
  color: var(--text-faint);
}
.ent-shield {
  display: grid; place-items: center;
  padding: 28px 0 8px;
  color: var(--green);
}
.ent-shield svg { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--green) 45%, transparent)); }
.ent-rows { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.ent-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: .88rem; font-weight: 500;
}
.ent-row .ok, .ent-row .none {
  font-size: .74rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.ent-row .ok { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.ent-row .none { color: var(--magenta); background: color-mix(in srgb, var(--magenta) 10%, transparent); }

/* ---------- Integrations marquee ---------- */
.marquee {
  overflow: hidden;
  padding-block: 10px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 14px;
  width: max-content;
  animation: marqueeMove 42s linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeMove { to { transform: translateX(-50%); } }

.app-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  transition: transform .25s, border-color .25s, color .25s;
}
.app-chip:hover { transform: translateY(-3px); border-color: var(--violet); color: var(--text); }
.app-dot {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
  /* stays white in dark mode too, so dark logos (GitHub, Notion…) remain visible */
  background: #fff;
  border: 1px solid var(--border);
}
.app-dot img { width: 17px; height: 17px; display: block; }

/* ---------- Final CTA ---------- */
.cta-final { padding-block: 80px 110px; }
.cta-box {
  text-align: center;
  padding: 72px 40px;
  border-radius: 26px;
  background:
    radial-gradient(ellipse 70% 120% at 50% -20%, color-mix(in srgb, var(--violet) 16%, transparent), transparent),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.cta-box::before, .cta-box::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
}
.cta-box::before { background: var(--cyan); top: -140px; inset-inline-start: -80px; }
.cta-box::after { background: var(--magenta); bottom: -160px; inset-inline-end: -80px; }
.cta-box h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; position: relative; z-index: 1; }
.cta-box p { color: var(--text-soft); font-size: 1.05rem; margin-bottom: 30px; position: relative; z-index: 1; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  transition: background .35s;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: 56px 40px;
}
.footer-brand .logo { height: 30px; margin-bottom: 16px; }
.footer-brand p { font-size: .9rem; color: var(--text-soft); max-width: 280px; margin-bottom: 10px; }
.footer-loc { font-weight: 600; }
.footer-offices-label {
  margin-top: 16px;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint) !important;
}
:lang(ar) .footer-offices-label { letter-spacing: 0; }
.footer-countries {
  display: flex; flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-size: .86rem; font-weight: 500;
  color: var(--text-soft);
}
.footer-countries li { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.footer-col h4 { font-size: .95rem; margin-bottom: 16px; }
.footer-col a {
  display: block;
  font-size: .9rem; color: var(--text-soft);
  margin-bottom: 10px;
  transition: color .2s;
  width: fit-content;
}
.footer-col a:hover { color: var(--violet); }
.footer-col .btn { color: #fff; margin-block: 8px 14px; }
.footer-col p { font-size: .88rem; color: var(--text-soft); margin-bottom: 4px; }
.footer-mail { font-weight: 600; color: var(--text) !important; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-block: 20px;
  border-top: 1px solid var(--border);
  font-size: .84rem; color: var(--text-faint);
}

/* ---------- Reveal on scroll ----------
   Hidden state only applies when JS confirmed it runs (html.js),
   so content is always visible if scripts fail or are disabled. */
html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
html.js .reveal.visible { opacity: 1; transform: translateY(0); }

/* stagger inside grids */
.feat-grid .reveal:nth-child(2), .uc-grid .reveal:nth-child(2) { transition-delay: .08s; }
.feat-grid .reveal:nth-child(3), .uc-grid .reveal:nth-child(3) { transition-delay: .16s; }
.feat-grid .reveal:nth-child(4), .uc-grid .reveal:nth-child(4) { transition-delay: .08s; }
.feat-grid .reveal:nth-child(5), .uc-grid .reveal:nth-child(5) { transition-delay: .16s; }
.feat-grid .reveal:nth-child(6), .uc-grid .reveal:nth-child(6) { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 56px; min-height: unset; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .how-grid, .enterprise-wrap { grid-template-columns: 1fr; gap: 44px; }
  .feat-grid, .uc-grid { grid-template-columns: repeat(2, 1fr); }
  .tour { grid-template-columns: 1fr; }
  .tour-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .tour-tab { min-width: 220px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chip-b { inset-inline-start: -8px; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: var(--header-h); inset-inline: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 26px;
    gap: 18px;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: all .3s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .burger { display: flex; }
  .nav-signin { display: none; }
  .nav-cta { display: none; }
  .feat-grid, .uc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding-block: 64px; }
  .float-chip { display: none; }
  .chat-pop { position: static; width: 100%; margin-top: -8px; border-radius: 0; border-inline: 0; border-bottom: 0; }
  .steps::before { inset-inline-start: 34px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .btn-lg { width: 100%; }
  .hero-cta { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
