/* ============================================================
   GRACE AFTER GRIT — Base Typography & Global Styles
   ============================================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  color: var(--md-on-surface);
  background-color: var(--md-surface);
  line-height: var(--leading-normal);
}

/* ---- Heading Hierarchy ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  color: var(--md-on-surface);
}

h1 {
  font-size: var(--text-display-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-display-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-headline-lg);
  font-weight: 700;
}

h4 {
  font-size: var(--text-headline-sm);
  font-weight: 600;
}

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

h6 {
  font-size: var(--text-title-md);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* ---- Paragraph ---- */
p {
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
  color: var(--md-on-surface-variant);
  max-width: 68ch;
}

p + p {
  margin-top: var(--space-4);
}

/* ---- Links ---- */
a {
  color: var(--md-primary);
  transition: color var(--duration-short) var(--motion-standard);
}

a:hover {
  color: var(--md-secondary);
}

/* ---- Selection ---- */
::selection {
  background-color: var(--md-secondary);
  color: var(--md-on-secondary);
}

/* ---- Accent font class ---- */
.font-accent {
  font-family: var(--font-display);
  font-style: italic;
}

/* ---- Small / Label text ---- */
small,
.text-label {
  font-size: var(--text-label-lg);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--md-on-surface-variant);
}

/* ---- Blockquote ---- */
blockquote {
  font-family: var(--font-display);
  font-size: var(--text-headline-sm);
  font-style: italic;
  color: var(--md-on-surface);
  border-left: 3px solid var(--md-secondary);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
}

/* ---- Horizontal Rule ---- */
hr {
  border: none;
  height: 1px;
  background-color: var(--md-outline);
  margin: var(--space-12) 0;
}

/* ---- Strong / Emphasis ---- */
strong {
  font-weight: 700;
  color: var(--md-on-surface);
}

em {
  font-style: italic;
}

/* ---- Responsive Typography ---- */
@media (max-width: 768px) {
  h1 {
    font-size: var(--text-display-md);
  }

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

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

  p {
    font-size: var(--text-body-md);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-display-sm);
  }

  h2 {
    font-size: var(--text-headline-md);
  }
}
