/* Noor — quiet, paper-like, liturgical. */

:root {
  --bg: #F8F6F1;            /* warm off-white, like soft paper */
  --surface: #FFFFFF;
  --text: #1F1F1F;
  --text-muted: #6B6B6B;
  --accent: #2A9B85;        /* NoorAccent (light) */
  --accent-faint: rgba(42, 155, 133, 0.35);
  --border: #E8E2D6;
  --radius: 12px;
  --max-w: 620px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0A;          /* near-black, matches app */
    --surface: #141414;
    --text: #ECEAE4;        /* warm cream, matches app */
    --text-muted: #8A867E;
    --accent: #4CB79E;      /* NoorAccent (dark) */
    --accent-faint: rgba(76, 183, 158, 0.4);
    --border: #1F1F1E;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 64px;
  width: 100%;
  flex: 1;
}

@media (min-width: 720px) {
  .site { padding: 64px 32px 96px; }
}

/* Header */

header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 56px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: "Iowan Old Style", "Charter", "Georgia", serif;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.brand:hover { color: var(--accent); }

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 22px;
  font-size: 15px;
  border-bottom: none;
}

nav a:hover { color: var(--accent); }

/* Typography */

h1 {
  font-family: "Iowan Old Style", "Charter", "Georgia", serif;
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 40px 0 8px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--text-muted);
}

p { margin: 0 0 18px; }

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 28px;
}

.subtitle {
  color: var(--text-muted);
  margin: 0 0 40px;
  font-size: 17px;
}

.meta {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 40px;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-faint);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}

a:hover { border-bottom-color: var(--accent); }

/* Lists */

ul {
  padding-left: 22px;
  margin: 0 0 18px;
}

ul li { margin-bottom: 8px; }

ul li::marker {
  color: var(--accent);
}

/* Bismillah — opening invocation at the top of the home page. */

.invocation {
  font-family: "Iowan Old Style", "Charter", "Georgia", serif;
  text-align: center;
  color: var(--accent);
  opacity: 0.9;
  margin: 8px 0 56px;
  font-size: 22px;
  direction: rtl;
  letter-spacing: 0.02em;
  font-feature-settings: "liga" on;
  line-height: 1.4;
}

@media (min-width: 720px) {
  .invocation {
    font-size: 24px;
    margin: 16px 0 64px;
  }
}

/* Colophon — small 8-pointed star seals the end of the home page. */
.colophon {
  text-align: center;
  color: var(--accent);
  font-size: 20px;
  margin: 64px 0 0;
  opacity: 0.55;
  line-height: 1;
}

/* Footer */

footer {
  max-width: var(--max-w);
  margin: 64px auto 0;
  padding: 28px 24px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--text-muted);
  border-bottom: none;
  margin: 0 10px;
}

footer a:hover { color: var(--accent); }

.fineprint {
  margin-top: 14px;
  opacity: 0.7;
}

/* Back link */

.back {
  display: inline-block;
  margin-top: 56px;
  font-size: 15px;
  color: var(--text-muted);
  border-bottom: none;
}

.back:hover { color: var(--accent); }

/* Section divider helper */

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