/*
 * The public site, in the app's look (docs/ui-design.md, "The look"): ink on
 * paper, sections on the page separated by rules, Fraunces only for the page
 * title and the wordmark, ochre only for the one thing that needs the reader.
 * The tokens are the app's (web/src/index.css), light and dark.
 */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/fraunces-latin-500-normal.woff2") format("woff2");
}

:root {
  --ink: #15201d;
  --paper: #faf8f3;
  --ochre: #c9922f;

  --bg: var(--paper);
  --surface: #ffffff;
  --text: var(--ink);
  --text-2: #3d4542;
  --muted: #5f6663;
  --border: #e4e0d6;
  --border-strong: #d6d1c5;
  --rule-strong: var(--ink);
  --accent: var(--ochre);
  --on-accent: var(--ink);
  --danger: #a3261f;
  --focus: #2f6fb0;

  --font: "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Fraunces", Georgia, serif;

  --gutter: 1rem;
  --width: 70rem;

  color-scheme: light;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101814;
    --surface: #17211d;
    --text: var(--paper);
    --text-2: #d5d9d6;
    --muted: #a9b0ac;
    --border: #2c3833;
    --border-strong: #3c4a44;
    --rule-strong: var(--text);
    --accent: #d6a03a;
    --danger: #f08a80;
    --focus: #79aee3;

    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* The header: the mark and wordmark, and the way into the app. */
.header,
.footer,
main {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.logo:hover {
  text-decoration: none;
}

.mark {
  display: block;
  flex-shrink: 0;
}

.tile {
  fill: var(--ink);
}

.strokes {
  stroke: var(--paper);
}

.bar {
  stroke: var(--accent);
}

@media (prefers-color-scheme: dark) {
  .tile {
    fill: var(--paper);
  }

  .strokes {
    stroke: var(--ink);
  }
}

.word {
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.sign-in {
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 0.75rem 0;
}

/* The page title: Fraunces, as in the app. */
h1 {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

@media (min-width: 48.0625rem) {
  h1 {
    font-size: 40px;
  }
}

/* A section label: small caps over a 1px ink rule, as in the app. */
.label {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

/* Home: the hero. */
.hero {
  padding: 3rem 0 2.5rem;
  max-width: 42rem;
}

.lede {
  margin: 1rem 0 1.5rem;
  font-size: 1.125rem;
  color: var(--text-2);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0;
}

.cta small {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* The three points: under an ink rule, ruled between, never boxed. */
.points {
  display: grid;
  border-top: 1px solid var(--rule-strong);
}

.point {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.point h2 {
  margin: 0 0 0.375rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.point p {
  margin: 0;
  color: var(--text-2);
}

@media (min-width: 48.0625rem) {
  .points {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2rem;
  }

  .point {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

/* The invite form: a field and a button, the only boxes on the page. */
.invite {
  padding: 2.5rem 0 3rem;
}

.invite form {
  max-width: 34rem;
}

.invite label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  color: var(--text-2);
}

.status.error {
  color: var(--danger);
}

/* Long-form reading: a 640px measure, as the app's legal pages. */
.reading {
  max-width: 40rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  font-size: 1rem;
  line-height: 1.65;
}

.reading h1 {
  margin-bottom: 1.5rem;
}

.reading h2:not(.label) {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.reading .label {
  margin-top: 2.5rem;
}

.reading h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

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

.reading a {
  text-decoration: underline;
}

.footer {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer a {
  padding: 0.5rem 0;
}

.footer .credit {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer a[aria-current="page"] {
  color: var(--text);
}
