/* ===================================================================
   PROJECT MAAIDA — design tokens
   Palette: deep palm-green ground, parchment paper, saffron accent,
   brick warmth. Signature motif: the "maaida" — a laid table —
   rendered as a recurring line-art divider, since the NPO's entire
   name and mission ("a table spread with food for those in need")
   comes from Surah Al-Ma'idah.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Amiri:wght@400;700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  /* palette pulled from the Project Maaida logo (black / gold / white) —
     the --green-* variable names are historical, they now hold near-black tones */
  --ink:        #161616;
  --green-900:  #141414;
  --green-800:  #202020;
  --green-700:  #2B2B2B;
  --parchment:  #F7F7F7;
  --parchment-2:#EEEEEE;
  --gold:       #C49629;
  --gold-light: #DDB65C;
  --brick:      #8A6A17;
  --sage:       #E7E7E5;
  --white:      #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-arabic:  'Amiri', serif;
  --font-body:    'Karla', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-w: 1180px;
  --radius: 4px;
  --transition: 300ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--green-900);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: inherit; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-donate {
  background: var(--gold);
  color: var(--green-900);
}
.btn-donate:hover { background: var(--gold-light); }

.btn-whatsapp {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.45);
}
.btn-whatsapp:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

.btn-outline {
  background: transparent;
  color: var(--green-900);
  border-color: var(--green-900);
}
.btn-outline:hover { background: var(--green-900); color: var(--white); }

.btn-ghost-light {
  background: transparent;
  color: var(--parchment);
  border-color: rgba(246,239,221,0.5);
}
.btn-ghost-light:hover { border-color: var(--parchment); background: rgba(246,239,221,0.08); }

/* ---------- nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green-900);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}
.brand-mark {
  height: 46px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand-word small { display: block; font-family: var(--font-body); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--gold-light); text-transform: uppercase; font-weight: 700; margin-top: 2px;}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--sage);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--gold); padding-bottom: 4px; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 10px 18px; font-size: 0.82rem; }

.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 880px) {
  .nav-links { position: fixed; top: 71px; left: 0; right: 0; background: var(--green-900); flex-direction: column; align-items: flex-start; padding: 20px 28px 28px; gap: 18px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity var(--transition), transform var(--transition); border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: block; }
  .nav-actions .btn-donate { padding: 9px 14px; font-size: 0.76rem; }
  .btn-whatsapp-label { display: none; }
}

/* ---------- bismillah intro overlay ---------- */
.bismillah-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--green-900);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  transition: opacity 700ms ease, visibility 700ms ease;
}
.bismillah-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.bismillah-text {
  font-family: var(--font-arabic);
  color: var(--gold-light);
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  opacity: 0;
  transform: scale(0.92);
  animation: bismillah-in 1400ms cubic-bezier(.2,.8,.2,1) forwards 200ms;
}
.bismillah-sub {
  font-family: var(--font-body);
  color: rgba(246,239,221,0.6);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 900ms ease forwards 900ms;
}
@keyframes bismillah-in {
  to { opacity: 1; transform: scale(1); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.bismillah-skip {
  position: absolute;
  bottom: 34px;
  background: none;
  border: 1px solid rgba(246,239,221,0.3);
  color: rgba(246,239,221,0.7);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0;
  animation: fade-up 700ms ease forwards 1400ms;
}
.bismillah-skip:hover { color: var(--white); border-color: var(--white); }

/* ---------- hero ---------- */
.hero {
  background: var(--green-900);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
  padding: 88px 0 110px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 20%, rgba(196,150,41,0.16), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(196,150,41,0.11), transparent 40%);
  pointer-events: none;
}
.hero-single {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero-single .hero-actions { justify-content: center; }

.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero-lede { font-size: 1.1rem; color: rgba(246,239,221,0.78); max-width: 46ch; margin: 0 auto 1.8em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* thin table-motif divider used between sections */
.table-divider {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0 auto;
}

/* ---------- section basics ---------- */
.section { padding: 86px 0; }
.section-tight { padding: 56px 0; }
.section-head { max-width: 62ch; margin-bottom: 46px; }
.section-head p { color: #4A4A3F; font-size: 1.05rem; }

.bg-parchment2 { background: var(--parchment-2); }
.bg-green { background: var(--green-900); color: var(--parchment); }
.bg-green h2, .bg-green h3 { color: var(--white); }
.bg-white { background: var(--white); }

/* ---------- hadith band ---------- */
.hadith-band {
  background: var(--green-900);
  color: var(--parchment);
  padding: 90px 0;
  position: relative;
}
.hadith-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.hadith-mark {
  font-family: var(--font-arabic);
  color: var(--gold);
  font-size: 2.4rem;
  display: block;
  margin-bottom: 12px;
}
.hadith-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--gold-light);
  margin-bottom: 22px;
  line-height: 1.9;
}
.hadith-text {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.55;
  margin-bottom: 18px;
}
.hadith-cite {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

/* ---------- timeline (years — real chronology, so numbering is earned) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  position: relative;
  margin-top: 10px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 11px; left: 0; right: 0;
  height: 1px;
  background: var(--parchment-2);
}
@media (max-width: 780px) {
  .timeline { grid-template-columns: 1fr; gap: 30px; }
  .timeline::before { display: none; }
}
.timeline-item { position: relative; padding-top: 34px; }
@media (max-width: 780px) { .timeline-item { padding-top: 0; padding-left: 30px; border-left: 1px solid var(--parchment-2); } }
.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px; left: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--parchment);
  box-shadow: 0 0 0 1px var(--gold);
}
@media (max-width: 780px) { .timeline-item::before { top: 3px; left: -6px; } }
.timeline-year { font-family: var(--font-display); color: var(--green-900); font-size: 1.4rem; font-weight: 600; }
.timeline-item p { font-size: 0.88rem; color: #4A4A3F; margin-top: 6px; }

/* ---------- cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--parchment-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(15,61,46,0.12); }
.card-media {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--sage), var(--parchment-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-700);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px;
  position: relative;
}
.card-media svg { width: 44px; height: 44px; opacity: 0.55; margin-bottom: 8px; }
.card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.card-tag { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 8px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { font-size: 0.92rem; color: #4A4A3F; flex: 1; }
.card-link { font-size: 0.85rem; font-weight: 700; color: var(--green-800); text-decoration: none; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.card-link:hover { color: var(--brick); }

/* event cards */
.event-card { display: flex; gap: 22px; padding: 26px; background: var(--white); border: 1px solid var(--parchment-2); border-radius: var(--radius); }
@media (max-width: 560px) { .event-card { flex-direction: column; } }
.event-date { flex-shrink: 0; width: 84px; text-align: center; background: var(--green-900); color: var(--white); border-radius: var(--radius); padding: 14px 8px; }
.event-date .day { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; display: block; line-height: 1; }
.event-date .month { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-light); display: block; margin-top: 4px; }
.event-body h3 { margin-bottom: 6px; }
.event-meta { font-size: 0.82rem; color: var(--brick); font-weight: 700; margin-bottom: 8px; }
.event-body p { color: #4A4A3F; font-size: 0.92rem; margin-bottom: 12px; }

/* stats */
.stat-row { display: flex; gap: 50px; flex-wrap: wrap; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); line-height: 1; }
.stat span { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(246,239,221,0.65); }

/* about split */
.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 34px; } }
.about-figure {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-light);
  text-align: center;
  padding: 30px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
.pull-quote {
  border-left: 3px solid var(--gold);
  padding-left: 22px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--green-900);
  margin: 30px 0;
  font-weight: 500;
}

/* footer */
@media (min-width: 900px) { .timeline-7 { grid-template-columns: repeat(7, 1fr); } }

/* 4-up grid for mosque placeholders */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 880px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: 1fr; } }

/* dashed placeholder card — signals "fill me in later" */
.mini-card {
  background: var(--white);
  border: 1.5px dashed var(--parchment-2);
  border-radius: var(--radius);
  padding: 30px 18px;
  text-align: center;
  color: #8A8A80;
}
.mini-card svg { width: 32px; height: 32px; color: var(--gold); margin-bottom: 12px; }
.mini-card h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; margin: 0 0 4px; color: var(--green-900); }
.mini-card span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* spotlight band — for flagship / highlighted content, inverse of the dark bands */
.spotlight-band { background: var(--gold); }
.spotlight-band h2 { color: var(--green-900); }
.spotlight-band p { color: #2A2210; }
.spotlight-badge {
  display: inline-block;
  background: var(--green-900);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.spotlight-band .btn-outline { border-color: var(--green-900); color: var(--green-900); margin-top: 8px; }
.spotlight-band .btn-outline:hover { background: var(--green-900); color: var(--gold); }

.site-footer { background: var(--green-900); color: rgba(246,239,221,0.75); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-logo { height: 84px; width: auto; margin-bottom: 14px; }
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a { text-decoration: none; color: inherit; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; }

/* form basics (donate / events RSVP) */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; color: var(--green-900); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--parchment-2);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; }

.amount-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.amount-chip { padding: 10px 18px; border: 1.5px solid var(--parchment-2); border-radius: 999px; background: var(--white); cursor: pointer; font-weight: 700; font-size: 0.9rem; transition: all var(--transition); }
.amount-chip.active, .amount-chip:hover { border-color: var(--gold); background: var(--gold); color: var(--green-900); }

.note-box { background: var(--parchment-2); border-left: 3px solid var(--gold); padding: 16px 20px; font-size: 0.88rem; border-radius: var(--radius); margin: 20px 0; }

/* page banner (about/projects/events) */
.page-banner { background: var(--green-900); color: var(--parchment); padding: 64px 0 56px; }
.page-banner h1 { color: var(--white); margin-bottom: 10px; }
.page-banner p { color: rgba(246,239,221,0.75); max-width: 60ch; font-size: 1.05rem; }
.breadcrumb { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.breadcrumb a { color: var(--gold); text-decoration: none; }

/* whatsapp float button */
.wa-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  background: #25D366;
  color: var(--white);
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(15,61,46,0.4);
  text-decoration: none;
  transition: transform var(--transition);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 26px; height: 26px; }
