/**
 * Inline type treatments for Literata text.
 *
 * WHY THIS FILE EXISTS
 *
 * On actabl.com, italic and bold Literata are font *families*, not font
 * *styles*. The child theme registers `LiterataSemiBoldItalic` and
 * `LiterataExtraBoldItalic` as their own families and applies them by tag
 * (h2 and h4), with no `font-style` and no `font-weight` anywhere in the
 * cascade. The family this plugin's modules name, plain `Literata`, has
 * no italic face at all: it is served by Beaver Builder's Google Fonts
 * request, which carries upright weights only, and only 400 and 500 of
 * those are real. Everything else is synthesized.
 *
 * So an editor pressing the italic or bold button inside one of our modules
 * gets a browser-faked slant or a browser-faked bold, which is what the
 * client reported as "a synthetic or forced italic". Selecting the real
 * family is the only way to get real glyphs.
 *
 * THE RESETS ARE LOAD-BEARING
 *
 * `font-style: normal` and `font-weight: normal` are not tidying. Each
 * static cut is a single face registered as normal/normal, with the weight
 * and slant baked into the glyphs. Leave `font-style: italic` in place and
 * the browser slants glyphs that are already slanted; leave an inherited
 * 500 in place and it emboldens a face that is already semibold.
 *
 * DEPENDENCY
 *
 * The upright text these rules sit inside depends on Beaver Builder
 * requesting Google's Literata, which nothing in this plugin or the child
 * theme guarantees. If that request goes away, module type falls back to
 * Georgia. See docs/beaver-builder-module-patterns.md.
 *
 * WHEN THE VARIABLE FONT SHIPS
 *
 * Once the child theme serves a real `Literata` family with upright and
 * italic faces across 200-900, this whole file collapses to
 * `font-style: italic` and `font-weight: 600` on the same selectors.
 * That is the reason it is one file and not sixteen edits.
 */

/* --------------------------------------------------------------------------
   Every element in this plugin that renders Literata.
   Keep this list in sync when a module adds or removes a Literata rule.
   -------------------------------------------------------------------------- */

/* Emphasis: the real italic face, not a synthesized slant. */
:is(
	.actabl-faq-section .fl-heading,
	.actabl-faq-section .fl-heading-text,
	.actabl-ai-insights-changes-everything__title,
	.actabl-ai-insights-changes-everything__stat,
	.actabl-ai-insights-how-it-works__title,
	.actabl-ai-insights-how-it-works__mcard-title,
	.actabl-product-faq__heading,
	.actabl-product-faq__question,
	.actabl-product-feature-grid__heading,
	.actabl-product-hero__heading,
	.actabl-product-integrations__heading,
	.actabl-product-resources__heading,
	.actabl-product-stats-cards__stat,
	.actabl-product-testimonials__heading,
	.actabl-product-testimonials__quote,
	.actabl-product-video-proof__heading,
	.actabl-request-a-demo__heading
) :is(em, i, cite) {
	font-family: "LiterataSemiBoldItalic";
	font-style: normal;
	font-weight: normal;
}

/* Strong: clamped to the heaviest real upright weight.
   There is no upright bold Literata on this site: both self-hosted bold
   cuts are italic, so 700 can only ever be synthesized. 500 is the
   heaviest weight Beaver Builder's request actually serves. */
:is(
	.actabl-faq-section .fl-heading,
	.actabl-faq-section .fl-heading-text,
	.actabl-ai-insights-changes-everything__title,
	.actabl-ai-insights-changes-everything__stat,
	.actabl-ai-insights-how-it-works__title,
	.actabl-ai-insights-how-it-works__mcard-title,
	.actabl-product-faq__heading,
	.actabl-product-faq__question,
	.actabl-product-feature-grid__heading,
	.actabl-product-hero__heading,
	.actabl-product-integrations__heading,
	.actabl-product-resources__heading,
	.actabl-product-stats-cards__stat,
	.actabl-product-testimonials__heading,
	.actabl-product-testimonials__quote,
	.actabl-product-video-proof__heading,
	.actabl-request-a-demo__heading
) :is(strong, b) {
	font-weight: 500;
}

/* Links: inherit the surrounding treatment.
   The theme paints every anchor navy, which is invisible inside the white
   headings on the dark testimonial and video-proof sections. */
:is(
	.actabl-faq-section .fl-heading,
	.actabl-faq-section .fl-heading-text,
	.actabl-ai-insights-changes-everything__title,
	.actabl-ai-insights-changes-everything__stat,
	.actabl-ai-insights-how-it-works__title,
	.actabl-ai-insights-how-it-works__mcard-title,
	.actabl-product-faq__heading,
	.actabl-product-faq__question,
	.actabl-product-feature-grid__heading,
	.actabl-product-hero__heading,
	.actabl-product-integrations__heading,
	.actabl-product-resources__heading,
	.actabl-product-stats-cards__stat,
	.actabl-product-testimonials__heading,
	.actabl-product-testimonials__quote,
	.actabl-product-video-proof__heading,
	.actabl-request-a-demo__heading
) a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}
