/* ============================================================================
   Websly 5.1 — Legacy Typography Aliases (v2)
   ============================================================================
   Maps pre-5.1 utility classes onto the new category-based vars.

   In v1 (Phase 1) these consumed per-tier scale multiplier vars
   (--ws-typo-scale-*). Those multipliers were deleted in v2 — sizes now
   come direct from the Customizer's per-category Desktop+Mobile clamps.

   Aliases point at the closest matching category var so that any template
   still using `.text-fluid-h1`, `.text-section-title`, `.text-section-subtitle`,
   etc. picks up the Customizer's category settings automatically.

   Deprecation: aliases stay on for the foreseeable future, gated behind
   `WEBSLY_LEGACY_TYPOGRAPHY` constant (default true). Set false in wp-config
   to skip loading this file entirely.

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

/* Hero-tier alias — heroes are intentionally OUTSIDE the global Customizer
   typography system in v2 (they're controlled by each hero block's local
   inspector). When .text-fluid-h1 appears INSIDE a Tier-C exempt block,
   the .ws-typo-exempt freeze unsets these vars and lets the block's own
   size class win. When it appears outside, it defaults to a sensible
   poster size via the property fallbacks. */
.text-fluid-h1 {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem); /* hero poster default — caps ~72px desktop */
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
}

/* Section title — the most-used heading class across the theme. */
.text-fluid-h2,
.text-section-title {
    font-family:    var(--ws-typo-cat-section-title-family);
    font-size:      var(--ws-typo-cat-section-title-size);
    font-weight:    var(--ws-typo-cat-section-title-weight);
    letter-spacing: var(--ws-typo-cat-section-title-tracking);
    line-height:    var(--ws-typo-cat-section-title-lh);
    font-style:     var(--ws-typo-cat-section-title-style);
}

/* H3-sized utility — used by some card-internal headings. */
.text-fluid-h3 {
    font-family:    var(--ws-typo-cat-card-title-family);
    font-size:      var(--ws-typo-cat-card-title-size);
    font-weight:    var(--ws-typo-cat-card-title-weight);
    letter-spacing: var(--ws-typo-cat-card-title-tracking);
    line-height:    var(--ws-typo-cat-card-title-lh);
    font-style:     var(--ws-typo-cat-card-title-style);
}

/* Section subtitle / lead-paragraph aliases. */
.text-section-subtitle,
.ws-section-desc {
    font-family:    var(--ws-typo-cat-section-subtitle-family);
    font-size:      var(--ws-typo-cat-section-subtitle-size);
    font-weight:    var(--ws-typo-cat-section-subtitle-weight);
    letter-spacing: var(--ws-typo-cat-section-subtitle-tracking);
    line-height:    var(--ws-typo-cat-section-subtitle-lh);
    font-style:     var(--ws-typo-cat-section-subtitle-style);
}

/* Older marker classes — no rules, just keep them recognised in the cascade
   so existing :where() selectors elsewhere in the theme don't break. */
.ws-type-titles,
.ws-type-title,
.ws-type-subtitle,
.ws-type-heading,
.ws-type-body,
.ws-type-label,
.ws-type-display,
.ws-type-numeric,
.ws-type-quote,
.ws-type-code,
.ws-type-title { /* (duplicate intentional — historical alias) */ }
