:root {
  --plum-900: #1f0730;
  --plum-800: #2a0a3d;
  --plum-700: #3d1257;
  --gold: #d4a838;
  --gold-soft: #e9cf8a;
  --ink: #1c1622;
  --paper: #f7f3ec;
  --radius: 14px;
  --accent: var(--gold);
  --accent-ink: #2b2112;
  --band: #6b5a3e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 60% 70% at 85% 10%, #5b1f7d 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 100%, #4a1866 0%, transparent 60%),
    var(--plum-800);
  padding: clamp(48px, 8vw, 96px) 20px clamp(56px, 8vw, 104px);
}
.corner {
  position: absolute;
  width: 220px; height: 220px;
  border: 1.5px solid rgba(212, 168, 56, .55);
  transform: rotate(45deg);
}
.corner--tl { top: -150px; left: -80px; }
.corner--br { bottom: -150px; right: -80px; }
.hero__inner {
  position: relative;
  max-width: 1160px; margin: 0 auto;
  display: grid; gap: 40px; align-items: center;
  grid-template-columns: 1.1fr 1fr;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-weight: 500; letter-spacing: .02em;
}
.hero h1 {
  margin: 0;
  font-family: "Reem Kufi", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.15;
  padding-inline-start: 22px;
  border-inline-start: 3px solid var(--gold);
}
.hero h1 span {
  display: block;
  color: var(--gold);
}
.lead { max-width: 56ch; margin: 24px 0 32px; color: #e6dcef; font-size: 1.08rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center;
  padding: 12px 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
  transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--plum-900); }
.btn--ghost { border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.stats {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: flex; gap: 36px; flex-wrap: wrap;
}
.stats strong {
  display: block;
  font-family: "Reem Kufi", sans-serif;
  font-size: 2rem; line-height: 1; color: var(--gold);
}
.stats span { font-size: .9rem; color: #cbbcd8; }
.hero__art {
  width: 100%; height: auto;
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 75%);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(31, 7, 48, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212,168,56,.25);
}
.toolbar__inner {
  max-width: 1160px; margin: 0 auto;
  padding: 10px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
}
.chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.chips a {
  display: block; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px;
  color: #dccfe7; text-decoration: none; font-size: .95rem;
  transition: background .2s, color .2s;
}
.chips a:hover { color: #fff; background: rgba(255,255,255,.08); }
.chips a.active { background: var(--gold); color: var(--plum-900); font-weight: 700; }
.search {
  position: relative; flex: 0 1 300px;
}
.search svg {
  position: absolute; inset-inline-start: 12px; top: 50%; translate: 0 -50%;
  width: 18px; height: 18px; fill: none; stroke: #b9a6c9; stroke-width: 2;
}
.search input {
  width: 100%;
  padding: 9px 40px 9px 14px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07); color: #fff;
  font: inherit; font-size: .95rem;
}
.search input::placeholder { color: #a996b8; }
.search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 7vw, 88px) 20px; background: var(--band); color: #fff; }
.theme-bronze  { --band: #7a6243; --accent: #d89a2e; --accent-ink: #fff; }
.theme-olive   { --band: #2f4a27; --accent: #9b8a4e; --accent-ink: #fff; }
.theme-slate   { --band: #33505a; --accent: #1f3a43; --accent-ink: #fff; }
.theme-violet  { --band: #5e3f85; --accent: #7a2468; --accent-ink: #fff; }
.theme-crimson { --band: #34507e; --accent: #c8282d; --accent-ink: #fff; }
.section__inner { max-width: 1160px; margin: 0 auto; }
.section__head {
  display: flex; align-items: flex-end; gap: 20px;
  margin-bottom: 40px;
}
.section__num {
  font-family: "Reem Kufi", sans-serif;
  font-size: clamp(3rem, 7vw, 5rem); line-height: .85;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.45);
}
.section h2 {
  margin: 0;
  font-family: "Reem Kufi", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.2;
}
.section h2 small {
  display: block;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 500;
  color: rgba(255,255,255,.78); margin-top: 6px;
}

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.1);
  box-shadow: 0 18px 36px rgba(0,0,0,.22);
  outline: none;
}
.card__title {
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 18px;
  font-weight: 700; font-size: 1.08rem; line-height: 1.4;
}
.card__logo {
  margin: 16px 16px 0;
  background: #fff; border-radius: 8px;
  aspect-ratio: 3 / 1;
  display: grid; place-items: center; overflow: hidden;
}
.card__logo img { width: 100%; height: 100%; object-fit: contain; }
.card__desc { padding: 14px 18px 0; color: rgba(255,255,255,.9); font-size: .98rem; }
.card__link {
  margin-top: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 14px 18px 16px;
  font-size: .82rem; color: rgba(255,255,255,.65);
  direction: ltr; justify-content: flex-end;
}
.card__link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.card:hover .card__link { color: #fff; }
.card--compact .card__logo { margin-bottom: 0; }

.divider {
  display: flex; align-items: center; gap: 16px;
  margin: 56px 0 28px;
  font-size: 1.3rem; font-weight: 700;
}
.divider::before, .divider::after {
  content: ""; flex: 1; max-width: 140px; height: 3px; border-radius: 2px; background: var(--accent);
}
.divider { justify-content: center; }
.note {
  margin: 32px 0 0; text-align: center;
  font-size: .95rem; color: rgba(255,255,255,.8);
}
.empty { text-align: center; padding: 80px 20px; font-size: 1.1rem; color: #6d6275; }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 48px 20px;
  background: var(--plum-900); color: #e6dcef;
}
.footer img { width: 64px; height: auto; border-radius: 12px; }
.footer p { margin: 0; }
.footer a { color: var(--gold); text-decoration: none; font-weight: 700; direction: ltr; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 460px; margin: 0 auto; order: -1; }
  .toolbar__inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .search { flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__art { animation: none; }
  .card, .btn { transition: none; }
}
