/* Kodumarket Julge — typography
   Global typographic rules applied across the theme, overriding
   GeneratePress defaults. Based on handoff §4.3 type scale.
   Depends on tokens.css + Google Fonts (Geist, Geist Mono, Instrument Serif italic). */

/* ---------- Base body ---------- */
body,
button,
input,
select,
textarea,
.entry-content,
.site {
  font-family: "Geist", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--km-ink);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

body {
  background: var(--km-surface);
}

/* ---------- Heading reset (we style per-context in home.css/archive.css/etc.) ---------- */
h1, h2, h3, h4, h5, h6,
.site-content h1,
.site-content h2,
.site-content h3,
.site-content h4,
.entry-title {
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--km-ink);
  text-wrap: balance;
}

h1, .entry-title { font-size: 48px; letter-spacing: -0.04em; line-height: 1.05; font-weight: 800; }
h2 { font-size: 40px; letter-spacing: -0.04em; line-height: 1.1; font-weight: 700; }
h3 { font-size: 30px; letter-spacing: -0.025em; line-height: 1.2; font-weight: 500; }
h4 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.25; font-weight: 500; }
h5 { font-size: 17px; letter-spacing: -0.01em; line-height: 1.3; font-weight: 500; }
h6 { font-size: 14px; letter-spacing: 0; line-height: 1.4; font-weight: 600; }

/* Mobile type adjustments */
@media (max-width: 768px) {
  h1, .entry-title { font-size: 34px; line-height: 1; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
}

/* ---------- Paragraph ---------- */
p {
  margin: 0 0 1em;
  line-height: 1.6;
  color: var(--km-ink-2);
}

/* ---------- Links ---------- */
a {
  color: var(--km-blue-800);
  text-decoration: none;
  transition: color .15s ease, opacity .15s ease;
}
a:hover,
a:focus {
  color: var(--km-blue-900);
}

/* ---------- Strong / em ---------- */
strong, b { font-weight: 700; }
em, i    { font-style: italic; }

/* Serif italic accent — used inside headings to replace ONE key word. */
.km-serif,
em.km-serif {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

/* ---------- Editorial / mono meta ---------- */
.km-mono,
.km-meta {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.08em;
}

.km-meta {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--km-ink-4);
  font-weight: 400;
}
.km-meta--sm { font-size: 10px; letter-spacing: 0.1em; }

/* ---------- Selection ---------- */
::selection {
  background: var(--km-green-500);
  color: var(--km-ink);
}

/* ---------- Focus visible (a11y §14) ---------- */
:focus-visible {
  outline: 2px solid var(--km-blue-800);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Hide elements visually but keep them accessible ---------- */
.km-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
