/* TOP Typography System */

/* Self-hosted font declarations (placeholder - replace with actual font files) */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Base */
body {
  font-family: var(--top-font-body);
  font-size: var(--top-body);
  line-height: var(--top-lh-body);
  color: var(--top-color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--top-font-heading);
  font-weight: 600;
  color: var(--top-color-primary);
  margin-top: 0;
}

h1 {
  font-size: var(--top-h1);
  line-height: var(--top-lh-tight);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--top-h2);
  line-height: var(--top-lh-heading);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--top-h3);
  line-height: var(--top-lh-heading);
}

h4 {
  font-size: var(--top-h4);
  line-height: var(--top-lh-heading);
}

/* Paragraphs */
p {
  margin-bottom: var(--top-space-md);
  max-width: 70ch;
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--top-color-accent);
  text-decoration: none;
  transition: color var(--top-transition-fast);
}

a:hover {
  color: var(--top-color-accent-hover);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--top-color-accent);
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: var(--top-space-md);
  padding-left: var(--top-space-lg);
}

li {
  margin-bottom: var(--top-space-xs);
}

/* Technical / Mono */
.top-technical,
.top-mono,
code,
pre {
  font-family: var(--top-font-mono);
  font-size: var(--top-technical);
  line-height: var(--top-lh-technical);
}

code {
  background: var(--top-color-bg-soft);
  padding: 0.125rem 0.375rem;
  border-radius: var(--top-radius-sm);
}

pre {
  background: var(--top-color-bg-soft);
  padding: var(--top-space-md);
  border-radius: var(--top-radius-md);
  overflow-x: auto;
}

/* Small / Caption */
.top-small,
.top-caption {
  font-size: var(--top-small);
  color: var(--top-color-muted);
}

/* Section headings */
.top-section-title {
  font-size: var(--top-h2);
  font-weight: 600;
  line-height: var(--top-lh-heading);
  color: var(--top-color-primary);
  margin-bottom: var(--top-space-lg);
}

.top-section-subtitle {
  font-size: var(--top-body);
  color: var(--top-color-muted);
  max-width: 60ch;
  margin-bottom: var(--top-space-xl);
}

/* Article typography */
.top-article h2 {
  margin-top: var(--top-space-2xl);
  margin-bottom: var(--top-space-md);
}

.top-article h3 {
  margin-top: var(--top-space-xl);
  margin-bottom: var(--top-space-sm);
}

.top-article p {
  max-width: 760px;
  line-height: 1.8;
}
