/* =====================================================================
   ANIS — Austin Network for Islamic Studies
   Colors live in the tokens below. Change them here and the whole site
   (day and night) follows.
   ===================================================================== */

:root {
  --bg: #f7f4ee;
  --bg-alt: #efe8dc;
  --surface: #fffdf9;
  --ink: #172540;
  --muted: #56607a;
  --line: #e1d8c8;
  --brand: #1f4e8c;
  --brand-strong: #163a6a;
  --brand-ink: #ffffff;
  --brand-soft: #e3ebf6;
  --gold: #17777a;
  --gold-art: #3aa6a3;
  --gold-soft: #dff1ef;
  --band-bg: #142c52;
  --band-ink: #edf2fb;
  --band-muted: #a7b5d3;
  --sky-top: #dce7f5;
  --sky-bottom: #f7ecd8;
  --glow: rgba(255, 205, 120, 0.75);
  --page: #fffdf8;
  --shadow: 0 1px 2px rgba(23, 37, 64, 0.06), 0 8px 24px rgba(23, 37, 64, 0.08);

  --font-display: "Marcellus", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-arabic: "Amiri", "Traditional Arabic", "Times New Roman", serif;

  --wrap: 1180px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1222; --bg-alt: #0f1830; --surface: #15203b; --ink: #e9eef8; --muted: #a6b2cc; --line: #26345a;
    --brand: #8fb4ef; --brand-strong: #b6cff6; --brand-ink: #0b1530; --brand-soft: #1c2c50;
    --gold: #6fd1cc; --gold-art: #4fbdb8; --gold-soft: #12312f;
    --band-bg: #101b36; --band-ink: #edf2fb; --band-muted: #a7b5d3;
    --sky-top: #050b1d; --sky-bottom: #1a2f5c; --glow: rgba(255, 196, 100, 0.85); --page: #1e2d4f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1222; --bg-alt: #0f1830; --surface: #15203b; --ink: #e9eef8; --muted: #a6b2cc; --line: #26345a;
  --brand: #8fb4ef; --brand-strong: #b6cff6; --brand-ink: #0b1530; --brand-soft: #1c2c50;
  --gold: #6fd1cc; --gold-art: #4fbdb8; --gold-soft: #12312f;
  --band-bg: #101b36; --band-ink: #edf2fb; --band-muted: #a7b5d3;
  --sky-top: #050b1d; --sky-bottom: #1a2f5c; --glow: rgba(255, 196, 100, 0.85); --page: #1e2d4f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--gold-art); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.wrap-text { max-width: 780px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
[lang="ar"] { font-family: var(--font-arabic); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.62em 1.25em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 0.98rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lg { font-size: 1.05rem; padding: 0.78em 1.5em; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }
.btn .icon { width: 20px; height: 20px; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.text-link:hover { border-bottom-color: transparent; }

/* ---------- announcement bar ---------- */
.announce-bar { background: var(--brand-strong); color: #fff; font-size: 0.95rem; }
:root[data-theme="dark"] .announce-bar { background: var(--gold-soft); color: var(--ink); }
.announce-inner { display: flex; align-items: center; gap: 16px; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
.announce-inner p { margin: 0; flex: 1; }
.announce-inner a { color: inherit; font-weight: 600; white-space: nowrap; }
:root[data-theme="dark"] .announce-inner a { color: var(--gold); }
.announce-close { background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; display: grid; place-items: center; border-radius: 50%; opacity: .8; }
.announce-close:hover { opacity: 1; background: rgba(255,255,255,.12); }

/* ---------- header & navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 46px; width: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.site-nav { flex: 1; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 8px; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand); }
.submenu-toggle { background: none; border: 0; color: var(--muted); padding: 6px 4px; margin-left: -10px; cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
.submenu-toggle .icon { transition: transform .15s; }
.has-menu.open .submenu-toggle .icon { transform: rotate(180deg); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-toggle, .menu-button {
  background: transparent; border: 1.5px solid var(--line); color: var(--ink);
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
}
.theme-toggle:hover, .menu-button:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: grid; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
.theme-toggle span, .menu-button span { display: grid; }
.menu-button { display: none; }
.menu-button .when-open { display: none; }
.nav-open .menu-button .when-open { display: grid; }
.nav-open .menu-button .when-closed { display: none; }
.nav-cta { display: none; }

/* Dropdowns */
.mega {
  position: absolute; top: calc(100% + 10px); left: -16px; z-index: 60;
  width: min(640px, 90vw); padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.mega-narrow { width: min(400px, 90vw); }
.has-menu.open .mega { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 1024px) {
  .has-menu:hover .mega, .has-menu:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
}
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mega-topic { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.mega-topic:hover { background: var(--brand-soft); }
.mega-ar { align-self: flex-start; font-size: 1.35rem; color: var(--gold); line-height: 1.4; }
.mega-name { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.mega-foot { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.mega-foot a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-list a { display: flex; gap: 14px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.mega-list a:hover { background: var(--brand-soft); }
.mega-list .icon { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.mega-list strong { display: block; font-size: 0.98rem; }
.mega-list small { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.4; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { padding-top: 0; }
.section-title { margin-bottom: 0.4em; }
.section-intro { color: var(--muted); max-width: 52ch; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head .section-title { margin: 0; }
.small-title { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; }
.empty { padding: 22px 24px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { max-width: 17ch; margin-bottom: 0.35em; }
.hero-greeting { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; color: var(--muted); font-size: 0.95rem; }
.hero-greeting [lang="ar"] { font-size: 1.7rem; color: var(--gold); line-height: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-visual { display: flex; justify-content: center; }
.hero-art { width: 100%; max-width: 440px; height: auto; overflow: visible; }

.feature-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  max-width: 560px; padding: 16px 20px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold-art);
  border-radius: 12px; box-shadow: var(--shadow);
}
.feature-card:hover { border-color: var(--brand); border-left-color: var(--gold-art); color: var(--ink); }
.feature-body { display: flex; flex-direction: column; gap: 2px; }
.feature-kicker { font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.feature-title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.feature-meta { font-size: 0.92rem; color: var(--muted); }
.feature-summary { font-size: 0.92rem; color: var(--muted); margin-top: 4px; }
.feature-cta { font-weight: 700; color: var(--brand); white-space: nowrap; }

.date-block {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; height: 68px; border-radius: 10px; flex-shrink: 0;
  background: var(--gold-soft); color: var(--ink);
}
.db-month { font-size: 0.8rem; font-weight: 700; color: var(--gold); }
.db-day { font-family: var(--font-display); font-size: 1.75rem; line-height: 1; }

/* Hero art colors (follow the theme) */
.hero-art .sky-top { stop-color: var(--sky-top); }
.hero-art .sky-bottom { stop-color: var(--sky-bottom); }
.hero-art .glow-in { stop-color: var(--glow); }
.hero-art .glow-out { stop-color: var(--glow); stop-opacity: 0; }
.art-frame { fill: var(--surface); stroke: var(--gold-art); stroke-width: 2.5; }
.art-inner-line { fill: none; stroke: var(--gold-art); stroke-width: 1.2; opacity: .8; }
.art-line { fill: none; stroke: var(--gold-art); stroke-width: 1; opacity: .55; }
.art-fill-soft { fill: var(--gold-art); opacity: .25; }
.art-sun { fill: #f7c86a; opacity: .9; }
.art-sun-halo { fill: #f7c86a; opacity: .18; }
.art-moon { fill: #f3dc9c; }
.art-star { fill: #f3e6c4; }
.art-night { display: none; }
:root[data-theme="dark"] .art-night { display: inline; }
:root[data-theme="dark"] .art-day { display: none; }
.art-chain { stroke: var(--gold-art); stroke-width: 1.5; }
.art-metal { fill: var(--gold-art); }
.art-metal-line { fill: none; stroke: var(--gold-art); stroke-width: 1.5; }
.art-glass { fill: color-mix(in srgb, var(--gold-art) 22%, var(--surface)); stroke: var(--gold-art); stroke-width: 2; }
.art-flame { fill: #ffd27a; }
.art-page { fill: var(--page); stroke: var(--gold-art); stroke-width: 1.6; }
.art-text-line { fill: none; stroke: var(--brand); stroke-width: 1.2; opacity: .45; }
.art-stand { fill: none; stroke: var(--gold-art); stroke-width: 2; stroke-linecap: round; }
.art-ground { stroke: var(--gold-art); stroke-width: 1.2; opacity: .5; }
.lantern-glow { animation: glow 5s ease-in-out infinite; transform-origin: 240px 238px; }
@keyframes glow { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lantern-glow { animation: none; }
  * { transition: none !important; }
}

/* ---------- doors ---------- */
.door-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.door {
  position: relative; padding: 56px 28px 28px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 200px 200px var(--radius) var(--radius) / 120px 120px var(--radius) var(--radius);
}
.door::before {
  content: ""; position: absolute; inset: 8px 8px auto 8px; height: 90px; pointer-events: none;
  border: 1px solid var(--gold-art); border-bottom: 0; opacity: .5;
  border-radius: 200px 200px 0 0 / 112px 112px 0 0;
}
.door-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: -14px auto 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.door h3 { text-align: center; }
.door h3 a { color: var(--ink); text-decoration: none; }
.door h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.door:hover { border-color: var(--brand); }
.door p { color: var(--muted); text-align: center; }
.door-links { list-style: none; padding: 16px 0 0; margin: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; position: relative; z-index: 1; }
.door-links a { font-weight: 600; text-decoration: none; }
.door-links a:hover { text-decoration: underline; }

/* ---------- topics ---------- */
.topics-section { background: var(--bg-alt); padding-top: clamp(48px, 7vw, 88px) !important; }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink);
}
.topic-tile:hover { border-color: var(--brand); color: var(--ink); }
.topic-ar { align-self: flex-start; font-size: 1.9rem; line-height: 1.5; color: var(--gold); }
.topic-name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.topic-blurb { color: var(--muted); font-size: 0.93rem; line-height: 1.5; flex: 1; }
.topic-count { font-size: 0.85rem; font-weight: 600; color: var(--brand); margin-top: 6px; }

/* ---------- events ---------- */
.events-section, .qa-section { padding-top: clamp(48px, 7vw, 88px) !important; }
.narrow-split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.event-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.event-body h3 { font-size: 1.25rem; margin-bottom: 4px; }
.event-body h3 a { color: var(--ink); text-decoration: none; }
.event-body h3 a:hover { color: var(--brand); }
.event-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 6px !important; }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-meta .icon { color: var(--gold); }

/* ---------- articles ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { position: relative; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.article-card:hover { border-color: var(--brand); }
.card-topic { position: relative; z-index: 1; align-self: flex-start; font-size: 0.88rem; font-weight: 700; color: var(--gold); text-decoration: none; margin-bottom: 10px; }
.card-topic:hover { text-decoration: underline; color: var(--gold); }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.article-card p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.card-meta { flex: 0 !important; margin: 0; font-size: 0.86rem !important; }

/* ---------- services band ---------- */
.services-band { background: var(--band-bg); color: var(--band-ink); padding-top: clamp(56px, 8vw, 96px) !important; position: relative; overflow: hidden; }
.services-band .section-intro { color: var(--band-muted); }
.services-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 420px; height: 420px; opacity: .14; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52'%3E%3Cg fill='none' stroke='%234fbdb8' stroke-width='1'%3E%3Cpolygon points='26,0 52,26 26,52 0,26'/%3E%3Crect x='7.6' y='7.6' width='36.8' height='36.8'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 70%); mask-image: radial-gradient(circle at 70% 30%, #000 0, transparent 70%);
}
.service-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; position: relative; z-index: 1; }
.service-item {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px;
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); text-decoration: none; color: inherit;
  background: rgba(255,255,255,.04);
}
.service-item:hover { background: rgba(255,255,255,.09); border-color: var(--gold-art); color: inherit; }
.service-icon { color: var(--gold-art); }
.service-title { font-family: var(--font-display); font-size: 1.3rem; }
.service-text { color: var(--band-muted); font-size: 0.93rem; line-height: 1.5; }
.service-grid-page .service-item { background: var(--surface); border-color: var(--line); color: var(--ink); }
.service-grid-page .service-item:hover { border-color: var(--brand); }
.service-grid-page .service-text { color: var(--muted); }
.service-grid-page .service-icon { color: var(--gold); }

/* ---------- Q&A ---------- */
.qa-list { display: grid; gap: 12px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { flex-shrink: 0; color: var(--brand); transition: transform .15s; }
.qa[open] summary .icon { transform: rotate(180deg); }
.qa[open] { border-color: var(--brand); }
.qa-answer { padding: 0 22px 18px; color: var(--muted); }
.qa-answer p:last-child { margin-bottom: 0; }
.qa-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- inner pages ---------- */
.page-head {
  position: relative; overflow: hidden;
  padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 44px);
  background: var(--bg-alt); border-bottom: 1px solid var(--line);
}
.page-head::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 360px; height: 280px; opacity: .35; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52'%3E%3Cg fill='none' stroke='%233aa6a3' stroke-width='1'%3E%3Cpolygon points='26,0 52,26 26,52 0,26'/%3E%3Crect x='7.6' y='7.6' width='36.8' height='36.8'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 80% 20%, #000 0, transparent 70%); mask-image: radial-gradient(circle at 80% 20%, #000 0, transparent 70%);
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.25em; }
.page-head .lede { margin: 0; }
.page-head-row { display: flex; gap: 22px; align-items: flex-start; }
.page-icon { display: grid; place-items: center; width: 68px; height: 68px; flex-shrink: 0; border-radius: 50%; background: var(--surface); color: var(--gold); border: 1px solid var(--line); }
.page-ar { font-size: 2rem; color: var(--gold); margin: 0 0 4px; line-height: 1.4; }
.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.92rem; }
.crumbs li + li::before { content: "/"; color: var(--muted); margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.form-panel {
  position: sticky; top: 100px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold-art); border-radius: var(--radius);
}
.form-panel h2 { font-size: 1.5rem; }
.form-panel p { color: var(--muted); }
.form-panel .btn { margin-top: 6px; }

.facts { margin: 0 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fact { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.fact .icon { grid-row: span 2; color: var(--gold); }
.fact dt { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.fact dd { margin: 0; font-weight: 600; }

/* Learn hub list */
.search-box input {
  font: inherit; width: min(320px, 80vw); padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}
.search-box input:focus { outline: none; border-color: var(--brand); }
.article-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.article-item { break-inside: avoid; border-bottom: 1px solid var(--line); }
.article-item a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px; text-decoration: none; color: var(--ink); }
.article-item a:hover .ai-title { color: var(--brand); }
.ai-title { font-weight: 600; }
.ai-topic { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
.topic-nav { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.topic-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-nav a { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); }
.topic-nav a:hover { border-color: var(--brand); color: var(--brand); }

/* Article page */
.article-head .lede { max-width: 60ch; }
.article-head h1 { max-width: 22ch; }
.article-meta { margin: 14px 0 0; color: var(--muted); font-size: 0.92rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); padding-top: 48px; padding-bottom: 80px; }
.article-aside { display: grid; gap: 20px; align-content: start; position: sticky; top: 100px; }
.aside-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.aside-card p { color: var(--muted); font-size: 0.95rem; }
.aside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aside-list a { text-decoration: none; font-weight: 600; }
.aside-list a:hover { text-decoration: underline; }

/* Long-form text */
.prose { max-width: 68ch; font-size: 1.09rem; line-height: 1.75; }
.prose h2 { font-size: 1.75rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.4em; }
.prose h4 { font-size: 1.15rem; margin-top: 1.3em; font-family: var(--font-body); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--gold); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold-art); color: var(--ink); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose img { border-radius: 10px; }
.prose .arabic { font-size: 1.6rem; line-height: 2; text-align: right; }
.source-note { margin-top: 2.5em; padding-top: 1em; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.verse { margin: 2em 0; padding: 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.verse-ar { font-family: var(--font-arabic); font-size: 1.9rem; line-height: 2; color: var(--ink); margin: 0 0 12px; }
.verse-en { margin: 0 auto !important; border: 0 !important; padding: 0 !important; max-width: 52ch; color: var(--muted) !important; }
.verse figcaption { margin-top: 12px; font-size: 0.88rem; font-weight: 700; color: var(--gold); }

/* About / voices */
.voices { background: var(--bg-alt); padding-top: clamp(48px, 7vw, 88px) !important; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.voice { margin: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.voice blockquote { margin: 0 0 18px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.5; }
.voice blockquote p::before { content: "“"; color: var(--gold); }
.voice blockquote p::after { content: "”"; color: var(--gold); }
.voice figcaption { display: flex; flex-direction: column; font-size: 0.93rem; }
.voice figcaption span { color: var(--muted); }

.not-found { text-align: left; padding: 100px 0; }

/* ---------- request forms ---------- */
.form-panel:has(.request-form) { position: static; }
.split:has(.request-form) { grid-template-columns: 1fr 1.05fr; }
@media (max-width: 1023px) { .split:has(.request-form) { grid-template-columns: 1fr; } }
.field-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 14px; margin-top: 18px; }
.field { grid-column: span 4; display: flex; flex-direction: column; gap: 6px; }
.field-half { grid-column: span 2; }
.field-quarter { grid-column: span 1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.optional { font-weight: 400; color: var(--muted); }
.form-panel .hint { margin: -2px 0 0; font-size: 0.86rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { min-height: 49px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field [aria-invalid="true"] { border-color: #c2412d; }
.form-panel .field-error { margin: 0; font-size: 0.86rem; color: #b3361f; min-height: 0; }
.field-error:empty { display: none; }
:root[data-theme="dark"] .field [aria-invalid="true"] { border-color: #f08a73; }
:root[data-theme="dark"] .form-panel .field-error { color: #f4a08d; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy { margin: 18px 0 14px; font-size: 0.86rem; color: var(--muted); }
.form-panel .form-status { margin: 12px 0 0; font-size: 0.93rem; color: var(--ink); font-weight: 600; }
.form-status:empty { display: none; }
.form-success { text-align: left; padding: 8px 0; }
.form-success:focus { outline: none; }
.success-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); margin-bottom: 14px; }
.form-alt { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.93rem; color: var(--muted); }
@media (max-width: 640px) {
  .field-half { grid-column: span 4; }
  .field-quarter { grid-column: span 2; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-about p { color: var(--muted); max-width: 36ch; margin-top: 14px; }
.footer-head { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--muted); text-decoration: none; }
.site-footer ul a:hover { color: var(--brand); text-decoration: underline; }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.footer-base p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
}
@media (max-width: 1023px) {
  .menu-button { display: grid; }
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .site-nav {
    position: fixed; inset: var(--nav-top, 76px) 0 0 0; z-index: 49; overflow-y: auto;
    background: var(--bg); padding: 16px clamp(16px, 4vw, 32px) 40px;
    display: none;
  }
  .nav-open .site-nav { display: block; }
  .nav-open { overflow: hidden; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-link { flex: 1; padding: 16px 4px; font-size: 1.15rem; }
  .submenu-toggle { margin: 0; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 10px; }
  .mega, .mega-narrow {
    position: static; width: 100%; display: none; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 16px; background: transparent;
  }
  .has-menu.open .mega { display: block; }
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-cta { display: flex; margin-top: 24px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-art { max-width: 300px; }
  .door-grid, .article-grid { grid-template-columns: 1fr 1fr; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .narrow-split, .split, .article-layout { grid-template-columns: 1fr; }
  .form-panel, .article-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .logo { height: 40px; }
  .door-grid, .article-grid { grid-template-columns: 1fr; }
  .topic-grid { gap: 10px; }
  .topic-tile { padding: 16px; }
  .topic-blurb { display: none; }
  .topic-ar { font-size: 1.5rem; }
  .topic-name { font-size: 1.1rem; }
  .door { padding-top: 48px; }
  .hero-art { max-width: 240px; }
  .feature-card { grid-template-columns: auto 1fr; }
  .feature-cta { grid-column: 1 / -1; }
  .event-row { grid-template-columns: auto 1fr; }
  .event-row .btn { grid-column: 1 / -1; justify-self: start; }
  .article-list { columns: 1; }
  .page-head-row { flex-direction: column; gap: 14px; }
  .page-icon { width: 56px; height: 56px; }
  .announce-inner { font-size: 0.88rem; }
}

@media print {
  .site-header, .announce-bar, .site-footer, .article-aside, .form-panel { display: none !important; }
  body { background: #fff; color: #000; }
}
