/* =========================================================
   Masjid website design system
   Themes: emerald (default), navy, teal, maroon, charcoal  ([data-theme="..."] on <body>)
   ========================================================= */

/* Use a plain ampersand in headings (Fraunces' decorative "&" reads like a symbol at small sizes) */
@font-face { font-family: "Plain Amp"; src: local("Georgia"), local("Times New Roman"); unicode-range: U+0026; }

:root {
  --brand: #0d4a3a;
  --brand-700: #0a3a2e;
  --brand-900: #062319;
  --brand-tint: #eaf2ee;
  --brand-tint-2: #d5e6de;
  --gold: #c39a4e;
  --gold-300: #dcc08a;
  --gold-tint: #f7efdf;

  --ink: #14211c;
  --ink-2: #3b4a44;
  --muted: #6a7a73;
  --line: #e4e0d5;
  --cream: #faf8f3;
  --white: #ffffff;

  --font-display: "Plain Amp", "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-arabic: "Amiri", "Traditional Arabic", serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(10, 30, 24, .06), 0 2px 8px rgba(10, 30, 24, .05);
  --shadow: 0 2px 4px rgba(10, 30, 24, .04), 0 12px 32px rgba(10, 30, 24, .09);
  --shadow-lg: 0 24px 60px rgba(6, 25, 19, .22);

  --container: 1200px;
  --gutter: clamp(18px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 75Q40 71 50 75' stroke-width='1'/%3E%3Cpath d='M40 74Q38.5 54 42.5 34' stroke-width='1.7'/%3E%3Cpath d='M38 66.6L41.2 65.4' stroke-width='.6'/%3E%3Cpath d='M38.1 58.6L41.3 57.4' stroke-width='.6'/%3E%3Cpath d='M38.6 50.6L41.8 49.4' stroke-width='.6'/%3E%3Cpath d='M39.5 42.6L42.7 41.4' stroke-width='.6'/%3E%3Cpath d='M42.5 34Q35 31.5 28.9 43.7M42.5 34Q34.4 28 27.9 34.4M42.5 34Q36.2 24.9 31.1 24.8M42.5 34Q39.3 23 36.7 19M42.5 34Q42.5 23.4 42.5 18.7M42.5 34Q45.7 23 48.3 19M42.5 34Q48.8 24.9 53.9 24.8M42.5 34Q50.6 28 57.1 34.4M42.5 34Q50 31.5 56.1 43.7M42.5 34Q47.8 33.7 52.1 47.2M42.5 34Q37.2 33.7 32.9 47.2' stroke-width='1.15'/%3E%3Ccircle cx='41.3' cy='36.6' r='1.1' fill='%23fff' stroke='none'/%3E%3Ccircle cx='43.9' cy='36.8' r='1.1' fill='%23fff' stroke='none'/%3E%3Cpath d='M109 75Q120 71 131 75' stroke-width='1'/%3E%3Cpath d='M119 74C117 69 123 66 121 61' stroke-width='1.8'/%3E%3Cpath d='M121 61Q115.8 52 105 51M121 61Q120 52 117 44M121 61Q124.8 52 131 46M121 61Q128.3 52 141 54' stroke-width='1.1'/%3E%3Cpath d='M96.5 48a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0Q105 52.2 96.5 48Z' stroke-width='.95'/%3E%3Cpath d='M101.6 50.6l-.6 2.4M108.7 50.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M107.5 41a2.4 2 0 0 1 4.8 0a2.4 2 0 0 1 4.8 0a2.4 2 0 0 1 4.8 0a2.4 2 0 0 1 4.8 0Q117 45.2 107.5 41Z' stroke-width='.95'/%3E%3Cpath d='M113.2 43.6l-.6 2.4M121.2 43.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M122.5 43a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0Q131 47.2 122.5 43Z' stroke-width='.95'/%3E%3Cpath d='M127.6 45.6l-.6 2.4M134.7 45.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M134.5 51a2.2 1.8 0 0 1 4.3 0a2.2 1.8 0 0 1 4.3 0a2.2 1.8 0 0 1 4.3 0Q141 55.2 134.5 51Z' stroke-width='.95'/%3E%3Cpath d='M138.4 53.6l-.6 2.4M143.9 53.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M29 155Q40 151 51 155' stroke-width='1'/%3E%3Cpath d='M39 154C37 149 43 146 41 141' stroke-width='1.8'/%3E%3Cpath d='M41 141Q35.8 132 25 131M41 141Q40 132 37 124M41 141Q44.9 132 51 126M41 141Q48.4 132 61 134' stroke-width='1.1'/%3E%3Cpath d='M16.5 128a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0Q25 132.2 16.5 128Z' stroke-width='.95'/%3E%3Cpath d='M21.6 130.6l-.6 2.4M28.7 130.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M27.5 121a2.4 2 0 0 1 4.8 0a2.4 2 0 0 1 4.8 0a2.4 2 0 0 1 4.8 0a2.4 2 0 0 1 4.8 0Q37 125.2 27.5 121Z' stroke-width='.95'/%3E%3Cpath d='M33.2 123.6l-.6 2.4M41.2 123.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M42.5 123a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0a2.8 2.4 0 0 1 5.7 0Q51 127.2 42.5 123Z' stroke-width='.95'/%3E%3Cpath d='M47.6 125.6l-.6 2.4M54.7 125.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M54.5 131a2.2 1.8 0 0 1 4.3 0a2.2 1.8 0 0 1 4.3 0a2.2 1.8 0 0 1 4.3 0Q61 135.2 54.5 131Z' stroke-width='.95'/%3E%3Cpath d='M58.4 133.6l-.6 2.4M63.9 133.4l.5 2.6' stroke-width='.7'/%3E%3Cpath d='M110 155Q120 151 130 155' stroke-width='1'/%3E%3Cpath d='M120 154Q118.5 134 122.5 114' stroke-width='1.7'/%3E%3Cpath d='M118 146.6L121.2 145.4' stroke-width='.6'/%3E%3Cpath d='M118.1 138.6L121.3 137.4' stroke-width='.6'/%3E%3Cpath d='M118.6 130.6L121.8 129.4' stroke-width='.6'/%3E%3Cpath d='M119.5 122.6L122.7 121.4' stroke-width='.6'/%3E%3Cpath d='M122.5 114Q115 111.5 108.9 123.7M122.5 114Q114.4 108 107.9 114.4M122.5 114Q116.2 104.9 111.1 104.8M122.5 114Q119.3 103 116.7 99M122.5 114Q122.5 103.4 122.5 98.7M122.5 114Q125.7 103 128.3 99M122.5 114Q128.8 104.9 133.9 104.8M122.5 114Q130.6 108 137.1 114.4M122.5 114Q130 111.5 136.1 123.7M122.5 114Q127.8 113.7 132.1 127.2M122.5 114Q117.2 113.7 112.9 127.2' stroke-width='1.15'/%3E%3Ccircle cx='121.3' cy='116.6' r='1.1' fill='%23fff' stroke='none'/%3E%3Ccircle cx='123.9' cy='116.8' r='1.1' fill='%23fff' stroke='none'/%3E%3Cpolygon points='80,27.5 81.4,30.7 84.6,29.4 83.3,32.6 86.5,34 83.3,35.4 84.6,38.6 81.4,37.3 80,40.5 78.6,37.3 75.4,38.6 76.7,35.4 73.5,34 76.7,32.6 75.4,29.4 78.6,30.7' stroke-width='.9'/%3E%3Cpolygon points='0,107.5 1.4,110.7 4.6,109.4 3.3,112.6 6.5,114 3.3,115.4 4.6,118.6 1.4,117.3 0,120.5 -1.4,117.3 -4.6,118.6 -3.3,115.4 -6.5,114 -3.3,112.6 -4.6,109.4 -1.4,110.7' stroke-width='.9'/%3E%3Cpolygon points='160,107.5 161.4,110.7 164.6,109.4 163.3,112.6 166.5,114 163.3,115.4 164.6,118.6 161.4,117.3 160,120.5 158.6,117.3 155.4,118.6 156.7,115.4 153.5,114 156.7,112.6 155.4,109.4 158.6,110.7' stroke-width='.9'/%3E%3Ccircle cx='80' cy='114' r='1.1'/%3E%3Ccircle cx='0' cy='34' r='1.1'/%3E%3Ccircle cx='160' cy='34' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="navy"] {
  --brand: #14385a;
  --brand-700: #0f2b46;
  --brand-900: #08182a;
  --brand-tint: #e9f0f6;
  --brand-tint-2: #d3e0ec;
  --ink: #121c27;
  --ink-2: #384655;
  --muted: #677585;
}

[data-theme="teal"] {
  --brand: #0f5257;
  --brand-700: #0b3f43;
  --brand-900: #062528;
  --brand-tint: #e7f2f2;
  --brand-tint-2: #cfe4e5;
  --ink: #122022;
  --ink-2: #364a4c;
  --muted: #657a7c;
}

[data-theme="maroon"] {
  --brand: #5e1f2b;
  --brand-700: #481722;
  --brand-900: #2a0c13;
  --brand-tint: #f5eaec;
  --brand-tint-2: #ead3d7;
  --ink: #23161a;
  --ink-2: #4b3a3e;
  --muted: #7d6a6e;
}

[data-theme="charcoal"] {
  --brand: #2c3a3f;
  --brand-700: #212c30;
  --brand-900: #12191b;
  --brand-tint: #edf0f1;
  --brand-tint-2: #d9dfe1;
  --ink: #161c1e;
  --ink-2: #3c4548;
  --muted: #6c7679;
}

[hidden] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-700); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); font-optical-sizing: auto; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.4rem); }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 650; letter-spacing: 0; }
p { color: var(--ink-2); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); max-width: 62ch; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--gold); color: var(--brand-900); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.5em; border-radius: 999px;
  font-weight: 600; font-size: .98rem; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-gold { background: var(--gold); color: var(--brand-900); box-shadow: 0 6px 18px rgba(195, 154, 78, .35); }
.btn-gold:hover { background: var(--gold-300); color: var(--brand-900); }
.btn-brand { background: var(--brand); color: var(--white); }
.btn-brand:hover { background: var(--brand-700); color: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: var(--white); }
.btn-lg { min-height: 56px; padding: 0 2em; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; }
.link-arrow .icon { transition: transform .2s var(--ease); width: 1em; height: 1em; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Top bar ---------- */
.topbar { background: var(--brand-900); color: rgba(255,255,255,.78); font-size: .84rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar a { color: rgba(255,255,255,.85); text-decoration: none; }
.topbar a:hover { color: var(--gold-300); }
.topbar-info { display: flex; gap: 22px; align-items: center; }
.topbar-info span, .topbar-info a { display: inline-flex; align-items: center; gap: 6px; }
.topbar .icon { width: 15px; height: 15px; color: var(--gold); }
.next-pill strong { color: var(--gold-300); font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 243, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(10,30,24,.06); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; color: var(--brand-900); }
.brand-sub { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a.nav-link {
  position: relative; padding: 10px 14px; border-radius: 999px;
  font-weight: 550; font-size: .95rem; color: var(--ink-2); text-decoration: none;
  transition: color .2s, background .2s;
}
.nav a.nav-link:hover { color: var(--brand); background: var(--brand-tint); }
.nav a.nav-link[aria-current="page"] { color: var(--brand); }
.nav a.nav-link[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--gold);
}
.nav .btn { margin-left: 10px; min-height: 44px; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--white); color: var(--brand); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle .icon { width: 22px; height: 22px; }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(6, 20, 15, .5); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; z-index: 140; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); z-index: 150;
  background: var(--cream); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column; padding: 20px 24px 28px; overflow-y: auto;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer nav a { display: flex; justify-content: space-between; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.drawer nav a[aria-current="page"] { color: var(--brand); }
.drawer nav a .icon { color: var(--gold); width: 18px; height: 18px; }
.drawer .btn { margin-top: 24px; width: 100%; }
.drawer-contact { margin-top: auto; padding-top: 24px; font-size: .92rem; color: var(--muted); display: grid; gap: 8px; }
.drawer-contact a { color: var(--ink-2); text-decoration: none; }
body.menu-open { overflow: hidden; }
body.menu-open .drawer { transform: none; }
body.menu-open .drawer-backdrop { opacity: 1; visibility: visible; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 80% at 85% 0%, rgba(195,154,78,.28) 0%, transparent 55%), linear-gradient(160deg, var(--brand) 0%, var(--brand-900) 100%);
  color: var(--white);
  padding: clamp(56px, 9vw, 120px) 0 clamp(80px, 11vw, 150px);
}
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 160px; opacity: .08; z-index: -1; }
.hero-skyline { position: absolute; left: 0; bottom: -1px; width: 100%; height: auto; color: var(--cream); z-index: -1; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .eyebrow { color: var(--gold-300); }
.hero h1 { color: var(--white); margin: 14px 0 20px; }
.hero h1 em { font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--gold-300); font-weight: 500; }
.hero .lead { color: rgba(255,255,255,.84); margin-bottom: 32px; }
.bismillah { font-family: var(--font-arabic); font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--gold-300); line-height: 1.6; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 36px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); font-size: .92rem; color: rgba(255,255,255,.8); }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--gold); width: 18px; height: 18px; }

/* Prayer widget (hero card) */
.prayer-widget {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-lg);
}
.pw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.pw-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-300); font-weight: 600; }
.pw-next { font-family: var(--font-display); font-size: 1.9rem; color: var(--white); line-height: 1.1; margin-top: 4px; }
.pw-count { font-variant-numeric: tabular-nums; font-size: .95rem; color: rgba(255,255,255,.75); margin-top: 4px; }
.pw-date { text-align: right; font-size: .8rem; color: rgba(255,255,255,.7); line-height: 1.5; }
.pw-list { list-style: none; padding: 0; display: grid; gap: 4px; }
.pw-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 10px 14px; border-radius: 12px; color: rgba(255,255,255,.86); font-size: .95rem; font-variant-numeric: tabular-nums; }
.pw-list li .n { font-weight: 600; color: var(--white); }
.pw-list li .iq { color: var(--gold-300); min-width: 72px; text-align: right; font-weight: 600; }
.pw-list li.is-next { background: rgba(195,154,78,.18); box-shadow: inset 0 0 0 1px rgba(195,154,78,.5); }
.pw-list .pw-cols { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); padding-block: 0 4px; }
.pw-foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: rgba(255,255,255,.75); }
.pw-foot a { color: var(--gold-300); }
.skeleton { display: inline-block; min-width: 60px; height: 1em; border-radius: 6px; background: rgba(255,255,255,.12); animation: pulse 1.4s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 120% at 100% 0%, rgba(195,154,78,.25) 0%, transparent 50%), linear-gradient(160deg, var(--brand) 0%, var(--brand-900) 100%);
  color: var(--white); padding: clamp(48px, 7vw, 88px) 0 clamp(110px, 14vw, 190px);
}
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 160px; opacity: .08; z-index: -1; }
.page-hero h1 { color: var(--white); margin: 10px 0 14px; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.page-hero .lead { color: rgba(255,255,255,.82); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; font-size: .85rem; color: rgba(255,255,255,.65); }
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-300); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-tint { background: var(--brand-tint); }
.section-white { background: var(--white); }
.section-dark { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(160deg, var(--brand-700), var(--brand-900)); color: var(--white); }
.section-dark::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 160px; opacity: .065; z-index: -1; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,.8); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 26px; height: 1.5px; background: currentColor; }
.center .eyebrow::after { content: ""; width: 26px; height: 1.5px; background: currentColor; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { margin: 12px 0 14px; }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split-wide { grid-template-columns: 1.2fr .8fr; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: .97rem; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover, .card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-tint-2); }
.card .link-arrow { margin-top: 16px; }
.card-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--brand-tint); color: var(--brand);
}
.card-icon .icon { width: 26px; height: 26px; }
.card-gold .card-icon { background: var(--gold-tint); color: #9a7330; }

.pillar { padding: clamp(28px, 3vw, 40px); text-align: left; }
.pillar .num { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--gold); opacity: .9; margin-bottom: 18px; }

/* Feature with art */
.art-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 5 / 4;
  background: radial-gradient(80% 60% at 50% 30%, rgba(195,154,78,.35), transparent 70%), linear-gradient(170deg, var(--brand), var(--brand-900));
  box-shadow: var(--shadow); color: var(--gold-300); isolation: isolate;
}
.art-frame::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 128px; opacity: .1; z-index: -1; }
.art-frame svg { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 88%; height: auto; }
.art-badge {
  position: absolute; left: 20px; bottom: 20px; right: 20px; max-width: 280px;
  background: rgba(255,255,255,.95); color: var(--ink); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow);
}
.art-badge strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--brand-900); }
.art-badge span { font-size: .87rem; color: var(--muted); }

.check-list { list-style: none; padding: 0; display: grid; gap: 12px; margin: 22px 0 30px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.check-list .icon { color: var(--white); background: var(--brand); border-radius: 50%; padding: 4px; width: 22px; height: 22px; stroke-width: 2.5; margin-top: 2px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--white); padding: 28px 22px; text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--brand); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--muted); }

/* Quote */
.quote { max-width: 820px; margin: 0 auto; text-align: center; }
.quote .ar { font-family: var(--font-arabic); font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--gold-300); line-height: 1.8; direction: rtl; margin-bottom: 16px; }
.quote blockquote { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.5; }
.section-dark .quote blockquote { color: var(--white); }
.quote cite { display: block; margin-top: 14px; font-style: normal; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

/* Events */
.event-card { display: flex; gap: 20px; align-items: flex-start; }
.event-date {
  flex: none; width: 74px; text-align: center; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--white);
}
.event-date .m { display: block; background: var(--brand); color: var(--gold-300); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 0; }
.event-date .d { display: block; font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--brand-900); padding: 8px 0 10px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; color: var(--muted); margin-bottom: 6px; }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-meta .icon { width: 15px; height: 15px; color: var(--gold); }

/* Donate */
.fund-card { border-top: 3px solid var(--gold); }
.fund-card .amount-hint { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.donate-panel {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 56px); box-shadow: var(--shadow);
}
.trust { display: grid; gap: 14px; }
.trust div { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--brand-tint); }
.trust .icon { color: var(--brand); width: 24px; height: 24px; margin-top: 2px; }
.trust strong { display: block; color: var(--ink); }
.trust span { font-size: .9rem; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 32px; justify-content: center; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.9); font-size: .9rem; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; }

/* Prayer page */
.today-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.prayer-tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 14px; text-align: center; transition: transform .3s var(--ease); }
.prayer-tile .ar { font-family: var(--font-arabic); color: var(--gold); font-size: 1.25rem; line-height: 1.2; }
.prayer-tile h3 { font-size: 1.15rem; margin: 4px 0 14px; }
.prayer-tile .lbl { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.prayer-tile .t { font-size: 1.3rem; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.prayer-tile .iq { font-size: 1.05rem; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.prayer-tile hr { border: 0; border-top: 1px dashed var(--line); margin: 12px 0; }
.prayer-tile.is-next { background: var(--brand); border-color: var(--brand); transform: translateY(-6px); box-shadow: var(--shadow); }
.prayer-tile.is-next h3, .prayer-tile.is-next .t { color: var(--white); }
.prayer-tile.is-next .lbl { color: rgba(255,255,255,.6); }
.prayer-tile.is-next .iq { color: var(--gold-300); }
.prayer-tile.is-next hr { border-color: rgba(255,255,255,.2); }

.jumuah-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px 28px; border-radius: var(--radius); background: var(--gold-tint); border: 1px solid #ecdcb9; margin-top: 28px; }
.jumuah-band strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--brand-900); }

.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.table-tools h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--brand); cursor: pointer; display: grid; place-items: center; }
.month-nav button:hover { background: var(--brand-tint); }
.month-nav .icon { width: 18px; height: 18px; }
.month-label { min-width: 150px; text-align: center; font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); -webkit-overflow-scrolling: touch; }
table.timetable { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; min-width: 640px; }
.timetable th, .timetable td { padding: 12px 14px; text-align: left; white-space: nowrap; }
.timetable thead th { position: sticky; top: 0; background: var(--brand); color: var(--white); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.timetable tbody tr:nth-child(even) { background: var(--cream); }
.timetable tbody tr.is-today { background: var(--gold-tint); box-shadow: inset 4px 0 0 var(--gold); font-weight: 600; }
.timetable td.hijri { color: var(--muted); }
.table-note { font-size: .85rem; color: var(--muted); margin-top: 14px; }

/* Program detail rows */
.program { display: grid; grid-template-columns: 72px 1fr; gap: 24px; padding: clamp(26px, 3vw, 40px) 0; border-top: 1px solid var(--line); }
.program:first-child { border-top: 0; }
.program .card-icon { margin: 0; width: 64px; height: 64px; }
.program h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); margin-bottom: 8px; }
.program .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-size: .8rem; padding: 5px 12px; border-radius: 999px; background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* Contact */
.contact-cards { display: grid; gap: 14px; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-card .card-icon { margin: 0; width: 48px; height: 48px; }
.contact-card .card-icon .icon { width: 22px; height: 22px; }
.contact-card h4 { margin-bottom: 2px; }
.contact-card p, .contact-card a { font-size: .97rem; }
.map-frame { width: 100%; min-height: 380px; height: 100%; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--brand-tint); }

.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 15px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.hp { display: none; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-status { font-size: .95rem; font-weight: 600; color: var(--brand); margin: 0; }
.form-status.is-error { color: #b42318; }
.form button[disabled] { opacity: .6; cursor: progress; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--radius-lg);
  background: radial-gradient(70% 120% at 100% 0%, rgba(195,154,78,.3), transparent 60%), linear-gradient(150deg, var(--brand), var(--brand-900));
  color: var(--white); padding: clamp(36px, 5vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 148px; opacity: .08; z-index: -1; }
.cta-band h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.3rem); }
.cta-band p { color: rgba(255,255,255,.82); margin-top: 8px; max-width: 56ch; }

/* ---------- Footer ---------- */
.site-footer { position: relative; isolation: isolate; overflow: hidden; background: var(--brand-900); color: rgba(255,255,255,.72); padding: clamp(56px, 7vw, 88px) 0 28px; font-size: .94rem; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 160px; opacity: .05; z-index: -1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(28px, 4vw, 56px); }
.site-footer h4 { color: var(--white); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer p { color: rgba(255,255,255,.68); }
.site-footer .brand-name { color: var(--white); }
.site-footer .brand-sub { color: rgba(255,255,255,.55); }
.footer-times li { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.footer-times li span:last-child { color: var(--white); }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); }
.socials a:hover { border-color: var(--gold); }
.socials .icon { width: 18px; height: 18px; }
.footer-bottom { margin-top: clamp(40px, 5vw, 64px); padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.55); }

/* Mobile sticky donate bar */
.mobile-donate { display: none; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* Placeholders not yet filled in (visible so they're easy to spot) */
.todo { background: #fff2b3; color: #6b5300; padding: 0 5px; border-radius: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav a.nav-link { padding: 10px 10px; font-size: .92rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .today-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .hero-skyline { width: 1100px; max-width: none; left: 50%; transform: translateX(-57%); }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-grid, .split, .split-wide, .donate-panel { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar-info .hide-md { display: none; }
  .art-frame { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .hero-skyline { width: 760px; }
  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .today-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prayer-tile.is-next { transform: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name { font-size: 1.08rem; }
  .brand-sub { font-size: .68rem; }
  .topbar-info a:not(.next-pill) { display: none; }
  .topbar .container { justify-content: center; }
  .topbar .topbar-donate { display: none; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .prayer-widget { padding: 20px 16px; }
  .pw-list li { gap: 10px; padding: 9px 10px; }
  .program { grid-template-columns: 1fr; gap: 14px; }
  .event-card { gap: 16px; }
  .event-date { width: 64px; }
  .cta-band .btn { width: 100%; }
  .mobile-donate {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
    transform: translateY(140%); transition: transform .35s var(--ease);
  }
  .mobile-donate.show { transform: none; }
  .mobile-donate .btn { width: 100%; box-shadow: var(--shadow-lg); }
  .site-footer { padding-bottom: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .site-header, .site-footer, .mobile-donate, .drawer { display: none !important; }
  .hero, .page-hero { background: none; color: var(--ink); }
}
