/* IvarsPenn — typographic and document base.
 *
 * Self-hosted webfonts, body/heading defaults, link styling, focus
 * states. Everything pulls from tokens.css. Goal: an unstyled HTML
 * page would already feel like the product.
 */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  padding: var(--space-7) var(--space-5) var(--space-8);
  max-width: 760px;
  margin-inline: auto;

  font-family: var(--font-body);
  font-size: var(--size-3);
  font-weight: var(--weight-regular);
  line-height: var(--line-body);
  color: var(--ink);
  background: var(--paper);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[x-cloak] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  line-height: var(--line-tight);
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--size-6); }
h2 { font-size: var(--size-4); }
h3 { font-size: var(--size-3); }

p { margin: 0; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { background: var(--ink); color: var(--paper); }

::selection { background: var(--ink); color: var(--paper); }

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