/* =====================================================================
   Mudabbir — Design System (dark default + light toggle, RTL/LTR)
   Synthesized from: Superwhisper, Dala, Vapi, AgentQL, Authkit
   Phase 1: tokens, reset, background, nav, hero, trust, buttons, toggles
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand accents (shared across themes) */
  --violet: #8b5cff;
  --violet-strong: #7c4dff;
  --blue: #3d7dff;
  --mint: #5ff2b8;
  --ember: #ff7a45;

  /* Radii */
  --r-pill: 999px;
  --r-card: 18px;
  --r-input: 12px;
  --r-sm: 8px;

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
  --section-y: clamp(72px, 10vw, 128px);

  /* Type — Tajawal is the primary typeface across the whole site */
  --font-display: 'Tajawal', system-ui, sans-serif;
  --font-body: 'Tajawal', system-ui, -apple-system, sans-serif;
  --font-ar: 'Tajawal', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace; /* kept only for numeric/technical labels (timer, stats) */

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.35s;
}

/* Light theme (default) */
:root, [data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f4f5fa;
  --elevated: #ffffff;
  --border: rgba(10, 12, 30, 0.10);
  --border-strong: rgba(10, 12, 30, 0.18);
  --text: #0b0c15;
  --text-muted: #565a6b;
  --text-faint: #8a8ea0;
  --btn-fg-on-accent: #ffffff;
  --glow-opacity: 0.12;
  --grid-opacity: 0.05;
  --card-shadow: 0 1px 2px rgba(10,12,30,0.04), 0 20px 40px -24px rgba(10,12,30,0.18);
}

/* Dark theme (opt-in) */
[data-theme="dark"] {
  --bg: #08090c;
  --bg-2: #0b0d12;
  --surface: #0f1116;
  --surface-2: #16181f;
  --elevated: #1b1e27;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-muted: #a6a9b4;
  --text-faint: #7a7d87;
  --btn-fg-on-accent: #ffffff;
  --glow-opacity: 0.20;
  --grid-opacity: 0.04;
  --card-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 50px -20px rgba(0,0,0,0.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
[lang="ar"], [dir="rtl"] body, html[lang="ar"] body { font-family: var(--font-ar); }
html[lang="ar"] { font-family: var(--font-ar); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: color-mix(in oklab, var(--violet) 40%, transparent); color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: inline-flex; align-items: center; gap: 10px;
}
html[lang="ar"] .eyebrow { font-family: var(--font-mono); letter-spacing: 0.06em; }

/* ---------- Background aurora + grid (procedural, no images) ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-aurora .glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
  opacity: var(--glow-opacity); transition: opacity var(--dur) var(--ease);
}
.glow--violet { width: 620px; height: 620px; background: var(--violet); top: -220px; inset-inline-start: -140px; }
.glow--blue   { width: 560px; height: 560px; background: var(--blue);  top: 8%;  inset-inline-end: -180px; }
.glow--mint   { width: 480px; height: 480px; background: var(--mint);  top: 62%; inset-inline-start: 34%; opacity: calc(var(--glow-opacity) * 0.5); }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--text);
  opacity: var(--grid-opacity);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--primary {
  background: linear-gradient(135deg, var(--violet), var(--blue));
  color: var(--btn-fg-on-accent);
  box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--violet) 70%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px color-mix(in oklab, var(--violet) 80%, transparent); }
.btn--ghost {
  background: color-mix(in oklab, var(--text) 5%, transparent);
  border-color: var(--border-strong); color: var(--text);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--violet); color: var(--text); background: color-mix(in oklab, var(--violet) 12%, transparent); }
.btn--mint { background: var(--mint); color: #04140d; }
.btn--mint:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -12px color-mix(in oklab, var(--mint) 70%, transparent); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
  padding: 14px 0; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__logo { width: auto; height: 30px; }

/* Theme-aware brand logo (colored mark on light, white mark on dark) */
.logo-dark { display: none; }
.logo-light { display: block; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.nav__wordmark { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
html[lang="ar"] .nav__wordmark { font-family: var(--font-ar); }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { font-size: 14.5px; color: var(--text-muted); transition: color var(--dur) var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 10px; }

/* icon toggles (lang + theme) */
.icon-btn, .lang-toggle {
  height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: color-mix(in oklab, var(--text) 4%, transparent);
  color: var(--text); font-size: 13.5px; font-weight: 600;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.icon-btn { width: 38px; padding: 0; }
.lang-toggle { font-family: var(--font-mono); letter-spacing: 0.02em; }
.icon-btn:hover, .lang-toggle:hover { border-color: var(--violet); color: var(--violet); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

.nav__burger { display: none; width: 40px; height: 40px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; background: none; border: 1px solid var(--border-strong); border-radius: 10px; }
.nav__burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--dur); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(130px, 16vw, 180px) clamp(40px, 6vw, 72px); }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 7vw, 78px); line-height: 1.04; letter-spacing: -0.03em;
  max-width: 15ch;
  background: linear-gradient(180deg, var(--text) 62%, color-mix(in oklab, var(--text) 55%, transparent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html[lang="ar"] .hero__title { font-family: var(--font-ar); letter-spacing: -0.01em; line-height: 1.18; }
.hero__title .accent {
  background: linear-gradient(120deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__subtitle { font-size: clamp(16px, 2.2vw, 20px); color: var(--text-muted); max-width: 62ch; line-height: 1.7; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* waveform (voice metaphor, Vapi) */
.waveform { width: 100%; max-width: 720px; margin-top: 10px; }
.waveform canvas { width: 100%; height: 140px; }

/* product mockup */
.hero__mockup {
  width: 100%; max-width: 1120px; margin-top: 20px; position: relative;
  border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.hero__mockup::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 60% at 50% -10%, color-mix(in oklab, var(--violet) 22%, transparent), transparent 70%);
}
.hero__mockup img { width: 100%; height: auto; }

/* ---------- Trusted by ---------- */
.trust { padding-block: clamp(28px, 5vw, 48px); }
.trust__label { text-align: center; color: var(--text-faint); font-size: 13.5px; margin-bottom: 22px; letter-spacing: 0.02em; }
.trust__logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 40px; opacity: 0.9; }
.trust__logos img { height: 34px; width: auto; filter: grayscale(1); opacity: 0.7; transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease); }
.trust__logos img:hover { opacity: 1; filter: grayscale(0); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; inset-block-start: 100%; inset-inline: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
    padding: 22px; box-shadow: var(--card-shadow);
  }
  .nav__cta-demo { display: none; }
}

/* =====================================================================
   SECTIONS (Phase 2 + 3)
   ===================================================================== */
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section__head { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: clamp(40px, 5vw, 64px); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -0.025em;
}
html[lang="ar"] .section__title { font-family: var(--font-ar); letter-spacing: -0.01em; line-height: 1.3; }
.section__subtitle { color: var(--text-muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.65; max-width: 60ch; }

/* Card base */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 28px; box-shadow: var(--card-shadow);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card__title { font-size: 18px; font-weight: 650; margin-bottom: 8px; letter-spacing: -0.01em; }
.card__text { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }

/* Icon chip */
.ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 18px; color: var(--violet);
  background: color-mix(in oklab, var(--violet) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--violet) 26%, transparent);
}
.ic svg { width: 22px; height: 22px; }
.ic--blue { color: var(--blue); background: color-mix(in oklab, var(--blue) 14%, transparent); border-color: color-mix(in oklab, var(--blue) 26%, transparent); }
.ic--mint { color: var(--mint); background: color-mix(in oklab, var(--mint) 14%, transparent); border-color: color-mix(in oklab, var(--mint) 26%, transparent); }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat { text-align: center; padding: 32px 20px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.stat__value {
  font-family: var(--font-mono); font-size: clamp(34px, 5vw, 52px); font-weight: 500; line-height: 1;
  background: linear-gradient(120deg, var(--violet), var(--blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat__label { color: var(--text-muted); font-size: 14.5px; margin-top: 12px; }

/* ---------- Services grid (with tall action card) ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card--tall { grid-row: span 2; }
.action-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.action-list li {
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 550;
  padding: 10px 14px; border-radius: 11px;
  background: color-mix(in oklab, var(--violet) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--violet) 20%, transparent);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.action-list li:hover { background: color-mix(in oklab, var(--violet) 20%, transparent); transform: translateX(-3px); }
[dir="ltr"] .action-list li:hover { transform: translateX(3px); }
.action-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); flex: none; }

/* ---------- Channels ---------- */
.channels-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.channel { text-align: center; padding: 26px 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.channel:hover { transform: translateY(-4px); border-color: var(--violet); }
.channel .ic { margin-inline: auto; }
.channel__name { font-size: 14px; font-weight: 550; }

/* ---------- Capabilities tabs ---------- */
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 34px; }
.tab {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 24px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); font-weight: 600; font-size: 14.5px;
  transition: all var(--dur) var(--ease);
}
.tab.active { background: linear-gradient(135deg, var(--violet), var(--blue)); color: #fff; border-color: transparent; box-shadow: 0 10px 26px -12px color-mix(in oklab, var(--violet) 80%, transparent); }
.tab:not(.active):hover { color: var(--text); border-color: var(--violet); }
.tab-panel { display: none; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tab-panel.active { display: grid; }

/* ---------- How it works (steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; }
.step__num {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 15px; font-weight: 500; margin-bottom: 18px; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.badge {
  font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--text) 6%, transparent); border: 1px solid var(--border); color: var(--text-muted);
}
.badges-label { font-size: 12.5px; color: var(--text-faint); margin-top: 16px; letter-spacing: 0.02em; }

/* ---------- Sectors ---------- */
.sectors-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sector {
  padding: 11px 22px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.sector:hover { color: var(--text); border-color: var(--violet); transform: translateY(-2px); background: color-mix(in oklab, var(--violet) 10%, transparent); }

/* ---------- Compliance ---------- */
.comp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---------- Benefits ---------- */
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.benefit { position: relative; overflow: hidden; }
.benefit::after { content: ''; position: absolute; inset-block-end: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, var(--violet), var(--blue)); transform: scaleX(0); transform-origin: var(--x-origin, left); transition: transform var(--dur) var(--ease); }
.benefit:hover::after { transform: scaleX(1); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: none; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 4px; font-size: 16.5px; font-weight: 600; text-align: start; font-family: inherit;
  transition: color var(--dur) var(--ease);
}
html[lang="ar"] .faq-q { font-family: var(--font-ar); }
.faq-q:hover { color: var(--violet); }
.faq-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1;
  background: color-mix(in oklab, var(--violet) 14%, transparent); color: var(--violet); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--violet); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease), padding var(--dur) var(--ease); }
.faq-a p { color: var(--text-muted); font-size: 15px; line-height: 1.7; padding: 0 4px; }
.faq-item.open .faq-a { max-height: 320px; }
.faq-item.open .faq-a p { padding-bottom: 22px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; }
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--border-strong); border-radius: 28px; padding: clamp(40px, 6vw, 72px);
  background:
    radial-gradient(80% 120% at 50% -20%, color-mix(in oklab, var(--violet) 30%, transparent), transparent 60%),
    var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.cta-card__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 42px); letter-spacing: -0.025em; line-height: 1.1; }
html[lang="ar"] .cta-card__title { font-family: var(--font-ar); line-height: 1.3; }
.cta-card__sub { color: var(--text-muted); font-size: clamp(15px, 2vw, 18px); max-width: 52ch; }
.cta-card__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px; box-shadow: var(--card-shadow); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--text-muted); }
.field .req { color: var(--ember); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-input);
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  font: inherit; font-size: 15px; transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); }
.field textarea { min-height: 92px; resize: vertical; }
.form__submit { width: 100%; margin-top: 6px; }
.form__success { display: none; text-align: center; padding: 24px 0; }
.form__success.show { display: block; }
.form__success h3 { color: var(--mint); font-size: 20px; margin-bottom: 6px; }
.form__success p { color: var(--text-muted); }
.contact-aside { display: flex; flex-direction: column; gap: 18px; }
.contact-point { display: flex; gap: 14px; align-items: flex-start; }
.contact-point .ic { margin-bottom: 0; }
.contact-point h4 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.contact-point p, .contact-point a { color: var(--text-muted); font-size: 14.5px; }
.contact-point a:hover { color: var(--violet); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 56px 32px; margin-top: var(--section-y); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer__brand img { width: auto; height: 28px; }
.footer__brand span { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
html[lang="ar"] .footer__brand span { font-family: var(--font-ar); }
.footer__tagline { color: var(--text-muted); font-size: 14px; max-width: 34ch; line-height: 1.6; }
.footer__col h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 14px; font-weight: 600; }
.footer__col a, .footer__col p { display: block; color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
.footer__col a:hover { color: var(--text); }
.footer__copy { margin-top: 40px; color: var(--text-faint); font-size: 13px; }

/* ---------- Responsive (sections) ---------- */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .card--tall { grid-row: auto; }
  .channels-grid { grid-template-columns: repeat(3, 1fr); }
  .tab-panel.active { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .comp-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
  .tab-panel.active { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .comp-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   PHASE 4 — Craft, motion & UX (a11y floor, live-call signature)
   ===================================================================== */

/* ---------- Accessibility: one consistent keyboard-focus ring ---------- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.btn:focus-visible { outline-offset: 4px; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }

/* ---------- Reading progress (the voice-line motif) ---------- */
.scroll-progress {
  position: fixed; inset-block-start: 0; inset-inline: 0; height: 2px; z-index: 200;
  background: linear-gradient(90deg, var(--violet), var(--blue), var(--mint));
  transform: scaleX(var(--p, 0)); transform-origin: right;
  will-change: transform; pointer-events: none;
}
[dir="ltr"] .scroll-progress { transform-origin: left; }

/* ---------- Nav: active-section underline ---------- */
.nav__links a::after {
  content: ''; position: absolute; inset-inline: 0; inset-block-end: -7px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  transform: scaleX(0); transform-origin: center; transition: transform var(--dur) var(--ease);
}
.nav__links a { position: relative; }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }
.nav__links a.active { color: var(--text); }

/* ---------- Card: pointer-follow glow (single signature interaction) ---------- */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity var(--dur) var(--ease);
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
              color-mix(in oklab, var(--violet) 20%, transparent), transparent 62%);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

/* ---------- Trust marquee (5 logos → intentional motion) ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; align-items: center; gap: 56px; width: max-content;
  animation: marquee 34s linear infinite;
}
[dir="rtl"] .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee img { height: 32px; width: auto; filter: grayscale(1); opacity: 0.62; transition: opacity var(--dur) var(--ease), filter var(--dur) var(--ease); }
.marquee img:hover { opacity: 1; filter: grayscale(0); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Signature: live inbound-call panel ---------- */
.hero__stage {
  width: 100%; max-width: 760px; margin-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
}
.livecall {
  width: 100%; text-align: start; position: relative; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: 22px;
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--card-shadow);
  padding: 18px 20px 20px;
}
.livecall::after {
  content: ''; position: absolute; inset-block-start: 0; inset-inline: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--violet), var(--blue), transparent);
}
.livecall__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.livecall__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.02em; color: var(--mint);
  background: color-mix(in oklab, var(--mint) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--mint) 30%, transparent);
  padding: 6px 12px; border-radius: var(--r-pill);
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint);
  animation: pulse 1.9s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--mint) 55%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.livecall__meta { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
.livecall__timer { color: var(--text-muted); }
.livecall__wave { width: 100%; height: 120px; display: block; }
.livecall__transcript { margin-top: 10px; min-height: 26px; }
.bubble { display: flex; gap: 10px; align-items: baseline; font-size: 15px; line-height: 1.6; color: var(--text); }
.bubble__who {
  flex: none; font-size: 11.5px; font-weight: 600; color: var(--violet);
  background: color-mix(in oklab, var(--violet) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--violet) 26%, transparent);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.bubble__text { color: var(--text-muted); }
.type-caret {
  display: inline-block; width: 2px; height: 1.05em; vertical-align: -2px; margin-inline-start: 1px;
  background: var(--violet); animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Form: inline validation ---------- */
.err-msg { display: none; color: var(--ember); font-size: 12.5px; font-weight: 500; margin-top: 6px; }
.field.invalid input, .field.invalid textarea { border-color: var(--ember); }
.field.invalid .err-msg { display: block; }

/* ---------- Motion opt-out for everything added here ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .pulse-dot { animation: none; }
  .type-caret { animation: none; }
  .scroll-progress { display: none; }
}

@media (max-width: 560px) {
  .livecall__top { flex-wrap: wrap; }
  .marquee__track { gap: 40px; }
}
