/* ==========================================================================
   Kanoon Mehr — shared stylesheet
   Design tokens recovered from the previous Astra/Elementor site:
   green #1F4D3A, gold #C8A24D, cream #FFF3D7, typeface Reem Kufi.
   ========================================================================== */

/* ---------- Font (self-hosted; no third-party requests) ---------- */
@font-face {
  font-family: 'Reem Kufi';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/reem-kufi-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Reem Kufi';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/reem-kufi-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Reem Kufi';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/reem-kufi-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF,
                 U+FE70-FEFC;
}

/* ---------- Tokens ---------- */
:root {
  --green:        #1F4D3A;
  --green-deep:   #143528;
  --green-soft:   #2E6A50;
  --gold:         #C8A24D;
  --gold-soft:    #E3C88A;
  --gold-wash:    rgba(200, 162, 77, 0.14);
  --cream:        #FDF6E8;
  --cream-deep:   #F5E9D2;
  --ink:          #23281F;
  --ink-soft:     #5C6157;
  --white:        #FFFFFF;
  --line:         rgba(31, 77, 58, 0.14);

  --shadow-sm: 0 1px 2px rgba(31, 77, 58, .06), 0 2px 8px rgba(31, 77, 58, .05);
  --shadow-md: 0 4px 12px rgba(31, 77, 58, .08), 0 12px 32px rgba(31, 77, 58, .07);
  --shadow-lg: 0 8px 24px rgba(31, 77, 58, .10), 0 24px 56px rgba(31, 77, 58, .09);

  --radius:    14px;
  --radius-lg: 22px;
  --wrap:      1180px;
  --gutter:    clamp(1.15rem, 4vw, 2.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Reem Kufi', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .6em; font-weight: 600; color: var(--green-deep); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: min(var(--wrap), 100% - (var(--gutter) * 2)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--white); }
.section--green { background: var(--green); color: var(--cream-deep); }
.section--green h2, .section--green h3 { color: var(--white); }

.lede { font-size: clamp(1.02rem, 1.5vw, 1.16rem); color: var(--ink-soft); max-width: 62ch; }
.section-head { text-align: center; max-width: 64ch; margin: 0 auto clamp(2.2rem, 5vw, 3.4rem); }
.section-head .lede { margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .9rem;
}
.section--green .eyebrow { color: var(--gold-soft); }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.7rem;
  border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .98rem;
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--green-deep); box-shadow: var(--shadow-md); }
.btn--gold { background: var(--gold); color: #2A2107; box-shadow: var(--shadow-sm); }
.btn--gold:hover { background: #b8913f; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--green); border-color: var(--green); }
.btn--ghost:hover { background: var(--green); color: #fff; }
.section--green .btn--ghost { color: var(--white); border-color: var(--gold-soft); }
.section--green .btn--ghost:hover { background: var(--gold); border-color: var(--gold); color: #2A2107; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }
.btn-row--center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 246, 232, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 78px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand img { width: 50px; height: 50px; }
.brand__name { font-weight: 600; font-size: 1.18rem; color: var(--green-deep); line-height: 1.15; }
.brand__tag { display: block; font-size: .72rem; font-weight: 400; color: var(--ink-soft); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  padding: .5rem .85rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-size: .96rem; font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--gold-wash); color: var(--green-deep); }
.nav a[aria-current="page"] { color: var(--green); background: var(--gold-wash); font-weight: 600; }
.header-cta { margin-left: .6rem; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  color: var(--green-deep);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-header__inner { flex-wrap: wrap; }
  .nav {
    display: none; order: 3; width: 100%;
    flex-direction: column; align-items: stretch; gap: .15rem;
    padding: .4rem 0 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .75rem .9rem; border-radius: var(--radius); }
  .header-cta { margin-left: 0; margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--cream) url('../img/hero-banner.jpg') center / cover no-repeat;
  min-height: clamp(460px, 74vh, 680px);
  display: grid; place-items: center;
  text-align: center;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(253,246,232,.86) 0%, rgba(253,246,232,.62) 55%, rgba(253,246,232,.3) 100%);
}
.hero__inner { position: relative; z-index: 1; padding: clamp(3rem, 9vw, 5.5rem) 0; max-width: 52rem; }
.hero h1 { margin-bottom: .5em; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft); max-width: 44ch; margin: 0 auto 2rem; }
.hero--compact { min-height: clamp(320px, 46vh, 440px); }
.hero--compact .hero__inner { padding: clamp(2.5rem, 7vw, 4rem) 0; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split--reverse .split__media { order: 2; } }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.9rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.6vw, 2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--ink-soft); font-size: .97rem; }
.card__icon {
  width: 68px; height: 68px; object-fit: contain;
  margin-bottom: 1.05rem;
}
.card--center { text-align: center; }
.card--center .card__icon { margin-inline: auto; }
.section--green .card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.section--green .card p { color: var(--cream-deep); }
.section--green .card:hover { background: rgba(255,255,255,.11); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: var(--green) url('../img/cta-band.jpg') center / cover no-repeat;
  text-align: center;
}
.cta-band::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,53,40,.82), rgba(20,53,40,.88));
}
.cta-band__inner { position: relative; z-index: 1; padding: clamp(3.5rem, 8vw, 6rem) 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--cream-deep); max-width: 54ch; margin-inline: auto; margin-bottom: 2rem; }

/* ---------- Prose (policy pages) ---------- */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 2.4em; padding-top: .2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; color: var(--green); }
.prose ul { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .55em; }
.prose li::marker { color: var(--gold); }
.prose__updated { font-size: .9rem; color: var(--ink-soft); font-style: italic; }

/* ---------- Definition rows (contact) ---------- */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: .95rem; align-items: flex-start; }
.contact-list .ico {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold-wash); color: var(--green);
  display: grid; place-items: center;
}
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list b { display: block; color: var(--green-deep); font-weight: 600; }
.contact-list span, .contact-list a { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Notice ---------- */
.notice {
  border-left: 4px solid var(--gold);
  background: var(--gold-wash);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .96rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: rgba(253,246,232,.8); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.site-footer a { color: rgba(253,246,232,.8); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); text-decoration: underline; }
.footer-grid { display: grid; gap: 2.4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.site-footer h4 { color: var(--white); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.footer-brand img { width: 60px; height: 60px; margin-bottom: 1rem; }
.footer-brand p { font-size: .93rem; max-width: 34ch; }
.footer-bottom {
  margin-top: 2.8rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(253,246,232,.16);
  display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; justify-content: space-between;
  font-size: .88rem; color: rgba(253,246,232,.62);
}
.social { display: flex; gap: .6rem; margin-top: 1.1rem; }
.social a {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.09);
  display: grid; place-items: center;
  transition: background-color .15s ease, transform .15s ease;
}
.social a:hover { background: var(--gold); transform: translateY(-2px); }
.social svg { width: 19px; height: 19px; }

/* ---------- Donation amount chips (donate.html) ---------- */
/* Deliberately non-interactive: the real amount is chosen inside the bot.
   These are <span>s, never buttons or inputs. */
.amount-chips {
  display: flex; flex-wrap: wrap; gap: .75rem;
  justify-content: center; margin-bottom: 1.6rem;
}
.amount-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.6rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  color: var(--green-deep); font-weight: 600; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.amount-chip--custom {
  background: var(--gold-wash); border-color: transparent;
  color: var(--ink-soft); font-weight: 500; font-size: .95rem;
}

/* ---------- Small utilities ----------
   These exist so no page needs an inline style= attribute: the site is served
   under a strict Content-Security-Policy (style-src 'self') that blocks them. */
.wrap--narrow   { max-width: 76ch; }
.text-center    { text-align: center; }
.center-inline  { margin-inline: auto; }
.mt-lg          { margin-top: 2rem; }
.footer-bottom--bare { margin-top: 0; border-top: 0; padding-top: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:hover, .card:hover, .social a:hover { transform: none; }
}
