/*
 * The site at halaqat.space.
 *
 * Values are lifted from src/shared/ui/colors.ts rather than picked again, so
 * somebody arriving from the app is not looking at a different product. Tajawal
 * is the app's face too, and it is loaded from Google Fonts here because a
 * marketing page is allowed a network request that a phone on a bad connection
 * is not.
 *
 * Deliberately one stylesheet and no build step: this is two pages that need to
 * be online and correct, not an application.
 */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
  --page: #ffffff;
  --field: #ecfdf5;
  --text: #111815;
  --muted: #5b6a63;
  --accent: #047857;
  --brand: #065f46;
  --gold: #b8860b;
  --border: #e6ebe8;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #17191b;
    --field: #1c1f21;
    --text: #eaeae8;
    --muted: #a0a5a3;
    --accent: #3e9e72;
    --brand: #c8a24c;
    --gold: #c8a24c;
    --border: #2e3234;
  }
}

* { box-sizing: border-box; }

/* On html as well as body, and both of them full height. A gradient on body
   alone stops where the content stops, so a short page shows the browser's own
   white below the fold, which in dark mode is a bright strip. */
html {
  min-height: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 0 1.5rem 5rem;
  background: linear-gradient(var(--field), var(--page) 22rem);
  color: var(--text);
  font-family: Tajawal, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 0 1rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--brand);
  text-decoration: none;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
}

section { margin: 0 0 3rem; }

h1 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 1rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
}

p { margin: 0 0 1rem; }

.lede p:first-of-type { font-size: 1.1875rem; }

.quiet { color: var(--muted); font-size: 0.9375rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

strong { font-weight: 700; }

/* The three steps. Numbered because the order is the whole idea. */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 2.5rem;
  margin-bottom: 1.5rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps li p { margin: 0; color: var(--muted); }

.plain { padding-inline-start: 1.25rem; margin: 0 0 1rem; }
.plain li { margin-bottom: 0.5rem; }

/* Each third party and what it actually receives. A table would be tidier and
   would also invite skimming past the second column, which is the important
   one. */
.third-parties { margin: 0 0 1.5rem; }

.third-parties dt {
  font-weight: 700;
  margin-top: 1.25rem;
  color: var(--text);
}

.third-parties dd {
  margin: 0.25rem 0 0;
  padding-inline-start: 0;
  color: var(--muted);
}

footer {
  max-width: var(--measure);
  margin: 4rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

footer p { margin: 0 0 0.25rem; }

@media (max-width: 30rem) {
  h1 { font-size: 1.625rem; }
  body { padding: 0 1.25rem 3rem; }
}
