/* Al-Fatih site. Layout: one centred column (max 1080px); green band hero, then alternating
   text + phone screenshot rows; plain reading column on privacy and support. */
:root {
  --bg: #F5F7F4;          /* page ground, faint green bias */
  --surface: #FFFFFF;
  --ink: #15211C;         /* body text */
  --muted: #45524C;       /* secondary text, 7:1 on --bg */
  --line: #D9E1DB;
  --green: #0F5C46;       /* brand */
  --green-ink: #FFFFFF;   /* text on green */
  --gold: #8A6516;        /* gold used as text: 5.4:1 on --bg */
  --bead: #D9A93E;        /* gold used as ornament only */
  --band: #0F5C46;        /* hero band */
  --band-ink: #FFFFFF;
  --band-muted: #CFE6DC;
  --f-ar: 'Amiri', 'Noto Naskh Arabic', serif;
  --f-body: 'Atkinson Hyperlegible', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1411; --surface: #121E19; --ink: #EEF3F0; --muted: #B7C4BD; --line: #26352E;
    --green: #3FB68B; --green-ink: #04140E; --gold: #F1C75B; --bead: #D9A93E;
    --band: #0F3D30; --band-ink: #FFFFFF; --band-muted: #CFE6DC; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1411; --surface: #121E19; --ink: #EEF3F0; --muted: #B7C4BD; --line: #26352E;
  --green: #3FB68B; --green-ink: #04140E; --gold: #F1C75B; --bead: #D9A93E;
  --band: #0F3D30; --band-ink: #FFFFFF; --band-muted: #CFE6DC; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 19px;           /* large by default: the app's readers have weak eyesight */
  line-height: 1.6;
}
a { color: var(--green); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.ar { font-family: var(--f-ar); direction: rtl; }

/* top bar */
.top { background: var(--band); color: var(--band-ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--band-ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.top nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.top nav a { color: var(--band-ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current="page"] { background: rgba(255,255,255,0.14); }
.lang { display: inline-flex; border: 2px solid rgba(255,255,255,0.5); border-radius: 12px; overflow: hidden; }
.lang button { background: transparent; color: var(--band-ink); border: 0; font: inherit; font-size: 0.9rem; font-weight: 700; padding: 6px 12px; min-height: 40px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--band-ink); color: var(--band); }

/* hero */
.hero { background: var(--band); color: var(--band-ink); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 40px 56px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.hero .ar-name { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--band-muted); line-height: 1.4; }
.hero .lead { font-size: 1.2rem; color: var(--band-muted); max-width: 34ch; margin-top: 14px; }
.hero .verse { margin-top: 26px; padding: 16px 18px; border: 2px solid rgba(255,255,255,0.22); border-radius: var(--radius); max-width: 30rem; }
.hero .verse .ar { font-size: 1.7rem; line-height: 1.9; color: var(--band-ink); }
.hero .verse p:last-child { color: var(--band-muted); font-size: 1rem; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 8px 18px; border-radius: 14px; background: var(--band-ink); color: #0F5C46; text-decoration: none; font-weight: 700; line-height: 1.2; }
.store small { font-weight: 400; font-size: 0.78rem; color: #45524C; }
.phone { justify-self: center; width: min(300px, 100%); aspect-ratio: 9 / 16; border-radius: 30px; border: 8px solid #0A2E24; overflow: hidden; background: #0A2E24; box-shadow: 0 18px 40px rgba(0,0,0,0.28); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* bead divider: 33 beads, the visual signature of the app's tasbih */
.beads { display: flex; justify-content: center; gap: 7px; padding-block: 26px; }
.beads span { width: 7px; height: 7px; border-radius: 50%; background: var(--bead); opacity: 0.8; }

/* feature rows */
.features { display: grid; gap: 56px; padding-block: 24px 40px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 40px; align-items: center; }
.row:nth-child(even) { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
.row:nth-child(even) .phone { order: -1; }
.row .phone { width: 100%; border-width: 6px; border-radius: 26px; box-shadow: 0 10px 28px rgba(0,0,0,0.16); }
.row .text { display: grid; gap: 12px; max-width: 36rem; }
.row .kicker { color: var(--gold); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }
.row ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* awrad list */
.awrad { padding-block: 8px 48px; display: grid; gap: 18px; }
.awrad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.wird { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px; }
.wird .ar { font-size: 1.6rem; color: var(--green); line-height: 1.5; text-align: right; }
.wird b { font-size: 1.05rem; }
.wird span { color: var(--muted); font-size: 0.95rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 3px solid var(--bead); background: var(--band); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; }
.gallery figcaption { padding: 12px 16px 16px; display: grid; gap: 2px; color: var(--band-ink); }
.gallery figcaption .ar { font-size: 1.4rem; color: var(--band-muted); text-align: right; line-height: 1.5; }
.gallery figcaption span:not(.ar) { color: var(--band-muted); font-size: 0.95rem; }

/* closing band */
.cta { background: var(--surface); border-top: 2px solid var(--line); }
.cta .wrap { padding-block: 40px; display: grid; gap: 14px; justify-items: start; }
.cta .stores .store { background: var(--green); color: var(--green-ink); }
.cta .stores .store small { color: var(--green-ink); opacity: 0.85; }

/* reading pages */
.doc { padding-block: 40px 64px; }
.doc .col { max-width: 44rem; display: grid; gap: 14px; }
.doc h1 { font-size: 2.2rem; color: var(--green); }
.doc h2 { font-size: 1.35rem; margin-top: 18px; color: var(--green); }
.doc .date { color: var(--muted); }
.doc ul, .doc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 4px 16px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 48px; }
.faq details > div { padding: 0 0 14px; display: grid; gap: 8px; }
.contact { background: var(--surface); border: 2px solid var(--green); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; }
.copy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.copy-row code { font-family: var(--f-body); font-size: 1.15rem; font-weight: 700; user-select: all; overflow-wrap: anywhere; }
.copy-row button { font: inherit; font-weight: 700; min-height: 44px; padding: 6px 14px; border-radius: 10px; border: 2px solid var(--green); background: transparent; color: var(--green); cursor: pointer; }

footer { border-top: 2px solid var(--line); }
footer .wrap { padding-block: 24px 32px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; color: var(--muted); font-size: 0.95rem; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* language switching: one block per language */
[data-lang-block] { display: none; }
html[lang="fr"] [data-lang-block="fr"], html[lang="en"] [data-lang-block="en"] { display: revert; }

@media (max-width: 760px) {
  body { font-size: 18px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 28px 40px; }
  .phone { width: min(260px, 100%); }
  .row, .row:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .row:nth-child(even) .phone { order: 0; }
  .row .phone { width: min(240px, 100%); justify-self: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .store, .top nav a { transition: background-color .15s ease, transform .15s ease; }
  .store:hover { transform: translateY(-1px); }
}
