/* Appraar — mushaf green, gilt frame, clean page */
:root {
  --green: #123F36;
  --green-2: #1D5A4C;
  --gilt: #A9822F;
  --gilt-soft: #E9DDBF;
  --page: #FFFFFF;
  --panel: #F2F5F3;
  --ink: #17221F;
  --muted: #56645F;
  --line: #D9E1DD;
  --radius-frame: 4px;
  --measure: 68ch;
  --ar-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --ar-display: "Amiri", "Traditional Arabic", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--ar-body);
  font-size: 17px;
  line-height: 1.75;
}
html[lang="en"] body { line-height: 1.6; }

a { color: var(--green-2); text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--gilt); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* Header */
.site-header { background: var(--green); color: #fff; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border: 2px solid var(--gilt); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--ar-display); font-size: 20px; line-height: 1;
  color: var(--gilt-soft);
}
.brand-name { font-weight: 600; font-size: 19px; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.site-nav a { color: #DCE8E3; text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--gilt); }
.lang-switch {
  border: 1px solid rgba(255,255,255,.45); padding: 3px 12px; border-radius: 999px;
}

/* Hero */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.25; margin: 0 0 18px; color: var(--green); font-weight: 700; }
html[lang="en"] .hero h1 { line-height: 1.15; letter-spacing: -0.01em; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 46ch; }
.status { display: flex; gap: 12px; flex-wrap: wrap; }
.pill {
  display: inline-block; padding: 10px 18px; border-radius: 999px; font-size: 15px;
  background: var(--panel); color: var(--green); border: 1px solid var(--line);
}
.pill.primary { background: var(--green); color: #fff; border-color: var(--green); text-decoration: none; }
.pill.primary:hover { background: var(--green-2); color: #fff; }

/* The memorable thing: a mushaf page frame */
.mushaf {
  position: relative; aspect-ratio: 3 / 4; max-width: 400px; margin-inline: auto; width: 100%;
  background: #FFFEFA; border: 2px solid var(--gilt); border-radius: var(--radius-frame);
  padding: 14px; box-shadow: 0 18px 40px -24px rgba(18,63,54,.55);
}
.mushaf-inner {
  height: 100%; border: 1px solid var(--gilt); outline: 6px double var(--gilt-soft); outline-offset: -12px;
  display: grid; grid-template-rows: auto 1fr auto; padding: 26px 22px; text-align: center;
}
.mushaf .sura {
  font-family: var(--ar-display); color: var(--green); font-size: 20px;
  border: 1px solid var(--gilt); border-radius: 999px; padding: 4px 18px; justify-self: center; background: #fff;
}
.mushaf .basmala {
  align-self: center; font-family: var(--ar-display); font-size: clamp(26px, 3.4vw, 36px);
  line-height: 2; color: var(--ink); direction: rtl;
}
.mushaf .page-no { font-family: var(--ar-display); color: var(--gilt); font-size: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .mushaf { animation: settle .9s ease-out both; }
  @keyframes settle { from { opacity: 0; transform: translateY(10px) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
}

/* Features */
.section { padding: 64px 0; }
.section h2 { font-size: 28px; color: var(--green); margin: 0 0 8px; }
.section .intro { color: var(--muted); margin: 0 0 32px; max-width: var(--measure); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.feature { padding: 24px 0 26px; border-bottom: 1px solid var(--line); padding-inline-end: 28px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Ask feature highlight */
.ask { background: var(--panel); }
.ask .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.ask-steps { margin: 0; padding-inline-start: 22px; }
.ask-steps li { margin-bottom: 10px; }
.ask-steps li::marker { color: var(--gilt); font-weight: 700; }
.notice {
  border-inline-start: 4px solid var(--gilt); background: #fff; padding: 16px 20px; margin-top: 8px;
  border-radius: 0 6px 6px 0; color: var(--ink);
}
html[dir="rtl"] .notice { border-radius: 6px 0 0 6px; }

/* Document pages */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: calc(var(--measure) + 40px); }
.doc h1 { color: var(--green); font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 6px; line-height: 1.3; }
.doc .updated { color: var(--muted); margin: 0 0 32px; font-size: 15px; }
.doc h2 { font-size: 21px; color: var(--green); margin: 36px 0 8px; }
.doc p, .doc li { max-width: var(--measure); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { border-collapse: collapse; width: 100%; margin: 12px 0 8px; font-size: 15.5px; }
.doc th, .doc td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--green); font-weight: 600; background: var(--panel); }
.mail { font-weight: 600; }

/* Footer */
.site-footer { background: var(--green); color: #C9D9D3; padding: 36px 0; font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #fff; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero .wrap, .ask .wrap { grid-template-columns: 1fr; gap: 36px; }
  .features { grid-template-columns: 1fr 1fr; }
  .mushaf { max-width: 300px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .hero { padding: 40px 0; }
}
