/* Al Ahd landing site. Dark-vellum / illuminated-manuscript visual language,
   mirrored from the mobile app's tokens (apps/mobile/tailwind.config.js). */

:root {
  --vellum: #08191b;
  --vellum-raised: #0f2925;
  --vellum-card: #143832;
  --vellum-edge: #1e4a43;
  --vellum-glow: #235952;

  --cream: #f8e2a2;
  --cream-body: #e8dbb5;
  --cream-soft: #c9b487;
  --cream-muted: #8e7d6c;
  --cream-ghost: #5a4f3d;

  --gold: #b8874a;
  --gold-deep: #8e6633;
  --gold-soft: #d9b07a;
  --gold-gilt: #e8c98c;

  --maxw: 1080px;
  --radius: 2px; /* khatim */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #0d2622 0%, var(--vellum) 55%) no-repeat,
    var(--vellum);
  color: var(--cream-body);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-gilt); text-decoration: none; }
a:hover { color: var(--cream); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- typographic system ---- */
.display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.gold-text {
  background: linear-gradient(180deg, var(--gold-gilt) 0%, var(--gold) 70%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.arabic { font-family: "Amiri", serif; direction: rtl; }
.kicker {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em; /* kufic */
  text-transform: uppercase;
  color: var(--cream-soft);
}

/* ---- top bar ---- */
header.bar {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(8, 25, 27, 0.72);
  border-bottom: 1px solid var(--vellum-edge);
}
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 34px; height: 34px; border-radius: 7px; }
.brand .name { font-family: "Fraunces", serif; font-weight: 600; font-size: 19px; color: var(--cream); }
.brand .name .ar { font-family: "Amiri", serif; color: var(--gold-gilt); margin-inline-start: 8px; font-size: 18px; }
.bar nav { display: flex; gap: 26px; align-items: center; }
.bar nav a { color: var(--cream-soft); font-size: 14.5px; font-weight: 500; }
.bar nav a:hover { color: var(--cream); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-gilt), var(--gold));
  color: #20160a; border-color: var(--gold-deep);
}
.btn-primary:hover { color: #20160a; background: linear-gradient(180deg, #f1d59a, var(--gold-soft)); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--vellum-edge); }
.btn-ghost:hover { color: var(--cream); border-color: var(--vellum-glow); background: var(--vellum-raised); }
.btn-soon { opacity: .62; cursor: default; }
.btn-soon:active { transform: none; }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); margin: 18px 0 0; }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--cream-body); margin: 22px 0 0; max-width: 30ch; }
.hero .ar-lede { font-family: "Tajawal", sans-serif; direction: rtl; color: var(--cream-soft); margin-top: 14px; font-size: 18px; }
.cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.cta-note { margin-top: 16px; font-size: 13.5px; color: var(--cream-muted); }

/* hero illustration card */
.hero-art {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--vellum-edge);
  box-shadow: 0 30px 80px -30px #000, inset 0 1px 0 rgba(248, 226, 162, 0.06);
}
.hero-art svg { width: 100%; height: auto; display: block; }

/* corner khatim ornaments */
.ornament { position: absolute; width: 38px; height: 38px; opacity: .5; z-index: 3; color: var(--gold); }
.ornament.tl { top: 14px; inset-inline-start: 14px; }
.ornament.br { bottom: 14px; inset-inline-end: 14px; transform: rotate(180deg); }

/* ---- section scaffolding ---- */
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.section-head { max-width: 60ch; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 12px 0 0; }
.section-head p { color: var(--cream-soft); margin-top: 12px; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, var(--vellum-edge), transparent); border: 0; margin: 0; }

/* ---- feature grid ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.card {
  background: linear-gradient(180deg, var(--vellum-card), var(--vellum-raised));
  border: 1px solid var(--vellum-edge); border-radius: 10px; padding: 24px;
}
.card .ic { color: var(--gold-gilt); margin-bottom: 14px; }
.card h3 { font-family: "Fraunces", serif; font-weight: 600; color: var(--cream); font-size: 19px; margin: 0 0 8px; }
.card p { color: var(--cream-soft); font-size: 15px; margin: 0; }

/* ---- the practice (numbered loop) ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.step .n {
  font-family: "Fraunces", serif; font-size: 14px; font-weight: 600; color: #20160a;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(180deg, var(--gold-gilt), var(--gold));
}
.step h3 { font-family: "Fraunces", serif; font-weight: 600; color: var(--cream); font-size: 17px; margin: 0 0 6px; }
.step p { color: var(--cream-soft); font-size: 14.5px; margin: 0; }

/* ---- covenant band ---- */
.covenant { text-align: center; }
.covenant .verse { font-family: "Amiri", serif; direction: rtl; font-size: clamp(26px, 4vw, 40px); color: var(--gold-gilt); line-height: 1.6; }
.covenant .gloss { color: var(--cream-soft); font-style: italic; font-family: "Fraunces", serif; margin-top: 16px; }
.covenant .src { color: var(--cream-muted); font-size: 13px; margin-top: 10px; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--vellum-edge); padding: 48px 0 60px; color: var(--cream-muted); }
footer .cols { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
footer .name { font-family: "Fraunces", serif; color: var(--cream); font-size: 18px; }
footer a { color: var(--cream-soft); font-size: 14.5px; }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer .fine { margin-top: 28px; font-size: 13px; color: var(--cream-ghost); }

/* ---- legal pages ---- */
.legal { padding-top: 56px; padding-bottom: 64px; }
.legal .doc { max-width: 760px; margin: 0 auto; }
.legal h1 { font-family: "Fraunces", serif; color: var(--cream); font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; }
.legal .meta { color: var(--cream-muted); font-size: 14px; margin-bottom: 8px; }
.legal .note {
  background: var(--vellum-raised); border: 1px solid var(--vellum-edge);
  border-radius: 8px; padding: 16px 18px; color: var(--cream-soft); font-size: 14.5px; margin: 22px 0 8px;
}
.legal h2 { font-family: "Fraunces", serif; color: var(--cream); font-size: 23px; margin: 40px 0 10px; }
.legal h3 { color: var(--cream); font-size: 17px; margin: 24px 0 6px; }
.legal p, .legal li { color: var(--cream-body); font-size: 16px; }
.legal ul { padding-inline-start: 22px; }
.legal li { margin: 6px 0; }
.legal a.back { display: inline-block; margin-top: 36px; font-weight: 600; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.legal th, .legal td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--vellum-edge); vertical-align: top; }
.legal th { color: var(--cream); font-weight: 600; }
.legal td { color: var(--cream-soft); }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  /* Art now sits first; pull it up tight under the sticky header. */
  .hero { padding-top: 0; }
  .hero .wrap { padding-top: 24px; }
  .hero-art { order: -1; }
  .hero .lede { max-width: none; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  /* Stack the bar: logo on top, nav links in a centered row beneath it. */
  .bar .wrap { flex-direction: column; height: auto; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .bar nav { gap: 20px; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---- language switch ---- */
.lang {
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 14px; font-weight: 600; color: var(--cream-soft);
  border: 1px solid var(--vellum-edge); border-radius: var(--radius);
  padding: 7px 13px; line-height: 1;
}
.lang:hover { color: var(--cream); border-color: var(--vellum-glow); background: var(--vellum-raised); }

/* ---- Arabic / RTL ----
   Web RTL is honoured by dir="rtl" + CSS logical properties (unlike the RN
   build, where textAlign was a no-op; see CLAUDE.md). Fonts mirror the app:
   Amiri for display + the verse, Tajawal for chrome/body. letter-spacing and
   uppercase are dropped on Arabic (they shatter cursive joining). */
[dir="rtl"] body { font-family: "Tajawal", system-ui, sans-serif; }
[dir="rtl"] .lang,
[dir="rtl"] .kicker,
[dir="rtl"] .card h3,
[dir="rtl"] .step h3,
[dir="rtl"] .legal h1,
[dir="rtl"] .legal h2,
[dir="rtl"] .legal h3,
[dir="rtl"] .brand .name { font-family: "Tajawal", system-ui, sans-serif; }
[dir="rtl"] .display,
[dir="rtl"] .covenant .verse,
[dir="rtl"] footer .name { font-family: "Amiri", serif; }
[dir="rtl"] .display { line-height: 1.4; }
[dir="rtl"] .hero h1 { line-height: 1.32; }
[dir="rtl"] .kicker { text-transform: none; letter-spacing: 0; font-weight: 600; }
[dir="rtl"] .card h3, [dir="rtl"] .step h3 { font-weight: 700; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .covenant .gloss { font-family: "Tajawal", system-ui, sans-serif; font-style: normal; }
