////
///
/// Stack Font Typography Mixins Module
/// ===========================================================================
///
/// @group Font
/// @author Scape Agency
/// @link https://scape.style
/// @since 0.1.0 initial release
/// @todo None
/// @access public
///
////

// ============================================================================
// Use
// ============================================================================

// @use '../dev' as *;

// ============================================================================
// Variables
// ============================================================================

///
/// Fallback Font Stacks
/// ---------------------------------------------------------------------------
///
/// These variables define fallback font stacks for different types of fonts
/// (sans-serif, serif, monospace). They are used when the preferred font is
/// not available on the user's system.
///
$font_fallback_sans: "Roboto Sans", "Helvetica Neue", "Helvetica", "Arial",
    sans-serif !default;
$font_fallback_serif: "Roboto Serif", "Times New Roman", "Times", serif !default;
$font_fallback_slab: "Roboto Slab", "Rockwell", "Georgia", "serif" !default;
$font_fallback_mono: "Roboto Mono", "Courier New", "Courier", monospace !default;

///
/// Default Font Definitions
/// ---------------------------------------------------------------------------
///
/// These variables define the default font families used in the project.
/// The `!default` flag allows them to be overridden if necessary.
///
$font_default_sans: "stylescape_sans_regular" !default;
$font_default_serif: "stylescape_serif_regular" !default;
$font_default_slab: "stylescape_slab_regular" !default;
$font_default_mono: "stylescape_mono_regular" !default;

///
/// Combined Font Stacks
/// ---------------------------------------------------------------------------
///
/// These variables combine the default font with its respective fallback
/// stack, ensuring that a suitable font is always available. The `!important`
/// flag ensures that these font stacks take precedence in CSS rendering.
///
$font_stack_sans: $font_default_sans, $font_fallback_sans !default;
$font_stack_serif: $font_default_serif, $font_fallback_serif !default;
$font_stack_slab: $font_default_slab, $font_fallback_slab !default;
$font_stack_mono: $font_default_mono, $font_fallback_mono !default;

:root {
    --primitive-type-font_stack_sans: #{$font_stack_sans};
    --primitive-type-font_stack_serif: #{$font_stack_serif};
    --primitive-type-font_stack_slab: #{$font_stack_slab};
    --primitive-type-font_stack_mono: #{$font_stack_mono};

    --semantic-type-font_stack--title: var(--primitive-type-font_stack_sans);
    --semantic-type-font_stack--body: var(--primitive-type-font_stack_sans);
}
