/* Accretive site.
   The colours are the app's tokens (src/styles/tokens.ts in the app repo), light and dark.
   Monochrome with one red accent: the full stop. No gradients, no shadows, no images.
   Type is App Sans, weights 400 and 500 only (fonts/LICENSE.txt). */

@font-face {
  font-family: "App Sans";
  src: url("/fonts/AppSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "App Sans";
  src: url("/fonts/AppSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --page: #F7F5F2;
  --text: #14120F;
  --text-secondary: #55514B;
  --text-muted: #6F6A63;
  --border: #E8E4DF;
  --accent: #DF3329;

  --measure: 680px;
  --gutter: 20px;
  --sans: "App Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #121110;
    --text: #ECEAE7;
    --text-secondary: #B0AAA4;
    --text-muted: #8B857E;
    --border: #2A2826;
    --accent: #FF6A5E;
  }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Page frame: one column of at most 680 px of text, the footer at the foot of a short page. */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  flex: 1;
  padding: 40px 0 8px;
}

.site-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
}

.site-footer {
  margin-top: 56px;
  padding: 12px 0 28px;
  border-top: 1px solid var(--border);
}

/* The wordmark: letters in the text colour, the full stop in the accent. */

.wordmark {
  display: block;
  margin: 0;
  color: var(--text);
  line-height: 0;
}

.wordmark svg {
  display: block;
  width: 116px;
  height: auto;
}

.stop {
  fill: var(--accent);
}

/* Type: tighter tracking and leading as the size grows. */

h1,
h2 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.022em;
}

h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

p,
ul {
  margin: 0 0 1em;
  text-wrap: pretty;
}

h1 + p,
h1 + .meta {
  margin-top: 0.75rem;
}

.meta {
  color: var(--text-secondary);
}

ul {
  padding-left: 1.25em;
}

li + li {
  margin-top: 0.5em;
}

/* Links are underlined, never told apart by colour alone. */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--text-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

/* Footer links: a tap target of at least 44 px. */

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  display: inline-block;
  padding: 10px 0;
  min-height: 44px;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.006em;
  color: var(--text-secondary);
}

.site-footer a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

/* The home page. */

.home {
  padding-top: clamp(56px, 16vh, 144px);
}

.home .wordmark svg {
  width: min(100%, 280px);
}

.lede {
  margin: 2rem 0 2rem;
  font-size: 1.375rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--text);
  text-wrap: balance;
}

@media (min-width: 600px) {
  h1 {
    font-size: 2.5rem;
    letter-spacing: -0.026em;
  }

  .site-header {
    padding-top: 40px;
  }

  main {
    padding-top: 56px;
  }

  .home .wordmark svg {
    width: 320px;
  }

  .lede {
    font-size: 1.625rem;
    letter-spacing: -0.016em;
  }
}
