/* ============================================================================
   Websly 5.1 — Legacy Typography Aliases
   ============================================================================
   Maps pre-5.1 utility classes (.text-fluid-h1, .text-section-title, etc.)
   onto the new 17-token system so existing templates render identically
   while we migrate to `websly_typo_classes()`.

   These aliases mirror the same CSS-var-driven values as the new
   .ws-typo-* classes, so a Customizer change to a token flows through both
   the new helper-emitted classes AND any legacy hardcoded class strings.

   ─── Deprecation timeline ──────────────────────────────────────────────
     Phase 1 (now):   aliases ship, always enqueued.
     Phase 4 (later): legacy still works, but new blocks must use the helper.
     Phase 5:         aliases gated behind constant `WEBSLY_LEGACY_TYPOGRAPHY`
                      in wp-config.php. Default true; set false to drop them.
     Future major:    aliases removed entirely.

   Spec: WEBSLY-5.1-GUIDES/GUIDE-TYPOGRAPHY-ROLES-5.1.md §8
   ============================================================================ */

/* ─── Heroes / display-tier aliases ────────────────────────────────────── */
.text-fluid-h1 {
    font-family: var(--ws-font-display);
    font-size: calc(var(--ws-typo-display-xl-size) * var(--ws-typo-scale-display, 1));
    font-weight: var(--ws-typo-display-xl-weight);
    line-height: var(--ws-typo-display-xl-lh);
    letter-spacing: var(--ws-typo-display-xl-tracking);
}

.text-fluid-h2,
.text-section-title {
    font-family: var(--ws-font-heading);
    font-size: calc(var(--ws-typo-heading-xl-size) * var(--ws-typo-scale-heading, 1));
    font-weight: var(--ws-typo-heading-xl-weight);
    line-height: var(--ws-typo-heading-xl-lh);
    letter-spacing: var(--ws-typo-heading-xl-tracking);
}

.text-fluid-h3 {
    font-family: var(--ws-font-heading);
    font-size: calc(var(--ws-typo-heading-lg-size) * var(--ws-typo-scale-heading, 1));
    font-weight: var(--ws-typo-heading-lg-weight);
    line-height: var(--ws-typo-heading-lg-lh);
    letter-spacing: var(--ws-typo-heading-lg-tracking);
}

/* ─── Subtitle / lead aliases ──────────────────────────────────────────── */
.text-section-subtitle,
.ws-section-desc {
    font-family: var(--ws-font-body);
    font-size: calc(var(--ws-typo-body-lg-size) * var(--ws-typo-scale-body, 1));
    font-weight: var(--ws-typo-body-lg-weight);
    line-height: var(--ws-typo-body-lg-lh);
    letter-spacing: var(--ws-typo-body-lg-tracking);
}

/* ─── Role markers retained for back-compat with existing :where() rules ─ */
.ws-type-titles,
.ws-type-title {
    /* Existing templates use these as soft "this is a section title" markers.
       The new system encourages .ws-typo-heading-xl + .ws-type-heading. */
}

/*
 * NOTE — Tailwind text-size classes (text-3xl, text-4xl, etc.) are still
 * defined elsewhere and continue to work as raw size overrides. Phase 4
 * migration will replace these with explicit token classes.
 */
