/* ============================================================
   Jamal Al Jallaf Advocates — base.css
   Tokens · reset · light/dark · RTL-aware
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
ol, ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, blockquote, figure { margin: 0; }

/* ─── Tokens ─── */
:root {
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display-ar: "Noto Naskh Arabic", "Amiri", "Cormorant Garamond", serif;
  --font-body-ar: "Noto Sans Arabic", "IBM Plex Sans Arabic", "Inter", sans-serif;

  --bg: #F5F2EC;
  --bg-elev: #FBF8F2;
  --bg-deep: #ECE6DA;
  --ink: #1A1F2A;
  --ink-soft: #4A5060;
  --ink-mute: #6E7384;
  --rule: rgba(14, 26, 43, 0.14);
  --rule-soft: rgba(14, 26, 43, 0.08);

  --navy: #0E1A2B;
  --navy-deep: #0A1320;
  --gold: #B08B3F;
  --gold-soft: #C9A24A;
  --whatsapp: #25D366;

  --shadow-1: 0 1px 2px rgba(14, 26, 43, .06), 0 4px 14px rgba(14, 26, 43, .04);
  --shadow-2: 0 12px 40px rgba(14, 26, 43, .12);
  --shadow-float: 0 16px 40px rgba(14, 26, 43, .22);

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(72px, 9vw, 140px);
  --radius: 2px;

  --t-fast: .2s ease;
  --t: .35s cubic-bezier(.2,.7,.2,1);
  --t-slow: .8s cubic-bezier(.2,.7,.2,1);
}

[data-theme="dark"] {
  --bg: #0B121C;
  --bg-elev: #111B28;
  --bg-deep: #07101A;
  --ink: #ECE6DA;
  --ink-soft: #BFC3CD;
  --ink-mute: #8B91A0;
  --rule: rgba(236, 230, 218, 0.16);
  --rule-soft: rgba(236, 230, 218, 0.08);
  --navy: #ECE6DA;
  --navy-deep: #F5F2EC;
  --gold: #C9A24A;
  --gold-soft: #D9B765;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  --shadow-2: 0 16px 50px rgba(0,0,0,.5);
}

/* ─── Arabic + RTL ─── */
[lang="ar"] { --font-display: var(--font-display-ar); --font-body: var(--font-body-ar); }
[lang="ar"] body { line-height: 1.85; }
[dir="rtl"] .flip-on-rtl { transform: scaleX(-1); }

/* ─── Layout primitives ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section.tight { padding-block: clamp(48px, 6vw, 96px); }

/* ─── Type ─── */
.section-eyebrow, .eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-bottom: 18px;
}
[lang="ar"] .section-eyebrow, [lang="ar"] .eyebrow { letter-spacing: .04em; font-size: 13px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 24px;
}
[lang="ar"] .section-title { line-height: 1.25; letter-spacing: 0; }
.section-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 56px;
}
[lang="ar"] .section-lede { font-style: normal; font-family: var(--font-body-ar); line-height: 1.85; }
.lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 18px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color var(--t), color var(--t), border-color var(--t), transform var(--t);
  cursor: pointer;
  min-height: 44px;
}
[lang="ar"] .btn { letter-spacing: 0; text-transform: none; font-size: 15px; }
.btn-primary { background: #0E1A2B; color: #F5F2EC; }
.btn-primary:hover { background: #B08B3F; color: #0B121C; transform: translateY(-1px); }
.btn-primary:hover span { color: #0B121C; }
[data-theme="dark"] .btn-primary { background: #B08B3F; color: #0B121C; }
[data-theme="dark"] .btn-primary:hover { background: #C9A24A; color: #0B121C; }
[data-theme="dark"] .btn-primary:hover span { color: #0B121C; }
.btn-ghost { color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: #B08B3F; color: #B08B3F; }
.btn-ghost:hover span { color: #B08B3F; }
[data-theme="dark"] .btn-ghost:hover { border-color: #C9A24A; color: #C9A24A; }
[data-theme="dark"] .btn-ghost:hover span { color: #C9A24A; }
.btn-block { width: 100%; justify-content: center; }
.btn .arrow-end::before { content: "→"; }
[dir="rtl"] .btn .arrow-end::before { content: "←"; }

/* ─── Focus ─── */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold-soft); color: var(--navy-deep); }

/* ─── Reduce motion ─── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
