/* ============================================================
   AL-HIKMA CHARITABLE FOUNDATION — Design System
   Palette: deep coastal teal + marigold gold + warm sand
   Display: Domine  |  Body: Work Sans  |  Ledger: Space Mono
   ============================================================ */

:root{
  --ink:        #123A3D;
  --ink-2:      #0A2426;
  --ink-soft:   #2C5457;
  --gold:       #E3A73B;
  --gold-dark:  #C7862080;
  --coral:      #E1592E;
  --sand:       #F7F2E6;
  --sand-2:     #EFE6CE;
  --paper:      #FFFDF8;
  --text:       #1E2321;
  --text-soft:  #4B5450;
  --teal-tint:  #DCEAE6;
  --white:      #FFFFFF;
  --line:       #D9CFB4;

  --display: "Domine", Georgia, "Times New Roman", serif;
  --body:    "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "Space Mono", "Courier New", monospace;

  --container: 1160px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px -12px rgba(10,36,38,0.25);
  --shadow-card: 0 6px 20px -8px rgba(18,58,61,0.18);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--body);
  color:var(--text);
  background:var(--sand);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{
  font-family:var(--display);
  color:var(--ink);
  margin:0 0 .5em;
  line-height:1.15;
  font-weight:700;
}
p{ margin:0 0 1em; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }

.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}

.eyebrow{
  font-family:var(--mono);
  font-size:12.5px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--coral);
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}
.eyebrow::before{
  content:"";
  width:22px;
  height:1px;
  background:var(--coral);
  display:inline-block;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:14px 26px;
  border-radius:999px;
  font-family:var(--body);
  font-weight:600;
  font-size:15px;
  border:1.5px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover{ transform:translateY(-2px); }
.btn-gold{
  background:var(--gold);
  color:var(--ink-2);
  box-shadow:0 10px 24px -10px rgba(227,167,59,0.7);
}
.btn-gold:hover{ background:#efb54e; }
.btn-outline{
  border-color:rgba(18,58,61,0.3);
  color:var(--ink);
  background:transparent;
}
.btn-outline:hover{ border-color:var(--ink); background:rgba(18,58,61,0.05); }
.btn-outline-light{
  border-color:rgba(255,255,255,0.45);
  color:var(--white);
  background:transparent;
}
.btn-outline-light:hover{ border-color:#fff; background:rgba(255,255,255,0.08); }
.btn-coral{
  background:var(--coral);
  color:#fff;
  box-shadow:0 10px 24px -10px rgba(225,89,46,0.6);
}
.btn-coral:hover{ background:#c94d26; }
.btn-block{ width:100%; justify-content:center; }

/* ============= HEADER ============= */
.site-header{
  position:sticky; top:0; z-index:100;
  border-bottom:1px solid var(--line);
}
/* Blur lives on its own layer (not an ancestor of .nav-links) because
   backdrop-filter/filter/transform on an ancestor creates a new containing
   block for position:fixed descendants — which broke the fixed mobile menu. */
.site-header-bg{
  position:absolute; inset:0; z-index:0;
  background:rgba(247,242,230,0.92);
  backdrop-filter:blur(10px);
}
.nav-wrap{
  position:relative; z-index:1;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-family:var(--display);
  font-weight:700;
  font-size:18px;
  color:var(--ink);
}
.brand img{
  width:46px; height:46px; border-radius:50%;
  object-fit:cover; border:2px solid var(--gold);
}
.brand .brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.brand .brand-text small{
  font-family:var(--mono);
  font-size:10.5px;
  letter-spacing:.1em;
  color:var(--coral);
  font-weight:400;
}
.nav-links{
  display:flex; align-items:center; gap:30px;
}
.nav-links a{
  font-size:14.5px; font-weight:600; color:var(--ink-soft);
  position:relative; padding:6px 0;
}
.nav-links a::after{
  content:""; position:absolute; left:0; bottom:0;
  width:0; height:2px; background:var(--coral);
  transition:width .2s ease;
}
.nav-links a:hover{ color:var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after{ width:100%; }
.nav-links a.active{ color:var(--ink); }
.nav-cta{ display:flex; align-items:center; gap:16px; }
.nav-cta .btn{ padding:10px 22px; font-size:14px; }

.menu-toggle{
  display:none;
  background:none; border:none;
  width:36px; height:30px;
  flex-direction:column; justify-content:space-between;
  padding:2px 0;
}
.menu-toggle span{
  display:block; height:2px; width:100%;
  background:var(--ink); border-radius:2px;
}

.nav-mobile-donate{ display:none; }

@media (max-width: 900px){
  .menu-toggle{ display:flex; }
  .nav-links{
    position:fixed; top:73px; left:0; right:0; bottom:0;
    background:var(--sand);
    flex-direction:column; align-items:flex-start;
    padding:30px 24px; gap:22px;
    transform:translateX(100%);
    transition:transform .28s ease;
    overflow-y:auto;
  }
  .nav-links.open{ transform:translateX(0); }
  .nav-links a{ font-size:20px; }
  /* Real fixed-position nav-cta breaks because .site-header's backdrop-filter
     creates a new containing block for descendants — so instead we hide the
     desktop CTA on mobile and show a full-width Donate button inside the
     sliding nav panel itself. */
  .nav-cta{ display:none; }
  .nav-mobile-donate{
    display:flex; justify-content:center;
    width:100%; margin-top:6px;
  }
}

/* ============= PAGE HEADER (inner pages) ============= */
.page-hero{
  position:relative;
  padding:100px 0 70px;
  background:linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color:#fff;
  overflow:hidden;
  text-align:left;
}
.page-hero::before{
  content:"";
  position:absolute; inset:0;
  background-image:radial-gradient(circle, rgba(227,167,59,0.35) 1.6px, transparent 1.6px);
  background-size:22px 22px;
  opacity:.35;
  mask-image:linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
}
.page-hero .container{ position:relative; z-index:2; }
.page-hero h1{ color:#fff; font-size:clamp(32px,5vw,48px); max-width:720px; }
.page-hero .eyebrow{ color:var(--gold); }
.page-hero .eyebrow::before{ background:var(--gold); }
.page-hero p.lead{ color:rgba(255,255,255,0.78); max-width:620px; font-size:17px; }
.crumb{
  font-family:var(--mono); font-size:12px; letter-spacing:.06em;
  color:rgba(255,255,255,0.55); margin-bottom:18px;
}
.crumb a{ color:rgba(255,255,255,0.85); }
.crumb a:hover{ color:var(--gold); }

/* ============= SECTION HELPERS ============= */
section{ padding:88px 0; }
.section-tight{ padding:56px 0; }
.section-head{ max-width:640px; margin-bottom:50px; }
.section-head h2{ font-size:clamp(28px,3.4vw,38px); }
.section-head p{ color:var(--text-soft); font-size:16.5px; }
.bg-ink{ background:var(--ink); color:#fff; }
.bg-ink h2, .bg-ink h3, .bg-ink h4{ color:#fff; }
.bg-paper{ background:var(--paper); }
.bg-teal-tint{ background:var(--teal-tint); }

/* ============= LEDGER / MANIFEST (signature element) ============= */
.ledger{
  border:1px solid var(--line);
  background:var(--paper);
  border-radius:var(--radius);
  box-shadow:var(--shadow-card);
  padding:36px 38px;
}
.ledger-title{
  display:flex; align-items:center; justify-content:space-between;
  font-family:var(--mono); font-size:12px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--text-soft);
  border-bottom:1px dashed var(--line);
  padding-bottom:16px; margin-bottom:22px;
}
.ledger-title .stamp{
  color:var(--ink-soft); background:var(--teal-tint);
  padding:4px 10px; border-radius:20px; font-size:10.5px;
}
.ledger-row{ margin-bottom:22px; }
.ledger-row:last-child{ margin-bottom:0; }
.ledger-row .lr-top{
  display:flex; align-items:baseline; gap:10px;
  font-family:var(--body); font-size:15.5px; font-weight:600; color:var(--ink);
  margin-bottom:8px;
}
.lr-top .fill-line{
  flex:1; border-bottom:1px dotted var(--line);
  transform:translateY(-3px);
}
.lr-top .pct{
  font-family:var(--mono); font-weight:700; color:var(--coral); font-size:15px;
}
.lr-bar{
  height:8px; border-radius:6px; background:var(--sand-2);
  overflow:hidden; position:relative;
}
.lr-bar span{
  display:block; height:100%; border-radius:6px;
  background:linear-gradient(90deg, var(--gold), var(--coral));
  width:0%;
  transition:width 1.1s cubic-bezier(.2,.8,.2,1);
}
.lr-bar.in-view span{ width:var(--w); }

/* ============= CARDS ============= */
.grid{ display:grid; gap:28px; }
.grid-2{ grid-template-columns:1fr 1fr; }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }
@media (max-width:900px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns:1fr; }
}
@media (min-width:601px) and (max-width:900px){
  .grid-3, .grid-4{ grid-template-columns:repeat(2,1fr); }
}

.card{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:transform .25s ease, box-shadow .25s ease;
}
.card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-soft); }
.card .card-img{ aspect-ratio:4/3; overflow:hidden; }
.card .card-img img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.card:hover .card-img img{ transform:scale(1.06); }
.card .card-body{ padding:22px; }
.card .tag{
  font-family:var(--mono); font-size:11px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--coral); margin-bottom:8px; display:block;
}
.card h3{ font-size:19px; margin-bottom:8px; }
.card p{ color:var(--text-soft); font-size:14.5px; margin-bottom:0; }

.value-card{
  padding:28px 24px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--paper);
}
.value-card .v-icon{
  width:44px; height:44px; border-radius:12px;
  background:var(--teal-tint); color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  margin-bottom:16px;
}
.value-card .v-icon svg{ width:22px; height:22px; }
.value-card h4{ font-size:17px; margin-bottom:6px; }
.value-card p{ font-size:14px; color:var(--text-soft); margin:0; }

/* ============= STATS STRIP ============= */
.stat-strip{
  display:flex; flex-wrap:wrap; gap:0;
  border-top:1px solid rgba(255,255,255,0.15);
  border-bottom:1px solid rgba(255,255,255,0.15);
}
.stat-strip .stat{
  flex:1; min-width:160px;
  padding:26px 20px;
  border-right:1px solid rgba(255,255,255,0.15);
}
.stat-strip .stat:last-child{ border-right:none; }
.stat-strip .stat .num{
  font-family:var(--mono); font-size:28px; color:var(--gold); font-weight:700;
}
.stat-strip .stat .lbl{
  font-size:12.5px; color:rgba(255,255,255,0.7); letter-spacing:.03em;
}

/* ============= FOOTER ============= */
.site-footer{
  background:var(--ink-2);
  color:rgba(255,255,255,0.82);
  padding:70px 0 0;
}
.footer-grid{
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1.1fr;
  gap:40px; padding-bottom:50px;
  border-bottom:1px solid rgba(255,255,255,0.12);
}
@media (max-width:900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-grid h5{
  font-family:var(--mono); font-size:12px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--gold); margin-bottom:18px;
}
.footer-brand{ display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.footer-brand img{ width:44px; height:44px; border-radius:50%; }
.footer-brand span{ font-family:var(--display); font-size:17px; color:#fff; }
.footer-grid p{ font-size:14px; color:rgba(255,255,255,0.62); }
.footer-links li{ margin-bottom:10px; }
.footer-links a{ font-size:14px; color:rgba(255,255,255,0.75); }
.footer-links a:hover{ color:var(--gold); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center;
  padding:22px 0; font-size:12.5px; color:rgba(255,255,255,0.5);
  flex-wrap:wrap; gap:10px;
}
.footer-bottom a{ color:rgba(255,255,255,0.7); }
.footer-bottom a:hover{ color:var(--gold); }

/* ============= REVEAL ANIMATION ============= */
.reveal{ opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in-view{ opacity:1; transform:translateY(0); }

@media (prefers-reduced-motion: reduce){
  .reveal, .lr-bar span{ transition:none !important; opacity:1 !important; transform:none !important; }
  html{ scroll-behavior:auto; }
}

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

/* ============= LIGHTBOX ============= */
.lightbox-overlay{
  position:fixed; inset:0; background:rgba(10,36,38,0.92);
  display:flex; align-items:center; justify-content:center;
  padding:40px; z-index:999;
  opacity:0; visibility:hidden; transition:opacity .25s ease;
}
.lightbox-overlay.open{ opacity:1; visibility:visible; }
.lightbox-overlay figure{ margin:0; max-width:900px; text-align:center; }
.lightbox-overlay img{ max-height:80vh; border-radius:8px; margin:0 auto; }
.lightbox-overlay figcaption{
  color:var(--sand); font-family:var(--mono); font-size:13px;
  margin-top:16px; letter-spacing:.03em;
}
.lightbox-close{
  position:absolute; top:24px; right:28px;
  background:none; border:1px solid rgba(255,255,255,0.4);
  color:#fff; width:44px; height:44px; border-radius:50%;
  font-size:24px; line-height:1; display:flex; align-items:center; justify-content:center;
}
.lightbox-close:hover{ background:rgba(255,255,255,0.1); }

/* ============= GALLERY GRID ============= */
.gallery-grid{
  columns:3; column-gap:20px;
}
.gallery-grid figure{
  margin:0 0 20px; break-inside:avoid;
  border-radius:var(--radius); overflow:hidden;
  border:1px solid var(--line); background:var(--paper);
  cursor:zoom-in; position:relative;
}
.gallery-grid img{ width:100%; display:block; transition:transform .5s ease; }
.gallery-grid figure:hover img{ transform:scale(1.05); }
.gallery-grid figcaption{
  position:absolute; left:0; right:0; bottom:0;
  padding:14px 16px 12px;
  background:linear-gradient(180deg, transparent, rgba(10,36,38,0.85));
  color:#fff; font-size:13px; font-family:var(--mono);
  opacity:0; transition:opacity .25s ease;
}
.gallery-grid figure:hover figcaption{ opacity:1; }
@media (max-width:900px){ .gallery-grid{ columns:2; } }
@media (max-width:560px){ .gallery-grid{ columns:1; } }

/* ============= FILTER TABS (gallery/services) ============= */
.filter-tabs{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:36px; }
.filter-tabs button{
  border:1px solid var(--line); background:var(--paper);
  padding:9px 18px; border-radius:999px; font-size:13.5px; font-weight:600;
  color:var(--ink-soft); transition:all .2s ease;
}
.filter-tabs button:hover{ border-color:var(--ink); }
.filter-tabs button.active{ background:var(--ink); color:#fff; border-color:var(--ink); }

/* ============= DONATE / LEDGER RECEIPT ============= */
.receipt{
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  padding:0;
  overflow:hidden;
}
.receipt-head{
  background:var(--ink); color:#fff;
  padding:26px 32px;
  display:flex; align-items:center; justify-content:space-between;
}
.receipt-head .eyebrow{ margin:0; color:var(--gold); }
.receipt-head .eyebrow::before{ background:var(--gold); }
.receipt-body{ padding:32px; }
.receipt-line{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 0; border-bottom:1px dashed var(--line);
  font-family:var(--mono); font-size:14.5px;
}
.receipt-line:last-child{ border-bottom:none; }
.receipt-line .k{ color:var(--text-soft); }
.receipt-line .v{ color:var(--ink); font-weight:700; letter-spacing:.02em; }

/* ============= FORM ============= */
.form-field{ margin-bottom:20px; }
.form-field label{
  display:block; font-size:13.5px; font-weight:600;
  color:var(--ink); margin-bottom:8px;
}
.form-field input, .form-field textarea{
  width:100%; padding:13px 16px; border:1.5px solid var(--line);
  border-radius:10px; background:var(--paper); font-family:var(--body);
  font-size:15px; color:var(--text); transition:border-color .2s ease;
}
.form-field input:focus, .form-field textarea:focus{
  outline:none; border-color:var(--ink);
}
.form-field textarea{ resize:vertical; min-height:130px; }

/* ============= MAP ============= */
.map-frame{
  border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; box-shadow:var(--shadow-card);
}
.map-frame iframe{ width:100%; height:100%; min-height:340px; border:0; display:block; }

/* ============= HERO SLIDER ============= */
.hero-slider{
  position:relative;
  border-radius:20px;
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  aspect-ratio:4/3;
  background:var(--ink);
}
.hero-slider .slide{
  position:absolute; inset:0;
  opacity:0; visibility:hidden;
  transition:opacity .9s ease;
}
.hero-slider .slide.active{ opacity:1; visibility:visible; }
.hero-slider .slide img{
  width:100%; height:100%; object-fit:cover;
}
.hero-slider .slide::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:45%;
  background:linear-gradient(180deg, transparent, rgba(10,36,38,0.78));
  pointer-events:none;
}
.hero-slider .slide-caption{
  position:absolute; left:22px; right:22px; bottom:20px;
  color:#fff; font-family:var(--mono); font-size:13px; z-index:2;
}
.hero-slider .slide-caption strong{
  display:block; color:var(--gold); font-size:11.5px;
  letter-spacing:.1em; margin-bottom:4px;
}
.slider-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border-radius:50%;
  background:rgba(255,255,255,0.88); border:none;
  display:flex; align-items:center; justify-content:center;
  color:var(--ink); z-index:5; transition:background .2s ease, transform .2s ease;
}
.slider-arrow:hover{ background:#fff; transform:translateY(-50%) scale(1.06); }
.slider-arrow svg{ width:20px; height:20px; }
.slider-arrow.prev{ left:14px; }
.slider-arrow.next{ right:14px; }
.slider-dots{
  position:absolute; bottom:18px; left:50%; transform:translateX(-50%);
  display:flex; gap:8px; z-index:5;
}
.slider-dots button{
  width:8px; height:8px; border-radius:50%; padding:0;
  background:rgba(255,255,255,0.5); border:none;
  transition:all .25s ease;
}
.slider-dots button.active{
  width:22px; border-radius:6px; background:var(--gold);
}
@media (max-width:600px){
  .hero-slider{ aspect-ratio:1/1; }
  .slider-arrow{ width:34px; height:34px; }
}
@media (prefers-reduced-motion: reduce){
  .hero-slider .slide{ transition:none; }
}

/* ---- Full-bleed header/hero variant ---- */
.hero-slider.hero-full{
  aspect-ratio:auto;
  height:clamp(520px, 78vh, 760px);
  border-radius:0;
  box-shadow:none;
  margin-top:-1px; /* seam with sticky header border */
}
.hero-slider.hero-full .slide::after{
  inset:0; height:100%;
  background:linear-gradient(100deg, rgba(9,33,35,0.94) 0%, rgba(9,33,35,0.72) 38%, rgba(9,33,35,0.32) 65%, rgba(9,33,35,0.15) 100%);
}
.hero-slider.hero-full .slide-caption{
  left:auto; right:32px; bottom:auto; top:32px;
  text-align:right; max-width:220px;
}
.hero-overlay{
  position:absolute; inset:0; z-index:2;
  display:flex; align-items:center;
}
.hero-text{ max-width:600px; }
.hero-text .eyebrow{ color:var(--gold); }
.hero-text .eyebrow::before{ background:var(--gold); }
.hero-text h1{
  color:#fff; font-size:clamp(32px,4.8vw,56px);
  text-shadow:0 2px 18px rgba(0,0,0,0.15);
}
.hero-text p{
  color:rgba(255,255,255,0.86); font-size:17.5px; max-width:520px;
}
.hero-slider.hero-full .slider-arrow{
  width:48px; height:48px;
}
.hero-slider.hero-full .slider-arrow.prev{ left:28px; }
.hero-slider.hero-full .slider-arrow.next{ right:28px; }
.hero-slider.hero-full .slider-dots{ bottom:28px; }
@media (max-width:900px){
  .hero-slider.hero-full{ height:clamp(560px, 92vh, 780px); }
  .hero-slider.hero-full .slide-caption{ display:none; }
}
@media (max-width:600px){
  .hero-slider.hero-full{ aspect-ratio:auto; }
  .hero-slider.hero-full .slide::after{
    background:linear-gradient(180deg, rgba(9,33,35,0.55) 0%, rgba(9,33,35,0.88) 62%, rgba(9,33,35,0.95) 100%);
  }
  .hero-overlay{ align-items:flex-end; padding-bottom:64px; }
  .hero-slider.hero-full .slider-arrow{ display:none; }
}
