/* Dawam · landing, legal & support pages.
   The palette and the measures are the app's own (Sources/Design/Theme.swift):
   warm paper, one accent the colour of old printer's ink gone warm, square
   corners and ruled lines rather than cards. A timetable is set in rules and
   columns. */

:root {
  --paper: #f3efe5;
  --raised: #e9e3d4;
  --ink: #1b1915;
  --ink-muted: #6e685a;
  --ink-faint: #8c8575;
  --hairline: #d5cfbf;
  --keyline: #1b1915;
  --accent: #8a5a23;

  /* The escalation ladder, used here only to show what it means. */
  --on-time: #2f6b57;
  --late: #8a5a23;
  --qada: #3f5a8a;
  --missed: #7a3f3f;
  --excused: #5a5668;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --raised: #1e1c16;
    --ink: #f0ebe1;
    --ink-muted: #9a9280;
    --ink-faint: #6a6356;
    --hairline: #2c2920;
    --keyline: #f0ebe1;
    --accent: #c08a42;

    --on-time: #6aa893;
    --late: #c08a42;
    --qada: #7d99c9;
    --missed: #c06a64;
    --excused: #9893a8;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans Arabic", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "tnum";
}

a { color: inherit; }

.shell {
  width: min(760px, calc(100% - 44px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--keyline);
  margin-bottom: 34px;
}
.masthead img { width: 46px; height: 46px; border-radius: 10px; display: block; }
.masthead .wordmark { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; }
.masthead .wordmark small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.masthead .spacer { flex: 1; }
.masthead nav { display: flex; gap: 18px; font-size: 15px; }
.masthead nav a { color: var(--ink-muted); text-decoration: none; font-weight: 500; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }

/* ------------------------------------------------------------------- lede */

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 50px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.022em;
  max-width: 17ch;
}

.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 54ch;
  margin: 18px 0 0;
}

/* The countdown is the largest thing in the app on purpose; the page borrows
   the gesture once, at the top, and then stops. */
.window-demo {
  margin: 34px 0 0;
  padding: 22px 0;
  border-top: 2px solid var(--keyline);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.window-demo .prayer {
  font-size: 23px;
  font-weight: 500;
}
.window-demo .remaining {
  font-size: clamp(40px, 9vw, 62px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
}
.window-demo .caption {
  flex-basis: 100%;
  font-size: 14px;
  color: var(--ink-muted);
}

/* ------------------------------------------------------------------ pieces */

section { margin: 56px 0 0; }

h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.014em;
  margin: 0 0 6px;
}

.section-note {
  color: var(--ink-muted);
  margin: 0 0 24px;
  max-width: 62ch;
}

p, li { max-width: 68ch; }

/* Ruled rows, the way the app lists a day. */
.rows { border-top: 1px solid var(--hairline); }
.row {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.row h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 500;
}
.row p { margin: 0; color: var(--ink-muted); font-size: 16px; }

/* The ladder, with its own colours doing the explaining. */
.ladder { border-top: 1px solid var(--hairline); }
.rung {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.rung .mark {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 9px;
  background: var(--ink-faint);
}
.rung.gentle  .mark { background: var(--on-time); }
.rung.focus   .mark { background: var(--accent); }
.rung.urgent  .mark { background: var(--missed); }
.rung .when { font-weight: 500; }
.rung .what { color: var(--ink-muted); font-size: 16px; }

/* A promise list: the privacy section of the app, repeated here. */
.promises { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hairline); }
.promises li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
  max-width: none;
}
.promises .tick { color: var(--on-time); font-weight: 600; flex: none; }

.callout {
  border: 2px solid var(--keyline);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 17px;
}
.callout strong { font-weight: 600; }

/* --------------------------------------------------------------- footer */

footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 2px solid var(--keyline);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink-muted);
}
footer a { font-weight: 500; }
footer .spacer { flex: 1; }

/* ------------------------------------------------------------ legal pages */

.back { display: inline-block; margin-bottom: 20px; font-weight: 500; text-decoration: none; font-size: 15px; }
.back:hover { text-decoration: underline; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--ink-muted);
}

.langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 36px; }
.langs a {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 7px 15px;
  border: 1px solid var(--hairline);
}
.langs a:hover { border-color: var(--keyline); }
.langs a:first-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }

article { margin-bottom: 52px; }
article > h2 { font-size: 28px; margin-bottom: 4px; }
article > .lang-label { color: var(--ink-muted); font-size: 14px; margin: 0 0 22px; }

article h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 30px 0 8px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
ul { padding-inline-start: 1.2em; }
li { margin: 5px 0; }

/* Arabic: right to left, no tracking, a shade larger — Rubik's Arabic sits
   smaller on the line than its Latin. */
[dir="rtl"] { font-size: 18px; }
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; }

@media (max-width: 560px) {
  .masthead { flex-wrap: wrap; }
  .masthead nav { flex-basis: 100%; gap: 16px; }
  .masthead .spacer { display: none; }
}
