/*
 * The header logo's motion (inc/brand.php, 2026-11-25). Ported from
 * docs/prototypes/logo/header-demo.html, letter order "cascade": V comes out
 * first, n goes back first. The link keeps the full logo's width at all
 * times and the letters move only with transform, so the menu never shifts.
 *
 * States, on .vef-site-header (assets/js/logo.js):
 *   vf-logo-live    the script is running; without it the letters wait hidden
 *   vf-logo-intro   first load: the mark assembles, the letters wait for it
 *   vf-logo-compact scrolling down: the letters are back behind the mark
 */
.vf-logo {
	--logo-h: 40px;
	--logo-fs: .61;           /* wordmark size / mark height */
	--logo-gap: .19;          /* mark to wordmark / mark height */
	--logo-ease: cubic-bezier(.2, .75, .2, 1);
	--logo-in-ease: cubic-bezier(.55, 0, .8, .35);
	--logo-mark-dur: .72s;    /* the two shapes coming together */
	--logo-word-delay: .82s;  /* load only: the letters wait for the mark */
	--logo-out-dur: .36s;     /* one letter sliding out */
	--logo-out-stagger: 50ms;
	--logo-in-dur: .22s;      /* one letter sliding back */
	--logo-in-stagger: 35ms;
	--logo-fade: .18s;
	--logo-hide: -.5em;       /* where a hidden letter parks, behind the mark */
	display: inline-flex;
	align-items: center;
	flex: none;
	color: #FFFFFF;
	text-decoration: none;
}
.vf-logo:hover { color: #FFFFFF; }
.vf-logo:focus-visible { outline: 2px solid #D9CCFF; outline-offset: 4px; border-radius: 6px; }
@media (max-width: 760px) {
	.vf-logo { --logo-h: 32px; }
}

.vf-logo__mark {
	position: relative;
	z-index: 1;
	display: block;
	flex: none;
	width: var(--logo-h);
	height: var(--logo-h);
	overflow: visible;
}
.vf-logo__word {
	position: relative;
	top: -.02em;
	margin-left: calc(var(--logo-h) * var(--logo-gap));
	font-family: Manrope, system-ui, sans-serif;
	font-size: calc(var(--logo-h) * var(--logo-fs));
	line-height: 1;
	letter-spacing: -.01em;
	white-space: nowrap;
	/* A slanted edge along the mark's upper right side, so a letter is cut
	   at the mark's real outline while it slides, never at a vertical line. */
	clip-path: polygon(calc(var(--logo-h) * -.27) calc(var(--logo-h) * -.3), 300% calc(var(--logo-h) * -.3), 300% calc(100% + var(--logo-h) * .3), calc(var(--logo-h) * -.87) calc(100% + var(--logo-h) * .3));
}
.vf-logo__word b { font-weight: 800; }
.vf-logo__word i {
	display: inline-block;
	font-style: normal;
	font-weight: 300;
	transform: skewX(-12deg);
	transform-origin: 0 85%;
}

/* One letter: out in order (V first), back in reverse (n first). */
.vf-logo__l {
	display: inline-block;
	will-change: transform;
	--out-delay: calc(var(--intro-delay, 0s) + var(--i) * var(--logo-out-stagger));
	--in-delay: calc((7 - var(--i)) * var(--logo-in-stagger));
	transition: transform var(--logo-out-dur) var(--logo-ease) var(--out-delay), opacity var(--logo-fade) linear var(--out-delay);
}
.vef-site-header.vf-logo-compact .vf-logo__l,
.vf-js .vef-site-header:not(.vf-logo-live) .vf-logo__l {
	transform: translateX(var(--logo-hide));
	opacity: 0;
}
.vef-site-header.vf-logo-compact .vf-logo__l {
	transition: transform var(--logo-in-dur) var(--logo-in-ease) var(--in-delay), opacity var(--logo-fade) linear calc(var(--in-delay) + var(--logo-in-dur) - var(--logo-fade));
}
.vf-js .vef-site-header:not(.vf-logo-live) .vf-logo__l { transition: none; }
.vf-js .vef-site-header:not(.vf-logo-live) .vf-logo__mark { opacity: 0; }

/* First load only: the mark assembles, then the letters come out. */
.vef-site-header.vf-logo-intro { --intro-delay: .82s; }
.vf-logo__all { transform-box: view-box; transform-origin: 50% 50%; }
.vf-logo-intro .vf-logo__phys { animation: vf-logo-phys var(--logo-mark-dur) var(--logo-ease) both; }
.vf-logo-intro .vf-logo__virt { animation: vf-logo-virt var(--logo-mark-dur) var(--logo-ease) both; }
.vf-logo-intro .vf-logo__blend { animation: vf-logo-blend .38s ease-out .4s both; }
.vf-logo-intro .vf-logo__all { animation: vf-logo-settle .3s ease-in-out .6s both; }
@keyframes vf-logo-phys { from { transform: translate(-14px, 28px); } to { transform: none; } }
@keyframes vf-logo-virt { from { transform: translate(14px, -28px); } to { transform: none; } }
@keyframes vf-logo-blend { from { opacity: 0; } to { opacity: 1; } }
@keyframes vf-logo-settle { 0% { transform: scale(1); } 45% { transform: scale(1.045); } 100% { transform: scale(1); } }

/* Hover (and keyboard focus): the two sides pull apart along the same line
   they come in on at load, the pale fusion panel fading first; on leave they
   come back together and the panel returns once they meet. */
.vf-logo__phys,
.vf-logo__virt { transition: transform .42s var(--logo-ease) .06s; }
.vf-logo__blend { transition: opacity .2s ease-out .3s; }
@media (hover: hover) {
	.vf-logo:hover .vf-logo__phys { transform: translate(-7px, 14px); }
	.vf-logo:hover .vf-logo__virt { transform: translate(7px, -14px); }
	.vf-logo:hover .vf-logo__blend { opacity: 0; }
}
.vf-logo:focus-visible .vf-logo__phys { transform: translate(-7px, 14px); }
.vf-logo:focus-visible .vf-logo__virt { transform: translate(7px, -14px); }
.vf-logo:focus-visible .vf-logo__blend { opacity: 0; }
.vf-logo:is(:hover, :focus-visible) :is(.vf-logo__phys, .vf-logo__virt) { transition-delay: 0s; }
.vf-logo:is(:hover, :focus-visible) .vf-logo__blend { transition: opacity .14s ease-out; }

/* Reduced motion: nothing slides. The full logo at the top, the mark alone
   once scrolled, swapped with a short fade; the mark stays whole on hover. */
@media (prefers-reduced-motion: reduce) {
	.vef-site-header .vf-logo__l,
	.vef-site-header.vf-logo-compact .vf-logo__l { transform: none; transition: opacity .15s linear; }
	.vf-logo-intro :is(.vf-logo__phys, .vf-logo__virt, .vf-logo__blend, .vf-logo__all) { animation: none; }
	.vf-logo:is(:hover, :focus-visible) :is(.vf-logo__phys, .vf-logo__virt) { transform: none; }
	.vf-logo:is(:hover, :focus-visible) .vf-logo__blend { opacity: 1; }
}
