/* Khatmati website: one stylesheet for every page. No JavaScript. */
:root {
  --bg: #F7F2E7;        /* page (Mushaf paper) */
  --card: #FFFFFF;      /* cards */
  --text: #1E2A28;      /* text */
  --muted: #5E6E6A;     /* secondary text */
  --line: #E4DAC4;      /* borders */
  --brand: #0F4C45;     /* ink green */
  --brand-2: #1B6B60;   /* gradient end */
  --light: #D4A54A;     /* musk gold */
  --on-brand: #D9E8E4;  /* text on green */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121816;
    --card: #1A2220;
    --text: #ECE6D8;
    --muted: #9DB0AB;
    --line: #2C3A36;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.9;
  direction: rtl;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* Top bar: fixed, see-through, blurred. */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.links { display: flex; gap: 4px; font-size: 15px; font-weight: 500; }
.links a {
  text-decoration: none;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 10px;
}
.links a:hover, .links a[aria-current] { color: var(--brand); background: color-mix(in srgb, var(--light) 18%, transparent); }
@media (prefers-color-scheme: dark) {
  .links a:hover, .links a[aria-current] { color: var(--light); }
}

/* Home hero: identity gradient, text on the right, phone on the left. */
.hero {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: 96px 20px 0;
  overflow: hidden;
}
.hero .in {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: end;
}
.hero .txt { padding-bottom: 64px; }
.hero .logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  display: block;
}
.hero h1 { font-size: 54px; line-height: 1.2; margin: 18px 0 4px; font-weight: 700; }
.hero .tag { color: var(--light); font-size: 22px; font-weight: 700; margin: 0; }
.hero .desc { color: var(--on-brand); max-width: 470px; margin: 10px 0 22px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  padding: 12px 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.phone {
  justify-self: center;
  width: 290px;
  border: 10px solid #000;
  border-bottom: 0;
  border-radius: 40px 40px 0 0;
  overflow: hidden;
  background: #000;
  line-height: 0;
}
.phone img { width: 100%; height: auto; display: block; }

/* Home body */
main.wrap { max-width: 1120px; margin: 0 auto; padding: 56px 20px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}
.feature .emoji { font-size: 30px; line-height: 1; }
.feature h3 { margin: 12px 0 2px; font-size: 19px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  justify-items: center;
}
.shots img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border: 8px solid #000;
  border-radius: 28px;
  display: block;
  background: #000;
}

/* Inner pages: gradient title, then 820px cards with numbered sections. */
.page-head {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  text-align: center;
  padding: 104px 20px 44px;
}
.page-head h1 { margin: 0; font-size: 38px; line-height: 1.3; font-weight: 700; }
.page-head p { margin: 6px 0 0; color: var(--on-brand); font-size: 15px; }
.page-head .tag { color: var(--light); font-weight: 700; }
.content { max-width: 820px; margin: 0 auto; padding: 32px 20px 48px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: var(--brand); }
@media (prefers-color-scheme: dark) { .card h2 { color: var(--light); } }
.card h2 .n {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-inline-end: 8px;
  border-radius: 50%;
  background: var(--light);
  color: var(--text);
  font-size: 15px;
  vertical-align: 2px;
}
@media (prefers-color-scheme: dark) { .card h2 .n { color: #121816; } }
.card p, .card li { margin: 0 0 6px; }
.card ul, .card ol { margin: 4px 0 0; padding-inline-start: 22px; }
.card ol { list-style-type: arabic-indic; }
.en .card ol { list-style-type: decimal; }
.card .muted, .muted { color: var(--muted); font-size: 15px; }
.lead { font-size: 18px; }
.en { direction: ltr; text-align: left; }
.en h2 .n { margin-inline-end: 8px; }
.button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 14px;
  padding: 10px 22px;
  margin-top: 8px;
}

/* 404 */
.notfound { text-align: center; padding-top: 12px; }
.notfound .big { font-size: 64px; line-height: 1; color: var(--light); font-weight: 700; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 22px 20px;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--brand); }

/* Phones: one column, hero centred. */
@media (max-width: 760px) {
  .links { display: none; }
  .hero .in { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .hero .txt { padding-bottom: 0; }
  .hero .logo { margin: 0 auto; }
  .hero .desc { margin-inline: auto; }
  .hero h1 { font-size: 44px; }
  .features, .shots { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 30px; }
  .card { padding: 18px; }
}

/* Group khatma page (/k/): 30 parts. */
.parts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 16px; }
.part {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 2px;
  background: var(--card);
  line-height: 1.4;
  min-width: 0;
}
.part b { display: block; font-size: 18px; }
.part span { display: block; font-size: 12px; color: var(--light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part.taken { background: color-mix(in srgb, var(--light) 20%, var(--card)); }
.part.taken span { color: var(--text); }
.part.done { background: var(--brand); color: #fff; border-color: var(--brand); }
.part.done span { color: var(--light); }
@media (max-width: 760px) { .parts { grid-template-columns: repeat(5, 1fr); } }
