/* Firasa AI — design tokens */

:root {
  /* Brand */
  --brand-deep: #3E1F5E;        /* logo purple */
  --brand-deep-2: #2A1440;
  --accent-h: 295;              /* violet hue, tweakable */
  --accent: oklch(0.68 0.22 var(--accent-h));
  --accent-soft: oklch(0.78 0.14 var(--accent-h));
  --accent-ink: oklch(0.22 0.10 var(--accent-h));

  /* Neutrals (dark-first) */
  --bg: #0A0812;
  --bg-1: #120E1E;
  --bg-2: #1A1430;
  --bg-3: #221A3E;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.18);
  --fg: #F4F1FA;
  --fg-muted: rgba(244,241,250,0.62);
  --fg-dim: rgba(244,241,250,0.42);

  /* Type */
  --font-display: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", "Tajawal", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-arabic: "Tajawal", "IBM Plex Sans Arabic", system-ui, sans-serif;

  /* Radii + shadows */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Spacing rhythm */
  --gutter: clamp(20px, 4vw, 72px);
  --section: clamp(64px, 10vw, 160px);
}

[data-theme="light"] {
  --bg: #F7F5FC;
  --bg-1: #EEE9F6;
  --bg-2: #E3DBF0;
  --bg-3: #D6CAE6;
  --line: rgba(20,10,40,0.08);
  --line-strong: rgba(20,10,40,0.18);
  --fg: #170A28;
  --fg-muted: rgba(23,10,40,0.64);
  --fg-dim: rgba(23,10,40,0.42);
  --accent: oklch(0.52 0.22 var(--accent-h));
  --accent-soft: oklch(0.6 0.18 var(--accent-h));
}

html[dir="rtl"] {
  --font-display: "Tajawal", "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Tajawal", "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 400ms ease, color 400ms ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Utility */
.container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-wrap: balance;
}
html[dir="rtl"] .display { letter-spacing: 0; line-height: 1.2; }

.grid-lines {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}

/* Chrome */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  transition: all .25s ease;
  white-space: nowrap;
}
.pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill-filled {
  background: var(--accent); color: #0A0812; border-color: var(--accent);
}
.pill-filled:hover { background: var(--fg); color: var(--bg); }
.pill-yellow {
  background: #f3e96d;
  color: #1A0F2E;
  border-color: #f3e96d;
  font-weight: 600;
}
.pill-yellow:hover { background: #f7f09a; color: #1A0F2E; border-color: #f7f09a; }
[data-theme="light"] .pill-yellow { background: #f3e96d; border-color: #f3e96d; color: #1A0F2E; }
[data-theme="light"] .pill-yellow:hover { background: #e8dc4a; border-color: #e8dc4a; }

.arrow-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--fg); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .25s ease, background .25s ease;
  flex: none;
}
.arrow-btn:hover { transform: scale(1.06); background: var(--accent); color: #fff; }
html[dir="rtl"] .arrow-btn svg { transform: scaleX(-1); }

/* Section scaffold */
.section { padding: var(--section) 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 72px;
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 2fr 1fr; align-items: end; gap: 80px; }
}
.section-head h2 {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[dir="rtl"] .section-head h2 { letter-spacing: 0; line-height: 1.2; }
.section-head .note {
  color: var(--fg-muted);
  font-size: 15px;
  max-width: 360px;
  line-height: 1.6;
}

hr.dotted {
  border: 0; height: 1px;
  background: repeating-linear-gradient(to right,
    var(--line-strong) 0 2px, transparent 2px 8px);
  margin: 48px 0;
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Page transition */
.page-enter { animation: pageEnter .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
