/* ============================================================
   Base Styles — Typography, links, global elements
   ============================================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* --- Headings (Montserrat from Site A) --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-6xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-4xl);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
}

/* --- Body text --- */
p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

strong { font-weight: 600; color: var(--text-primary); }

/* --- Links --- */
a:not([class]) {
  color: var(--accent-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

a:not([class]):hover {
  color: var(--accent-secondary-hover);
}

/* --- Lists --- */
.prose ul, .prose ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

/* --- Code --- */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--bg-tertiary);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

/* --- Eyebrow / label text --- */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
}

/* --- Section heading group --- */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: var(--text-lg);
}

/* --- Dark section overrides --- */
.dark-section {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4 {
  color: var(--text-on-dark);
}

.dark-section p,
.dark-section li {
  color: var(--text-on-dark-muted);
}

.dark-section .eyebrow {
  color: var(--accent-primary);
}

/* --- Skip link (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-primary);
  color: white;
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* --- Selection --- */
::selection {
  background-color: var(--accent-primary-light);
  color: var(--text-primary);
}

/* --- Responsive typography --- */
@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-xl); }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}
