/* The Wellus site's one stylesheet. The colours of the ground, the words and the mark are
   lib/wellus.ts' (tests/site.test.mjs checks them); the fonts are the app's own Quicksand
   (made once: docs/reports/site/report.md). Every contrast below is WCAG 2's, worked out by lib/contrast.ts. */

@font-face {
  font-family: "Quicksand";
  src: url("fonts/Quicksand_700Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quicksand";
  src: url("fonts/Quicksand_500Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The accent: the one line to change for another (docs/reports/site/report.md). */
  --accent: #F26A2E;
  /* The accent deepened toward Ink, for lines and words on Cream: 4.83 to 1 for #F26A2E,
     4.95 for #FF5A1F. */
  --accent-deep: color-mix(in srgb, var(--accent) 70%, var(--ink));
  --ink: #1C1917;
  --ground: #FFF8F2; /* Cream */
  --text: var(--ink); /* 16.62 on Cream */
  --muted: #5F5750; /* 6.73 on Cream */
  --line: #E9DFD5;
  --u1: #F26A2E; /* the mark, light: Tangerine and Raspberry */
  --u2: #D6336C;
  --wash: 8%;
  --heading: "Quicksand", ui-rounded, system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-deep: var(--accent); /* 6.12 on Night (#FF5A1F 5.99) */
    --ground: #141210; /* Night */
    --text: #FFF8F2; /* Cream, 17.76 on Night */
    --muted: #B5ABA2; /* 8.29 on Night */
    --line: #2C2724;
    --u1: #FF8A55; /* the mark, dark */
    --u2: #F2588A;
    --wash: 10%;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--ground);
  /* The soft wash of the accent at the top, as the app's pages have. */
  background-image: radial-gradient(120% 420px at 50% 0, color-mix(in srgb, var(--accent) var(--wash), transparent), transparent);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

a {
  color: inherit;
  text-decoration-color: var(--accent-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-deep);
  text-decoration-thickness: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The mark: two u's, no fill, round caps, at the mark's own stroke. */
.mark {
  display: block;
  height: auto;
}
.mark path {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
}
.mark .u1 {
  stroke: var(--u1);
}
.mark .u2 {
  stroke: var(--u2);
}

/* ---- The home page: the launch screen's mark and wordmark, then the line ---------------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 72px 16px 48px;
  text-align: center;
}
.hero .mark {
  width: clamp(128px, 36vw, 176px);
}
.wordmark {
  margin: 20px 0 0;
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.1;
}
.tagline {
  max-width: 21em;
  margin: 16px 0 0;
  font-family: var(--heading);
  font-weight: 500;
  font-size: clamp(20px, 5.4vw, 26px);
  line-height: 1.35;
  text-wrap: balance;
}

/* Where the App Store badge goes once the app is there: for now, one quiet line in a pill. */
.soon {
  margin: 40px 0 0;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
}

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

.bar {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 16px 16px 0;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font: 700 24px/1 var(--heading);
}
.home-link:hover {
  color: var(--text);
}
.mark.small {
  width: 40px;
}

.doc {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 8px 16px 48px;
}
.doc h1,
.doc h2,
.doc h3,
.doc h4 {
  font-family: var(--heading);
  font-weight: 700;
  scroll-margin-top: 16px;
}
.doc h1 {
  margin: 24px 0 16px;
  font-size: clamp(32px, 8vw, 40px);
  line-height: 1.15;
}
.doc h2 {
  margin: 40px 0 12px;
  font-size: 24px;
  line-height: 1.25;
}
.doc h3 {
  margin: 28px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}
.doc h4,
.doc h5,
.doc h6 {
  margin: 24px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}
.doc p,
.doc ul,
.doc ol,
.doc pre {
  margin: 0 0 16px;
}
.doc ul,
.doc ol {
  padding-left: 24px;
}
.doc li + li,
.doc li > ul,
.doc li > ol {
  margin-top: 6px;
}
.doc li > ul,
.doc li > ol {
  margin-bottom: 0;
}
.doc strong {
  font-weight: 650;
}
.doc code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  font: 0.88em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.doc pre {
  padding: 12px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  overflow-x: auto;
}
.doc pre code {
  padding: 0;
  background: none;
}
.doc blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent-deep);
  color: var(--muted);
}
.doc hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* A table scrolls inside its own box, so the page never scrolls sideways. */
.table {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
th {
  font-weight: 650;
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
th.c,
td.c {
  text-align: center;
}
th.r,
td.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

.foot {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 16px 16px 32px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot a {
  display: inline-block;
  padding: 11px 2px;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
  text-decoration: none;
}
.foot a:hover,
.foot a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.contact {
  margin: 0;
  text-align: center;
}
.legal .foot {
  border-top: 1px solid var(--line);
}
