:root {
  --bg:    #faf9f7;
  --ink:   #17171a;
  --muted: #6e6e76;
  --rule:  #e3e1dc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:    #121214;
    --ink:   #ececee;
    --muted: #94949c;
    --rule:  #2b2b30;
  }
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 160ms ease;
}
a:hover, a:focus-visible { text-decoration-color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.sans {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------- landing page ---------- */

.landing main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}

.mark { display: block; color: var(--ink); }

.wordmark {
  margin: 1.75rem 0 0;
  font-size: clamp(1.05rem, 1.4rem + 1.2vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.19em;
  /* letter-spacing adds trailing space after the last glyph; nudge back to true centre */
  text-indent: 0.19em;
}

.tagline {
  margin: 0.9rem 0 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 0.95rem + 0.35vw, 1.12rem);
}

/* Centred label with a hairline rule running out to either side. */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 2.5rem 0 0;
  width: min(100%, 22rem);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.section-label::before,
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.contact { margin: 2.25rem 0 0; font-size: 1rem; min-height: 1.6em; }
.contact .obf { color: var(--ink); }

.landing main > * {
  animation: rise 620ms cubic-bezier(0.22, 0.68, 0.24, 1) backwards;
}
.landing main > :nth-child(2) { animation-delay: 70ms; }
.landing main > :nth-child(3) { animation-delay: 140ms; }
.landing main > :nth-child(4) { animation-delay: 210ms; }
.landing main > :nth-child(5) { animation-delay: 280ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- document pages ---------- */

.doc main {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3.5rem;
}

.doc .back {
  display: inline-block;
  margin-bottom: 2.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration-color: transparent;
}
.doc .back:hover, .doc .back:focus-visible { color: var(--ink); }

.doc h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 1.4rem + 1vw, 1.9rem);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.doc .updated {
  margin: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.doc h2 {
  margin: 2.5rem 0 0.6rem;
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc p, .doc li { font-size: 0.99rem; }
.doc p { margin: 0 0 1rem; }
.doc ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.doc li { margin-bottom: 0.4rem; }

/* ---------- shared footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  line-height: 1.75;
}
footer p { margin: 0; }

footer .entity {
  color: var(--ink);
  letter-spacing: 0.07em;
}

footer .links { margin-top: 0.7rem; }
footer .links a { color: var(--muted); }
footer .links a:hover, footer .links a:focus-visible { color: var(--ink); }
footer .sep { padding: 0 0.5rem; opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  .landing main > * { animation: none; }
  a { transition: none; }
}
