/* ─────────────────────────────────────────────────────────────────────────
   Bayt ul Uloom — baytululoom.org
   Modern, restrained: bold geometric sans, soft borders, Islamic geometry
   as quiet ornament. Founding-stage nonprofit site.
   ────────────────────────────────────────────────────────────────────── */

:root {
  /* Color */
  --ink: #0A0A0A;
  --ink-2: #1F1F1F;
  --bone: #FAF9F6;
  --bone-2: #F2F0EA;
  --line: #E5E2DA;
  --line-strong: #C8C5BC;
  --muted: #6B6B6B;

  --emerald: #0E5237;
  --emerald-2: #0A3D29;
  --emerald-soft: #E6EFEA;
  --emerald-tint: #F1F5F2;

  --brass: #B8893D;
  --brass-tint: #FAF3E6;

  /* Pinned tokens — for text on saturated/dark backgrounds */
  --bone-pinned: #FAF9F6;
  --ink-pinned: #0A0A0A;
  --emerald-pinned: #0E5237;
  --emerald-2-pinned: #0A3D29;

  /* Type */
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing (4px scale) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, svg { display: block; }
::selection { background: var(--ink); color: var(--bone); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

/* ── Top notice bar ──────────────────────────────────────────────────── */

.notice {
  background: var(--emerald-2);
  color: var(--bone-pinned);
}
.notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 10px var(--s-5);
}
.notice-inner svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--brass); }
.notice a { text-decoration: underline; text-decoration-color: rgba(250,249,246,0.4); }
.notice a:hover { text-decoration-color: var(--bone); }

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}
.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--emerald);
  flex-shrink: 0;
}
.brand-mark { letter-spacing: 0.01em; line-height: 1.1; }
.brand-mark small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: var(--s-6);
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.65;
  transition: opacity 0.15s;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; }
.nav-links a.active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  background: var(--ink);
  border-radius: 1px;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 9px 16px;
  background: var(--emerald);
  color: var(--bone-pinned) !important;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  opacity: 1 !important;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--emerald-2); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 13px 22px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  font-family: var(--sans);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; }

.btn--primary {
  background: var(--emerald);
  color: var(--bone-pinned);
  border-color: var(--emerald);
}
.btn--primary:hover { background: var(--emerald-2); border-color: var(--emerald-2); }

.btn--ghost-dark {
  background: transparent;
  color: var(--bone-pinned);
  border-color: rgba(250,249,246,0.3);
}
.btn--ghost-dark:hover { background: rgba(250,249,246,0.08); border-color: rgba(250,249,246,0.5); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--brass {
  background: var(--brass);
  color: var(--bone-pinned);
  border-color: var(--brass);
}
.btn--brass:hover { background: #a37a35; border-color: #a37a35; }

.btn--lg { padding: 15px 28px; font-size: 15px; }
.btn--block { width: 100%; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,0.06), transparent 55%),
    linear-gradient(165deg, var(--emerald-pinned) 0%, var(--emerald-2-pinned) 100%);
  color: var(--bone-pinned);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-ornament {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  opacity: 0.08;
  z-index: 0;
  color: var(--bone-pinned);
  pointer-events: none;
}
.hero-ornament--2 {
  position: absolute;
  left: -100px;
  bottom: -140px;
  width: 320px;
  height: 320px;
  opacity: 0.06;
  z-index: 0;
  color: var(--brass);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: var(--s-9);
  padding-bottom: var(--s-8);
  max-width: 720px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(250,249,246,0.7);
  margin-bottom: var(--s-5);
  padding: 6px 12px;
  border: 1px solid rgba(250,249,246,0.18);
  border-radius: 100px;
}
.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
}
.hero-arabic {
  font-size: 22px;
  font-weight: 500;
  color: var(--brass);
  margin-bottom: var(--s-3);
  letter-spacing: 0;
}
.hero h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--s-5);
}
.hero p.lead {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(250,249,246,0.8);
  max-width: 560px;
  margin-bottom: var(--s-6);
}
.hero-actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

/* ── Sections ────────────────────────────────────────────────────────── */

main { display: block; }

.section {
  padding: var(--s-9) 0;
}
.section--tight { padding: var(--s-8) 0; }
.section--tinted { background: var(--emerald-tint); }
.section--dark {
  background: linear-gradient(165deg, var(--emerald-pinned) 0%, var(--emerald-2-pinned) 100%);
  color: var(--bone-pinned);
}
.section--bordered { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--s-7);
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--emerald);
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.section--dark .eyebrow { color: var(--brass); }

.section-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.section-title--sm { font-size: 26px; }

.section-sub {
  font-size: 16px;
  color: var(--muted);
  margin-top: var(--s-4);
  line-height: 1.65;
}
.section--dark .section-sub { color: rgba(250,249,246,0.75); }

.lede {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 720px;
}
.lede + .lede { margin-top: var(--s-4); }

/* ── Grids & cards ───────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: var(--s-5);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bone);
  padding: var(--s-6);
}
.card--tinted { background: var(--bone-2); }

.pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-4);
  background: var(--emerald-soft);
  color: var(--emerald);
}
.pillar-icon svg { width: 20px; height: 20px; }
.pillar-icon--brass { background: var(--brass-tint); color: var(--brass); }

.card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-2);
}
.card p { color: var(--muted); font-size: 14px; line-height: 1.65; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 100px;
  font-weight: 600;
  line-height: 1.4;
}
.badge--emerald { background: var(--emerald-soft); color: var(--emerald-2); }
.badge--brass { background: var(--brass-tint); color: #8a6526; }
.badge--ghost { border: 1px solid var(--line-strong); color: var(--muted); }

/* ── Timeline / journey ──────────────────────────────────────────────── */

.timeline {
  list-style: none;
  border-left: 2px solid var(--line);
  margin-left: 10px;
}
.timeline > li {
  position: relative;
  padding: 0 0 var(--s-7) var(--s-6);
}
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bone);
  border: 2px solid var(--line-strong);
}
.timeline > li.is-active::before {
  border-color: var(--emerald);
  background: var(--emerald);
}
.timeline-phase {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: var(--s-2);
}
.timeline > li.is-active .timeline-phase { color: var(--emerald); font-weight: 600; }
.timeline h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-2);
}
.timeline p { color: var(--muted); font-size: 15px; max-width: 580px; }

/* ── Stats strip ─────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  text-align: center;
}
.stat-value {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--emerald-pinned);
}
.section--dark .stat-value { color: var(--bone-pinned); }
.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--s-2);
}
.section--dark .stat-label { color: rgba(250,249,246,0.65); }

/* ── Forms ───────────────────────────────────────────────────────────── */

.field { margin-bottom: var(--s-4); }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--s-2);
  letter-spacing: -0.01em;
}
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--emerald);
}
.textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }

.form-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--s-3);
}

/* ── Quote / pull ────────────────────────────────────────────────────── */

.quote {
  border-left: 3px solid var(--brass);
  padding-left: var(--s-5);
}
.quote-text {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.5;
  font-style: normal;
}
.quote-source {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: var(--s-3);
}

/* ── List with icons (checkmarks etc) ───────────────────────────────── */

.check-list { list-style: none; }
.check-list > li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  font-size: 15px;
}
.check-list svg {
  width: 18px; height: 18px;
  color: var(--emerald);
  flex-shrink: 0;
  margin-top: 2px;
}
.section--dark .check-list svg { color: var(--brass); }

/* ── Divider ─────────────────────────────────────────────────────────── */

.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ── CTA band ────────────────────────────────────────────────────────── */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.cta-band h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.cta-band p { color: var(--muted); margin-top: var(--s-2); max-width: 460px; }
.section--dark .cta-band p { color: rgba(250,249,246,0.75); }

/* ── Footer ──────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  background: var(--bone-2);
}
.footer-inner {
  padding-top: var(--s-7);
  padding-bottom: var(--s-6);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-6);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: var(--s-3);
}
.footer-brand svg { width: 22px; height: 22px; color: var(--emerald); }
.footer-tagline { font-size: 13px; color: var(--muted); max-width: 260px; line-height: 1.6; }
.footer-heading {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--s-4);
}
.footer-links { list-style: none; font-size: 14px; }
.footer-links li { margin-bottom: var(--s-2); }
.footer-links a { text-decoration: none; color: var(--ink); opacity: 0.75; }
.footer-links a:hover { opacity: 1; color: var(--emerald); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  font-size: 12px;
  color: var(--muted);
}
.footer-social {
  display: flex;
  gap: var(--s-3);
}
.footer-social a {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.footer-social a:hover { border-color: var(--emerald); color: var(--emerald); }
.footer-social svg { width: 14px; height: 14px; }

/* ── Page header (non-home pages) ───────────────────────────────────── */

.page-header {
  padding: var(--s-8) 0 var(--s-7);
  border-bottom: 1px solid var(--line);
  background: var(--emerald-tint);
}
.page-header .eyebrow { margin-bottom: var(--s-3); }
.page-header h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  max-width: 760px;
}
.page-header p {
  font-size: 17px;
  color: var(--muted);
  margin-top: var(--s-4);
  max-width: 640px;
  line-height: 1.65;
}

/* ── Utilities ───────────────────────────────────────────────────────── */

.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }
.mb-6 { margin-bottom: var(--s-6); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
  .hero h1 { font-size: 42px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
  .section-title { font-size: 28px; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s-5);
    gap: var(--s-4);
    z-index: 30;
  }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: var(--s-6); }
  .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero p.lead { font-size: 16px; }
  .section-title { font-size: 24px; }
  .page-header h1 { font-size: 30px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .hero-inner { padding-top: var(--s-7); padding-bottom: var(--s-6); }
  .stats { grid-template-columns: 1fr 1fr; }
}
