/* ==========================================================================
   iEndow — mobile-first stylesheet
   Font: Manrope (Manzil-style)
   ========================================================================== */

:root {
  --forest: #052d2d;
  --forest-2: #0a5a4f;
  --teal: #457373;
  --dark: #022d2d;
  --gold: #d4a24e;
  --gold-dark: #c4913e;
  --muted: #566a63;
  --border: #e2ece8;
  --band-philanthropic: #d7e6be;
  --band-investments: #dfe975;
  --band-grants: #0c4b4b;
  --bg-alt: #f4f8f6;

  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 12px 34px rgba(5, 45, 45, 0.14);
  --header-h: 116px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--forest);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand__word, .footer__brand {
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 5vw, 40px);
}
.container--narrow { max-width: 780px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--forest); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  cursor: pointer;
  border: 0;
  min-height: 44px; /* touch target */
}
.btn--lg { padding: 15px 34px; font-size: 1.05rem; }
.btn__arrow { flex: none; transition: transform .18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn--primary { background: var(--forest-2); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--forest); transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #241700; }
.btn--gold:hover { background: var(--gold-dark); }

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--forest);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 95px; height: 95px; }
.brand__word { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.brand__i { color: var(--gold); }

.nav__toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px;
}
.nav__toggle span {
  display: block; height: 2px; width: 100%; background: #fff;
  border-radius: 2px; transition: transform .3s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__menu { list-style: none; padding: 0; }

/* Mobile nav: slide-down panel */
@media (max-width: 820px) {
  .nav__menu {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    display: grid; gap: 2px;
    max-height: 0; overflow: hidden;
    transition: max-height .32s ease;
    box-shadow: 0 12px 20px rgba(0,0,0,.06);
  }
  .nav__menu.open { max-height: 380px; }
  .nav__menu li { text-align: center; }
  .nav__menu a { display: block; padding: 15px; font-family: "Manrope", sans-serif; font-weight: 500; }
  .nav__menu a:not(.btn):hover { color: var(--forest-2); }
  .nav__donate { margin: 10px auto 16px; width: max-content; }
}

/* Desktop nav */
@media (min-width: 821px) {
  .nav__toggle { display: none; }
  .nav__menu { display: flex; align-items: center; gap: 28px; }
  .nav__menu a:not(.btn) { font-family: "Manrope", sans-serif; font-weight: 500; font-size: .98rem; color: rgba(255, 255, 255, .9); }
  .nav__menu a:not(.btn):hover { color: var(--gold); }
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark), var(--forest-2));
  text-align: left;
  padding: clamp(64px, 11vw, 132px) 0;
}
/* Background animation */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}
/* Dark wash so the animation stays visible while the heading remains readable */
/* Left-weighted wash: darker where the text sits, video shows through on the right */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(2, 45, 45, .82) 0%, rgba(2, 45, 45, .58) 42%, rgba(5, 45, 45, .30) 100%);
}
.hero__inner { position: relative; z-index: 1; }
.hero .btn--primary { background: #fff; color: var(--forest); }
.hero .btn--primary:hover { background: #eef2f0; }
.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 4rem);
  font-weight: 800;
  max-width: 15ch;
  margin-inline: 0;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.hero__tagline {
  font-size: clamp(1.08rem, 3.2vw, 1.35rem);
  color: rgba(255, 255, 255, .92);
  max-width: 44ch;
  margin: clamp(18px, 3.5vw, 26px) 0 clamp(26px, 4vw, 34px);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .3);
}

/* ---- Generic section -------------------------------------------------- */
.section { padding: clamp(56px, 11vw, 88px) 0; }
.section--alt { background: var(--bg-alt); }
#what-is-waqf { background: #eafaf6; }
.section h2, .cta h2 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: .5em;
}
.lead {
  font-size: clamp(1.02rem, 2.6vw, 1.16rem);
  color: var(--muted);
  max-width: 62ch;
}
.lead.center { margin-inline: auto; }

/* ---- Video ------------------------------------------------------------ */
.video {
  margin-top: clamp(26px, 5vw, 38px);
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Click-to-play facade: branded thumbnail + play button (matches original iendow.ca) */
.video__facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer; background: #000;
  display: grid; place-items: center;
}
.video__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: relative; z-index: 1;
  width: clamp(64px, 9vw, 88px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  padding-left: 4px; /* optically centre the triangle */
  color: #fff; background: rgba(10, 90, 79, .92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .32);
  transition: transform .18s ease, background .18s ease;
}
.video__facade:hover .video__play,
.video__facade:focus-visible .video__play { transform: scale(1.08); background: var(--forest-2); }

/* ---- Why iEndow: Manzil-style card grid ------------------------------- */
.section__head { margin-bottom: clamp(32px, 6vw, 56px); }
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 3vw, 34px);
}
.pcard { display: flex; flex-direction: column; }
/* Rounded image tile on the iEndow band colour (Manzil pattern) */
.pcard__media {
  aspect-ratio: 16 / 11;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: clamp(16px, 2vw, 22px);
}
.pcard__media--philanthropic { background: var(--band-philanthropic); }
.pcard__media--investments   { background: var(--band-investments); }
.pcard__media--grants        { background: var(--band-grants); }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }

.pcard h3 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; margin-bottom: .45em; }
.pcard p { font-size: 1.02rem; color: var(--muted); }
.pcard__list-title { font-weight: 700; color: var(--forest); margin-top: 1.1em; }
.pcard ul { list-style: none; padding: 0; margin-top: .5em; }
.pcard li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--muted); }
.pcard li::before {
  content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700;
  color: var(--forest-2);
}

@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

/* ---- Donate CTA ------------------------------------------------------- */
.cta {
  padding: clamp(56px, 10vw, 84px) 0;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--dark), var(--forest-2));
}
.cta h2 { color: #fff; }
.cta .btn--primary { background: #fff; color: var(--forest); margin-top: 6px; }
.cta .btn--primary:hover { background: #eef2f0; }

/* ---- Contact ---------------------------------------------------------- */
.contact-cards {
  margin-top: clamp(26px, 5vw, 40px);
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;
}
.contact-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 30px; min-width: min(300px, 100%);
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 6px 18px rgba(5, 45, 45, .06);
  transition: transform .18s ease, border-color .18s ease;
}
a.contact-card:hover { transform: translateY(-4px); border-color: var(--forest-2); }
.contact-card__label { text-transform: uppercase; letter-spacing: 1px; font-size: .74rem; color: var(--muted); }
.contact-card__value { font-family: "Manrope", sans-serif; font-weight: 600; font-size: 1.16rem; color: var(--forest-2); word-break: break-word; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--dark); color: #cddbd5;
  text-align: center; padding: clamp(36px, 7vw, 52px) 0;
}
.footer__inner { display: grid; gap: 8px; }
.footer__brand { font-size: 1.4rem; font-weight: 800; color: #fff; }
.footer__meta a { color: var(--gold); }
.footer__copy { color: #7f958d; font-size: .86rem; margin-top: 8px; }

/* ---- Motion preferences ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero__video { display: none; }        /* fall back to the gradient */
  .hero__overlay { background: none; }
}
