/**
 * Theme Typography
 *
 * Font utility classes matching the Stitch/DESIGN.md type scale.
 * Class names mirror the Stitch HTML class names so Elementor
 * Custom CSS references work without translation.
 *
 * All classes are prefixed with .ei- in addition to the Stitch
 * names to avoid collisions with Elementor or WP core.
 *
 * @package EthicalInfrastructure
 */

/* ─────────────────────────────────────────────────────────────────────────────
   DISPLAY
   ───────────────────────────────────────────────────────────────────────────── */

.ei-text-display-lg,
.text-display-lg {
  font-family: var(--font-display);
  font-size: var(--fs-display-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADLINES
   ───────────────────────────────────────────────────────────────────────────── */

.ei-text-headline-xl,
.text-headline-xl {
  font-family: var(--font-display);
  font-size: var(--fs-headline-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline);
}

.ei-text-headline-lg,
.text-headline-lg {
  font-family: var(--font-display);
  font-size: var(--fs-headline-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline-lg);
}

.ei-text-headline-md,
.text-headline-md {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline-md);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BODY
   ───────────────────────────────────────────────────────────────────────────── */

.ei-text-body-lg,
.text-body-lg {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
}

.ei-text-body-md,
.text-body-md {
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
}

/* ─────────────────────────────────────────────────────────────────────────────
   LABELS — Institutional uppercase caps. The signature of this design.
   ───────────────────────────────────────────────────────────────────────────── */

.ei-text-label-caps,
.text-label-caps,
.font-label-caps {
  font-family: var(--font-body);
  font-size: var(--fs-label-caps);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

.ei-text-label-tiny,
.text-label-tiny,
.font-label-tiny {
  font-family: var(--font-body);
  font-size: var(--fs-label-tiny);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label-tiny);
  text-transform: uppercase;
}

/* Wide tracking variant used in hero eyebrows */
.ei-text-label-wide {
  font-family: var(--font-body);
  font-size: var(--fs-label-caps);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label-wide);
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PROSE — Used in the About page document layout.
   Matches the "academic document" style: justified text, generous leading.
   ───────────────────────────────────────────────────────────────────────────── */

.ei-prose {
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: var(--fw-regular);
  line-height: 1.8;
  color: var(--color-on-surface-variant);
}

.ei-prose p {
  margin-bottom: var(--space-4);
}

.ei-prose p:last-child {
  margin-bottom: 0;
}

/* Blockquote — About page featured quote */
.ei-blockquote {
  border-left: 4px solid var(--color-outline-variant);
  padding-left: var(--space-8);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  font-style: italic;
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  color: var(--color-on-surface-variant);
  margin: var(--space-6) 0;
}

/* Pull-quote box — About page highlighted research pillar */
.ei-pull-quote {
  background-color: var(--color-surface-container-low);
  border: 1px solid var(--color-outline-variant);
  padding: var(--space-card-padding);
  margin: var(--space-6) 0;
}

.ei-pull-quote__label {
  font-family: var(--font-body);
  font-size: var(--fs-label-caps);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.ei-pull-quote__text {
  font-style: italic;
  color: var(--color-on-surface-variant);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLOBAL HEADING DEFAULTS
   Applied to all h1–h6 so WP content looks correct without extra classes.
   ───────────────────────────────────────────────────────────────────────────── */

h1, .h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--color-on-surface);
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline);
  color: var(--color-on-surface);
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline-lg);
  color: var(--color-on-surface);
}

h4, .h4 {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-headline-md);
  color: var(--color-on-surface);
}

h5, .h5 {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-body);
  color: var(--color-on-surface);
}

h6, .h6 {
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-body);
  color: var(--color-on-surface);
}

p {
  font-size: var(--fs-body-md);
  line-height: var(--lh-body);
  color: var(--color-on-surface-variant);
}

/* Strong defaults */
strong, b { font-weight: var(--fw-semibold); }
em, i     { font-style: italic; }

/* Link defaults in content */
.ei-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: var(--transition-colors);
}
.ei-content a:hover {
  opacity: 0.75;
}

/* Horizontal rules */
hr {
  border: none;
  border-top: 1px solid var(--color-outline-variant);
  margin: var(--space-6) 0;
}
