/* HivexAi ambient and responsive motion. Text, focus targets and hit boxes keep their resting position. */
.hx-atlas {
  position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden;
  background-position:center; background-size:cover; background-repeat:no-repeat;
}
.hx-atlas-video { display:block; width:100%; height:100%; max-width:none; object-fit:cover; pointer-events:none; }
.hx-login .login-layout,.hx-login .masthead { z-index:1; }
.hx-login .masthead { z-index:2; }
.hx-shell .hx-hero .hx-mascot { z-index:1; }
.hx-shell .hx-hero .hx-copy,.hx-shell .hx-hero .hx-film {z-index:2;}
.hx-login .login-scene::after {
  content:""; position:absolute; inset:0; z-index:0; pointer-events:none; opacity:.7;
  background:linear-gradient(95deg,#f9fcfff5 0%,#f9fcffed 27%,#f9fcff91 43%,transparent 63%);
  transition:opacity .55s ease;
}
html[data-hx-writing] .hx-login .login-scene::after {opacity:1;}
html[data-hx-writing] .mascot-stage {filter:saturate(.91);}
.hx-login .mascot-stage {transition:filter .5s ease;}
.hx-login .hx-motion-toggle,.hx-shell .hx-hero .hx-motion-toggle,.hx-motion-toggle {
  position:absolute; z-index:3; display:inline-flex; align-items:center; justify-content:center; gap:7px;
  margin:0; padding:6px 9px; width:auto; height:auto; min-height:30px; border:0; border-radius:6px;
  font:500 11px/1.3 var(--hv-font,system-ui); letter-spacing:0; color:#3c5274; background:#f9fcffb0; box-shadow:none;
  cursor:pointer; touch-action:manipulation;
}
.hx-login .hx-motion-toggle { right:var(--gutter); top:calc(var(--mast-y) + 2px); }
.hx-shell .hx-hero .hx-motion-toggle {top:10px;right:15px;}
.hx-motion-toggle[hidden] { display:none!important; }
.hx-motion-toggle > i {width:10px;height:10px;display:block;position:relative;}
.hx-motion-toggle > i::before,.hx-motion-toggle > i::after {content:"";position:absolute;top:1px;bottom:1px;width:2px;border-radius:1px;background:currentColor;}
.hx-motion-toggle > i::before {left:2px}.hx-motion-toggle > i::after {right:2px}
.hx-motion-toggle[data-paused="true"] > i::before {left:2px;top:0;bottom:auto;width:0;height:0;background:none;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:7px solid currentColor;border-radius:0;}
.hx-motion-toggle[data-paused="true"] > i::after{display:none;}
.hx-motion-toggle:hover {background:#fff!important;color:#284683!important;}
.hx-motion-toggle:focus-visible {outline:2px solid #365cb1!important;outline-offset:3px;}
#trialLoginBox:not(form),.bw-gate.bw-activation-gate {isolation:isolate;}
#trialLoginBox>.tl-card,.bw-gate.bw-activation-gate>.bw-gate-card {position:relative;z-index:1;}
#trialLoginBox>.hx-motion-toggle,.bw-activation-gate>.hx-motion-toggle { top:12px;right:14px; }

/* The layers under the mascot move independently. Their movement is continuous across a loop. */
html[data-hx-motion=on] .hx-login .mascot {
  animation:hxHovercraft 7.8s cubic-bezier(.42,0,.58,1) infinite both;
  transform-origin:52% 62%;
}
html[data-hx-motion=on] .hx-hero .hx-mascot { animation:hxHeroHover 8.3s cubic-bezier(.42,0,.58,1) infinite both; }
html[data-hx-motion=on] .studio-halo { animation:hxHaloArc 12s ease-in-out infinite; }
html[data-hx-motion=on] .mascot-shadow { animation:hxGroundShadow 7.8s ease-in-out infinite; }
@keyframes hxHovercraft {0%,100%{transform:translate3d(-1px,3px,0) rotate(.32deg) scale(.998)}50%{transform:translate3d(3px,-7px,0) rotate(-.8deg) scale(1.012)}}
@keyframes hxHeroHover {0%,100%{transform:translate3d(-2px,4px,0) rotate(.45deg)}50%{transform:translate3d(3px,-7px,0) rotate(-.85deg)}}
@keyframes hxHaloArc {0%,100%{transform:rotate(-19deg) scale(1);opacity:.73}50%{transform:rotate(-15deg) scale(1.018);opacity:1}}
@keyframes hxGroundShadow {0%,100%{transform:scaleX(1.02);opacity:.20}50%{transform:scaleX(.86);opacity:.13}}
html[data-hx-motion=on] .hx-login .mode-pane:not(.hidden) .entry-title { animation:hxTypeArrive .56s cubic-bezier(.18,.72,.22,1) backwards; }
html[data-hx-motion=on] .hx-login .mode-pane:not(.hidden) .entry-actions { animation:hxActionArrive .44s .09s cubic-bezier(.18,.72,.22,1) backwards; }
html[data-hx-motion=on] .hx-login .account-pane:not(.hidden) .account-switch button.on::after { animation:hxInkArrive .22s ease-out both; transform-origin:left; }
html[data-hx-motion=on] .hx-login .remember input:checked+.check-ink::after {animation:hxTick .22s cubic-bezier(.18,.8,.26,1) both;}
@keyframes hxTypeArrive {from{clip-path:inset(0 0 8% 0);translate:0 7px;opacity:.75}to{clip-path:inset(0);translate:0 0;opacity:1}}
@keyframes hxActionArrive {from{translate:0 5px;opacity:.75}to{translate:0 0;opacity:1}}
@keyframes hxInkArrive {from{scale:.35 1}to{scale:1 1}}
@keyframes hxTick {from{opacity:0;transform:rotate(28deg) scale(.55)}to{opacity:1;transform:rotate(42deg) scale(1)}}

/* One soft highlight follows the pointer on the current card. Keyboard focus has its own fixed highlight. */
.hx-shell .hx-quick>button,.hx-shell .hx-studios>button {position:relative;isolation:isolate;}
.hx-shell .hx-quick>button::after,.hx-shell .hx-studios>button::after {
  content:"";inset:0;position:absolute;z-index:1;pointer-events:none;border-radius:inherit;
  opacity:0;background:radial-gradient(145px circle at var(--hx-light-x,70%) var(--hx-light-y,30%),rgba(104,163,240,.15),rgba(153,191,255,.065) 54%,transparent 100%);
  transition:opacity .23s ease;
}
html[data-hx-motion=on] .hx-quick>button[data-hx-lit]::after,html[data-hx-motion=on] .hx-studios>button[data-hx-lit]::after,
html[data-hx-motion=on] :is(.hx-quick,.hx-studios)>button:focus-visible::after {opacity:1;}
.hx-quick>button i {transform-origin:50% 65%;transition:transform .23s cubic-bezier(.18,.82,.22,1),box-shadow .23s;}
html[data-hx-motion=on] .hx-quick>button:is(:hover,:focus-visible) i {transform:translateY(-2px) rotate(-3deg);box-shadow:0 3px 9px #293c7019;}
html[data-hx-motion=on] .hx-studios>button:is(:hover,:focus-visible) .hx-cardcaption>svg {transform:translateX(3px);}
.hx-studios>button .hx-cardcaption>svg {transition:transform .22s ease;}
/* Only decorative ink moves continuously; labels and click targets remain stationary. */
.hx-header::after {content:'';position:absolute;left:0;bottom:-1px;width:84px;height:2px;background:linear-gradient(90deg,transparent,#24a5c6,#4b77db,transparent);opacity:0;pointer-events:none;}
html[data-hx-motion=on] .hx-header::after {animation:hxHeaderTrace 9s ease-in-out infinite;}
html[data-hx-motion=on] .hx-nav[aria-current=page]>svg {animation:hxIconBreathe 4.8s ease-in-out infinite;transform-origin:center;}
html[data-hx-motion=on] .hx-actions .hx-primary {animation:hxActionBreathe 4s ease-in-out infinite;}
.hx-home-brand {width:max-content;position:relative;padding-bottom:5px;}
.hx-home-brand::after {content:'';position:absolute;bottom:0;left:0;width:24px;height:2px;background:#27a2ad;transform-origin:left;}
html[data-hx-motion=on] .hx-home-brand::after {animation:hxBrandLine 5s ease-in-out infinite;}
html[data-hx-motion=on] .hx-studios>button:hover .hx-art img {transform:scale(1.045) translateY(-1px);}
.hx-art img {transition:transform .8s cubic-bezier(.2,.75,.2,1);}
.hx-tool-link>i {transition:background .22s,color .22s;}
.hx-tool-link:hover>i {background:#dfeafa;color:#244db3;}
.hx-header button,.hx-sidebar button {touch-action:manipulation;}
@keyframes hxHeaderTrace {0%,12%{left:0;opacity:0}22%{opacity:.75}78%{opacity:.75}90%,100%{left:calc(100% - 84px);opacity:0}}
@keyframes hxIconBreathe {0%,100%{scale:1}50%{scale:1.1}}
@keyframes hxActionBreathe {0%,100%{outline:3px solid #4272ea00;outline-offset:0}50%{outline:3px solid #4272ea15;outline-offset:3px}}
@keyframes hxBrandLine {0%,100%{scale:1 1;opacity:.65}50%{scale:2.3 1;opacity:1}}
html[data-hx-motion=on] .hx-sidebar .hx-nav[aria-current=page]::before {animation:hxNavInk .28s cubic-bezier(.15,.8,.3,1) both;transform-origin:center;}
@keyframes hxNavInk {from{scale:1 .28;opacity:.5}to{scale:1 1;opacity:1}}
html[data-hx-motion=on] .hx-dialog[open] {animation:hxDirectoryIn .19s cubic-bezier(.16,.76,.2,1) both;}
html[data-hx-motion=on] .hx-dialog[open]::backdrop {animation:hxBackdropIn .17s ease-out;}
@keyframes hxDirectoryIn {from{translate:0 -4px;scale:.992;opacity:.84}to{translate:0 0;scale:1;opacity:1}}
@keyframes hxBackdropIn {from{opacity:0}to{opacity:1}}
:is(.hx-main>.panel,.hx-login) :is(button,input,textarea,select,summary) { transition-timing-function:cubic-bezier(.2,.74,.24,1); }
.hx-quick>button:active,.hx-studios>button:active,.action-primary:active,.hx-actions>button:active {scale:.985;}
html[data-hx-motion=on] #loginBox:not([hidden]),html[data-hx-motion=on] .console-panel { animation:hxAdminArrive .26s cubic-bezier(.2,.75,.2,1) backwards; }
@keyframes hxAdminArrive {from{translate:0 4px;opacity:.84}to{translate:0 0;opacity:1}}

/* The same switch stops existing native decorations. Functional video previews are controlled by their owner. */
html[data-hx-motion=off] :is(.hx-login,.hx-shell) *,html[data-hx-motion=off] :is(.hx-login,.hx-shell) *::before,html[data-hx-motion=off] :is(.hx-login,.hx-shell) *::after {animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
html[data-hx-motion=off] :is(.hx-mascot,.mascot,.studio-halo,.mascot-shadow),html[data-hx-hidden] :is(.hx-mascot,.mascot,.studio-halo,.mascot-shadow),html[data-hx-writing] :is(.hx-mascot,.mascot,.studio-halo,.mascot-shadow){animation-play-state:paused!important;}
html[data-hx-motion=off] :is(.hx-quick,.hx-studios)>button::after{opacity:0!important;}
html:is([data-hx-hidden],[data-hx-writing]) :is(.hx-header,.hx-home-brand)::after,
html:is([data-hx-hidden],[data-hx-writing]) :is(.hx-nav[aria-current=page]>svg,.hx-actions .hx-primary){animation-play-state:paused!important;}
@media(max-width:740px){.hx-login .hx-motion-toggle{top:24px;right:var(--gutter);}.hx-hero .hx-motion-toggle>span{display:none;}.hx-shell .hx-hero .hx-motion-toggle{min-width:32px;min-height:32px;top:5px;right:8px;}.hx-login .login-scene:has(#authShell:not(.hidden)) .hx-atlas{opacity:.66;}}
@media(prefers-reduced-motion:reduce){.hx-motion-toggle{display:none!important;}.hx-quick>button::after,.hx-studios>button::after{display:none}.hx-login .login-scene::after{transition:none!important;}}
@media(forced-colors:active){.hx-atlas,.mascot-shadow,.studio-halo{visibility:hidden;}.hx-motion-toggle{border:1px solid ButtonText!important;}}

html[data-hx-motion=off] :is(.hx-quick,.hx-studios)>button:hover,html[data-hx-motion=off] .hx-studios>button:hover .hx-art img{transform:none!important;}
html[data-hx-motion=off] :is(.hx-quick,.hx-studios,.hx-actions,.hx-login) button:active{scale:1!important;}

html[data-hx-motion=off] :is(#loginBox,.console-panel){animation:none!important;}
@media(prefers-reduced-motion:reduce){ :is(#loginBox,.console-panel){animation:none!important;} }

/* studio-3: keep map labels from showing through beside the form card */
.hx-login .login-scene:has(#authShell:not(.hidden))::after{opacity:1;background:linear-gradient(95deg,#f9fcfff5 0%,#f9fcfff2 34%,#f9fcffc2 43%,#f9fcff45 51%,transparent 60%)}

/* Home motion uses only decorative children, never the label or hit target. */
#panel-home :is(.hx-quick,.hx-scenes)>button:nth-child(2){--hx-phase:-1.6s;}
#panel-home :is(.hx-quick,.hx-scenes)>button:nth-child(3){--hx-phase:-3.2s;}
#panel-home :is(.hx-quick,.hx-scenes)>button:nth-child(4){--hx-phase:-4.8s;}
#panel-home :is(.hx-quick,.hx-scenes)>button:nth-child(5){--hx-phase:-6.4s;}
#panel-home .hx-quick>button>i {position:relative;overflow:hidden;isolation:isolate;}
#panel-home .hx-quick>button>i::after,
#panel-home .hx-actions .hx-primary::after {
  content:'';position:absolute;inset:-30% -70%;pointer-events:none;
  background:linear-gradient(110deg,transparent 39%,#fff5 49%,transparent 59%);
  translate:-50% 0;opacity:0;
}
#panel-home .hx-actions .hx-primary {position:relative;isolation:isolate;overflow:hidden;}
html[data-hx-motion=on][data-hx-home-active] #panel-home .hx-quick>button>i>svg {
  animation:hxShortcutCue 8s var(--hx-phase,0s) cubic-bezier(.3,0,.3,1) infinite;
  transform-origin:50% 65%;
}
html[data-hx-motion=on][data-hx-home-active] #panel-home .hx-quick>button>i::after {
  animation:hxHomeSheen 8s var(--hx-phase,0s) ease-in-out infinite;
}
html[data-hx-motion=on][data-hx-home-active] #panel-home .hx-actions .hx-primary::after {
  animation:hxHomeSheen 7s 1s ease-in-out infinite;
}
html[data-hx-motion=on][data-hx-home-active] #panel-home .hx-home-brand::before {
  background:linear-gradient(90deg,#4c4681 25%,#3da7b9 50%,#4c4681 75%);background-size:200% 100%;
  animation:hxHomeInk 6s ease-in-out infinite;
}
html[data-hx-motion=on][data-hx-home-active] #panel-home .hx-scenes>button img {
  animation:hxSceneDrift 16s var(--hx-phase,0s) ease-in-out infinite;
}
#panel-home .hx-scenes>button>i {transition:background .2s ease,border-color .2s ease;}
#panel-home .hx-scenes>button:is(:hover,:focus-visible)>i {background:#ffffff4a;border-color:#fff;}
#panel-home .hx-composer {transition:border-color .2s ease,box-shadow .2s ease;}
#panel-home .hx-composer:focus-within {box-shadow:0 0 0 3px #7152d914,0 4px 16px #3535550a;}
#panel-home .hx-composer>label {transition:color .2s ease;}
#panel-home .hx-composer:focus-within>label {color:#4634a6;}
@keyframes hxShortcutCue {0%,35%,100%{transform:translateY(0) rotate(0)}12%{transform:translateY(-2px) rotate(-6deg)}24%{transform:translateY(0) rotate(3deg)}}
@keyframes hxHomeSheen {0%,7%{translate:-50% 0;opacity:0}13%{opacity:.8}27%{translate:50% 0;opacity:0}100%{translate:50% 0;opacity:0}}
@keyframes hxHomeInk {0%,100%{background-position:0 0}50%{background-position:100% 0}}
@keyframes hxSceneDrift {0%,100%{scale:1.018;translate:-1px 0}50%{scale:1.052;translate:1px -1px}}
html:not([data-hx-home-active]) #panel-home :is(.hx-mascot,.hx-primary),
html:is([data-hx-hidden],[data-hx-writing]) #panel-home :is(.hx-quick>button>i>svg,.hx-scenes>button img),
#panel-home .hx-quick:not([data-hx-visible])>button>i>svg,
#panel-home .hx-scenes:not([data-hx-visible])>button img,
html:is([data-hx-hidden],[data-hx-writing]) #panel-home .hx-quick>button>i::after,
html:is([data-hx-hidden],[data-hx-writing]) #panel-home .hx-primary::after,
html:is([data-hx-hidden],[data-hx-writing]) #panel-home .hx-home-brand::before,
#panel-home .hx-quick:not([data-hx-visible])>button>i::after {animation-play-state:paused!important;}
html[data-hx-motion=off] #panel-home .hx-scenes>button img {animation:none!important;transform:none!important;}
html[data-hx-motion=off] #panel-home :is(.hx-quick>button>i,.hx-primary)::after {display:none;}
#panel-home .hx-quick>button:hover {transform:none;}
#panel-home :is(.hx-quick,.hx-actions)>button:active {scale:1;}
@media(max-width:740px){
  html[data-hx-motion=on] #panel-home .hx-scenes>button img {animation:none;}
  html[data-hx-motion=on] #panel-home .hx-quick>button>i>svg {animation-duration:10s;}
}
