/* viewful.app — the one stylesheet for the home page, Help and the Privacy
   policy. Light and dark follow the visitor's setting (DESIGN Passes 29 and
   36). Plum on paper, apricot on plum: plum is never text on the dark
   ground, apricot never text on the light one. Every text colour here is at
   least 4.5 to 1 on its ground. The wordmark is a drawing, inline SVG in
   each page (Gabarito ExtraBold outlined, wordmark C, Q3 orange, picked 23
   November): no font loads for it. Gabarito Bold sets the Help and Privacy
   headings, as it does the app's screen headings; everything else is Red
   Hat Text. */

:root {
  color-scheme: light dark;
  --ground: #f8f3ee;
  --ink: #2a1830;
  --soft-ink: #6b5a70;
  --accent: #7a4c84;
  --on-accent: #fff3e6;
  --raised: #fffbf6;
  --rule: rgba(42, 24, 48, 0.12);
  --wordmark: #7a4c84;          /* the letters: plum on paper */
  --dot: #f7935c;               /* the i's tilted square: a mark, never text */
  --heading: "Gabarito", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --text: "Red Hat Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1c1020;
    --ink: #fff3e6;
    --soft-ink: #b9a9be;
    --accent: #ffc08a;
    --on-accent: #2a1830;
    --raised: #2e1c34;
    --rule: rgba(255, 243, 230, 0.14);
    --wordmark: #fff3e6;        /* the letters: cream on plum */
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;          /* 18 px at the default text size */
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* The wordmark: "Viewful" drawn as SVG, its letters in currentColor and the
   i's dot in --dot. Sized by the font size, so the rules below still work. */
.wordmark {
  line-height: 1;
  color: var(--wordmark);
}
.wordmark svg { display: block; height: 0.9em; width: auto; }
.wordmark .dot { fill: var(--dot); }
.wordmark a { display: inline-block; color: inherit; text-decoration: none; }

/* ---- The home page ---- */
.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 16px 2.5rem;
}
.home .icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 22.5%;
  margin: 0 0 1.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(42, 24, 48, 0.18);
}
.home h1 {
  margin: 0 0 1.75rem;
  font-size: clamp(2.5rem, 15vw, 5rem);
}
.home .wordmark svg { margin: 0 auto; }
.home .lead {
  max-width: 30rem;
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 4.6vw, 1.6rem);
  font-weight: 500;
  line-height: 1.35;
  text-wrap: balance;
}
.home .body {
  max-width: 29rem;
  margin: 0 0 2rem;
  color: var(--soft-ink);
  text-wrap: pretty;
}
.home .soon {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- The 404 page: the home page's layout, a smaller wordmark ---- */
.missing .wordmark { margin: 0 0 2rem; font-size: clamp(2.25rem, 10vw, 3rem); }
.missing h1.lead { font-family: var(--text); }
.missing .body { margin-bottom: 1.5rem; }
.missing .ways { margin: 0; font-weight: 500; }
.missing .ways a { white-space: nowrap; }
.missing .ways .sep { padding: 0 0.1em; }
.sep { padding: 0 0.35em; }

/* ---- Help and the Privacy policy ---- */
.page main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 16px 2.5rem;
}
.page .wordmark { margin: 0 0 2.5rem; font-size: 1.75rem; }
.page h1 {
  font-family: var(--heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
.page h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.75rem 0 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--accent);
}
.page h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.4; margin: 1.75rem 0 0.25rem; }
.page p, .page ol { margin: 0 0 1rem; }
.page ol { padding-left: 1.5rem; }
.page li { margin: 0 0 0.25rem; }
.page b { font-weight: 600; }
.page .lede { font-size: 1.1875rem; }
.page .meta { color: var(--soft-ink); font-size: 1rem; }

/* ---- The footer, the same on every page ---- */
footer {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 16px 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--soft-ink);
  font-size: 1rem;
  text-align: center;
}
footer p { margin: 0 0 0.25rem; }
footer .sep { padding: 0 0.35em; }
