/**
 * Typography Styles
 * Font styles for QVG Capital theme
 */

/* ============================================
   Headings
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: var(--tracking-brand);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: var(--tracking-brand);
}

h2 {
  font-size: var(--font-size-3xl);
  letter-spacing: var(--tracking-brand);
}

h3 {
  font-size: var(--font-size-2xl);
  letter-spacing: var(--tracking-brand);
}

h4 {
  font-size: var(--font-size-xl);
  letter-spacing: var(--tracking-brand);
}

h5 {
  font-size: var(--font-size-lg);
  letter-spacing: var(--tracking-brand);
}

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: var(--tracking-brand);
}

/* Brand guideline: Sub-headers use PMS 563 */
.sub-header,
.section-subtitle,
h3.subtitle,
h4.subtitle {
  color: var(--color-teal);
  text-transform: none;
  letter-spacing: 0.05em;
}

/* ============================================
   Body Text
   ============================================ */

p {
  margin-bottom: var(--spacing-md);
}

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

.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

.small,
small {
  font-size: var(--font-size-sm);
}

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

em,
i {
  font-style: italic;
}

/* ============================================
   Links
   ============================================ */

.link-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-arrow::after {
  content: " →";
  display: inline-block;
  transition: transform var(--transition-base);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ============================================
   Lists
   ============================================ */

ul,
ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-xs);
}

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

ul ul,
ol ol,
ul ol,
ol ul {
  margin-top: var(--spacing-xs);
  margin-bottom: 0;
}

/* Unstyled list */
.list-unstyled {
  list-style: none;
  padding-left: 0;
}

/* Inline list */
.list-inline {
  list-style: none;
  padding-left: 0;
}

.list-inline li {
  display: inline-block;
  margin-right: var(--spacing-sm);
}

/* ============================================
   Blockquotes
   ============================================ */

blockquote {
  font-size: var(--font-size-lg);
  font-style: italic;
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
  border-left: 4px solid var(--color-accent);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

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

blockquote cite::before {
  content: "— ";
}

/* ============================================
   Code
   ============================================ */

code,
pre {
  font-family: 'Courier New', Courier, monospace;
  background-color: var(--color-background-alt);
}

code {
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

pre {
  display: block;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--spacing-md);
}

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

/* ============================================
   Horizontal Rule
   ============================================ */

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--spacing-lg) 0;
}

/* ============================================
   Text Utilities
   ============================================ */

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

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

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

.text-white {
  color: var(--color-text-light);
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-capitalize {
  text-transform: capitalize;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-body {
  font-family: var(--font-body);
}

/* ============================================
   Responsive Typography
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

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

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

  blockquote {
    font-size: var(--font-size-base);
  }
}
