/* Graphite site. Paper by day, graphite by night. Everything ships from this origin. */

@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;
}

:root {
  --bg: #f6f5f1;
  --ink: #161616;
  --muted: #6b6f76;
  --rule: #e2e0d8;
  --tile: #0a0a0a;
  --accent: #161616;
  --accent-ink: #f6f5f1;
  --measure: 38rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --ink: #ecebe6;
    --muted: #8d939c;
    --rule: #222222;
    --tile: #000000;
    --accent: #ecebe6;
    --accent-ink: #0a0a0a;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: calc(var(--measure) + 2.5rem);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--muted); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* Header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.bar nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; color: var(--muted); }
.bar nav a { text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current='page'] { color: var(--ink); }

main { flex: 1; padding: 3.5rem 0 4rem; }

/* Home */
.mark {
  display: block;
  width: 104px;
  height: 104px;
  border-radius: 24px;
  background: var(--tile);
  box-shadow: 0 0 0 1px var(--rule), 0 12px 32px -12px rgb(0 0 0 / 0.35);
}
h1 {
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin: 2rem 0 0.75rem;
}
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); margin: 0 0 2rem; max-width: 30rem; }
.lede strong { color: var(--ink); font-weight: 500; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 120ms ease;
}
.button:active { transform: translateY(1px); }
.fine { font-size: 0.875rem; color: var(--muted); }

.features { list-style: none; padding: 0; margin: 4.5rem 0 0; border-top: 1px solid var(--rule); }
.features li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.features b { font-weight: 500; }
.features span { color: var(--muted); }
@media (max-width: 30rem) {
  .features li { grid-template-columns: 1fr; gap: 0.15rem; }
}

kbd {
  font: 500 0.8em 'Geist Mono', ui-monospace, monospace;
  padding: 0.05em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* Legal pages */
.doc h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin-top: 0; }
.doc .updated { color: var(--muted); font-size: 0.9375rem; margin: 0 0 2.5rem; }
.doc h2 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; margin: 2.75rem 0 0.5rem; }
.doc p, .doc ul { margin: 0 0 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.4rem; }
.doc li::marker { color: var(--muted); }
.doc code { font: 0.875em 'Geist Mono', ui-monospace, monospace; overflow-wrap: anywhere; }
.summary {
  border-left: 2px solid var(--ink);
  padding: 0.25rem 0 0.25rem 1.1rem;
  margin: 0 0 2.5rem;
}
.summary p:last-child { margin-bottom: 0; }

/* Footer */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2rem;
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
footer nav { display: flex; gap: 1.25rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
