/* surah.ly — one stylesheet for every page. Fonts: /fonts/fonts.css (self-hosted). */

:root {
  --emerald: #0F3D2E;
  --emerald-deep: #0B3024;
  --gold: #C9A96A;
  --ivory: #F4EDDC;
  --muted: #CFC3A6;
  --rule: rgba(201, 169, 106, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--emerald);
  color: var(--ivory);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Font by language, everywhere (sections, footer, inline spans). */
[lang='ar'] {
  font-family: 'Noto Naskh Arabic', serif;
}

[lang='en'] {
  font-family: 'Source Serif 4', Georgia, serif;
}

/* An English name inside Arabic text (e.g. Moad LLC) stays on one line. */
[lang='ar'] span[lang='en'] {
  unicode-bidi: isolate;
  white-space: nowrap;
}

a {
  color: var(--gold);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--ivory);
}

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

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* header */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.wordmark {
  font-family: 'Amiri Quran', serif;
  font-size: 2.25rem;
  line-height: 1.6;
  color: var(--gold);
  text-decoration: none;
}

.site-header .tagline {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* bilingual sections: Arabic first, then English */
main {
  padding: 2rem 0 3rem;
}

section[lang='ar'] {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.125rem;
  line-height: 1.95;
  text-align: right;
}

section[lang='en'] {
  text-align: left;
}

section + section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

h1,
h2 {
  color: var(--gold);
  line-height: 1.35;
}

h1 {
  font-size: 1.6rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
}

section[lang='ar'] h1,
section[lang='ar'] h2 {
  font-weight: 600;
  line-height: 1.7;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-inline-start: 1.25rem;
}

li + li {
  margin-top: 0.4rem;
}

.cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--gold);
  border-radius: 4px;
  text-decoration: none;
}

.email {
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--emerald-deep);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.site-footer nav li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* Initiative line (text only) above the footer links. */
.initiative {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.initiative-text p {
  margin: 0;
  color: var(--ivory);
}

.initiative-text p + p {
  margin-top: 0.2rem;
  color: var(--gold);
}

/* Home page: "About the initiative" panel — parchment card palette.
   The WICS logo is shown in its own colours (never recoloured or filtered). */
.panel {
  margin-top: 2.5rem;
  padding: 2rem 1.25rem;
  border-radius: 8px;
  background: #F4EDDC;
  color: #0F3D2E;
  text-align: center;
}

section + section.panel {
  border-top: 0;
}

.panel-logo {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto;
}

.panel-rule {
  width: 72px;
  height: 2px;
  margin: 1.25rem auto 1.5rem;
  background: #A8823E;
}

.panel h2 {
  margin: 0 0 0.5rem;
  color: #0F3D2E;
}

.panel p {
  margin: 0;
}

.panel [lang='ar'] {
  font-size: 1.125rem;
  line-height: 1.95;
}

.panel [lang='ar'] + [lang='en'] {
  margin-top: 1.5rem;
}

@media (min-width: 40rem) {
  .panel {
    padding: 2.5rem 2.5rem;
  }

  .panel-logo {
    width: 200px;
  }
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 1.5rem;
  }

  main {
    padding: 3rem 0 4rem;
  }

  h1 {
    font-size: 1.9rem;
  }
}
