@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #faf8f4;
  --ink: #1a1a1a;
  --ink-soft: #2e2a26;
  --muted: #706963;
  --accent: #2d3a52;
  --accent-strong: #14253f;
  --rule-soft: rgba(45, 58, 82, 0.20);
  --rule-medium: rgba(45, 58, 82, 0.40);

  --serif: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --s4: 16px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  --max-w: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}
a:hover { border-bottom-color: var(--ink); }

h1, h2, h3 { color: var(--ink); font-weight: 400; margin: 0; }
p { margin: 0 0 var(--s4); }
strong { font-weight: 500; color: var(--ink); }

/* ---------- Top nav ---------- */
.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s7) var(--s4) 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s4);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.005em;
  border-bottom: none;
}
.wordmark:hover { border-bottom: none; }
.wordmark .mark {
  color: var(--accent);
  opacity: 0.8;
  flex-shrink: 0;
}

/* ---------- Container ---------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s9) var(--s4) var(--s9);
}

/* ---------- Document pages (privacy, terms) ---------- */
.doc h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.doc .meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--s8);
  font-weight: 500;
}
.doc h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: var(--s8) 0 var(--s4);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.doc ul {
  margin: 0 0 var(--s4);
  padding-left: 24px;
}
.doc li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.doc a.inline {
  color: var(--accent);
  border-bottom-color: var(--rule-soft);
}
.doc a.inline:hover { border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  padding: var(--s8) var(--s4);
  max-width: var(--max-w);
  margin: 0 auto;
  border-top: 1px solid var(--rule-soft);
}
.footer a {
  color: var(--muted);
  border-bottom: none;
  margin-right: var(--s4);
}
.footer a:last-child { margin-right: 0; }
.footer a:hover { color: var(--ink); border-bottom: none; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
}
.footer-meta { color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .nav { padding: var(--s6) var(--s4) 0; }
  .wrap { padding: var(--s7) var(--s4) var(--s8); }
  .footer { padding: var(--s7) var(--s4); }
  .footer-row { flex-direction: column; align-items: flex-start; gap: var(--s4); }
}

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