/*
 * Smoothly shrinks the sticky header's vertical padding once the page
 * has scrolled past the top. Overriding the --wp--preset--spacing--sm
 * custom property on the header itself works because every nested
 * padding in the header markup already references var(--wp--preset--spacing--sm) —
 * changing it here cascades to all of them without touching the value
 * anywhere else on the page.
 */

header.wp-block-template-part .is-position-sticky {
    transition: padding-top 0.25s ease, padding-bottom 0.25s ease;
}
 
header.wp-block-template-part .is-position-sticky.is-stuck {
    --wp--preset--spacing--sm: clamp(0.35rem, 0.3rem + 0.2vi, 0.5rem);
}
 