/* ═══════════════════════════════════════════
   DESIGN SYSTEM - TYPOGRAPHY
   CygnusAlpha Production Theme
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   HEADINGS - RESPONSIVE WITH CLAMP()
   ═══════════════════════════════════════════ */
h1, .h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 3.9vw, 4rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
  margin: 0 0 1.5rem 0;
}

h2, .h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 3vw, 3rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
  margin: 0 0 1.25rem 0;
}

h3, .h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.25vw, 2.25rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
  margin: 0 0 1rem 0;
}

h4, .h4 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.75vw, 1.75rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
  margin: 0 0 0.875rem 0;
}

h5, .h5 {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.5vw, 1.5rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
  color: var(--color-text);
  margin: 0 0 0.75rem 0;
}

h6, .h6 {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-normal);
  color: var(--color-text);
  margin: 0 0 0.625rem 0;
}

/* ═══════════════════════════════════════════
   BODY TEXT
   ═══════════════════════════════════════════ */
body {
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-normal);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  margin: 0 0 1rem 0;
  line-height: var(--lh-relaxed);
}

/* ═══════════════════════════════════════════
   TEXT UTILITIES
   ═══════════════════════════════════════════ */
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.text-3xl { font-size: var(--fs-3xl); }
.text-4xl { font-size: var(--fs-4xl); }
.text-5xl { font-size: var(--fs-5xl); }
.text-6xl { font-size: var(--fs-6xl); }

/* ═══════════════════════════════════════════
   FONT WEIGHT UTILITIES
   ═══════════════════════════════════════════ */
.font-light { font-weight: var(--fw-light); }
.font-normal { font-weight: var(--fw-normal); }
.font-medium { font-weight: var(--fw-medium); }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }
.font-extrabold { font-weight: var(--fw-extrabold); }

/* ═══════════════════════════════════════════
   TEXT COLOR UTILITIES
   ═══════════════════════════════════════════ */
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-secondary { color: var(--color-text-secondary); }
.text-dim { color: var(--color-text-dim); }

/* ═══════════════════════════════════════════
   TEXT ALIGNMENT
   ═══════════════════════════════════════════ */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ═══════════════════════════════════════════
   TEXT TRANSFORM
   ═══════════════════════════════════════════ */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

/* ═══════════════════════════════════════════
   LINKS
   ═══════════════════════════════════════════ */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base) var(--ease);
}

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

.link-primary {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.link-primary:hover {
  color: var(--color-primary-light);
  text-decoration-thickness: 2px;
}

/* ═══════════════════════════════════════════
   LISTS
   ═══════════════════════════════════════════ */
ul, ol {
  margin: 0 0 1rem 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: var(--lh-relaxed);
}

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

/* ═══════════════════════════════════════════
   SPECIAL TEXT EFFECTS
   ═══════════════════════════════════════════ */
.highlight,
.accent,
em.highlight,
span.highlight {
  display: inline;
  background: var(--gradient-accent);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 4s linear infinite;
  font-style: italic;
  font-weight: var(--fw-bold);
}

@keyframes shimmerText {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ═══════════════════════════════════════════
   LABELS & BADGES
   ═══════════════════════════════════════════ */
.label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-primary);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: var(--radius-circle);
}

/* ═══════════════════════════════════════════
   BLOCKQUOTE
   ═══════════════════════════════════════════ */
blockquote {
  font-size: var(--fs-2xl);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 2rem 0;
  padding: 2rem 2.5rem;
  background: var(--color-bg-card);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

blockquote p {
  margin: 0;
}

/* ═══════════════════════════════════════════
   CODE & PRE
   ═══════════════════════════════════════════ */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-elevated);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  color: var(--color-primary);
}

pre {
  background: var(--color-bg-elevated);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
  color: var(--color-text);
}

/* ═══════════════════════════════════════════
   SMALL TEXT
   ═══════════════════════════════════════════ */
small, .small {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

/* ═══════════════════════════════════════════
   LEAD TEXT
   ═══════════════════════════════════════════ */
.lead {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
}
