/**
 * Typography System
 * Professional typographic scale for investor-grade presentation
 */

/* ============================================
   BASE TYPOGRAPHY
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADING HIERARCHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  line-height: 1.1;
  margin-top: 0;
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  margin-top: var(--space-12);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  margin-top: var(--space-10);
}

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

h5 {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero headlines */
.hero-title {
  font-size: var(--text-6xl);
  font-weight: var(--weight-black);
  line-height: 1.05;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg,
    var(--color-navy-900),
    var(--color-navy-700),
    var(--color-gold-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg,
    var(--color-platinum-100),
    var(--color-gold-light),
    var(--color-gold-medium)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-2xl);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

/* Section titles */
.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-6);
  position: relative;
  padding-bottom: var(--space-4);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg,
    var(--color-gold-medium),
    transparent
  );
}

/* ============================================
   BODY TEXT
   ============================================ */

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-primary);
}

.lead {
  font-size: var(--text-xl);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

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

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

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

/* ============================================
   TEXT UTILITIES
   ============================================ */

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

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

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

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

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

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

.text-gold {
  color: var(--color-gold-medium);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* ============================================
   LINKS
   ============================================ */

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

a:visited {
  color: var(--color-link-visited);
}

.link-gold {
  color: var(--color-gold-medium);
  font-weight: var(--weight-semibold);
}

.link-gold:hover {
  color: var(--color-gold-light);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* External link indicator */
a[target="_blank"]::after {
  content: ' ↗';
  font-size: 0.85em;
  opacity: 0.6;
}

/* ============================================
   LISTS
   ============================================ */

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

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

ul li {
  list-style-type: disc;
}

ul.checked-list {
  list-style: none;
  padding-left: 0;
}

ul.checked-list li::before {
  content: '✓';
  color: var(--color-success-medium);
  font-weight: var(--weight-bold);
  margin-right: var(--space-2);
}

/* ============================================
   CODE & PRE
   ============================================ */

code {
  font-family: var(--font-code);
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-primary);
}

pre {
  font-family: var(--font-code);
  font-size: var(--text-sm);
  background: var(--color-surface);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--color-border);
  overflow-x: auto;
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* ============================================
   BLOCKQUOTES
   ============================================ */

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-gold-medium);
  background: var(--color-surface);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

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

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

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

/* ============================================
   HORIZONTAL RULES
   ============================================ */

hr {
  border: none;
  height: var(--border-width);
  background: linear-gradient(90deg,
    transparent,
    var(--color-divider),
    transparent
  );
  margin: var(--space-12) 0;
}

hr.gold-divider {
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--color-gold-medium),
    transparent
  );
}

/* ============================================
   SPECIAL TEXT ELEMENTS
   ============================================ */

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold-medium);
  margin-bottom: var(--space-2);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-extrabold);
  line-height: 1;
  color: var(--color-gold-medium);
}

.stat-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

/* Financial impact text */
.impact-text {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-gold-dark);
  border-left: 3px solid var(--color-gold-medium);
  padding-left: var(--space-4);
  margin: var(--space-4) 0;
}

[data-theme="dark"] .impact-text {
  color: var(--color-gold-light);
}

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */

@media (max-width: 1200px) {
  :root {
    --text-6xl: 3rem;      /* 48px */
    --text-5xl: 2.5rem;    /* 40px */
    --text-4xl: 2rem;      /* 32px */
  }

  .hero-title {
    font-size: var(--text-5xl);
  }
}

@media (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;    /* 40px */
    --text-5xl: 2rem;      /* 32px */
    --text-4xl: 1.75rem;   /* 28px */
    --text-3xl: 1.5rem;    /* 24px */
  }

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

  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }
}

@media (max-width: 576px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }
}
