/* Procoach's website: the Figma color tokens (dark and light follow the device,
   as in the apps) and the apps' fonts, IBM Plex Sans and IBM Plex Sans Arabic. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/fonts/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --canvas: #f9fafb;
  --surface: #ffffff;
  --raised: #f2f4f7;
  --brand: #16305a;
  --on-brand: #ffffff;
  --border: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --accent: #ff7a2f;
  --accent-text: #c2410c;
  --accent-subtle: #fff4ec;
  --font-en: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system,
    "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system,
    "Segoe UI", Tahoma, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #071224;
    --surface: #12233d;
    --raised: #1a2e4d;
    --border: #26406a;
    --text: #f2f5fa;
    --text-2: #a9b6cb;
    --muted: #7385a3;
    --accent-text: #ff9a5c;
    --accent-subtle: #3a2414;
  }
}

* {
  box-sizing: border-box;
}

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

[lang|="en"] {
  font-family: var(--font-en);
}
[lang|="ar"] {
  font-family: var(--font-ar);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

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

[id] {
  scroll-margin-top: 16px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding-inline: 16px;
}

/* The bar on top, in bg/brand in both modes. */
.bar {
  background: var(--brand);
  color: var(--on-brand);
}
.bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-block: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-brand);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
}
.brand img {
  display: block;
}
.langs {
  display: flex;
  gap: 16px;
}
.langs a {
  color: var(--on-brand);
  font-weight: 600;
  text-decoration: none;
  opacity: 0.85;
}
.langs a:hover,
.langs a:focus-visible {
  opacity: 1;
  text-decoration: underline;
}

main {
  padding-block: 24px 40px;
}

/* One card per language. */
.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px;
  margin-block-end: 24px;
}
.doc > :first-child {
  margin-top: 0;
}
.doc > :last-child {
  margin-bottom: 0;
}
.doc h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.3;
  text-wrap: balance;
}
.doc h2 {
  margin: 28px 0 8px;
  font-size: 20px;
  line-height: 1.4;
  text-wrap: balance;
}
.doc h3 {
  margin: 18px 0 4px;
  font-size: 16px;
  line-height: 1.5;
}
.doc p,
.doc ul,
.doc ol {
  margin: 8px 0;
  color: var(--text-2);
}
.doc ul,
.doc ol {
  padding-inline-start: 22px;
}
.doc li {
  margin-block: 4px;
}
.doc li > ul {
  margin-block: 4px;
}
.doc strong {
  color: var(--text);
  font-weight: 600;
}
.updated {
  color: var(--muted);
  font-size: 14px;
}

/* A point that waits for the owner's word before the page goes live. */
mark {
  background: var(--accent-subtle);
  color: var(--accent-text);
  border-radius: 4px;
  padding: 0 4px;
}

/* The home page. */
.hero {
  text-align: center;
  padding-block: 16px 24px;
}
.hero img {
  display: block;
  margin: 0 auto;
}
.hero h1 {
  margin: 16px 0 6px;
  font-family: var(--font-en);
  font-size: 32px;
  line-height: 1.25;
}
.hero p {
  margin: 2px 0;
  color: var(--text-2);
  text-wrap: balance;
}
.links {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-block: 16px 0;
  padding: 0;
  list-style: none;
}
.links li {
  margin: 0;
}
.links a {
  display: block;
  height: 100%;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.links a span {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}
.links a:hover,
.links a:focus-visible {
  border-color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 20px 28px;
  text-align: center;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
}
footer a {
  color: var(--text-2);
}
footer p {
  margin: 4px 0 0;
}
