/* mnaralsbul.com — shared stylesheet (RTL + LTR via logical properties) */

:root {
  --ink: #1c1826;
  --muted: #5f596b;
  --line: #e7e3ee;
  --bg: #ffffff;
  --soft: #f7f5fb;
  --accent: #5c24a9;
  --accent-ink: #350477;
  --accent-2: #9254e7;
  --accent-soft: #f2ebfc;
  --lav: #cb9ff6;
  --footer-bg: #17141f;
  --radius: 14px;
  --maxw: 72rem;
}

/* Pure Wash pages: brand palette */
.pw {
  --accent: #5c24a9;
  --accent-ink: #350477;
  --accent-2: #9254e7;
  --accent-soft: #f5effe;
  --soft: #faf7ff;
  --footer-bg: #1d0a3a;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  line-height: 1.85;
}
[lang="en"] { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.3; color: var(--ink); }
p { margin-block: 0 1rem; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; border-radius: 4px; }
address { font-style: normal; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0.75rem;
  background: #fff; color: var(--ink); padding: 0.5rem 1rem; border-radius: 8px; z-index: 20;
}
.skip:focus { inset-inline-start: 0.75rem; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: 46rem; }

/* ---------- Header ---------- */
.site-header { background: rgba(255, 255, 255, 0.97); border-block-end: 1px solid var(--line); }
.header-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.25rem; padding-block: 0.75rem;
}
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.25; color: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--accent-ink); letter-spacing: -0.01em; }
.brand-sub { font-size: 0.78rem; color: var(--muted); }
.brand-logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-logo img { display: block; height: 46px; width: auto; }
.brand-logo span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }

.site-nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding-block: 0.3rem; border-block-end: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); border-block-end-color: var(--accent); }

.lang {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem;
  font-size: 0.9rem; font-weight: 500; text-decoration: none; color: var(--ink); background: #fff;
}
.lang:hover { border-color: var(--accent); color: var(--accent); }

@media (min-width: 900px) {
  .site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.2) blur(6px); }
  .header-row { flex-wrap: nowrap; min-height: 4.5rem; }
  .site-nav { order: 0; width: auto; margin-inline-start: auto; }
}

/* ---------- Page sections ---------- */
.hero { padding-block: 3.25rem 3rem; background: linear-gradient(180deg, var(--soft), #fff); border-block-end: 1px solid var(--line); }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-block: 0.25rem 1rem; letter-spacing: -0.01em; }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--accent); margin-block-end: 0.25rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 42rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 1.5rem; }

.pw-hero { background: radial-gradient(120% 80% at 50% 0%, #f1e6ff 0%, #fbf8ff 55%, #fff 100%); }
.pw-hero-grid { display: grid; gap: 2rem; align-items: center; }
.pw-hero-logo { justify-self: center; width: min(260px, 70%); }
@media (min-width: 820px) {
  .pw-hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .pw-hero-logo { width: min(300px, 90%); }
}

.section { padding-block: 3.25rem; }
.section.alt { background: var(--soft); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.45rem, 3.2vw, 1.95rem); margin-block: 0 0.75rem; }
.section-intro { color: var(--muted); max-width: 44rem; margin-block-end: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  padding: 0.7rem 1.3rem; border-radius: 12px; font-weight: 600; text-decoration: none; line-height: 1.4;
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-ink); }

.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card h3 { font-size: 1.12rem; margin-block: 0 0.5rem; }
.card p:last-child { margin-block-end: 0; }
.card .more { font-weight: 600; text-decoration: none; }
.icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink); margin-block-end: 0.9rem;
}
.icon svg { width: 1.35rem; height: 1.35rem; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1rem; }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; margin-block-end: 0.75rem; font-family: "Inter", system-ui, sans-serif;
}
.steps h3 { font-size: 1.05rem; margin-block: 0 0.35rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.facts { display: grid; gap: 0 1.5rem; margin: 0; }
.facts dt { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.facts dd { margin: 0 0 1rem; font-weight: 500; }
@media (min-width: 720px) {
  .facts { grid-template-columns: minmax(10rem, max-content) 1fr; }
  .facts dt, .facts dd { padding-block: 0.6rem; margin: 0; border-block-end: 1px solid var(--line); }
}

.notice { background: var(--accent-soft); border-inline-start: 4px solid var(--accent); border-radius: 10px; padding: 1rem 1.25rem; }
.notice p:last-child { margin-block-end: 0; }
.soon {
  display: inline-flex; align-items: center; gap: 0.5rem; border: 1.5px dashed var(--accent-2); color: var(--accent-ink);
  background: #fff; border-radius: 999px; padding: 0.4rem 1rem; font-weight: 600; font-size: 0.95rem;
}
.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
@media (min-width: 720px) { .linklist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.linklist a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); font-weight: 500;
}
.linklist a:hover { border-color: var(--accent); color: var(--accent); }
.linklist a::after { content: "\2190"; color: var(--accent); }
[dir="ltr"] .linklist a::after { content: "\2192"; }

/* ---------- Legal / long-form ---------- */
.legal-head { padding-block: 2.5rem 1.75rem; background: var(--soft); border-block-end: 1px solid var(--line); }
.legal-head h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin-block: 0.25rem 0.5rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin: 0; }
.placeholder { background: #fff1c9; color: #6b4b00; border-radius: 4px; padding-inline: 0.3rem; font-weight: 600; }

.legal-layout { display: grid; gap: 2rem; padding-block: 2rem 3.5rem; }
@media (min-width: 980px) {
  .legal-layout { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 3rem; }
  .toc { position: sticky; top: 6rem; max-height: calc(100vh - 7.5rem); overflow: auto; }
}
.toc { align-self: start; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.toc h2 { font-size: 0.95rem; margin: 0 0 0.5rem; }
.toc ol { margin: 0; padding-inline-start: 1.25rem; font-size: 0.93rem; }
.toc li { margin-block: 0.3rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.prose { max-width: 47rem; min-width: 0; }
.prose > :first-child { margin-block-start: 0; }
.prose h2 { font-size: 1.32rem; margin-block: 2.5rem 0.6rem; padding-block-start: 0.25rem; scroll-margin-top: 6rem; }
.prose h3 { font-size: 1.05rem; margin-block: 1.4rem 0.35rem; scroll-margin-top: 6rem; }
.prose ul, .prose ol { padding-inline-start: 1.35rem; margin-block: 0 1rem; }
.prose li { margin-block: 0.35rem; }
.prose .notice { margin-block: 1rem 1.25rem; }

.table-wrap { overflow-x: auto; margin-block: 0.5rem 1.25rem; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: start; vertical-align: top; padding: 0.7rem 0.85rem; border-block-end: 1px solid var(--line); }
tr:last-child td { border-block-end: 0; }
th { background: var(--soft); font-weight: 600; }
td:first-child { font-weight: 500; min-width: 9rem; }

.faq { display: grid; gap: 0.75rem; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.95rem 1.15rem; }
.faq details[open] { border-color: var(--lav); }
.faq summary { cursor: pointer; font-weight: 600; list-style-position: inside; }
.faq details p { margin: 0.6rem 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #d8d2e3; padding-block: 2.75rem 1.5rem; font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.f-title { color: #fff; font-size: 1rem; margin: 0 0 0.6rem; }
.f-entity { color: #fff; font-weight: 600; margin: 0; }
.f-entity-en { margin: 0 0 0.75rem; color: #bfb6cf; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer address { margin-block-end: 0.5rem; }
.f-bottom { margin-block-start: 2.25rem; padding-block-start: 1.1rem; border-block-start: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.875rem; color: #b3aac3; }
.f-bottom p { margin: 0 0 0.35rem; }
.f-service { color: #e9defc; font-weight: 500; }

/* ---------- 404 ---------- */
.nf { padding-block: 4.5rem; text-align: center; }
.nf-code { font-size: 4rem; font-weight: 700; color: var(--accent); line-height: 1; margin: 0 0 1rem; font-family: "Inter", system-ui, sans-serif; }
.nf .actions { justify-content: center; }
.nf-en { margin-block-start: 2.5rem; padding-block-start: 2rem; border-block-start: 1px solid var(--line); }
