/* The public website (F-062): one column to read, in the apps' first draft of colours (design/README.md, Q-047).
   The Arabic is real text in Amiri Quran, from design/fonts/ (copied in by build.sh). */
@font-face {
  font-family: "Amiri Quran";
  src: url("/fonts/amiri_quran.ttf") format("truetype");
  font-display: swap;
}

:root {
  --background: #f7f1e6;
  --surface: #fffbf4;
  --text: #2b2119;
  --muted-text: #6b5d50;
  --accent: #b4532a;
  --line: #e4d8c6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --arabic: "Amiri Quran", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #1e1914;
    --surface: #2a231c;
    --text: #f3eadf;
    --muted-text: #b8a999;
    --accent: #e38a5c;
    --line: #3d342b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page { max-width: 40rem; margin: 0 auto; padding: 0 1rem 4rem; }

/* the top: the name, and the few pages */
.top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.25rem;
  padding: 1.5rem 0 0;
}
.name { font-size: 1.375rem; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.name b { font-weight: 700; }
.name span { font-weight: 400; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 1rem; }
.top nav a { color: var(--muted-text); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }

/* the opening: an ayah word by word, the brushstroke under one word at a time */
.ayah {
  margin: 3.5rem 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.6rem;
  direction: rtl;
}
.ayah button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center;
}
.ayah .ar {
  font-family: var(--arabic); font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 2;
  border-bottom: 5px solid transparent; border-radius: 3px; padding: 0 0.15em 0.3em;
  transition: border-color 600ms ease;
}
.ayah .mean { direction: ltr; font-size: 0.95rem; color: var(--muted-text); margin-top: 0.55rem; }
.ayah .marked .ar { border-bottom-color: var(--accent); }
.ayah .marked .mean { color: var(--text); }
.ref { text-align: center; font-size: 0.875rem; color: var(--muted-text); margin: 0.75rem 0 0; }

h1 {
  font-size: clamp(2.1rem, 6.4vw, 3.1rem); line-height: 1.12; font-weight: 400; letter-spacing: -0.01em;
  margin: 3rem 0 1.25rem;
  text-wrap: balance;
}
h2 { font-size: 1.6rem; line-height: 1.25; font-weight: 400; margin: 3.25rem 0 0.75rem; }
h3 { font-size: 1.2rem; line-height: 1.35; font-weight: 700; margin: 2rem 0 0.4rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }
.lead { font-size: 1.3rem; line-height: 1.55; }
.quiet { color: var(--muted-text); }
.arabic-inline { font-family: var(--arabic); font-size: 1.3em; }

/* the waitlist */
.join { margin: 2rem 0 0; padding: 1.4rem 1.4rem 1.2rem; background: var(--surface); border-radius: 14px; }
.join p { margin: 0 0 0.9rem; }
.join form { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.join input[type="email"] {
  flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 1.05rem; color: var(--text); background: var(--background);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem 0.8rem;
}
.join button {
  font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--surface); background: var(--accent);
  border: 0; border-radius: 10px; padding: 0.65rem 1.2rem; cursor: pointer;
}
.join button[disabled] { opacity: 0.6; cursor: default; }
.join .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join .status { min-height: 1.5em; font-size: 0.95rem; margin: 0.7rem 0 0; color: var(--muted-text); }
.join .status.done { color: var(--text); }

/* the team */
.person { margin: 0; }
.person dt { font-weight: 700; }
.person dd { margin: 0 0 1rem; }

/* questions */
.faq dt { font-weight: 700; margin-top: 1.5rem; }
.faq dd { margin: 0.3rem 0 0; }

.bottom {
  margin-top: 4.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-size: 0.95rem; color: var(--muted-text);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem;
}
.bottom a { color: var(--muted-text); }

@media (prefers-reduced-motion: reduce) {
  .ayah .ar { transition: none; }
}

/* on a phone the four words of the opening ayah stand two and two */
@media (max-width: 30rem) {
  .ayah { gap: 0.25rem 0; }
  .ayah button { flex: 0 0 50%; }
}
