/* ============================================================
   Muslim Curatory — House Stylesheet
   Derived from the Muslim Curatory House Design System.
   Typeface: Cardo (house body face)
   Ink: #1A1A18   Muted: #5A5A56
   No drop caps. No ornaments. Restraint is the design.
   ============================================================ */

:root {
  --ink: #1A1A18;          /* house body colour */
  --ink-body: #1A1A18;
  --muted: #5A5A56;        /* house muted */
  --rule: #E4E1DA;
  --paper: #FFFFFF;        /* white ground */
  --paper-raised: #F7F5F1;
  --accent: #8A6A2F;       /* warm ochre — the cover's amber, darkened for screen legibility */
  --accent-soft: #B8934A;  /* lighter ochre for rules and small marks */
  --paper-tint: #FBF8F2;   /* very faint warm ground for raised blocks */
  --measure: 34rem;          /* ~66 characters at 19px */
  --serif: "Cardo", "Liberation Serif", Georgia, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--serif);
  font-size: 1.1875rem;      /* 19px */
  line-height: 1.65;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Structure ---------- */

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow { max-width: var(--measure); }

main { padding: 3.5rem 0 5rem; }

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 2px solid var(--accent-soft);
  padding: 1.75rem 0 1.5rem;
}

.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 0.9375rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  font-weight: 400;
}

.wordmark span { white-space: nowrap; }

.wordmark:hover { color: var(--muted); }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

nav a:hover { color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Typography ---------- */

h1, h2, h3 { font-weight: 400; line-height: 1.25; }

h1 {
  font-size: 2.5rem;
  margin: 0 0 1.25rem;
  letter-spacing: 0.005em;
}

h2 {
  font-size: 1.5rem;
  margin: 3rem 0 1rem;
  padding-top: 1.25rem;
  position: relative;
}

h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.25rem;
  height: 2px;
  background: var(--accent-soft);
}

h3 {
  font-size: 1.125rem;
  margin: 2rem 0 0.5rem;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1.35rem; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--muted); }

.muted { color: var(--muted); }

.lede {
  font-size: 1.375rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.04em;
  background: transparent;
}

.button:hover { background: var(--ink); color: var(--paper); }

.button.secondary { border-color: var(--rule); color: var(--muted); }
.button.secondary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 0; }

/* ---------- Home hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  padding: 1rem 0 1rem;
}

.hero h1 { font-size: 2.875rem; }

@media (max-width: 48rem) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero h1 { font-size: 2.125rem; }
  h1 { font-size: 2rem; }
}

/* ---------- Cover ---------- */

.cover {
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  display: block;
}

.cover-frame {
  background: var(--paper-tint);
  border: 1px solid var(--rule);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 26rem;
}

.cover-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.cover-placeholder strong {
  display: block;
  color: var(--ink);
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

/* ---------- Book entry (Catalog) ---------- */

.book {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--rule);
}

@media (max-width: 48rem) {
  .book { grid-template-columns: 1fr; gap: 2rem; }
}

.book-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 1.5rem;
  line-height: 1.7;
}

.book-meta dt { letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.75rem; }
.book-meta dd { margin: 0 0 0.75rem; }

/* ---------- Praise ---------- */

blockquote {
  margin: 1.75rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  font-size: 1.0625rem;
  color: var(--ink);
}

blockquote cite {
  display: block;
  margin-top: 0.6rem;
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- Forms ---------- */

form { margin-top: 1.5rem; }

.field { margin-bottom: 1.5rem; }

label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule);
  background: #fff;
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
  font-variant-numeric: oldstyle-nums proportional-nums;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

textarea { min-height: 9rem; resize: vertical; }

.hint { font-size: 0.9375rem; color: var(--muted); margin-top: 0.4rem; }

button[type="submit"] {
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink-body);
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

button[type="submit"]:hover { background: var(--ink); color: var(--paper); }

/* ---------- Quiet signup (never a gate) ---------- */

.signup-quiet {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem 0;
  margin: 3rem 0;
}

.signup-quiet p { margin: 0 0 1rem; font-size: 1.0625rem; }

.signup-inline { display: flex; gap: 0.6rem; flex-wrap: wrap; max-width: 30rem; }
.signup-inline input { flex: 1 1 14rem; }

/* ---------- Excerpt ---------- */

.excerpt p { margin-bottom: 0; text-indent: 1.4rem; }
.excerpt p:first-of-type { text-indent: 0; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-tint);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

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

footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }



/* ============================================================
   Arabic — Qur'anic blocks
   English prose carries a first-line indent. Arabic never does.
   ============================================================ */

.ayah-block {
  direction: rtl;
  text-align: right;
  text-indent: 0;
  margin: 2.75rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
}

.ayah {
  direction: rtl;
  text-align: right;
  text-indent: 0;
  font-size: 1.5rem;
  line-height: 2.4;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: "Scheherazade New", "KFGQPC Uthmanic Script HAFS",
               "Amiri", "Noto Naskh Arabic", serif;
}

.ayah-ref {
  direction: rtl;
  text-align: right;
  text-indent: 0;
  font-size: 0.9375rem;
  color: var(--accent);
  margin: 0.5rem 0 0;
  padding: 0;
  font-family: "Scheherazade New", "KFGQPC Uthmanic Script HAFS",
               "Amiri", "Noto Naskh Arabic", serif;
}

/* The English rendering: bold, one point smaller than body, so it
   reads as a quotation rather than as competing with the Arabic. */
.ayah-translation {
  text-indent: 0;
  font-size: 1.0625rem;      /* one point below the 1.1875rem body */
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
  margin: 1.5rem 0 2.75rem;
}

.ayah-cite {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.excerpt .ayah-block p,
.excerpt .ayah-translation { text-indent: 0; }
