/*
Theme Name: IGAC
Theme URI: https://igac.org.za
Author: Islamic Governance Advisory Committee
Author URI: https://igac.org.za
Description: Official theme for the Islamic Governance Advisory Committee — Qasd wa Amanah. A scholarly, postscript-editorial aesthetic built on classical Islamic geometric motifs.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: igac
Tags: custom-menu, featured-images, full-width-template, theme-options
*/

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #1a1610;
  --ink-mid: #3d3628;
  --ink-light: #6b5f4a;
  --cream: #f5f0e8;
  --parchment: #ede5d4;
  --gold: #b8860b;
  --gold-light: #d4a843;
  --gold-pale: #f7f0dc;
  --rule: #c8b88a;
  --red-accent: #8b1a1a;
  --serif: 'Playfair Display', Georgia, serif;
  --body: 'EB Garamond', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(139,110,50,0.04) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(139,110,50,0.02) 29px);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 600; margin-bottom: 1.25rem; }
h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.75rem; }
h2 em, h1 em { color: var(--gold); font-style: italic; }
p { color: var(--ink-mid); margin-bottom: 1rem; }

/* ── LAYOUT ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 3rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

/* ── SECTION LABELS ── */
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* ── NAV ── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 3rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-branding a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-decoration: none;
}
.site-branding .tagline {
  font-family: var(--body);
  font-size: 0.75rem;
  color: rgba(245,240,232,0.45);
  font-style: italic;
  margin-left: 0.75rem;
}

#primary-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}
#primary-menu li a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.7);
  text-decoration: none;
  transition: color 0.2s;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item a { color: var(--gold-light); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(200,184,138,0.4);
  color: var(--gold-light);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  text-transform: uppercase;
}

/* ── FOLIO BAND ── */
.folio-band {
  background: var(--parchment);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.folio-band span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── PAGE HERO ── */
.page-hero {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(184,134,11,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero .hero-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.page-hero .hero-label::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.page-hero h1 { color: var(--cream); letter-spacing: -0.02em; }
.page-hero .hero-sub {
  color: rgba(245,240,232,0.65);
  font-size: 1.15rem;
  max-width: 600px;
  margin-top: 1rem;
  font-style: italic;
  border-left: 2px solid var(--gold);
  padding-left: 1.25rem;
}
.hero-rule { margin-top: 3rem; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }

/* ── CARDS ── */
.card {
  border: 1px solid var(--rule);
  padding: 2rem;
  background: var(--cream);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
}
.card-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* ── BLOCKQUOTE ── */
.igac-blockquote {
  border-left: 3px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--gold-pale);
  border-radius: 0 4px 4px 0;
}
.igac-blockquote .arabic {
  font-size: 1.6rem;
  direction: rtl;
  color: var(--ink);
  margin-bottom: 0.75rem;
  font-family: var(--body);
  line-height: 1.6;
}
.igac-blockquote .translation {
  font-style: italic;
  color: var(--ink-mid);
  font-size: 0.98rem;
}
.igac-blockquote .source {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-top: 0.6rem;
}

/* ── PULL STAT ── */
.pull-stat {
  text-align: center;
  padding: 2.5rem;
  border: 1px solid var(--rule);
  background: var(--gold-pale);
}
.pull-stat .stat-number {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.pull-stat .stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
}

/* ── DARK BAND ── */
.dark-band {
  background: var(--ink);
  color: var(--cream);
  padding: 5rem 0;
}
.dark-band p { color: rgba(245,240,232,0.72); }
.dark-band h2 { color: var(--cream); }
.dark-band h3 { color: var(--cream); }
.dark-band .section-label { color: var(--gold-light); }
.dark-band .section-label::before { background: var(--gold-light); }

/* ── PARCHMENT BAND ── */
.parchment-band { background: var(--parchment); padding: 5rem 0; }

/* ── RULES ── */
.h-rule { border: none; border-top: 1px solid var(--rule); margin: 0; }
.double-rule { border: none; border-top: 3px double var(--rule); margin: 0; }
.ornament {
  text-align: center;
  padding: 2rem 0;
  color: var(--rule);
  font-size: 0.8rem;
  letter-spacing: 0.5em;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--cream) !important;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.9rem 2.25rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink) !important; }
.btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--ink);
  margin-left: 1rem;
}
.btn-outline:hover { background: var(--ink); color: var(--cream) !important; }
.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink) !important;
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

/* ── GRID ELEMENTS ── */
.obj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  margin-top: 3rem;
}
.obj-item {
  padding: 2.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.obj-item:nth-child(2n) { border-right: none; }
.obj-item:nth-last-child(-n+2) { border-bottom: none; }
.obj-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 800;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 0.75rem;
}

/* ── NEWS ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.news-card {
  border: 1px solid var(--rule);
  background: var(--cream);
  overflow: hidden;
}
.news-card-body { padding: 1.75rem; }
.news-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.news-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.news-card p { font-size: 0.9rem; color: var(--ink-light); }
.news-tag {
  display: inline-block;
  background: var(--gold-pale);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0.2rem 0.6rem;
  margin-top: 1rem;
}

/* ── CONTACT FORM ── */
.contact-form-wrap { max-width: 680px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--gold); }
.form-group textarea { min-height: 160px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* ── SERVICES ── */
.service-item {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 3rem;
  align-items: start;
}
.service-item:last-child { border-bottom: none; }
.service-num {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 800;
  color: var(--rule);
  line-height: 1;
}

/* ── PILLAR ITEMS ── */
.pillar-item {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(200,184,138,0.2);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  align-items: start;
}
.pillar-item:last-child { border-bottom: none; }
.pillar-ar {
  font-family: var(--body);
  font-size: 2rem;
  color: var(--gold-light);
  direction: rtl;
  line-height: 1.2;
  padding-top: 0.25rem;
}

/* ── FOOTER ── */
#site-footer {
  background: var(--ink);
  border-top: 2px solid var(--gold);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 3rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}
.footer-brand h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 500;
  margin-bottom: 1rem;
}
.footer-brand p { font-size: 0.9rem; color: rgba(245,240,232,0.55); line-height: 1.7; }
.footer-brand .footer-motto {
  font-family: var(--body);
  font-size: 1.4rem;
  color: var(--gold-light);
  font-style: italic;
  direction: rtl;
  margin: 1.25rem 0 0.5rem;
}
.footer-nav h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.4);
  font-weight: 400;
  margin-bottom: 1.25rem;
}
.footer-nav ul { list-style: none; }
.footer-nav ul li { margin-bottom: 0.6rem; }
.footer-nav ul li a {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.65);
  text-decoration: none;
  font-family: var(--body);
  transition: color 0.2s;
}
.footer-nav ul li a:hover { color: var(--gold-light); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 3rem;
  border-top: 1px solid rgba(200,184,138,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.3);
  margin: 0;
}

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .container { padding: 0 1.5rem; }
  .two-col, .three-col, .news-grid, .obj-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  .service-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .service-num { font-size: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .obj-item { border-right: none !important; }
  .obj-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .obj-item:last-child { border-bottom: none; }
  .menu-toggle { display: block; }
  #primary-menu { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--ink); padding: 1.5rem 3rem; gap: 1.25rem; border-bottom: 1px solid var(--gold); z-index: 200; }
  #primary-menu.open { display: flex; }
  .header-inner { position: relative; }
  .page-hero { padding: 3rem 1.5rem 2.5rem; }
  .folio-band { padding: 0.6rem 1.5rem; }
  .folio-band span:not(:first-child):not(:last-child) { display: none; }
}
