/* ==========================================================
   Silakab — Typography
   ========================================================== */

/* ── Headings ── */

h1, .h1 {
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  font-weight: 700;
}

h2, .h2 {
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  font-weight: 700;
}

h3, .h3 {
  font-size: var(--text-h3);
  line-height: var(--lh-h3);
  font-weight: 700;
}

h4, .h4 {
  font-size: var(--text-h4);
  line-height: var(--lh-h4);
  font-weight: 700;
}

/* ── Body text variants ── */

.text-lg {
  font-size: var(--text-body-lg);
  line-height: var(--lh-body);
}

.text-sm {
  font-size: var(--text-body-sm);
  line-height: 1.6;
}

.text-caption {
  font-size: var(--text-caption);
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-caption);
  font-weight: 600;
  text-transform: uppercase;
}

/* ── Emphasis ── */

.text-semibold {
  font-weight: 600;
}

/* ── Dark background text ── */

.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4,
.dark-bg .h1, .dark-bg .h2, .dark-bg .h3, .dark-bg .h4 {
  color: var(--color-white);
}

.dark-bg p, .dark-bg li, .dark-bg span {
  color: var(--color-muted-light);
}

/* ── Light background text ── */

.light-bg h1, .light-bg h2, .light-bg h3, .light-bg h4,
.light-bg .h1, .light-bg .h2, .light-bg .h3, .light-bg .h4 {
  color: var(--color-dark-surface);
}

.light-bg p, .light-bg li, .light-bg span {
  color: var(--color-muted-dark);
}

/* ── Gradient text accent ── */

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Links in body text ── */

.body-link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-smooth);
}

.body-link:hover {
  color: var(--color-secondary);
}

/* ── Responsive Typography ── */

@media (max-width: 1024px) {
  h1, .h1 { font-size: 2.75rem; }
  h2, .h2 { font-size: 2rem; }
  h3, .h3 { font-size: 1.5rem; }
}

@media (max-width: 640px) {
  h1, .h1 {
    font-size: 2.25rem;  /* 36px */
  }
  h2, .h2 {
    font-size: 1.75rem;  /* 28px */
  }
  h3, .h3 {
    font-size: 1.375rem; /* 22px */
  }
  h4, .h4 {
    font-size: 1.125rem; /* 18px */
  }
  .text-lg {
    font-size: 1rem;
  }
  body {
    font-size: 0.9375rem; /* 15px */
  }
  .text-sm {
    font-size: 0.8125rem; /* 13px */
  }
}
