@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('../fonts/dm-sans/dm-sans-variable.woff2') format('woff2-variations');
}

.w-custom-logo {
    width: 100%;
    height: auto;
}

:root {
    --w-font-sans: 'DM Sans', sans-serif;

    --w-color-primary: #22427C;
    --w-color-primary-hue: 219;
    --w-color-primary-saturation: 57%;
    --w-color-primary-lightness: 31%;

    /* Wagtail uses "secondary" (not primary) for buttons, links, and outlines,
       so it needs to be driven from the same brand color too. */
    --w-color-secondary: #22427C;
    --w-color-secondary-hue: 219;
    --w-color-secondary-saturation: 57%;
    --w-color-secondary-lightness: 31%;

    /* Wagtail hardcodes this focus-ring color independently of primary/secondary.
       This tint (same 219 hue, lighter/desaturated) is the balance point that still
       clears the WCAG 1.4.11 3:1 non-text contrast minimum against both white fields
       and the navy sidebar (which now shares --w-color-primary). */
    --w-color-focus: #7692C6;
}

/* In dark mode, Wagtail renders links and outline-button text/borders using
   --w-color-secondary-100/-75 against near-black surfaces (grey-500 to grey-800).
   Derived at our brand lightness (31%) those land around #2D57A4, only ~2.2:1
   against those surfaces. These overrides keep the same 219 hue but lighten it
   enough to clear 4.5:1 text contrast on every dark-theme surface. The solid
   button background (--w-color-secondary itself) already has strong contrast
   and is left untouched. */
.w-theme-dark {
    --w-color-secondary-100: #7B9CDB;
    --w-color-secondary-75: #A6C0E8;
}
