/*
 * أبيات (Abyat): the small static site (le3batna.github.io/abyat/): the landing, privacy and
 * support pages. The profile viewer in p/ has its own stylesheet. The same look as the app and the
 * viewer: ink on paper, white cards, hairlines, one teal accent. No cookies, no scripts, no outside
 * fonts: Tajawal, Amiri and Aref Ruqaa (SIL OFL 1.1, fonts/OFL-*.txt) are served from here.
 */

@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Tajawal"; src: url("fonts/Tajawal-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("fonts/Amiri-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aref Ruqaa"; src: url("fonts/ArefRuqaa-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --paper: #f6f4ef;
  --card: #ffffff;
  --ink: #141414;
  --muted: #6b6b66;
  --hair: #dedbd3;
  --teal: #0f766e;
  --teal-bright: #5eead4;
  --tint: #e7f3f1;
  --verse: "Amiri", "Times New Roman", serif;
  --ruqaa: "Aref Ruqaa", "Amiri", serif;
  --ui: "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.75 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--teal); color: #fff; }

a { color: var(--teal); font-weight: 700; text-decoration-thickness: 1.5px; text-underline-offset: 4px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 0.45em; font-weight: 700; }
p { margin: 0 0 0.85em; }
b, strong { font-weight: 700; }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 18px; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -80px; z-index: 10;
  padding: 6px 14px; background: var(--ink); color: #fff; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ header & footer */

.top { padding: 18px 0 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand b { font: 400 26px/1.1 var(--ruqaa); }
.brand small { font-size: 14px; color: var(--muted); font-weight: 400; }

main { padding-bottom: 28px; }

.foot { border-top: 1px solid var(--hair); padding: 20px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 15px; }
.foot p { margin: 0.4em 0 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.foot-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--card); border: 1px solid var(--hair); border-radius: 999px;
  color: var(--ink); text-decoration: none;
}
.foot-nav a:hover { border-color: var(--teal); color: var(--teal); }
.foot .small { font-size: 14px; }

/* ------------------------------------------------------------ landing */

.hero { text-align: center; padding: 40px 0 8px; }
.hero img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 30px rgba(20, 20, 20, 0.18); }
.hero h1 { font: 400 56px/1.2 var(--ruqaa); margin: 18px 0 2px; }
.hero .en-name { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.hero .line { font-size: 19px; max-width: 30em; margin: 0 auto 6px; }
.hero .line-en { color: var(--muted); font-size: 16px; max-width: 32em; margin: 0 auto 22px; }

.verse-card {
  margin: 22px auto 26px; max-width: 520px; padding: 22px 20px 16px;
  background: var(--card); border: 1px solid var(--hair); border-radius: 18px; text-align: center;
}
.verse-card .h { font: 400 25px/1.9 var(--verse); margin: 0; }
.verse-card .h + .h { margin-top: 2px; }
.verse-card .by { color: var(--muted); font-size: 15px; margin: 12px 0 0; }

.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 14px;
  background: var(--ink); color: #fff; text-decoration: none; font-size: 17px; font-weight: 700;
}
.store svg { width: 20px; height: 20px; fill: currentColor; }
.store:hover { background: var(--teal); }

.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; text-align: start; }
.features li { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 12px 16px; }
.features b { display: block; }
.features span { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------ documents */

.doc { overflow-wrap: break-word; margin: 18px 0 8px; padding: 24px 20px 14px; background: var(--card); border: 1px solid var(--hair); border-radius: 18px; }
.doc h1 { font-size: 30px; margin: 0 0 4px; }
.doc h2 { font-size: 20px; margin: 1.6em 0 0.4em; padding-top: 0.2em; }
.doc h2::before { content: ""; display: inline-block; width: 10px; height: 4px; border-radius: 2px; background: var(--teal); margin-inline-end: 8px; vertical-align: middle; }
.doc ul, .doc ol { padding-inline-start: 1.3em; margin: 0 0 1em; }
.doc li { margin: 0 0 0.45em; }
.doc li::marker { color: var(--teal); }
.doc .meta { color: var(--muted); font-size: 15px; }
.doc .note-tr { color: var(--muted); font-size: 15px; font-style: italic; }
.lang-switch { margin: 0; font-size: 15px; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 44px; }
.summary { margin: 18px 0 8px; padding: 14px 16px 4px; background: var(--tint); border-radius: 14px; border-inline-start: 4px solid var(--teal); }
.summary h2 { margin: 0 0 6px; font-size: 19px; }
.summary h2::before { display: none; }
.doc-en { margin-top: 26px; font-size: 16px; line-height: 1.7; }
.doc-en h1 { font-size: 28px; }

@media (min-width: 700px) {
  .hero { padding-top: 56px; }
  .features { grid-template-columns: 1fr 1fr; }
  .doc { padding: 30px 30px 18px; }
}
