/* ═══════════════════════════════════════════════════════════
   MotionPilot — Design Tokens (source of truth)
   Every public page links this file before its own stylesheet.
   Palette is the existing brand palette: black, charcoal, red,
   white. No new accent hues are introduced here.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Base surfaces ─────────────────────────────────────── */
  --bg: #050506;
  --bg-1: #08080a;
  --bg-2: #0d0d10;
  --bg-3: #12121a;
  --surface-0: #0a0a0c;
  --surface-1: #111113;
  --surface-2: #161618;
  --surface-3: #1a1a1e;

  /* ── Text (WCAG AA on base and charcoal) ───────────────── */
  --text-1: #f5f5f7;
  --text-2: #a3a3ab;
  --text-3: #8a8a93;   /* raised from #6b6b73: 5.95:1 on --bg */
  --text-4: #6b6b73;   /* decorative dividers / disabled only */

  /* ── Brand ─────────────────────────────────────────────── */
  --red: #e43333;
  --red-2: #c92929;
  --red-light: #ff6b5a;
  --red-deep: #b81f1f;
  --green: #32d787;
  --violet: #7f54dd;   /* legacy alias, no new usage */
  --blue: #ff6b5a;     /* legacy alias mapped to brand red */
  --c-blue: #ff6b5a;   /* legacy alias mapped to brand red */

  /* Brand gradient for display text, glows and lines */
  --grad-brand: linear-gradient(120deg, #ff6b5a 0%, #e43333 55%, #b81f1f 100%);
  /* Action gradient: white text stays above 4.5:1 at every stop */
  --grad-action: linear-gradient(120deg, #c92929 0%, #b81f1f 58%, #b81f1f 100%);
  --grad-violet: linear-gradient(120deg, #7f54dd 0%, #e43333 100%);

  /* ── Translucent layers (liquid glass) ─────────────────── */
  --glass-fill: linear-gradient(155deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 55%, rgba(255,255,255,.03));
  --glass-fill-strong: linear-gradient(155deg, rgba(255,255,255,.12), rgba(255,255,255,.03) 60%, rgba(255,255,255,.05));
  --glass-border: rgba(255,255,255,.10);
  --glass-border-strong: rgba(255,255,255,.20);
  --glass-blur: blur(28px) saturate(160%);
  --line-soft: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --red-glow: rgba(228,51,51,.35);
  --red-wash: rgba(228,51,51,.10);

  /* ── Radii ─────────────────────────────────────────────── */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  /* legacy aliases used by secondary pages */
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-xl: 32px;

  /* ── Spacing ───────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --section-y: 120px;
  --section-y-sm: 80px;

  /* ── Typography ────────────────────────────────────────── */
  --font-body: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --fs-hero: clamp(38px, 5.1vw, 66px);
  --fs-h2: clamp(30px, 3.6vw, 44px);
  --fs-h2-sm: clamp(26px, 3.2vw, 36px);
  --fs-h3: clamp(18px, 1.6vw, 22px);
  --fs-lead: clamp(16px, 1.5vw, 18px);
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 12.5px;
  --lh-tight: 1.2;
  --lh-body: 1.85;
  /* Arabic is a connected script: never apply negative tracking */
  --tracking: 0;
  --transition: color .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);

  /* ── Motion ────────────────────────────────────────────── */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 700ms;

  /* ── Elevation ─────────────────────────────────────────── */
  --shadow-sm: 0 8px 24px -12px rgba(0,0,0,.55);
  --shadow-md: 0 20px 50px -20px rgba(0,0,0,.65);
  --shadow-lg: 0 40px 90px -30px rgba(0,0,0,.8);
  --shadow-red: 0 10px 30px -8px rgba(228,51,51,.55);

  /* ── Focus & layout ────────────────────────────────────── */
  --focus-color: #ffffff;
  --focus-halo: rgba(228,51,51,.55);
  /* ── Legacy aliases (secondary pages) ──────────────────── */
  --accent: var(--red);
  --accent-light: var(--red-light);
  --accent-dark: var(--red-deep);
  --accent-glow: rgba(228,51,51,.3);
  --bg-dark: var(--bg);
  --bg-card: var(--surface-1);
  --bg-card-hover: var(--surface-3);
  --bg-surface: var(--surface-2);
  --border: #222225;
  --border-light: #2a2a2e;
  --border-hover: var(--line-strong);
  --text-primary: #f5f5f5;
  --text-secondary: var(--text-2);
  --text-muted: var(--text-3);
  --success: var(--green);
  --warning: var(--red-light);
  --danger: var(--red);

  --container: 1180px;
  --z-nav: 1000;
  --z-float: 999;
  --z-modal: 2000;
}

/* ── Global keyboard focus: always visible ──────────────── */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-halo);
}

/* ── Reduced motion: content visible, no essential motion ─ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .stagger-children,
  .stagger-children .reveal-child,
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}



/* ═══════════════════════════════════════════════════════════
   v3.7 LIGHT THEME — appended 2026-12-03
   Flips the whole site (every page that links tokens.css) to
   the light theme introduced on the homepage in v3.6. Append-
   only: the dark :root block above is left untouched, and this
   block wins because it comes later in the file.
   ═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   LIGHT THEME (v3.7): white background + black dots, site-wide.
   Appended AFTER the original dark token definitions, so these
   win on every page that links tokens.css. Brand red unchanged.
   ═══════════════════════════════════════════════════════════ */
:root {
  /* surfaces: white / warm paper */
  --bg: #faf8f7;
  --bg-1: #f4f1ef;
  --bg-2: #efeae8;
  --bg-3: #e9e3e1;
  --surface-0: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #faf7f5;
  --surface-3: #f3efed;
  --bg-dark: var(--bg);
  --bg-card: #ffffff;
  --bg-card-hover: #faf6f4;
  --bg-surface: #faf7f5;

  /* text: warm near-black scale (AA on white) */
  --text-1: #1d1519;
  --text-2: #51484d;
  --text-3: #71676c;
  --text-4: #a2989c;
  --text-primary: #1d1519;

  /* liquid glass → light glass */
  --glass-fill: linear-gradient(155deg, rgba(255,255,255,.92), rgba(255,255,255,.72) 55%, rgba(255,255,255,.82));
  --glass-fill-strong: linear-gradient(155deg, rgba(255,255,255,.97), rgba(255,255,255,.85) 60%, rgba(255,255,255,.92));
  --glass-border: rgba(29,17,21,.10);
  --glass-border-strong: rgba(29,17,21,.16);
  --line-soft: rgba(29,17,21,.06);
  --line: rgba(29,17,21,.10);
  --line-strong: rgba(29,17,21,.18);
  --border: #e7dfdd;
  --border-light: #dcd3d1;

  /* light elevation */
  --shadow-sm: 0 8px 22px -12px rgba(46,16,24,.14);
  --shadow-md: 0 20px 46px -20px rgba(46,16,24,.16);
  --shadow-lg: 0 40px 84px -30px rgba(46,16,24,.22);

  /* palette extras used across earlier blocks */
  --ink-warm: #1d1519;
  --muted-warm: #5b5156;
  --ember: #d23a2a;              /* deep ember: readable on white */
  --ember-soft: #ff8f7a;
  --wine-1: #f9eeec;             /* light wine wash for CTA panel */
  --wine-2: #f3e0dc;
  --grad-display: linear-gradient(115deg, #ff6b5a 0%, #f04438 28%, #e43333 55%, #b81f1f 80%, #8f1414 100%);

  --focus-color: #b81f1f;
}

/* white backdrop + black dot pattern (self-contained) */
body {
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(228,51,51,.06), transparent 60%),
    radial-gradient(900px 480px at 8% 12%, rgba(228,51,51,.04), transparent 55%),
    var(--bg) !important;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(20,12,15,.20) 1.5px, transparent 1.6px);
  background-size: 26px 26px;
  opacity: .9;
}
body > * { position: relative; }
::selection { background: rgba(228,51,51,.25); color: #1d1519; }
input, textarea, select { color-scheme: light; }

/* glass.css nav: dark glass → light glass (shared pages) */
.nav-inner {
  background: linear-gradient(155deg, rgba(255,255,255,.9), rgba(255,255,255,.72)) !important;
  border: 1px solid rgba(29,17,21,.09) !important;
  box-shadow: 0 16px 44px -18px rgba(46,16,24,.22), inset 0 1px 0 rgba(255,255,255,.8) !important;
}
.nav-links a:hover { background: rgba(29,17,21,.06); }
.nav-links a[aria-current="page"] { background: rgba(29,17,21,.06); }
.nav-burger { background: rgba(29,17,21,.05); }
.nav-links.nav-open { background: rgba(255,255,255,.98) !important; }
