/* MasjidGo — shared styles
   Palette: deep teal + gold on warm paper. No large dark blocks. */

:root {
  --paper:      #FBFAF7;
  --sand:       #F1EDE4;
  --ink:        #23312F;
  --ink-soft:   #5A6B68;
  --teal:       #00695C;
  --teal-deep:  #004D40;
  --gold:       #C98A00;
  --gold-soft:  #F5E4B8;
  --rule:       #DFDACE;
  --action:     #C0392B;

  --wrap: 68rem;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-top: 0; }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-deep); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }

/* ── Header ─────────────────────────────────────────────── */
.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.head-row {
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem 0;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700; font-size: 1.22rem;
  color: var(--teal-deep); text-decoration: none;
  letter-spacing: -0.02em;
}
.brand svg { flex: none; }
.site-nav { margin-left: auto; display: flex; gap: 1.35rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.site-nav a:hover { color: var(--teal); text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--action); color: #fff;
  padding: .72rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  border: none;
}
.btn:hover { background: #A93226; color: #fff; }
.btn-quiet {
  background: transparent; color: var(--teal-deep);
  border: 1.5px solid var(--teal); padding: .68rem 1.3rem;
}
.btn-quiet:hover { background: rgba(0,105,92,.07); color: var(--teal-deep); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 3rem 0 2.2rem; }
.hero p.lead {
  font-size: 1.16rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 1.5rem;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .88rem; color: var(--ink-soft); margin: .9rem 0 0; }

/* ── Prayer band ────────────────────────────────────────── */
.band {
  margin-top: 2.4rem;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--sand);
  overflow: hidden;
}
.band-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--rule);
  font-size: .9rem; color: var(--ink-soft);
  flex-wrap: wrap;
}
.band-head strong { color: var(--teal-deep); font-weight: 600; }
.prayers { display: grid; grid-template-columns: repeat(5, 1fr); }
.prayer {
  padding: 1rem .6rem 1.1rem;
  text-align: center;
  border-right: 1px solid var(--rule);
}
.prayer:last-child { border-right: none; }
.prayer .ar {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.15rem; color: var(--teal); display: block; margin-bottom: .3rem;
}
.prayer .nm { font-weight: 600; font-size: .97rem; display: block; }
.prayer .tm { font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.prayer[data-now="true"] {
  background: #fff;
  box-shadow: inset 0 -3px 0 var(--gold);
}
.prayer[data-now="true"] .nm { color: var(--teal-deep); }

/* ── Sections ───────────────────────────────────────────── */
section { padding: 2.6rem 0; }
section + section { border-top: 1px solid var(--rule); }
.sec-intro { max-width: 52ch; margin-bottom: 1.8rem; }
.sec-intro p { color: var(--ink-soft); margin-bottom: 0; }

/* ── Feature list ───────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.6rem 2rem; }
.feat h3 { margin-bottom: .3rem; color: var(--teal-deep); }
.feat p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.feat { border-top: 2px solid var(--gold-soft); padding-top: .8rem; }

/* ── Languages ──────────────────────────────────────────── */
.langs { display: flex; flex-wrap: wrap; gap: .55rem; }
.lang {
  border: 1px solid var(--rule); background: #fff;
  border-radius: 999px; padding: .42rem 1rem;
  font-size: 1rem; color: var(--ink);
}
.lang span { color: var(--ink-soft); font-size: .82rem; margin-left: .4rem; }

/* ── Sadaqah note ───────────────────────────────────────── */
.note {
  background: var(--sand); border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.note p:last-child { margin-bottom: 0; }
.note .ar {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.3rem; color: var(--teal-deep); line-height: 2;
  margin-bottom: .4rem;
}

/* ── Legal pages ────────────────────────────────────────── */
.legal { padding: 2.4rem 0 3rem; }
.legal .meta {
  font-size: .92rem; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 1.8rem;
}
.legal h2 {
  font-size: 1.32rem; margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal h3 { margin-top: 1.4rem; color: var(--teal-deep); }
.legal ul { max-width: 68ch; padding-left: 1.2rem; }
.legal li { margin-bottom: .55rem; }
.legal table {
  border-collapse: collapse; width: 100%; margin: 1rem 0 1.4rem; font-size: .95rem;
}
.legal th, .legal td {
  border: 1px solid var(--rule); padding: .62rem .8rem; text-align: left; vertical-align: top;
}
.legal th { background: var(--sand); font-weight: 600; }
.toc {
  background: var(--sand); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem 1.3rem; margin-bottom: 2rem;
}
.toc ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .25rem; }

/* ── Footer ─────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--sand);
  padding: 2rem 0 2.4rem;
  font-size: .93rem;
}
.foot-grid { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: space-between; }
.foot-grid p { color: var(--ink-soft); margin-bottom: .4rem; }
.foot-links { display: flex; flex-direction: column; gap: .4rem; }
.foot-bottom {
  margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--ink-soft); font-size: .88rem;
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .prayers { grid-template-columns: repeat(3, 1fr); }
  .prayer:nth-child(3) { border-right: none; }
  .prayer:nth-child(n+4) { border-top: 1px solid var(--rule); }
  section { padding: 2.1rem 0; }
  .site-nav { gap: 1rem; width: 100%; margin-left: 0; }
}

/* ── Skip link ──────────────────────────────────────────── */
.skip {
  position: absolute; left: -9999px;
  background: var(--teal-deep); color: #fff;
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0;
  z-index: 100; text-decoration: none; font-weight: 600;
}
.skip:focus {
  left: 0; top: 0; color: #fff;
}

/* ── Story ──────────────────────────────────────────────── */
.story {
  display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr);
  gap: 2.2rem; align-items: start; margin-bottom: 1.8rem;
}
.story-text p:last-child { margin-bottom: 0; }
.card {
  background: #fff; border: 1px solid var(--rule);
  border-top: 3px solid var(--teal);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
}
.card h3 { margin-bottom: .6rem; color: var(--teal-deep); }
.card-note { font-size: .92rem; color: var(--ink-soft); margin-bottom: .8rem; }
.people { list-style: none; margin: 0 0 1rem; padding: 0; }
.people li {
  padding: .38rem 0; border-bottom: 1px solid var(--rule);
  font-weight: 500; font-size: 1rem;
}
.people li:last-child { border-bottom: none; }
.verified {
  border-top: 1px solid var(--rule); padding-top: .8rem; margin-bottom: 0;
}
.verified strong { color: var(--ink); }

@media (max-width: 720px) {
  .story { grid-template-columns: 1fr; gap: 1.4rem; }
}
