/* =====================================================================
   أجيال الحضارة — Generations of Civilization
   style.css : design system + layout + components
   Palette: deep teal night, gold, jewel teal, amber.
   ===================================================================== */

/* --------------------------------- tokens ------------------------------ */
:root {
  --night-900: #04161e;
  --night-800: #06202a;
  --night-700: #0a2c34;
  --night-600: #0e3945;
  --night-500: #14505e;

  --gold-400: #e2c374;
  --gold-500: #d4ad57;
  --gold-600: #b98f3c;
  --teal-400: #74c3b6;
  --teal-500: #4fa89b;
  --amber-400: #eda968;

  --ink: #eaf3f3;
  --ink-soft: #b7cccc;
  --ink-dim: #86a2a4;

  --line: rgba(226, 195, 116, 0.22);
  --line-soft: rgba(116, 195, 182, 0.16);
  --card: rgba(255, 255, 255, 0.045);
  --card-hi: rgba(255, 255, 255, 0.075);

  --font-body: 'Almarai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Reem Kufi', 'Almarai', system-ui, sans-serif;
  --font-verse: 'Amiri', 'Traditional Arabic', serif;
  --font-latin: 'Manrope', system-ui, sans-serif;

  --radius-s: 10px;
  --radius: 18px;
  --radius-l: 26px;

  --shadow-s: 0 4px 14px rgba(0, 0, 0, 0.22);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  --shadow-gold: 0 10px 34px rgba(226, 195, 116, 0.22);

  --wrap: 1220px;
  --header-h: 74px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.06rem);
  line-height: 1.85;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(116, 195, 182, 0.13), transparent 62%),
    radial-gradient(880px 560px at 8% 4%, rgba(226, 195, 116, 0.10), transparent 60%),
    linear-gradient(180deg, var(--night-800) 0%, var(--night-900) 48%, #030f15 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

html[dir="ltr"] body { font-family: var(--font-latin), var(--font-body); }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--gold-400); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.35;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: 0;
}
html[dir="ltr"] h1, html[dir="ltr"] h2,
html[dir="ltr"] h3, html[dir="ltr"] h4 {
  font-family: var(--font-latin), var(--font-head);
  letter-spacing: -0.015em;
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 50%;
  transform: translate(-50%, -140%);
  top: 8px; z-index: 999;
  background: var(--gold-400); color: var(--night-900);
  padding: 10px 20px; border-radius: 0 0 12px 12px;
  font-weight: 700; transition: transform 0.2s;
}
.skip-link:focus { transform: translate(-50%, 0); }

.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }

/* -------------------------------- header ------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  backdrop-filter: blur(14px);
  background: rgba(4, 22, 30, 0.72);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled {
  background: rgba(4, 22, 30, 0.92);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; gap: 1.1rem;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; padding: 3px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-s);
  object-fit: contain;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name {
  font-family: var(--font-head); font-size: 1.16rem; color: var(--ink);
  font-weight: 700;
}
.brand__sub {
  font-family: var(--font-latin); font-size: 0.68rem;
  color: var(--gold-400); letter-spacing: 0.06em;
}

.site-nav { display: flex; align-items: center; gap: 0.35rem; }
.site-nav a {
  color: var(--ink-soft); padding: 0.45rem 0.85rem; border-radius: 999px;
  font-size: 0.94rem; text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--ink); background: var(--card); text-decoration: none; }
.site-nav__cta {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600)) !important;
  color: var(--night-900) !important;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}
.site-nav__cta:hover { filter: brightness(1.08); }

.header-tools { display: flex; align-items: center; gap: 0.7rem; }

.lang-switch {
  display: flex; gap: 2px; padding: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.lang-btn {
  background: none; border: 0; cursor: pointer;
  color: var(--ink-dim); font-size: 0.8rem; font-weight: 600;
  padding: 0.34rem 0.72rem; border-radius: 999px;
  transition: all 0.2s; white-space: nowrap;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--night-900);
}

.nav-toggle {
  display: none; width: 42px; height: 42px;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 12px; cursor: pointer; padding: 11px 10px;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span:not(.sr-only) {
  display: block; height: 2px; background: var(--gold-400); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --------------------------------- hero -------------------------------- */
.hero { position: relative; padding: clamp(2rem, 5vw, 3.6rem) 0 clamp(3rem, 7vw, 5.5rem); overflow: hidden; }

.hero__glow {
  position: absolute; inset-inline-end: -14%; top: -22%;
  width: min(720px, 88vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(116, 195, 182, 0.20), transparent 66%);
  pointer-events: none;
}

.hero__grid {
  position: relative; z-index: 1;
  display: grid; gap: clamp(1.6rem, 4vw, 2.6rem);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
}

.pill {
  display: inline-block;
  border: 1px solid var(--line);
  background: rgba(226, 195, 116, 0.08);
  color: var(--gold-400);
  padding: 0.4rem 1rem; border-radius: 999px;
  font-size: 0.83rem; font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero__title { margin-bottom: 0.5rem; font-size: clamp(2rem, 1.4rem + 3.4vw, 3.5rem); }
.hero__title-1 { display: block; color: var(--ink-soft); font-weight: 400; }
html[dir="ltr"] .hero__title-1:empty { display: none; }
.hero__title-1:empty { display: none; }
.hero__title-2 {
  display: block;
  background: linear-gradient(100deg, var(--gold-400) 0%, #f6e3ae 42%, var(--gold-500) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold-400);
  font-weight: 700;
}

.hero__tagline {
  font-size: clamp(1.04rem, 1rem + 0.4vw, 1.28rem);
  color: var(--teal-400); font-weight: 600; margin-bottom: 1rem;
}
.hero__lead { color: var(--ink-soft); max-width: 56ch; font-size: 1.01rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 1.6rem 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.82rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  text-decoration: none; border: 1px solid transparent;
  transition: transform 0.18s, filter 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--night-900); box-shadow: var(--shadow-gold);
}
.btn--gold:hover { filter: brightness(1.09); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { background: var(--card-hi); border-color: var(--gold-400); }
.btn--full { width: 100%; }

.verse-box {
  margin: 0 0 1.5rem; padding: 1.05rem 1.3rem;
  background: linear-gradient(135deg, rgba(226, 195, 116, 0.10), rgba(116, 195, 182, 0.05));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.verse-box::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 12%;
  width: 3px; height: 76%; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-400), var(--teal-400));
}
.verse-box__label {
  font-size: 0.73rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold-400); font-weight: 700; margin-bottom: 0.35rem;
}
.verse-box__text {
  font-family: var(--font-verse); font-size: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  line-height: 1.9; color: #f6e9c6; margin: 0 0 0.3rem;
}
.verse-box__ref { font-size: 0.84rem; color: var(--ink-dim); font-style: normal; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; margin: 0;
  padding-top: 1.2rem; border-top: 1px solid var(--line-soft);
}
.hero__stats > div { display: flex; flex-direction: column; }
.hero__stats dt { font-size: 0.78rem; color: var(--ink-dim); order: 2; }
.hero__stats dd {
  margin: 0; font-family: var(--font-head); font-size: 1.42rem;
  color: var(--gold-400); font-weight: 700; order: 1;
}

/* --------------------------- three.js orbit ---------------------------- */
.hero__visual {
  position: relative;
  aspect-ratio: 1 / 0.96;
  min-height: 380px;
  border-radius: var(--radius-l);
  background: radial-gradient(circle at 50% 46%, rgba(116, 195, 182, 0.10), transparent 68%);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
#orbit-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; cursor: grab; touch-action: pan-y;
}
#orbit-canvas:active { cursor: grabbing; }

.orbit-labels { position: absolute; inset: 0; pointer-events: none; }

.orbit-label {
  position: absolute; top: 0; left: 0;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.26rem 0.62rem 0.26rem 0.32rem;
  background: rgba(4, 22, 30, 0.80);
  border: 1px solid var(--node-color, var(--gold-400));
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.71rem; font-weight: 600; line-height: 1.4;
  white-space: nowrap; cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  will-change: transform, opacity;
}
html[dir="rtl"] .orbit-label { padding: 0.26rem 0.32rem 0.26rem 0.62rem; }
.orbit-label__num {
  display: grid; place-items: center;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--node-color, var(--gold-400));
  color: var(--night-900); font-size: 0.66rem; font-weight: 800;
  flex: none;
}
.orbit-label__title { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.orbit-label.is-hover,
.orbit-label.is-active {
  background: var(--node-color, var(--gold-400));
  color: var(--night-900);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.orbit-label.is-hover .orbit-label__num,
.orbit-label.is-active .orbit-label__num {
  background: var(--night-900); color: var(--node-color, var(--gold-400));
}
.orbit-label[data-status="upcoming"] { border-style: dashed; opacity: 0.88; }
.orbit-label.is-compact .orbit-label__title { display: none; }

.orbit-caption {
  position: absolute; inset-inline: 0; bottom: 0.9rem;
  text-align: center; font-size: 0.79rem; color: var(--ink-dim);
  margin: 0; padding-inline: 1rem;
}

/* fallback ring when WebGL is unavailable */
.orbit-labels.is-plain { pointer-events: auto; }
.orbit-labels.is-plain .orbit-label { position: absolute; }
.hero__visual.is-fallback { min-height: 420px; aspect-ratio: auto; }

/* ------------------------------- sections ------------------------------ */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.028), transparent);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section__head { max-width: 74ch; margin-bottom: 2.2rem; }
.kicker {
  display: inline-block;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-400); font-weight: 700; margin-bottom: 0.6rem;
}
.section__title { font-size: clamp(1.6rem, 1.25rem + 1.8vw, 2.5rem); color: var(--ink); }
.section__lead { color: var(--ink-soft); max-width: 68ch; margin-bottom: 0; }

/* ------------------------------- filters ------------------------------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1.6rem;
}
.chip {
  background: var(--card); border: 1px solid var(--line-soft);
  color: var(--ink-soft); padding: 0.5rem 1.15rem;
  border-radius: 999px; cursor: pointer; font-size: 0.88rem; font-weight: 600;
  transition: all 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--gold-400); }
.chip.is-active {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--night-900); border-color: transparent;
}

/* --------------------------- arc summary cards ------------------------- */
.arcs {
  display: grid; gap: 0.9rem; margin-bottom: 2.4rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.arc-card {
  padding: 1.05rem 1.2rem; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line-soft);
  border-inline-start: 3px solid var(--arc-color, var(--gold-400));
  cursor: pointer; transition: background 0.2s, transform 0.2s;
  text-align: start; width: 100%;
}
.arc-card:hover { background: var(--card-hi); transform: translateY(-3px); }
.arc-card.is-active { background: rgba(226, 195, 116, 0.12); }
.arc-card h3 {
  margin: 0 0 0.25rem; font-size: 1rem;
  color: var(--arc-color, var(--gold-400));
}
.arc-card p { margin: 0; font-size: 0.86rem; color: var(--ink-dim); }
.arc-card span {
  display: inline-block; margin-top: 0.5rem;
  font-size: 0.74rem; color: var(--teal-400); font-weight: 700;
}

/* ------------------------------ episode grid --------------------------- */
.grid-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.grid-title { font-size: 1.22rem; margin-bottom: 0.2rem; }
.grid-count { font-size: 0.84rem; color: var(--gold-400); font-weight: 700; margin: 0; }
.grid-hint { font-size: 0.86rem; color: var(--ink-dim); margin-bottom: 1.5rem; }

.ep-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
}

.ep-card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.3rem 1.35rem 1.15rem;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s, background 0.22s, box-shadow 0.22s;
}
.ep-card::after {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--arc-color, var(--gold-400)), transparent);
}
.ep-card:hover,
.ep-card:focus-within {
  transform: translateY(-4px); background: var(--card-hi);
  border-color: var(--arc-color, var(--gold-400));
  box-shadow: var(--shadow);
}
.ep-card.is-dim { opacity: 0.82; }

.ep-card__top {
  display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.85rem;
}
.ep-card__num {
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none; border-radius: 13px;
  background: linear-gradient(135deg, var(--arc-color, var(--gold-400)), transparent);
  border: 1px solid var(--arc-color, var(--gold-400));
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem;
  color: var(--nav-num, var(--ink));
}
.ep-card__arc {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--arc-color, var(--gold-400)); font-weight: 700;
}
.ep-card__status {
  margin-inline-start: auto;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: rgba(116, 195, 182, 0.14); color: var(--teal-400);
  white-space: nowrap;
}
.ep-card[data-status="upcoming"] .ep-card__status {
  background: rgba(255, 255, 255, 0.07); color: var(--ink-dim);
}

.ep-card__title {
  font-size: 1.09rem; margin-bottom: 0.5rem; color: var(--ink);
}
.ep-card__summary {
  font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-card__foot {
  margin-top: auto; padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
}
.ep-card__meta { font-size: 0.79rem; color: var(--ink-dim); }
.ep-card__btn {
  background: none; border: 1px solid var(--arc-color, var(--gold-400));
  color: var(--arc-color, var(--gold-400));
  padding: 0.38rem 1rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ep-card__btn:hover {
  background: var(--arc-color, var(--gold-400));
  color: var(--night-900);
}

.ep-empty, .ep-loading {
  grid-column: 1 / -1; text-align: center;
  padding: 2.4rem 1rem; color: var(--ink-dim);
}

.coming-series {
  margin-top: 2rem; padding: 0.95rem 1.2rem;
  border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--gold-400); font-size: 0.89rem; font-weight: 600; text-align: center;
}

/* ---------------------------- feature grid ---------------------------- */
.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}
.feature-card {
  position: relative; overflow: hidden;
  padding: 1.4rem 1.35rem;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}
.feature-card:hover {
  transform: translateY(-4px); background: var(--card-hi);
  border-color: var(--line);
}
.feature-card__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 0.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(226, 195, 116, 0.18), rgba(116, 195, 182, 0.10));
  border: 1px solid var(--line);
  color: var(--gold-400); font-size: 1.25rem;
}
.feature-card h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.feature-card p { margin: 0; font-size: 0.89rem; color: var(--ink-soft); }

/* ----------------------------- level grid ----------------------------- */
.level-grid {
  list-style: none; counter-reset: lvl; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}
.level-card {
  position: relative; counter-increment: lvl;
  padding: 1.5rem 1.35rem 1.3rem;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color 0.22s, background 0.22s, transform 0.22s;
}
.level-card::before {
  content: counter(lvl, decimal);
  position: absolute; top: 0.85rem; inset-inline-end: 1.05rem;
  font-family: var(--font-head); font-size: 2.5rem; font-weight: 700;
  color: rgba(226, 195, 116, 0.14); line-height: 1;
}
.level-card h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.level-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.level-card.is-current {
  border-color: var(--gold-400);
  background: linear-gradient(160deg, rgba(226, 195, 116, 0.12), rgba(116, 195, 182, 0.04));
  box-shadow: var(--shadow-gold);
}
.level-card.is-current:hover { transform: translateY(-4px); }
.level-badge {
  display: inline-block; margin-top: 0.75rem;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 0.22rem 0.68rem; border-radius: 999px;
  background: var(--gold-400); color: var(--night-900);
}

/* --------------------------------- about ------------------------------- */
.about-grid {
  display: grid; gap: 1.1rem; margin-bottom: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.statement {
  padding: 1.5rem 1.45rem; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line-soft);
  position: relative; overflow: hidden;
}
.statement::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0;
  width: 100%; height: 3px;
}
.statement--vision::before { background: linear-gradient(90deg, var(--gold-400), transparent); }
.statement--mission::before { background: linear-gradient(90deg, var(--teal-400), transparent); }
.statement h3 { font-size: 1.12rem; color: var(--gold-400); }
.statement--mission h3 { color: var(--teal-400); }
.statement p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.goals {
  padding: 1.5rem 1.55rem; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line-soft);
}
.goals h3 { font-size: 1.12rem; color: var(--gold-400); }
.goals ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.goals li {
  position: relative; padding-inline-start: 1.85rem;
  font-size: 0.92rem; color: var(--ink-soft);
}
.goals li::before {
  content: '◆'; position: absolute; inset-inline-start: 0; top: 0;
  color: var(--teal-400); font-size: 0.72rem; line-height: 2.3;
}

/* ---------------------------------- join ------------------------------- */
.join-grid {
  display: grid; gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: start;
}
.join-logo {
  margin-top: 1.6rem; width: min(190px, 60%);
  border-radius: 50%; background: #fff; padding: 8px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
html[dir="rtl"] .join-logo { margin-inline-start: auto; }

.join-form {
  padding: clamp(1.3rem, 3vw, 2rem);
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1rem; display: flex; flex-direction: column; }
.field-row {
  display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 0;
}
.field label {
  font-size: 0.85rem; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 0.94rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  padding: 0.72rem 0.9rem;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
html[dir="ltr"] .field input, html[dir="ltr"] .field select,
html[dir="ltr"] .field textarea { font-family: var(--font-latin), inherit; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-400);
  background: rgba(0, 0, 0, 0.34);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dim); }
.field select option { background: var(--night-700); color: var(--ink); }
.field textarea { resize: vertical; min-height: 82px; }

.check {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.85rem; color: var(--ink-soft);
  margin: 0.4rem 0 1.2rem; cursor: pointer;
}
.check input {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; flex: none; margin-top: 3px;
  border: 1.5px solid var(--line); border-radius: 6px;
  background: rgba(0, 0, 0, 0.24); cursor: pointer;
  display: grid; place-content: center; transition: all 0.2s;
}
.check input::after {
  content: '✓'; font-size: 0.8rem; font-weight: 900;
  color: var(--night-900); transform: scale(0); transition: transform 0.15s;
}
.check input:checked { background: var(--gold-400); border-color: var(--gold-400); }
.check input:checked::after { transform: scale(1); }

.form-note { font-size: 0.78rem; color: var(--ink-dim); margin: 0.9rem 0 0; text-align: center; }
.form-msg { margin: 0.7rem 0 0; font-size: 0.88rem; font-weight: 700; text-align: center; min-height: 1.4em; }
.form-msg.is-ok { color: var(--teal-400); }
.form-msg.is-err { color: #f0a08c; }

/* -------------------------------- dialog ------------------------------- */
.ep-dialog {
  border: 0; padding: 0; background: transparent;
  max-width: min(620px, 92vw); width: 100%;
  color: var(--ink);
}
.ep-dialog::backdrop {
  background: rgba(2, 10, 14, 0.78);
  backdrop-filter: blur(5px);
}
.ep-dialog__inner {
  position: relative; padding: clamp(1.5rem, 4vw, 2.3rem);
  background: linear-gradient(160deg, var(--night-600), var(--night-800));
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  max-height: 86vh; overflow-y: auto;
}
.ep-dialog__close {
  position: absolute; top: 0.9rem; inset-inline-end: 0.9rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line-soft);
  cursor: pointer; display: grid; place-items: center;
  color: var(--ink-soft); font-size: 0.95rem;
  transition: all 0.2s;
}
.ep-dialog__close:hover {
  background: var(--gold-400); color: var(--night-900); border-color: transparent;
}
.ep-dialog__kicker {
  font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal-400); font-weight: 700; margin-bottom: 0.4rem;
}
.ep-dialog__title { font-size: clamp(1.25rem, 1.1rem + 1vw, 1.7rem); margin-bottom: 0.7rem; }
.ep-dialog__summary { color: var(--ink-soft); font-size: 0.96rem; }
.ep-dialog__verse {
  margin: 1.2rem 0; padding: 1rem 1.15rem;
  background: rgba(226, 195, 116, 0.08);
  border-inline-start: 3px solid var(--gold-400);
  border-radius: var(--radius-s);
}
.ep-dialog__verse p {
  font-family: var(--font-verse); font-size: 1.1rem; line-height: 1.95;
  color: #f6e9c6; margin: 0 0 0.3rem;
}
.ep-dialog__verse cite { font-size: 0.84rem; color: var(--ink-dim); font-style: normal; }
.ep-dialog__meta {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.ep-dialog__meta li {
  font-size: 0.79rem; font-weight: 700;
  padding: 0.28rem 0.8rem; border-radius: 999px;
  background: var(--card-hi); border: 1px solid var(--line-soft);
  color: var(--ink-soft);
}
.ep-dialog__note {
  margin: 1.1rem 0 0; font-size: 0.84rem; color: var(--ink-dim);
  border-top: 1px solid var(--line-soft); padding-top: 0.9rem;
}

/* -------------------------------- footer ------------------------------- */
.site-footer {
  padding: clamp(2.6rem, 6vw, 4rem) 0 1.6rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.5));
}

.sponsor {
  text-align: center; padding-bottom: 2.2rem; margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--line-soft);
}
.sponsor__kicker {
  font-size: 0.79rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-400); font-weight: 700; margin-bottom: 0.3rem;
}
.sponsor__lead { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1.2rem; }
.sponsor__row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.3rem; flex-wrap: wrap;
}
.sponsor__logo {
  width: 88px; height: 88px; flex: none; border-radius: 50%;
  background: #fff; padding: 5px; object-fit: contain;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-s);
}
.sponsor__names { text-align: start; max-width: 62ch; }
.sponsor__name-ar {
  font-family: var(--font-head); font-size: 1.06rem; font-weight: 600;
  color: var(--gold-400); margin: 0 0 0.2rem;
}
.sponsor__name-en, .sponsor__name-tr {
  font-family: var(--font-latin); font-size: 0.86rem;
  color: var(--ink-soft); margin: 0 0 0.15rem; line-height: 1.6;
}
.sponsor__name-tr { color: var(--ink-dim); font-size: 0.82rem; }

.footer-grid {
  display: grid; gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2rem;
}
.footer-brand {
  display: flex; align-items: center; gap: 0.75rem;
  grid-column: span 1;
}
.footer-brand img {
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff; padding: 4px; object-fit: contain; flex: none;
  box-shadow: 0 0 0 1px var(--line);
}
.footer-brand strong {
  display: block; font-family: var(--font-head);
  color: var(--gold-400); font-size: 1rem;
}
.footer-brand small {
  font-family: var(--font-latin); font-size: 0.7rem; color: var(--ink-dim);
}
.footer-col h4 {
  font-size: 0.83rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-400); margin-bottom: 0.7rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-col a, .link-btn {
  color: var(--ink-soft); font-size: 0.88rem; text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: start;
  font-family: inherit;
}
.footer-col a:hover, .link-btn:hover { color: var(--gold-400); text-decoration: none; }

.footer-ayah {
  font-family: var(--font-verse); font-size: 1.12rem; color: #f2e2bb;
  text-align: center; margin: 0 0 0.6rem;
  padding-top: 1.4rem; border-top: 1px solid var(--line-soft);
}
.footer-rights {
  text-align: center; font-size: 0.8rem; color: var(--ink-dim); margin: 0;
}

.noscript {
  padding: 1rem; text-align: center;
  background: #4a1f1f; color: #ffdede; margin: 0;
}

/* ------------------------------ animations ----------------------------- */
.js-reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-reveal.is-in { opacity: 1; transform: none; }

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

/* ------------------------------ responsive ----------------------------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; aspect-ratio: 1 / 0.8; min-height: 340px; }
  .join-grid { grid-template-columns: 1fr; }
  .join-logo { margin-inline: 0; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    padding: 1rem 1.2rem 1.4rem;
    background: rgba(4, 22, 30, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%); opacity: 0; visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .site-nav a { padding: 0.8rem 1rem; border-radius: var(--radius-s); font-size: 1rem; }
  .site-nav__cta { text-align: center; margin-top: 0.5rem; }
}

@media (max-width: 720px) {
  :root { --radius-l: 20px; }
  .brand__sub { display: none; }
  .hero__stats { gap: 1.1rem 1.7rem; }
  .hero__stats dd { font-size: 1.2rem; }
  .field-row { grid-template-columns: 1fr; }
  .ep-grid { grid-template-columns: 1fr; }
  .orbit-label { font-size: 0.66rem; }
  .orbit-label__title { max-width: 11ch; }
  .sponsor__names { text-align: center; }
  .sponsor__row { flex-direction: column; }
  .ep-dialog__inner { max-height: 90vh; }
}

@media (max-width: 460px) {
  .wrap { width: min(100% - 1.6rem, var(--wrap)); }
  .lang-btn { padding: 0.3rem 0.5rem; font-size: 0.72rem; }
  .hero__visual { min-height: 290px; aspect-ratio: 1 / 0.85; }
  .brand__mark { width: 44px; height: 44px; }
  .brand__name { font-size: 1rem; }
  .orbit-label__title { display: none; }
  .goals ul { grid-template-columns: 1fr; }
}

/* --------------------------- print fallback ---------------------------- */
@media print {
  body { background: #fff; color: #111; }
  .site-header, .hero__visual, .orbit-caption, .join-form { display: none; }
  a { color: #111; }
}
