@font-face { font-family: 'Areal'; src: url('/fonts/ABCAreal-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Areal'; src: url('/fonts/ABCAreal-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Areal Mono'; src: url('/fonts/ABCArealMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* The app's natural paper, and its X-ray charcoal for dark mode. */
:root {
  --canvas: #e9e9e2;
  --title: #1e1e1b;
  --ink: #403e3c;
  --body: #5c5b58;
  --meta: rgba(0, 0, 0, 0.42);
  --rule: rgba(0, 0, 0, 0.12);
  --glass: rgba(255, 255, 255, 0.34);
  --button: #3d3c3a;
  --button-ink: #e9e9e2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #161618;
    --title: #cccdc8;
    --ink: #d4d4cf;
    --body: #b8b9b3;
    --meta: rgba(230, 230, 225, 0.5);
    --rule: rgba(230, 230, 225, 0.14);
    --glass: rgba(255, 255, 255, 0.05);
    --button: #e9e9e2;
    --button-ink: #161618;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 16px/1.6 'Areal', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--title); }
p, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

.mono {
  font-family: 'Areal Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--meta);
}

.masthead {
  display: flex;
  justify-content: center;
  padding: 28px 16px 0;
}
.masthead a { color: var(--ink); text-decoration: none; letter-spacing: 0.3em; }

/* Landing */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  text-align: center;
}
.wordmark {
  width: min(620px, 84vw);
  aspect-ratio: 1030 / 627;
  margin: 0 auto;
  background: var(--title);
  -webkit-mask: url('/images/title.webp') center / contain no-repeat;
  mask: url('/images/title.webp') center / contain no-repeat;
}
.lede {
  max-width: 34em;
  margin: 40px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 14px 26px;
  border-radius: 14px;
  background: var(--button);
  color: var(--button-ink);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.store:hover { color: var(--button-ink); opacity: 0.9; }
.store svg { width: 17px; height: 17px; fill: currentColor; }
.store[aria-disabled='true'] { pointer-events: none; }

.gallery {
  display: flex;
  gap: 22px;
  justify-content: center;
  padding: 48px 24px 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; }
.gallery img {
  display: block;
  width: 230px;
  height: auto;
  border-radius: 34px;
  background: var(--glass);
}
.gallery figure:nth-child(even) { margin-top: 56px; }
@media (max-width: 1320px) { .gallery { justify-content: flex-start; } }

.notes {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.notes h2 {
  margin: 12px 0 10px;
  font-weight: 500;
  font-size: 17px;
  color: var(--title);
}
.notes p { margin: 0; font-size: 15px; }
@media (max-width: 760px) { .notes { grid-template-columns: 1fr; gap: 32px; } }

/* Reading pages */
.page {
  max-width: 38em;
  margin: 0 auto;
  padding: 88px 24px 32px;
}
.page h1 {
  margin: 14px 0 12px;
  font-weight: 400;
  font-size: clamp(34px, 7vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--title);
}
.page .updated { margin: 0 0 48px; }
.page .mono.updated { white-space: nowrap; font-size: 10px; }
.page h2 {
  margin: 48px 0 12px;
  font-weight: 500;
  font-size: 18px;
  color: var(--title);
}
.page p, .page li { font-size: 16px; line-height: 1.65; }
.page p { margin: 0 0 16px; }
.page ul { margin: 0 0 16px; padding-left: 20px; }
.page li { margin-bottom: 8px; }
.contact {
  margin: 8px 0 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--glass);
}
.contact p { margin: 0; }
.contact a { font-weight: 500; }

footer {
  max-width: 1080px;
  margin: 64px auto 0;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: 14px;
}
footer .credits { flex-basis: 100%; margin: 0 0 8px; font-size: 12px; line-height: 1.5; color: var(--meta); max-width: 60em; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer a { color: var(--body); text-decoration: none; }
footer a:hover { color: var(--title); }
.page + footer { max-width: calc(38em + 48px); }
