:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1c1a;
  --muted: #6a675f;
  --rule: #e5e1d8;
  --accent: #9a4a06;
  --button-bg: #1d1c1a;
  --button-text: #fbfaf7;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --surface: #1f1e1b;
    --text: #ebe8e1;
    --muted: #a39f95;
    --rule: #302e2a;
    --accent: #f0b955;
    --button-bg: #ebe8e1;
    --button-text: #151412;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

main {
  flex: 1;
  padding-block: clamp(2.5rem, 8vw, 5.5rem);
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration-thickness: 0.12em;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 650;
}

p,
ul {
  margin: 0 0 1.1rem;
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure {
  max-width: var(--measure);
}

.muted {
  color: var(--muted);
}

/* Header and footer */

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
}

.site-header nav a,
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 2rem;
  padding-block: 2.5rem 1.5rem;
}

.site-footer h2 {
  margin-bottom: 0.6rem;
  font-size: 0.9375rem;
}

.site-footer nav {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

.site-footer .wordmark {
  margin: 0;
}

.colophon {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Home */

.lead {
  max-width: 24em;
  margin-bottom: 1.5rem;
  font-size: clamp(1.75rem, 4.4vw, 2.625rem);
  line-height: 1.22;
}

.intro {
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.1875rem;
}

.sections {
  display: grid;
  gap: 1.75rem;
  max-width: var(--measure);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule);
}

.sections p {
  margin-bottom: 0;
}

.apps {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.app-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 26rem;
  margin-top: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s;
}

.app-card:hover {
  border-color: var(--muted);
}

.app-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.app-card strong {
  display: block;
  color: var(--text);
  font-size: 1.0625rem;
}

.app-icon {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 22%;
}

.quote {
  max-width: var(--measure);
  margin: clamp(3rem, 8vw, 5rem) 0 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--rule);
}

.quote blockquote {
  margin: 0;
}

.quote blockquote p {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-style: italic;
  line-height: 1.3;
}

.quote figcaption {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* App pages */

.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
}

.app-head .app-icon {
  width: 5.5rem;
  height: 5.5rem;
}

.app-head h1 {
  margin-bottom: 0.15rem;
}

.app-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1875rem;
}

.button {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  opacity: 0.85;
}

.shots {
  display: flex;
  gap: 1rem;
  margin: clamp(2rem, 5vw, 3rem) calc(-1 * var(--gutter));
  padding: 0.25rem var(--gutter) 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
}

.shots > * {
  flex: none;
  scroll-snap-align: start;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 1.125rem;
}

.shots img {
  display: block;
  width: auto;
  height: clamp(22rem, 62vh, 30rem);
}

/* Two frames that share one continuous illustration */
.shots .pair {
  display: flex;
}

/* Long-form text (legal pages) */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 650;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose li > ul {
  margin: 0.35rem 0 0;
}

.updated {
  color: var(--muted);
}

.prose a {
  overflow-wrap: anywhere;
}

@media print {
  .site-header nav,
  .site-footer {
    display: none;
  }
}
