/* OpenQuill site: dot-grid paper, blue-black ink, one hand-drawn stroke.
   System fonts only, so the pages make no third-party requests. */

:root {
  color-scheme: light dark;
  --paper: #f6f8fb;
  --dot: #d3dae6;
  --ink: #172036;
  --ink-soft: #4a556e;
  --rule: #dce2ec;
  --accent: #2747c9;
  --marker: #ffe27a;
  --marker-ink: #172036;
  --note: #fff4ce;
  --note-edge: #b78a00;
  --focus: #2747c9;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11151d;
    --dot: #262e3d;
    --ink: #e7ebf3;
    --ink-soft: #a5afc3;
    --rule: #2a3242;
    --accent: #93aaff;
    --marker: #5c4a0e;
    --marker-ink: #fff1c2;
    --note: #2b2410;
    --note-edge: #c9a227;
    --focus: #93aaff;
  }
}

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

html {
  background-color: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  font: 400 1.0625rem/1.6 var(--font-body);
  overflow-wrap: break-word;
}

h1,
h2,
.pitch {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 6px;
  z-index: 1;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header and footer */

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: calc(var(--measure) + 32px);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.site-header--home {
  justify-content: flex-end;
}

.brand {
  font: 700 1.125rem/1 var(--font-display);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

main {
  flex: 1;
  padding-bottom: 3rem;
}

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  /* A rule as wide as the text column, not the padded box. */
  background: linear-gradient(var(--rule), var(--rule)) no-repeat 16px 0 / calc(100% - 32px) 1px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

/* Landing page */

.hero {
  padding-top: clamp(2rem, 10vh, 6rem);
}

.wordmark {
  margin: 0;
  font: 700 clamp(3.25rem, 14vw, 6rem)/0.95 var(--font-display);
  letter-spacing: -0.035em;
}

.stroke {
  display: block;
  width: min(100%, 25rem);
  height: auto;
  margin: 0.5rem 0 1.75rem -0.25rem;
  overflow: visible;
}

.stroke path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: write 1.6s cubic-bezier(0.45, 0.05, 0.25, 1) 0.25s forwards;
}

@keyframes write {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stroke path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.pitch {
  margin: 0 0 1rem;
  max-width: 30rem;
  font-size: clamp(1.3125rem, 4.2vw, 1.625rem);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.about {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  color: var(--ink-soft);
}

.status {
  margin: 0 0 2.5rem;
}

.status mark {
  padding: 0.1em 0.35em;
  margin: 0 -0.1em;
  background: var(--marker);
  color: var(--marker-ink);
  border-radius: 0.2em 0.5em 0.3em 0.6em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 34rem;
}

.facts li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-top: 1px solid var(--rule);
}

.facts li:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.25rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Document pages: privacy, support, 404 */

.doc {
  padding-top: 1.5rem;
}

.doc h1 {
  margin: 0 0 0.35rem;
  font: 700 clamp(2rem, 7vw, 2.75rem)/1.1 var(--font-display);
  letter-spacing: -0.02em;
}

.doc h2 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.3125rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.doc h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.0625rem;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 1rem;
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

.doc li {
  margin: 0.35rem 0;
}

.meta {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
}

.summary {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--accent);
}

.draft-banner {
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  background: var(--note);
  border: 2px dashed var(--note-edge);
  border-radius: 8px;
}

.draft-banner p {
  margin: 0;
}

.faq dt {
  margin-top: 1.25rem;
  font-weight: 600;
}

.faq dd {
  margin: 0.25rem 0 0;
}

code {
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
