/* The home wrapper contains the whole page; the interior-page wrapper contains only the nav. */
.rk:not(.rk-about-nav) > .rk-nav,
.rk.rk-about-nav,
.wp-theme-ray-blueprint > header {
    position: sticky;
    top: var(--rk-toolbar-offset, 0px);
    z-index: 40;
    background-color: #faf8ef;
}

/* Carry the paper colour into the gutters without adding scrollable width. */
.rk:not(.rk-about-nav) > .rk-nav::before,
.rk.rk-about-nav::before,
.wp-theme-ray-blueprint > header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: #faf8ef;
    box-shadow: 0 0 0 100vmax #faf8ef;
    clip-path: inset(0 -100vmax);
}

/* On small phones WordPress's toolbar scrolls away with the document. */
@media (min-width: 601px) {
    body.admin-bar { --rk-toolbar-offset: var(--wp-admin--admin-bar--height, 32px); }
}

.rk :is(#services, #projects, #contact, #client-title) {
    scroll-margin-top: calc(5.6cqw + 12px + var(--rk-toolbar-offset, 0px));
}
@media (max-width: 760px) {
    .rk :is(#services, #projects, #contact, #client-title) {
        scroll-margin-top: calc(72px + var(--rk-toolbar-offset, 0px));
    }
    .rk-nav .mobmenu[open] {
        max-height: calc(100dvh - var(--rk-toolbar-offset, 0px));
        overflow-y: auto;
    }
}
