/* Colors and fonts mirror the app's "Paper" style (assets/ui/theme.tres, docs/STYLE.md). */
@font-face { font-family: "Geist"; src: url(/fonts/geist.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fonts/geist_mono.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument_serif.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument_serif_italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #F3EFE7;
  --card: #EBE5D9;
  --ink: #1D1B18;
  --ink-dim: #6F6960;
  --rule: rgba(29, 27, 24, .16);
  --indigo: #38467F;

  /* Fluid sizes scale linearly between a 360px and a 1200px viewport. */
  --gutter: clamp(16px, 2.29px + 3.81vw, 48px);
  --measure: 680px;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
main { flex: 1; }
h1, h2, h3, p { margin: 0; }
img { display: block; }
a { color: inherit; }

.label {
  color: var(--ink-dim);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Header and footer */

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  width: 100%;
  margin: 0 auto;
  padding: 20px var(--gutter);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 26px;
  line-height: 1;
}
.brand img { border-radius: 22%; }
.site-footer {
  padding-top: 24px;
  padding-bottom: 32px;
  color: var(--ink-dim);
  font-size: 14px;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  padding-left: 0;
  padding-right: 0;
  width: calc(100% - 2 * var(--gutter));
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Home */

.hero {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(48px, 30.86px + 4.76vw, 96px) var(--gutter);
}
.hero h1 {
  margin: 16px 0 20px;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(44px, 31.14px + 3.57vw, 80px);
  line-height: 1;
  letter-spacing: -.01em;
}
.hero em { color: var(--indigo); }
.hero__lede { max-width: 32em; color: var(--ink-dim); font-size: 19px; }

/* Long-form pages */

.prose {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(32px, 20.57px + 3.17vw, 64px) var(--gutter) clamp(48px, 36.57px + 3.17vw, 80px);
}
.prose h1 {
  margin: 12px 0 28px;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(44px, 35.43px + 2.38vw, 68px);
  line-height: 1;
}
.prose h2 {
  margin: 2em 0 .6em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(28px, 25.14px + .794vw, 36px);
  line-height: 1.1;
}
.prose h3 { margin: 1.6em 0 .4em; font-size: 18px; font-weight: 600; line-height: 1.3; }
.prose p, .prose ul { margin: 0 0 1em; text-wrap: pretty; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--ink-dim); }
.prose a { color: var(--indigo); text-underline-offset: 2px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose code { font-family: "Geist Mono", ui-monospace, monospace; font-size: .88em; }
