/* Masjid Hub public site. Colours follow the app's theme
   (masjidhub-app src/theme/theme.ts): light by default, dark when the
   device prefers it. */
:root {
  --bg: #F7F5F0;
  --bg-alt: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F0EDE6;
  --primary: #0F6B42;
  --secondary: #087A55;
  --on-primary: #FFFFFF;
  --gold: #D7A43B;
  --gold-hi: #C68A1E;
  --text: #111827;
  --text-2: #4B5563;
  --muted: #667085;
  --border: #E5E1D8;
  --hero-bg: #0A3324;
  --hero-bg-2: #0F4A30;
  --hero-text: #F6EDDC;
  --hero-muted: #C9D6CD;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05), 0 8px 24px rgba(17, 24, 39, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B100D;
    --bg-alt: #020303;
    --surface: #161D19;
    --surface-alt: #212A24;
    --primary: #8BE85A;
    --secondary: #3B9F35;
    --on-primary: #0B100D;
    --gold: #D7A43B;
    --gold-hi: #FFC74C;
    --text: #FFFFFF;
    --text-2: #C8D0CB;
    --muted: #8E9993;
    --border: #3E4B43;
    --hero-bg: #06140E;
    --hero-bg-2: #0D2A1C;
    --shadow: none;
  }
}

/* Plus Jakarta Sans (SIL OFL 1.1), self-hosted so no third party sees visits */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--secondary); }
h1, h2, h3 { line-height: 1.2; font-weight: 700; text-wrap: balance; }
h1, h2 { letter-spacing: -0.02em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--surface-alt); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: .95rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-list { display: flex; }
.menu-list {
  display: none; flex-direction: column; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px; padding: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow);
}
.menu-list a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 10px; }
.menu-list a:hover { background: var(--surface-alt); }
@media (max-width: 760px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Hero */
.hero {
  background: radial-gradient(120% 90% at 70% 0%, var(--hero-bg-2) 0%, var(--hero-bg) 60%);
  color: var(--hero-text);
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 16px; color: #FFFFFF; }
.hero h1 span { color: var(--gold); }
.hero p.lead { font-size: 1.15rem; color: var(--hero-muted); margin: 0 0 28px; max-width: 34em; }
.hero-art { justify-self: center; width: min(340px, 80%); }
.hero-art img { border-radius: 22%; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); display: block; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; gap: 32px; }
  .hero-art { order: -1; width: 140px; justify-self: start; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; font-size: 1rem;
}
.btn-gold { background: var(--gold); color: #1B1405; }
.btn-gold:hover { background: #E4B34B; color: #1B1405; }
.btn-ghost { border-color: rgba(246, 237, 220, .35); color: var(--hero-text); }
.btn-ghost:hover { background: rgba(246, 237, 220, .08); color: #FFFFFF; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--secondary); color: var(--on-primary); }
.store-note { margin-top: 14px; font-size: .9rem; color: var(--hero-muted); }

/* Sections */
section.block { padding: 64px 0; }
section.block.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 8px; }
.section-head p { color: var(--text-2); margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (min-width: 900px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 12px 0 6px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-2); font-size: .97rem; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary);
}
.icon.gold { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold-hi); }
.icon svg { width: 24px; height: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.checklist li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .checklist li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B100D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
}
.cta {
  background: radial-gradient(120% 120% at 100% 0%, var(--hero-bg-2) 0%, var(--hero-bg) 70%);
  color: var(--hero-text); border-radius: 24px; padding: 40px 32px;
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.cta h2 { color: #FFFFFF; margin: 0 0 6px; font-size: 1.6rem; }
.cta p { margin: 0; color: var(--hero-muted); max-width: 36em; }

/* Long-form pages (privacy, terms, about, ...) */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.page-head .wrap { padding-top: 48px; padding-bottom: 32px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 6px; color: var(--primary); }
.page-head p { margin: 0; color: var(--muted); }
.prose { padding-top: 32px; padding-bottom: 64px; }
.prose h2 { color: var(--primary); font-size: 1.25rem; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: 4px 0; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-alt); color: var(--text); }
td { color: var(--text-2); }
.note {
  background: color-mix(in srgb, var(--gold) 14%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
  border-radius: 12px; padding: 14px 16px; color: var(--text); margin: 20px 0;
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 40px 0 32px; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer p { margin: 8px 0 0; color: var(--muted); max-width: 26em; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; align-content: start; }
.foot-links a { color: var(--text-2); text-decoration: none; }
.foot-links a:hover { color: var(--primary); }
.copy { width: 100%; color: var(--muted); font-size: .85rem; margin-top: 8px; }
