/* Shared utility classes: add to a semantic HTML element or an Elementor widget. */
.t-heading-1 { --type-size: var(--text-heading-1-size); }
.t-heading-2 { --type-size: var(--text-heading-2-size); }
.t-heading-3 { --type-size: var(--text-heading-3-size); }
.t-heading-4 { --type-size: var(--text-heading-4-size); }
.t-heading-5 { --type-size: var(--text-heading-5-size); }

:is(.t-heading-1, .t-heading-2, .t-heading-3, .t-heading-4, .t-heading-5) {
    --type-family: var(--font-family-heading);
    --type-weight: var(--text-heading-weight);
    --type-line-height: var(--text-heading-line-height);
}

.t-body,
.t-body-regular,
.t-body-bold {
    --type-size: var(--text-body-size);
    --type-family: var(--font-family-body);
    --type-line-height: var(--text-body-line-height);
}
.t-body { --type-weight: var(--font-weight-book); }
.t-body-regular { --type-weight: var(--font-weight-regular); }
/* Figma copy BOLD is Medium/600, not Bold/700. */
.t-body-bold { --type-weight: var(--font-weight-medium); }
.t-body-sm {
    --type-family: var(--font-family-body);
    --type-size: var(--text-body-sm-size);
    --type-weight: var(--font-weight-regular);
    --type-line-height: var(--text-body-sm-line-height);
}
.t-caption {
    --type-family: var(--font-family-body);
    --type-size: var(--text-caption-size);
    --type-weight: var(--font-weight-regular);
    --type-line-height: var(--text-caption-line-height);
}

:is(.t-heading-1, .t-heading-2, .t-heading-3, .t-heading-4, .t-heading-5,
    .t-body, .t-body-regular, .t-body-bold, .t-body-sm, .t-caption),
.sm-design-system :is(.t-heading-1, .t-heading-2, .t-heading-3, .t-heading-4, .t-heading-5,
    .t-body, .t-body-regular, .t-body-bold, .t-body-sm, .t-caption) {
    font-family: var(--type-family);
    font-size: var(--type-size);
    font-weight: var(--type-weight);
    line-height: var(--type-line-height);
    letter-spacing: var(--letter-spacing-default);
}

/* Elementor assigns classes to the widget wrapper, not its actual heading. */
.elementor.elementor .elementor-element:is(
    .t-heading-1, .t-heading-2, .t-heading-3, .t-heading-4, .t-heading-5,
    .t-body, .t-body-regular, .t-body-bold, .t-body-sm, .t-caption
) :is(.elementor-heading-title, .elementor-widget-container, .elementor-button) {
    font-family: var(--type-family);
    font-size: var(--type-size);
    font-weight: var(--type-weight);
    line-height: var(--type-line-height);
    letter-spacing: var(--letter-spacing-default);
}

/* Keep text-editor paragraphs/links consistent with the chosen utility. */
.elementor.elementor .elementor-widget-text-editor:is(
    .t-body, .t-body-regular, .t-body-bold, .t-body-sm, .t-caption
) .elementor-widget-container :is(p, li, a) {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}

/* Buttons are links styled as buttons: no underline in any state (theme reset underlines a:hover). */
:is(.sm-catalogue-button, .sm-button, .sm-hero__button):is(:link, :visited, :hover, :focus, :focus-visible, :active) { text-decoration: none; }
