/* ========================================
   BASE STYLES - Typography & Global Elements
   ======================================== */

/* Body */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Prevent body scroll when mobile nav is open */
body.nav-open {
  overflow: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: 0.01em;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  letter-spacing: 0;
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

/* Responsive headings */
@media (max-width: 768px) {
  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }
}

/* Paragraphs */
p {
  margin-bottom: var(--space-3);
  line-height: var(--line-height-relaxed);
}

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

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-dark);
}

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

/* Strong & emphasis */
strong, b {
  font-weight: var(--font-semibold);
}

em, i {
  font-family: var(--font-heading);
  font-style: italic;
}

/* Blockquotes - Minimal style */
blockquote {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-style: normal;
  font-weight: var(--font-light);
  line-height: var(--line-height-relaxed);
  padding-left: var(--space-4);
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-left: 2px solid var(--color-text);
  background-color: transparent;
  margin: var(--space-5) 0;
}

blockquote p {
  margin-bottom: 0;
}

/* Images */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Horizontal rule */
hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-5) 0;
}

/* Selection - Minimal inverted style */
::selection {
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* Accessibility - Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content link */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  z-index: var(--z-toast);
}

.skip-to-main:focus {
  top: 0;
}
