/* Typography System Standards */

/* Base typography reset */

* {
  font-family: var(--font-family-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
button,
input,
textarea,
label {
  margin: 0;
  padding: 0;
  color: var(--text-primary);
}

/* Header Styles */
h1,
.h1 {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-headers-h1);
  font-size: var(--font-size-headers-h1);
  line-height: var(--font-line-height-headers-h1);
  letter-spacing: var(--font-letter-spacing-headers-h1);
}

h2,
.h2 {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-headers-h2);
  font-size: var(--font-size-headers-h2);
  line-height: var(--font-line-height-headers-h2);
  letter-spacing: var(--font-letter-spacing-headers-h2);
}

h3,
.h3 {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-headers-h3);
  font-size: var(--font-size-headers-h3);
  line-height: var(--font-line-height-headers-h3);
  letter-spacing: var(--font-letter-spacing-headers-h3);
}

h4,
.h4 {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-headers-h4);
  font-size: var(--font-size-headers-h4);
  line-height: var(--font-line-height-headers-h4);
  letter-spacing: var(--font-letter-spacing-headers-h4);
}

h5,
.h5 {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-headers-h5);
  font-size: var(--font-size-headers-h5);
  line-height: var(--font-line-height-headers-h5);
  letter-spacing: var(--font-letter-spacing-headers-h5);
}

h6,
.h6 {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-headers-h6);
  font-size: var(--font-size-headers-h6);
  line-height: var(--font-line-height-headers-h6);
  letter-spacing: var(--font-letter-spacing-headers-h6);
}

/* Body Text Styles */
p,
.body-default {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-body-default);
  font-size: var(--font-size-body-default);
  line-height: var(--font-line-height-body-default);
  letter-spacing: var(--font-letter-spacing-body-default);
}

a,
.body-link {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-body-link);
  font-size: var(--font-size-body-link);
  line-height: var(--font-line-height-body-link);
  letter-spacing: var(--font-letter-spacing-body-link);
}

strong,
.body-bold {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-body-bold);
  font-size: var(--font-size-body-bold);
  line-height: var(--font-line-height-body-bold);
  letter-spacing: var(--font-letter-spacing-body-bold);
}

em,
.body-italic {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-body-italic);
  font-style: italic;
  font-size: var(--font-size-body-italic);
  line-height: var(--font-line-height-body-italic);
  letter-spacing: var(--font-letter-spacing-body-italic);
}

.fine-print {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-body-fine-print);
  font-size: var(--font-size-body-fine-print);
  line-height: var(--font-line-height-body-fine-print);
  letter-spacing: var(--font-letter-spacing-body-fine-print);
}

/* Blockquote Styles */
blockquote {
  margin: 0;
  padding: 0;
}

blockquote .blockquote-header {
  font-family: var(--font-family-title);
  font-weight: var(--font-weights-blockquote-header);
  font-size: var(--font-size-blockquote-header);
  line-height: var(--font-line-height-blockquote-header);
  letter-spacing: var(--font-letter-spacing-blockquote-header);
}

blockquote .blockquote-body,
blockquote:not(.blockquote-header) {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-blockquote-body);
  font-size: var(--font-size-blockquote-body);
  line-height: var(--font-line-height-blockquote-body);
  letter-spacing: var(--font-letter-spacing-blockquote-body);
}

/* Button and Interactive Element Styles */
button,
.btn {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-other-button);
  font-size: var(--font-size-other-button);
  line-height: normal;
  letter-spacing: var(--font-letter-spacing-other-button);
}

/* Caption and Small Text */
.caption {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-other-caption);
  font-size: var(--font-size-other-caption);
  line-height: var(--font-line-height-other-caption);
  letter-spacing: var(--font-letter-spacing-other-caption);
}

.overline {
  font-family: var(--font-family-body);
  font-weight: var(--font-weights-other-overline);
  font-size: var(--font-size-other-overline);
  line-height: var(--font-line-height-other-overline);
  text-transform: uppercase;
  letter-spacing: var(--font-letter-spacing-other-overline);
}

/* Responsive Typography */
@media (max-width: 767px) {
  h1,
  .h1 {
    font-size: clamp(28px, 8vw, var(--font-size-headers-h1));
    line-height: clamp(34px, 9vw, var(--font-line-height-headers-h1));
  }

  h2,
  .h2 {
    font-size: clamp(24px, 6vw, var(--font-size-headers-h2));
    line-height: clamp(30px, 7vw, var(--font-line-height-headers-h2));
  }

  h3,
  .h3 {
    font-size: clamp(22px, 5vw, var(--font-size-headers-h3));
    line-height: clamp(28px, 6vw, var(--font-line-height-headers-h3));
  }
}

/* Typography modifiers */
.text-large {
  font-size: 1.125em;
  line-height: 1.4;
}

.text-small {
  font-size: 0.875em;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.75em;
  line-height: 1.6;
}

/* Text color utilities */
.text-primary {
  color: var(--text-primary);
}
.text-medium {
  color: var(--text-medium);
}
.text-on-light {
  color: var(--text-on-light);
}

/* Font weight utilities */
.font-black {
  font-weight: var(--font-weight-black);
}
.font-bold {
  font-weight: var(--font-weight-bold);
}
.font-semibold {
  font-weight: var(--font-weight-semibold);
}
.font-regular {
  font-weight: var(--font-weight-regular);
}

/* Text alignment utilities */
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-justify {
  text-align: justify;
}

/* Text decoration utilities */
.underline {
  text-decoration: underline;
}
.no-underline {
  text-decoration: none;
}

/* Letter spacing utilities */
.tracking-tight {
  letter-spacing: -0.025em;
}
.tracking-normal {
  letter-spacing: 0;
}
.tracking-wide {
  letter-spacing: 0.025em;
}
.tracking-wider {
  letter-spacing: 0.05em;
}

/* Line height utilities */
.leading-none {
  line-height: 1;
}
.leading-tight {
  line-height: 1.25;
}
.leading-normal {
  line-height: 1.5;
}
.leading-relaxed {
  line-height: 1.625;
}
.leading-loose {
  line-height: 2;
}
