/* Measured surface animation owns geometry; CSS must not run a second clock. */
.header{transition:background-color 240ms,color 240ms}
.header.is-animating,.header.is-animating .topbar{transition:none}
.header.is-animating{will-change:width,height,top,left;max-width:none}
.header .topbar{box-sizing:border-box}
.menu-motion-mask{overflow:clip}
.menu-motion-inner{display:block;will-change:transform}
.motion-character{display:inline-block}
[data-motion=characters] .motion-word{overflow:clip;vertical-align:bottom;padding-bottom:.12em;margin-bottom:-.12em}
.menu-contact .menu-motion-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%}
.menu-section{position:relative;border-top-color:transparent}
.menu-section:before{content:'';position:absolute;left:0;right:0;top:-1px;height:1px;background:#f1f1ee;transform-origin:left}
.header.is-open:not(.is-closing) .menu-section:before{animation:menu-rule-draw 750ms cubic-bezier(.22,1,.36,1) 100ms backwards}
.header.is-open:not(.is-closing) .menu-section:nth-child(2):before{animation-delay:180ms}
.header.is-open:not(.is-closing) .menu-section:nth-child(3):before{animation-delay:260ms}
.header.is-closing .menu-section:before{opacity:0;transition:opacity 150ms}
@keyframes menu-rule-draw{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* Rules are real decorative elements. Without JS the authored borders remain. */
.has-drawn-rule{position:relative;border-top-color:transparent!important}
.has-drawn-rule > .drawn-rule{position:absolute;top:0;left:0;right:0;height:1px;background:var(--line);transform-origin:left;pointer-events:none}
.has-drawn-underline{position:relative;border-bottom-color:transparent!important}
.has-drawn-underline > .drawn-rule{position:absolute;top:auto;bottom:0;left:0;right:0;height:1px;background:currentColor;transform-origin:left;pointer-events:none}

/* Native same-origin document transitions keep links/history/browser controls
   intact. Unsupported browsers navigate normally; no script hides the page. */
@view-transition{navigation:auto}
::view-transition-group(root){background:#c6c8c8;animation-duration:680ms;overflow:clip}
::view-transition-old(root),::view-transition-new(root){mix-blend-mode:normal;animation-duration:680ms;animation-timing-function:cubic-bezier(.76,0,.24,1);animation-fill-mode:both}
::view-transition-old(root){animation-name:page-slide-away}
::view-transition-new(root){animation-name:page-slide-arrive}
/* A diagonal cover/uncover moves left to right; the neutral plane is the
   interstitial. The pages themselves do not scale or slide underneath it. */
@keyframes page-slide-away{0%{clip-path:polygon(-10% 0,100% 0,100% 100%,0 100%)}55%,100%{clip-path:polygon(100% 0,100% 0,100% 100%,110% 100%)}}
@keyframes page-slide-arrive{0%,25%{clip-path:polygon(0 0,-10% 0,0 100%,0 100%)}100%{clip-path:polygon(0 0,100% 0,110% 100%,0 100%)}}
:root[data-navigation-direction=back]::view-transition-old(root){animation-name:page-slide-back-away}
:root[data-navigation-direction=back]::view-transition-new(root){animation-name:page-slide-back-arrive}
@keyframes page-slide-back-away{0%{clip-path:polygon(0 0,110% 0,100% 100%,0 100%)}55%,100%{clip-path:polygon(0 0,0 0,-10% 100%,0 100%)}}
@keyframes page-slide-back-arrive{0%,25%{clip-path:polygon(100% 0,100% 0,100% 100%,110% 100%)}100%{clip-path:polygon(-10% 0,100% 0,100% 100%,0 100%)}}
@media(prefers-reduced-motion:reduce){
 @view-transition{navigation:none}
 ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
 .menu-motion-inner{will-change:auto}
 .header.is-animating{will-change:auto}
 .header.is-open:not(.is-closing) .menu-section:before{animation:none}
}

/* Same-document fallback; no page or heading is hidden while HTML is fetched. */
.page-navigation-veil{position:fixed;inset:0 -12%;z-index:10000;background:#c6c8c8;pointer-events:none;transform:translateX(-110%) skewX(-8deg)}
:root[data-navigation-state=pending]{cursor:progress}
:root[data-navigation-state=pending] a{cursor:progress}
@media(prefers-reduced-motion:reduce){.page-navigation-veil{display:none}}
