/*
 * typography.css
 *
 * Базовый сброс, шрифты, type scale.
 * Source Serif 4 для body/H, Inter для UI.
 * Type scale: H1 48, H2 32, H3 22, body 18, caption 14, metadata 13.
 * Вертикальный ритм: отступы кратны 8px.
 */

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

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

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, dl, figure, blockquote, pre {
  margin: 0;
}

ul, ol {
  padding-left: 24px;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h2 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

p {
  font-size: 18px;
  line-height: 1.65;
}

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

.caption {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.metadata {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: 0.02em;
}
