/* ==========================================================================
   DESIGN 33 - TYPOGRAPHY & EDITORIAL STYLES
   Master Typography System — Inspired by Baunfire & Clay.global
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL TYPOGRAPHIC SMOOTHING & RENDERING
   -------------------------------------------------------------------------- */
body, h1, h2, h3, h4, h5, h6, p, a, span, button, input, textarea {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. HEADING HIERARCHY (MATHEMATICAL SCALE & OPTICAL NEGATIVE TRACKING)
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: var(--leading-section);
  letter-spacing: var(--tracking-section);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--leading-sub);
  letter-spacing: var(--tracking-section);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: var(--leading-card);
  letter-spacing: var(--tracking-sub);
}

h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-compact);
  letter-spacing: var(--tracking-card);
}

h5 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--tracking-snug);
}

h6 {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--tracking-snug);
}

/* --------------------------------------------------------------------------
   3. EDITORIAL DISPLAY HEADING SCALES (BAUNFIRE / CLAY ARCHETYPE)
   -------------------------------------------------------------------------- */
.display-hero {
  font-size: var(--fs-display-hero);
  font-weight: 800;
  line-height: var(--leading-hero);
  letter-spacing: var(--tracking-hero);
  color: var(--text-primary);
  text-wrap: balance;
}

.display-section {
  font-size: var(--fs-display-section);
  font-weight: 700;
  line-height: var(--leading-section);
  letter-spacing: var(--tracking-section);
  color: var(--text-primary);
  text-wrap: balance;
}

.display-sub {
  font-size: var(--fs-display-sub);
  font-weight: 600;
  line-height: var(--leading-sub);
  letter-spacing: var(--tracking-sub);
  text-wrap: balance;
}

.display-card {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-card);
  letter-spacing: var(--tracking-card);
}

/* --------------------------------------------------------------------------
   4. BODY TEXT & EDITORIAL PROSE
   -------------------------------------------------------------------------- */
.lead-text {
  font-size: var(--fs-lead);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--text-secondary);
  max-width: 64ch;
  text-wrap: pretty;
}

.body-lead {
  font-size: var(--text-lg);
  line-height: 1.58;
  letter-spacing: var(--tracking-body);
  color: var(--text-primary);
  text-wrap: pretty;
}

.body-muted, p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  text-wrap: pretty;
}

.body-small {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  letter-spacing: var(--tracking-snug);
}

.body-xs {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.48;
  letter-spacing: var(--tracking-snug);
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   5. EDITORIAL SERIF ACCENTS & PRESTIGE ITALICS
   -------------------------------------------------------------------------- */
.editorial-italic {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
  padding-right: 0.05em;
}

/* --------------------------------------------------------------------------
   6. TECHNICAL MONOSPACED LABELS, EYEBROWS & TELEMETRY
   -------------------------------------------------------------------------- */
.mono-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  line-height: 1;
}

.mono-tag-accent {
  color: var(--accent-terracotta);
}

.section-eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  row-gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--accent-terracotta);
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  background-color: var(--accent-terracotta);
}

.badge-dark {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
  border: 1px solid var(--border-dark-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono);
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   7. EDITORIAL & INTERACTIVE TEXT LINKS
   -------------------------------------------------------------------------- */
.text-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-medium);
  letter-spacing: var(--tracking-body);
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.text-link:hover {
  color: var(--accent-terracotta);
  text-decoration-color: var(--accent-terracotta);
}

.editorial-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--accent-terracotta);
  letter-spacing: var(--tracking-snug);
}

.editorial-link:hover {
  color: var(--accent-terracotta-hover);
}
