/*
 * The whole site's style, in one file. No framework, no build step, nothing fetched from anywhere
 * else: every font is beside this file, so a page loads completely with no request leaving the
 * visitor's phone.
 *
 * The two colours are the app's own: #204E38 green and #FBF8F3 cream.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('fonts/NotoSansArabic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('fonts/NotoSansArabic-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('fonts/NotoSansArabic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --green: #204e38;
  --cream: #fbf8f3;
  --ink: #12211b;
  --muted: #5a6862;
  --rule: #e6ded2;
  --card: #ffffff;
}

* { box-sizing: border-box; }

html {
  /* Nothing here changes with the system theme: the app has one appearance and so does this. */
  background: var(--cream);
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  /* 1.35 for the same reason as in the app: Plus Jakarta Sans has tall ascenders and deep
     descenders, and a tighter line clips them. */
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Arabic is written in Noto Sans Arabic and mirrored whole, not just aligned to the right. */
[dir='rtl'] body,
body[dir='rtl'] {
  font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.8;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  /* A 16px gutter on a phone, the same as the app's screens. */
  padding: 1rem 1rem 4rem;
}

header.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--green);
  font-weight: 700;
}

.brand img { height: 2rem; width: auto; display: block; }

nav.languages { display: flex; gap: 0.35rem; }

nav.languages button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
  background: transparent;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  /* A finger-sized target, on a phone as on a laptop. */
  min-height: 44px;
  cursor: pointer;
}

nav.languages button[aria-pressed='true'] {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

h1 {
  font-size: 1.75rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.4;
  margin: 2.25rem 0 0.5rem;
}

p, li { margin: 0 0 1rem; }

ol, ul { padding-inline-start: 1.5rem; }

a { color: var(--green); }

.banner {
  display: inline-block;
  background: #ebf1ec;
  border: 1.5px solid var(--green);
  border-radius: 10px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

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

/*
 * The one button on the confirmation page. It opens winou:// — which does nothing at all if the app
 * is not installed, and shows no error either. That is why the quiet line under it repeats the same
 * instruction in words: whatever the button does or does not do, the reader still knows what to do.
 */
.action {
  display: inline-block;
  background: var(--green);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  min-height: 44px;
  margin: 0.25rem 0 0.5rem;
}

footer.foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.foot a { color: var(--green); }

/* Only the chosen language is shown. Everything is in the page; nothing is fetched to switch. */
[data-lang] { display: none; }
[data-lang].shown { display: block; }
