/* css/typography.css */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

/* Define generic typography rules and utility classes */

body {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: var(--font-heading);
  font-weight: var(--weight-heavy);
  color: inherit;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  margin-bottom: var(--space-24);
}

h2 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  margin-bottom: var(--space-32);
}

h3 {
  font-size: clamp(1.25rem, 2vw + 1rem, 1.75rem);
  margin-bottom: var(--space-16);
}

h4 {
  font-size: clamp(1.125rem, 1.5vw + 1rem, 1.25rem);
}

p {
  font-family: var(--font-body);
  margin-bottom: var(--space-16);
  font-size: clamp(1rem, 1.2vw + 0.8rem, 1.125rem);
  color: inherit;
}

/* Screen reader only - used for AEO and accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   TYPOGRAPHY CLASSES (Utilities)
   ========================================= */

.display-xl {
  font-family: var(--font-heading);
  font-weight: var(--weight-heavy);
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -3px;
}

.display-lg {
  font-family: var(--font-heading);
  font-weight: var(--weight-heavy);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -2px;
}

.heading-md {
  font-family: var(--font-heading);
  font-weight: var(--weight-heavy);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -1px;
}

.body {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: 1rem;
  letter-spacing: 0;
}

.body-sm {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  font-size: 0.875rem;
}

.label {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Color Utilities */
.text-primary { color: var(--text-primary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--text-accent); }
.text-inverse { color: var(--text-inverse); }

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-accent);
}
