/* 
 * Typography System
 * Consistent with reset.css and variables.css
 */

/* ===== HEADINGS ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading, var(--font-family));
  font-weight: var(--fw-light);
  line-height: var(--lh-tight);
  margin: 0 0 var(--spacing-md);
  color: var(--text-primary);
}

h1 {
  font-size: var(--fs-3xl);
  letter-spacing: -0.025em;
}
h2 {
  font-size: var(--fs-2xl);
}
h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-regular);
}
h4 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
}
h5 {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
}
h6 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* ===== TEXT ELEMENTS ===== */
p {
  margin: 0 0 var(--spacing-md);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-500);
}
strong {
  font-weight: var(--fw-semibold);
}
em {
  font-style: italic;
}
small {
  font-size: var(--fs-xs);
}

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-700);
}

/* ===== LINKS ===== */
a:not([class]) {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast),
    text-decoration-color var(--transition-fast);
}

a:not([class]):hover,
a:not([class]):focus-visible {
  color: var(--color-secondary-dark);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* ===== LISTS ===== */
/* Reset.css removes list styles, these add them back for semantic content */
ul:not([class]),
ol:not([class]) {
  margin: 0 0 var(--spacing-md) var(--spacing-lg);
  padding: 0;
  list-style-position: outside;
}
ul:not([class]) {
  list-style-type: disc;
}
ol:not([class]) {
  list-style-type: decimal;
}
li:not([class]) {
  margin-bottom: var(--spacing-xs);
  line-height: var(--lh-relaxed);
}

/* ===== CODE & QUOTES ===== */
blockquote {
  margin: 0 0 var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--color-gray-100);
  border-left: 4px solid var(--color-secondary);
  color: var(--color-gray-700);
  border-radius: var(--radius-sm);
}
code,
pre,
kbd,
samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}
pre {
  overflow: auto;
  padding: var(--spacing-md);
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
  margin: 0 0 var(--spacing-md);
}

/* ===== TYPOGRAPHY UTILITIES ===== */
.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--text-primary);
  position: relative;
  padding-bottom: var(--spacing-md);
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--color-secondary);
}
.section-subtitle {
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--color-gray-700);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--lh-normal);
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (min-width: 768px) {
  h1 {
    font-size: var(--fs-4xl);
  }
  h2 {
    font-size: var(--fs-3xl);
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: var(--fs-5xl);
  }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}
