/* Typography System - The Local Pond */
/* Weight variance and proportional scaling for information architecture */

/* Base Typography */
body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  letter-spacing: var(--letter-spacing-normal);
}

/* Heading Hierarchy - Clear visual weights */

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-snug);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

/* Body Text */

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

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

/* Large body text for emphasis */
.text-lg {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

.text-xl {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-relaxed);
}

/* Small text for captions and metadata */
.text-sm {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.text-xs {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

/* Text colors */
.text-secondary {
  color: var(--color-text-secondary);
}

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

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

/* Font weight utilities */
.font-light {
  font-weight: var(--font-weight-light);
}

.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* Links */
a {
  color: var(--color-accent-600);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-in-out);
}

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

a:active {
  color: var(--color-accent-800);
}

/* Lists */
ul,
ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
  line-height: var(--line-height-relaxed);
}

/* Remove list styling for navigation and component lists */
nav ul,
nav ol,
ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li,
ul[role="list"] li,
ol[role="list"] li {
  margin-bottom: 0;
}

/* Code and monospace */
code,
kbd,
samp,
pre {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
}

code {
  padding: 0.125rem 0.25rem;
  background-color: var(--color-neutral-100);
  border-radius: var(--radius-sm);
  color: var(--color-primary-700);
}

pre {
  padding: var(--space-4);
  background-color: var(--color-neutral-100);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

pre code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
}

/* Blockquote */
blockquote {
  padding-left: var(--space-6);
  border-left: 4px solid var(--color-primary-400);
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

blockquote p {
  margin-bottom: var(--space-3);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  margin-top: var(--space-2);
}

/* Emphasis */
strong,
b {
  font-weight: var(--font-weight-bold);
}

em,
i {
  font-style: italic;
}

/* Abbreviations */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--color-border-light);
  margin: var(--space-8) 0;
}

/* Desktop adjustments */
@media (min-width: 1024px) {
  /* Increase body text size for desktop readability */
  body {
    font-size: var(--font-size-lg);
  }

  p {
    font-size: var(--font-size-lg);
  }

  /* Adjust large text proportionally */
  .text-lg {
    font-size: var(--font-size-xl);
  }

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

/* Print styles */
@media print {
  body {
    font-size: 12pt;
    color: #000;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    font-size: 18pt;
  }

  h3 {
    font-size: 14pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  /* Show URLs after links */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }
}
