/*
 * Nova header effect: transparent-until-scrolled-header. Site-wide, always loaded; its JS acts only
 * when the header's nova-header group has the transparent-header block style.
 * The JS only applies these classes on pages that open with a full-bleed cover, so every rule
 * here assumes the header is sitting on that cover.
 */

/*
 * The colour comes from the JS, which copies whatever colour the cover's own text uses — a value
 * already chosen to read against that image, so this works on a dark and on a light cover alike.
 * White is only the fallback for a cover with no text of its own. Links and the site title inherit
 * it through the theme's `a { color: currentColor }`, and the open mobile overlay keeps its own
 * preset colours.
 */
.nova-header-transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background-color: transparent;
    color: var(--nova-header-color, #fff);
    transition:
        background-color 200ms ease,
        color 200ms ease;
}

/* Scrolled: the header paints an opaque `base`, so text goes back to the palette's own foreground. */
.nova-header-transparent.is-nova-scrolled {
    position: fixed;
    background-color: var(--wp--preset--color--base, #fff);
    color: var(--wp--preset--color--contrast, #111);
}

.nova-header-transparent.is-nova-scrolled:not(:has(.nova-header-rule)) {
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
