/* =========================================================
   الهوية البصرية — Design tokens, reset & typography
   Change colours / fonts here and the whole site follows.
   ========================================================= */
:root {
  /* Palette: warm ivory → cream → beige → taupe, with subtle gold */
  --ivory: #fbf8f3;
  --cream: #f4ede2;
  --beige: #e8dccb;
  --sand: #d8c7b0;
  --taupe: #a89888;
  --taupe-deep: #75685d;
  --ink: #2e2925;
  --ink-soft: #5b524b;
  --gold: #b48f57;
  --gold-deep: #8a6a3a; /* readable gold for small text */
  --gold-soft: #d9c39a;
  --line: rgba(46, 41, 37, 0.12);
  --line-strong: rgba(46, 41, 37, 0.22);
  --surface: #fffdf9;

  --font-display: 'Amiri', 'Noto Naskh Arabic', 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font-latin: 'Cormorant Garamond', Georgia, serif;

  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(46, 41, 37, 0.04), 0 18px 48px -18px rgba(46, 41, 37, 0.22);
  --shadow-lg: 0 30px 80px -30px rgba(46, 41, 37, 0.35);

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --header-h: 80px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Page fade-in */
main { opacity: 0; transition: opacity 0.7s var(--ease); }
body.is-ready main { opacity: 1; }

/* ---------- Typography ---------- */
.display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 700; color: var(--ink); letter-spacing: 0; }
.display { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: 1.25; }
.h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: 1.3; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.35; }
.h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.45; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-soft); line-height: 1.95; max-width: 60ch; font-weight: 300; }
.muted { color: var(--taupe-deep); }
.latin { font-family: var(--font-latin); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--gold-deep);
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; }
.gold-text { color: var(--gold-deep); }
em.accent { font-style: normal; color: var(--gold-deep); position: relative; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--cream); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
