/* Nuspace — Motion (see module.php). Timings copied from the mockup. */

/* Header: let the menu items fill the header's height, so a mega panel
   (top: 100% of its item) starts at the header's bottom border. */
@media (min-width: 1101px) {
	#brx-header .ns-nav:not(.brx-open) { align-self: stretch; }
	#brx-header .ns-nav:not(.brx-open) > .brx-nav-nested-items { align-self: stretch; height: auto; align-items: stretch; }
	#brx-header .ns-nav:not(.brx-open) > .brx-nav-nested-items > li { align-items: center; }
	#brx-header .ns-nav:not(.brx-open) > .brx-nav-nested-items > li.brxe-dropdown { flex-direction: column; justify-content: center; }
	#brx-header .ns-search-toggle { align-self: stretch; justify-content: center; }
}

@media (min-width: 1101px) and (prefers-reduced-motion: no-preference) {
	#brx-header .ns-nav:not(.brx-open) .brxe-dropdown > .brx-dropdown-content {
		transform: translateY(-6px);
		transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
	}
	#brx-header .ns-nav:not(.brx-open) .brxe-dropdown.open > .brx-dropdown-content {
		transform: none;
		transition-delay: .06s, .06s, 0s;
	}
	#brx-header .ns-nav .brx-submenu-toggle svg { transition: transform .2s; }
	#brx-header .ns-nav:not(.brx-open) .brxe-dropdown.open > .brx-submenu-toggle svg { transform: rotate(180deg); }
}

@media (prefers-reduced-motion: no-preference) {
	@keyframes ns-zoom { from { transform: scale(1.07); } to { transform: none; } }
	@keyframes ns-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

	.ns-hero { overflow: hidden; }
	.ns-hero-img { animation: ns-zoom 1.8s cubic-bezier(.2,.7,.2,1) both; }
	.ns-hero-in > * { animation: ns-rise .7s cubic-bezier(.2,.7,.2,1) both; }
	.ns-hero-in > :nth-child(2) { animation-delay: .08s; }
	.ns-hero-in > :nth-child(3) { animation-delay: .16s; }
	.ns-hero-in > :nth-child(4) { animation-delay: .24s; }
	.ns-hero-tag { animation: ns-rise .7s .5s both; }

	html.ns-reveal-on .ns-rv:not(.ns-in) { opacity: 0; transform: translateY(20px); }
	html.ns-reveal-on .ns-rv--fade:not(.ns-in) { transform: none; }
	html.ns-reveal-on .ns-rv { transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1); transition-delay: var(--ns-d, 0s); }
}

/* Phone drawer slide-out (see motion.js). */
@media (max-width: 1100px) and (prefers-reduced-motion: no-preference) {
	.ns-nav.ns-drawer-out .brx-nav-nested-items { transform: translateX(100%) !important; }
	.ns-nav.ns-drawer-out::before { opacity: 0 !important; }
}
