/* Page-to-page motion (proposal 12/11/2026, round 11). See v9/nav.js.
   The header never moves. Leaving: content lifts away. Arriving: a lit film edge sweeps across and lays the
   new page down behind it, like window film being applied; blocks settle and the title rises. */

/* Menu pill */
.desktop-nav.has-indicator{position:relative}
@media(min-width:960px){
 .desktop-nav{display:grid;grid-template-columns:repeat(2,minmax(max-content,1fr)) repeat(3,max-content)}
}
/* The indicator is local to the navigation, but the film menu spans the header.
   A fixed panel avoids inheriting the narrow nav as its positioning container. */
.desktop-nav.has-indicator .mega-menu{position:fixed;inset:var(--header-height) 0 auto}
.desktop-nav.has-indicator>a,.desktop-nav.has-indicator .nav-link{position:relative;z-index:1}
.desktop-nav.has-indicator>a:hover,.desktop-nav.has-indicator .nav-link:hover{background:transparent}
.desktop-nav.has-indicator>a[aria-current=page]::after,.desktop-nav.has-indicator .nav-link[aria-current=page]::after{display:none}
.nav-indicator{position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;
 background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.07));box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 6px 18px -8px rgba(120,180,255,.55)}
.nav-indicator[hidden]{display:none}
.nav-indicator::after{content:"";position:absolute;left:50%;bottom:4px;width:16px;height:2px;margin-left:-8px;border-radius:2px;background:#8DB8FF;box-shadow:0 0 10px rgba(141,184,255,.9)}

/* Leaving: the content lifts away (the header stays) */
html.nav-leaving body>*:not(.site-header){opacity:0;transition:opacity .17s ease-in}
html.nav-leaving #main>*{transform:translateY(-16px) scale(.99);transition:transform .17s ease-in,filter .17s ease-in}
@media(min-width:1024px){html.nav-leaving #main>*{filter:blur(5px)}}

/* Arriving: hidden before the first paint (class set in <head>); nav.js then sweeps a lit film edge across
   and reveals the page behind it (Web Animations clip on #main), while blocks settle and the title rises. */
html.nav-entering body>*:not(.site-header){opacity:0}
html.nav-entering.nav-revealing body>*:not(.site-header){opacity:1;transition:opacity .45s ease .15s}
html.nav-entering.nav-revealing #main{opacity:1;transition:none}
html.nav-entering.nav-revealing #main>*{animation:nav-settle .9s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--nav-i,3)*60ms)}
@keyframes nav-settle{from{transform:translateX(-26px) scale(.985)}to{transform:none}}
html.nav-revealing .nav-title{animation:nav-title .85s cubic-bezier(.16,1,.3,1) .18s both}
@keyframes nav-title{from{clip-path:inset(-20% -8% 100% -8%);transform:translateY(.45em)}to{clip-path:inset(-20% -8% -30% -8%);transform:none}}
/* The film edge: a bright core with a blue halo, a thin iridescent fringe and glare ahead of it,
   and the fresh tint it leaves on the glass behind it */
.nav-edge{position:fixed;top:-2vh;bottom:-2vh;left:0;z-index:58;width:3px;pointer-events:none;will-change:transform;
 background:linear-gradient(180deg,rgba(255,255,255,.2),#fff 12%,#fff 88%,rgba(255,255,255,.2));
 box-shadow:0 0 10px 2px #fff,0 0 22px 6px rgba(150,200,255,.95),0 0 80px 26px rgba(90,160,255,.45)}
.nav-edge::before{content:"";position:absolute;top:0;bottom:0;right:3px;width:34vw;background:linear-gradient(270deg,rgba(18,96,230,.26),rgba(18,96,230,.1) 30%,rgba(18,96,230,.03) 65%,transparent)}
.nav-edge::after{content:"";position:absolute;top:0;bottom:0;left:3px;width:9vw;
 background:linear-gradient(90deg,rgba(255,255,255,.9),rgba(170,245,255,.45) 12%,rgba(190,170,255,.28) 26%,rgba(255,255,255,.12) 50%,rgba(255,255,255,0))}
@media(max-width:699px){.nav-edge::before{width:46vw}.nav-edge::after{width:16vw}}

/* Safety net: if the script never runs, the content still appears */
html.nav-entering:not(.nav-revealing) body>*:not(.site-header){animation:nav-safety 0s .9s forwards}
@keyframes nav-safety{to{opacity:1}}

/* The browser's own page cross-fade would double the effect: switch it off (this file loads after cinematic.css) */
@view-transition{navigation:none}

@media(prefers-reduced-motion:reduce){
 .nav-edge{display:none}
 html.nav-leaving body>*,html.nav-leaving #main>*,html.nav-entering body>*,html.nav-entering #main>*,html.nav-revealing .nav-title{opacity:1!important;transform:none!important;filter:none!important;clip-path:none!important;transition:none!important;animation:none!important}
}
