/* Scandia 2026 Modernizer — front-end layer. Intentionally conservative. */

body.sf26-typography {
    text-rendering: optimizeLegibility;
    font-kerning: normal;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.sf26-system-font,
body.sf26-system-font #main,
body.sf26-system-font .site-main,
body.sf26-system-font .wpb_text_column,
body.sf26-system-font .vc_column_text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

body.sf26-typography #main,
body.sf26-typography .site-main {
    font-size: var(--sf26-base-desktop);
    line-height: var(--sf26-line-height);
}

/* WPBakery/TheGem body-copy floor. max(1em, X) preserves larger inherited text. */
body.sf26-typography #main :where(.wpb_text_column, .vc_column_text, .gem-textbox, .gem-list, .vc_toggle_content, .wpb_accordion_content) :where(p, li, blockquote),
body.sf26-typography .site-main :where(.wpb_text_column, .vc_column_text, .gem-textbox, .gem-list, .vc_toggle_content, .wpb_accordion_content) :where(p, li, blockquote) {
    font-size: max(1em, var(--sf26-min-text)) !important;
    line-height: var(--sf26-line-height) !important;
}

body.sf26-typography #main :where(p, li, blockquote),
body.sf26-typography .site-main :where(p, li, blockquote) {
    overflow-wrap: break-word;
}

body.sf26-fluid-headings #main :where(h1, .h1),
body.sf26-fluid-headings .site-main :where(h1, .h1) { font-size: clamp(2.25rem, 5vw, 3.75rem) !important; line-height: 1.12 !important; }
body.sf26-fluid-headings #main :where(h2, .h2),
body.sf26-fluid-headings .site-main :where(h2, .h2) { font-size: clamp(1.875rem, 4vw, 2.75rem) !important; line-height: 1.18 !important; }
body.sf26-fluid-headings #main :where(h3, .h3),
body.sf26-fluid-headings .site-main :where(h3, .h3) { font-size: clamp(1.55rem, 3vw, 2.1rem) !important; line-height: 1.22 !important; }
body.sf26-fluid-headings #main :where(h4, .h4),
body.sf26-fluid-headings .site-main :where(h4, .h4) { font-size: clamp(1.35rem, 2.4vw, 1.75rem) !important; line-height: 1.28 !important; }
body.sf26-fluid-headings #main :where(h5, .h5),
body.sf26-fluid-headings .site-main :where(h5, .h5) { font-size: clamp(1.15rem, 2vw, 1.4rem) !important; line-height: 1.32 !important; }
body.sf26-fluid-headings #main :where(h6, .h6),
body.sf26-fluid-headings .site-main :where(h6, .h6) { font-size: clamp(1rem, 1.7vw, 1.2rem) !important; line-height: 1.38 !important; }

/* TheGem menu defaults in the supplied database are 14px desktop/submenu and 16px mobile. */
body.sf26-nav-boost #primary-menu > li > a,
body.sf26-nav-boost #primary-navigation #primary-menu > li > a {
    font-size: max(1em, 16px) !important;
}
body.sf26-nav-boost #primary-menu .sub-menu a,
body.sf26-nav-boost #primary-menu ul a {
    font-size: max(1em, 15px) !important;
    line-height: 1.35 !important;
}
body.sf26-nav-boost .mobile-menu-layout-default .primary-navigation a,
body.sf26-nav-boost .mobile-menu-layout-overlay .primary-navigation a,
body.sf26-nav-boost #primary-navigation.responsive a {
    font-size: max(1em, 18px) !important;
    line-height: 1.35 !important;
}

body.sf26-accessibility :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid currentColor !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px Canvas, 0 0 0 5px CanvasText !important;
}

body.sf26-accessibility :where(h1, h2, h3, h4, h5, h6, [id]) {
    scroll-margin-top: 7rem;
}

body.sf26-accessibility :where(input, select, textarea, button) {
    font: inherit;
}

body.sf26-link-underlines #main a:not(.gem-button):not(.vc_btn3):not(.wp-block-button__link):not([class*="button"]),
body.sf26-link-underlines .site-main a:not(.gem-button):not(.vc_btn3):not(.wp-block-button__link):not([class*="button"]) {
    text-decoration-line: underline;
    text-decoration-thickness: max(1px, 0.08em);
    text-underline-offset: 0.14em;
    text-decoration-skip-ink: auto;
}

body.sf26-touch-targets :where(button, input[type="button"], input[type="submit"], input[type="reset"], select, .gem-button, .vc_btn3, .wp-block-button__link) {
    min-height: 44px;
}

body.sf26-responsive-media #main :where(img, video, iframe),
body.sf26-responsive-media .site-main :where(img, video, iframe),
body.sf26-responsive-media .wpb_wrapper :where(img, video, iframe) {
    max-width: 100%;
}

body.sf26-responsive-media #main :where(img, video),
body.sf26-responsive-media .site-main :where(img, video),
body.sf26-responsive-media .wpb_wrapper :where(img, video) {
    height: auto;
}

body.sf26-responsive-media #main table,
body.sf26-responsive-media .site-main table,
body.sf26-responsive-media .wpb_wrapper table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    body.sf26-typography #main,
    body.sf26-typography .site-main {
        font-size: var(--sf26-base-mobile);
    }

    body.sf26-typography #main :where(.wpb_text_column, .vc_column_text, .gem-textbox, .gem-list, .vc_toggle_content, .wpb_accordion_content) :where(p, li, blockquote),
    body.sf26-typography .site-main :where(.wpb_text_column, .vc_column_text, .gem-textbox, .gem-list, .vc_toggle_content, .wpb_accordion_content) :where(p, li, blockquote) {
        font-size: max(1em, var(--sf26-base-mobile)) !important;
    }

    body.sf26-responsive-media #main :where(.wpb_wrapper, .vc_column-inner),
    body.sf26-responsive-media .site-main :where(.wpb_wrapper, .vc_column-inner) {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.sf26-reduced-motion *,
    body.sf26-reduced-motion *::before,
    body.sf26-reduced-motion *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

@media (forced-colors: active) {
    body.sf26-accessibility :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
        outline: 3px solid Highlight !important;
        box-shadow: none !important;
    }
}
