/**
 * @file
 * Typography styles with optical weight color hierarchy.
 */

:root {
  /* Font families */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --font-heading: var(--font-primary);

  /* Font sizes */
  --font-size-base: 16px;
  --font-size-small: 0.875rem;
  --font-size-large: 1.125rem;
  --font-size-h1: 2.5rem;
  --font-size-h2: 2rem;
  --font-size-h3: 1.5rem;
  --font-size-h4: 1.25rem;
  --font-size-h5: 1.125rem;
  --font-size-h6: 1rem;

  /* Line heights */
  --line-height-base: 1.6;
  --line-height-heading: 1.3;

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

/* Base typography */
html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-primary);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-normal);
}

/* Headings with optical weight colors */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  margin-top: 0;
  margin-bottom: 0.5em;
}

/* Large headings - lighter green, less contrast */
h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading-large);
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-heading-large);
}

/* Medium headings - medium green */
h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading-medium);
}

h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading-medium);
}

/* Small headings - darker green, more contrast */
h5 {
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading-small);
}

h6 {
  font-size: var(--font-size-h6);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading-small);
}

/* Paragraphs */
p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

/* Lead paragraph - larger, slightly lighter */
p.lead,
.lead p {
  font-size: var(--font-size-large);
  color: var(--color-text-secondary);
}

/* Small text - higher contrast for readability */
small,
.small {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
}

/* Muted text */
.text-muted {
  color: var(--color-text-muted);
}

/* Links */
a {
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Strong/bold - slightly darker for emphasis */
strong, b {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

/* Emphasis */
em, i {
  font-style: italic;
}

/* Site branding */
.site-branding {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text-primary);
}

.site-branding:hover,
.site-branding:focus {
  text-decoration: none;
}

.site-name {
  display: block;
  font-size: 6rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--color-green-light);
}

.site-slogan {
  display: block;
  font-size: 2rem;
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

/* Menu typography */
.menu a {
  font-weight: var(--font-weight-medium);
  color: var(--color-green-medium);
}

.menu a:hover,
.menu a:focus {
  color: var(--color-green-dark);
}

/* Lists in content */
ul, ol {
  color: var(--color-text-primary);
}

li strong {
  color: var(--color-green-medium);
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--color-green-light);
  padding-left: 1rem;
  margin-left: 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

/* Code */
code {
  background-color: var(--color-border-light);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--color-green-dark);
}
