/* ==========================================================================
   BASE — Global Typography & Body Styles
   ========================================================================== */

body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-white);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--color-charcoal);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-h1);
  line-height: var(--leading-tight);
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-h2);
  line-height: var(--leading-snug);
}

h3 {
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-h3);
  line-height: var(--leading-heading);
}

/* Body Text */
p {
  margin-bottom: 1.5em;
  max-width: var(--content-max);
}

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

.lead {
  font-size: var(--text-body-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

strong, b {
  font-weight: 700;
}

/* Links */
a {
  transition: color var(--duration-fast) ease;
}

.text-link {
  color: var(--color-blue);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.text-link:hover {
  color: var(--color-blue-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Inline prose links (used inside paragraphs to cross-link between pages) */
.prose-link {
  color: var(--color-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
  transition: opacity var(--duration-fast) ease;
}

.prose-link:hover {
  opacity: 0.8;
}

/* Text Utilities */
.text-inverse {
  color: var(--color-text-inverse);
}

.text-muted-inverse {
  color: var(--color-text-muted-inverse);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-orange {
  color: var(--color-orange);
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: var(--text-body-sm);
}

/* Selection */
::selection {
  background-color: var(--color-orange);
  color: var(--color-white);
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-orange);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-md);
}
