/* ═══════════════════════════════════════════════════════════════
   رفيق — tokens.css
   Pure-white, minimal, editorial. One accent (brand teal). Soft
   gray hairlines, whisper-quiet shadows, generous whitespace.
   Typography is the hero. Logical properties throughout (RTL/LTR).
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Neutral scale ── */
  --bg:      #FFFFFF;
  --ink:     #0E1113;   /* near-black — headlines, primary text */
  --ink-2:   #33383D;   /* strong body */
  --muted:   #71777E;   /* secondary text */
  --faint:   #9BA1A7;   /* captions, meta */
  --line:    #ECEDEF;   /* hairline borders */
  --line-2:  #F4F5F6;   /* faint dividers */
  --tint:    #F8F9FA;   /* inset fills, sidebar */
  --tint-2:  #F1F3F4;

  /* ── The one accent (brand teal) ── */
  --accent:      #0B3B3C;
  --accent-600:  #0F4E4F;
  --accent-700:  #093031;
  --accent-tint: #EAF1F0;
  --accent-line: #CFE0DE;

  /* ── Functional (chips / forms only) ── */
  --ok:      #1E7A55;
  --ok-tint: #E6F2EC;
  --warn:    #9A6B12;
  --warn-tint:#F6EEDC;
  --err:     #B23B32;
  --err-tint:#F8E7E4;

  /* ── Depth ── */
  --shadow-xs: 0 1px 2px rgba(14, 17, 19, .05);
  --shadow-sm: 0 1px 2px rgba(14, 17, 19, .05), 0 4px 12px rgba(14, 17, 19, .04);
  --shadow:    0 2px 6px rgba(14, 17, 19, .05), 0 18px 40px rgba(14, 17, 19, .07);
  --shadow-lg: 0 8px 20px rgba(14, 17, 19, .06), 0 40px 80px rgba(14, 17, 19, .10);

  /* ── Shape ── */
  --r-xs: 8px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* ── Type ── */
  --font: 'Alexandria', system-ui, sans-serif;
  --font-num: 'Inter', 'Alexandria', ui-sans-serif, sans-serif;

  --container: 1200px;
  --nav-h: 72px;
  --gap-section: clamp(80px, 11vw, 148px);
}

html[lang="en"] { --font: 'Inter', system-ui, sans-serif; }

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

html { scroll-behavior: smooth; scroll-padding-block-start: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }

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

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink-2);
  background: var(--bg);
  font-size: 1.02rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { font-size: 1rem; line-height: 1.65; }

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent-tint); color: var(--accent-700); }

/* ── Type roles ── */
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.2; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { letter-spacing: -0.02em; }

.display {
  font-size: clamp(2.05rem, 5.4vw, 4.15rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
}
html[lang="ar"] .display { line-height: 1.28; letter-spacing: 0; font-weight: 700; }

.h2 { font-size: clamp(1.9rem, 3.4vw, 2.85rem); font-weight: 600; line-height: 1.18; }
html[lang="ar"] .h2 { line-height: 1.35; font-weight: 700; }

.h3 { font-size: 1.24rem; font-weight: 600; line-height: 1.35; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  inline-size: 7px; block-size: 7px;
  border-radius: 50%;
  background: var(--accent);
}
html[lang="en"] .eyebrow { letter-spacing: .04em; }

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.24rem);
  line-height: 1.7;
  color: var(--muted);
}
html[lang="ar"] .lead { line-height: 1.9; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.prose { max-width: 54ch; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: .96rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { inline-size: 17px; block-size: 17px; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--accent-600); box-shadow: var(--shadow-sm); }

.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { border-color: #DCDEE1; background: var(--tint); }

.btn-quiet { background: transparent; color: var(--ink-2); padding-inline: 6px; }
.btn-quiet:hover { color: var(--accent); }

.btn-lg { padding: 15px 30px; font-size: 1rem; }

.arrow { transition: transform .18s ease; }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(3px); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* ── Layout scaffolding ── */
.container {
  max-inline-size: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
.section { padding-block: var(--gap-section); }

.section-head { max-inline-size: 640px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .h2 { margin-block: 16px 0; }
.section-head .lead { margin-block-start: 18px; }

/* ── Reveal (JS-gated, subtle) ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }

/* ── Utilities ── */
.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
