/* ---------------------------------------------------------------------------
   Monsoon Reads -- sitewide header rules

   This file is the deliberate exception to the child theme's scope rule.
   style.css is store-only and loads only on WooCommerce pages; this one loads
   everywhere, because the header is Astra's on all eleven pages and Astra free
   has no sticky-header module (that lives in Astra Pro).

   Keep it small. Anything that belongs to the store goes in style.css.
   --------------------------------------------------------------------------- */

/* Sticky primary header ------------------------------------------------------
   #masthead is the sticky element rather than .ast-main-header-wrap, because
   position:sticky is constrained to its containing block -- and the main row's
   containing block is #masthead itself, so sticking that alone would release
   it at the header's own bottom edge, which is no stick at all. Offsetting the
   whole masthead upward by the announcement row's height scrolls that row out
   of view and leaves the menu row pinned at the top.

   The offsets are the announcement row's measured height: 43px at desktop,
   40px below Astra's 921px breakpoint. If that row's padding, font size or
   content changes, re-measure. If it is ever removed, set top to 0 or the menu
   row will be cropped by that many pixels.
   --------------------------------------------------------------------------- */

#masthead {
	position: sticky;
	top: -43px;
	z-index: 99;
}

@media (max-width: 921px) {
	#masthead {
		top: -40px;
	}
}

/* A pinned row would otherwise sit on top of whatever an in-page link jumps
   to -- the "Skip to content" link included. */
:target,
#content {
	scroll-margin-top: 130px;
}

@media (max-width: 921px) {
	:target,
	#content {
		scroll-margin-top: 100px;
	}
}
