/* Wansteadium Header v2.2: compact sticky bar on large screens (see sticky-bar.js).
 * Only active once the script adds .wium-sticky, so without JavaScript nothing changes. */
.wium-mini-mark { display: none; }

@media screen and (min-width: 1200px) and (min-height: 700px) {
	html.wium-sticky { scroll-padding-top: var(--wium-scroll-pad, 0); }

	/* The bottom padding becomes margin so the pinned bar isn't padded with empty space;
	   unstuck, the header looks exactly as before. */
	.wium-sticky .site-header {
		position: sticky;
		z-index: 50;
		background-color: var(--wium-bar-bg, #fff);
		padding-bottom: 6px;
		margin-bottom: 10px;
		transition: box-shadow .25s ease;
	}
	.wium-sticky .site-header.is-stuck { box-shadow: 0 10px 18px -14px rgba(20, 40, 60, .45); }

	/* Small logo that slides into the header's left gutter once the bar is pinned,
	   so the nav itself never moves or wraps. */
	.wium-sticky .site-header-menu { position: relative; }
	.wium-sticky .wium-mini-mark {
		display: block;
		position: absolute;
		top: 50%;
		right: 100%;
		margin-right: 12px;
		opacity: 0;
		transform: translate(14px, -50%) scale(.6);
		transform-origin: right center;
		box-shadow: none;
		pointer-events: none;
		transition: opacity .25s ease, transform .35s ease;
	}
	.wium-sticky .site-header.is-stuck .wium-mini-mark {
		opacity: 1;
		transform: translate(0, -50%);
		pointer-events: auto;
	}
	.wium-mini-mark img { display: block; width: 34px; height: 34px; max-width: none; }
}

/* Where scroll-driven animations are supported, the big logo itself shrinks and glides
   into the bar's left gutter as you scroll, so the separate mini mark isn't needed.
   sticky-bar.js measures the path and sets the --wium-dock-* variables. */
@supports (animation-timeline: scroll()) {
	@media screen and (min-width: 1200px) and (min-height: 700px) and (prefers-reduced-motion: no-preference) {
		.wium-sticky .wium-mini-mark { display: none; }
		/* Twenty Sixteen clips .site-branding; let the logo travel out of it. */
		.wium-sticky .wium-masthead-row .site-branding { overflow: visible; }
		.wium-sticky .wium-masthead-row .custom-logo-link { position: relative; z-index: 2; }
		.wium-sticky .wium-masthead-row .custom-logo {
			transform-origin: 0 0;
			will-change: transform;
			animation: wium-logo-dock linear both;
			animation-timeline: scroll(root);
			animation-range: 0px var(--wium-dock-end, 240px);
		}
		.wium-sticky .wium-masthead-row .site-title,
		.wium-sticky .wium-masthead-row .site-description {
			animation: wium-fade-out linear both;
			animation-timeline: scroll(root);
			animation-range: 0px calc(var(--wium-dock-end, 240px) * .4);
		}
		@keyframes wium-logo-dock {
			to { transform: translate(var(--wium-dock-x, 0px), var(--wium-dock-y, 0px)) scale(var(--wium-dock-s, 1)); }
		}
		@keyframes wium-fade-out { to { opacity: 0; } }
	}
}

/* v2.2: slightly tighter menu spacing so the menu fits on one row (and the bar can pin) from about 1280px. */
@media screen and (min-width: 1200px) and (max-width: 1365px) {
	.site-header-main.wium-header-layout .main-navigation .primary-menu { gap: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.wium-sticky .site-header,
	.wium-sticky .wium-mini-mark { transition: none; }
}
