/* Motion layer: decorative, interruptible, and independent of research state. */
.facthelm-motion .view.active,
.facthelm-motion .search-result,
.facthelm-motion .search-status.agent-live{animation:none}
.facthelm-motion .motion-scene:not(.motion-in-view),
.facthelm-motion .motion-scene:not(.motion-in-view)::before,
.facthelm-motion .motion-scene:not(.motion-in-view)::after,
.facthelm-motion .motion-scene:not(.motion-in-view) *,
.facthelm-motion .motion-scene:not(.motion-in-view) *::before,
.facthelm-motion .motion-scene:not(.motion-in-view) *::after{animation-play-state:paused!important}

/* Ambient light and orbital motion. Text and controls remain stationary. */
.hero::before{left:24px;right:24px;animation:ambient-tide 19s ease-in-out infinite alternate;transform-origin:60% 40%}
.search-intro::before{animation:ambient-tide 23s ease-in-out infinite alternate}
.closing-light{animation:ambient-glow 12s ease-in-out infinite}
.hero-visual .orb-halo{animation:halo-sway 18s ease-in-out infinite alternate}
.intro-orb{overflow:clip}
.intro-orbit{animation:intro-halo-sway 17s ease-in-out infinite alternate}
.orb-halo::before,.intro-orbit::before{content:'';position:absolute;left:2%;top:32%;width:5px;height:5px;border-radius:50%;background:#ff9bb3;box-shadow:0 0 12px #ef557b8c,0 0 22px #ef557b36;animation:orbital-light 5s ease-in-out infinite}
.orb-halo::after{animation:halo-cross 22s ease-in-out infinite alternate}
.intro-orbit::after{animation:halo-cross 19s ease-in-out infinite alternate}
.hero-visual .is-active .core-ribbons{animation-duration:9s}
.intro-orb .is-ambient .core-ribbons{animation-duration:14s}
.agent-live .is-active .core-ribbons{animation-duration:7s}
.ai-orb.is-active .core-sculpture::after{content:'';position:absolute;inset:11%;border:1px solid #e85d8a42;border-radius:50%;opacity:0;animation:core-wave 4.4s cubic-bezier(.2,.65,.3,1) infinite;pointer-events:none}
.hero-visual .core-sculpture::after{animation-duration:7.5s;border-color:#e85d8a26}
.ai-orb:not(.is-active) .core-sculpture::after{display:none}

/* Staggered landing sections and living, conceptual document illustrations. */
.motion-ready .reveal{transition-duration:.78s;transition-delay:var(--reveal-delay,0ms)}
.motion-ready .feature-card.is-visible:hover{transform:translateY(-7px);transition-delay:0ms}
.motion-ready .reveal:focus-within{opacity:1;transform:none;transition-delay:0ms}
.feature-card .paper-sheet:first-child{animation:paper-hover-left 7s ease-in-out infinite}
.feature-card .paper-sheet:nth-child(2){animation:paper-hover-right 8s ease-in-out infinite;animation-delay:-3s}
.feature-card .scan-line{animation:paper-scan 6.5s ease-in-out infinite}
.context-art path{animation:context-flow 14s linear infinite}
.context-art>svg circle:last-child{animation:context-beacon 5s ease-in-out infinite}
.evidence-art .evidence-sheet{animation:evidence-hover 8s ease-in-out infinite}
.evidence-art .evidence-check{animation:evidence-seal 6s ease-in-out infinite;animation-delay:-2s}
.feature-card:hover .paper-sheet,.feature-card:hover .scan-line,.feature-card:hover .evidence-sheet,.feature-card:hover .evidence-check{animation-play-state:paused}
.feature-icon svg{transition:transform .4s var(--ease)}
.feature-card:hover .feature-icon svg{transform:rotate(-9deg) scale(1.12)}
.principle-row{transition:background .3s,border-color .3s}
.principle-row:hover{background:#ee8aad05}
.principle-row>.lucide,.principle-index{transition:transform .35s var(--ease),color .35s,box-shadow .35s}
.principle-row:hover>.lucide{transform:translate(3px,-2px);color:#ffb1c5}
.principle-row:hover .principle-index{transform:scale(1.08);box-shadow:0 0 18px #bf3c5e24}

/* Focus feedback has no timer, percent, or implication of research progress. */
.search-form::after,.hero-composer::after{content:'';position:absolute;inset:0;border:1px solid #ff9ab963;border-radius:inherit;box-shadow:inset 0 0 24px #e5416810;opacity:0;pointer-events:none;transition:opacity .25s}
.search-form:focus-within::after,.hero-composer:focus-within::after{animation:composer-focus 3.6s ease-in-out infinite}
.search-form:focus-within .composer-caption>svg{animation:focus-spark 1s var(--ease) 1}
.search-input-row textarea,.hero-composer textarea{transition:background .2s,color .2s}
.question-starters button>svg:first-child,.dashboard-actions button>svg:first-child,.nav>svg{transition:transform .35s var(--ease),color .25s}
.question-starters button:hover>svg:first-child{transform:rotate(-9deg) scale(1.12)}
.dashboard-actions button:hover>svg:first-child{transform:translateY(-3px) rotate(-5deg)}
.nav:hover>svg{transform:translateX(2px)}
.motion-click-host{position:relative}
.motion-click-feedback{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:3}
.motion-click-feedback>span{position:absolute;width:130px;height:130px;margin:-65px 0 0 -65px;border-radius:50%;background:radial-gradient(circle,#ffd2df3d 0,#e4557c19 45%,transparent 70%);pointer-events:none}
.research-citation:hover svg,.row-original:hover svg,.original-link:hover svg{transform:translate(2px,-2px)}
.research-citation svg,.row-original svg,.original-link svg{transition:transform .3s var(--ease)}
.search-result blockquote{transition:border-color .35s}
.search-result:hover blockquote{border-left-color:#fa719a}
.quote-toggle[open] summary,.research-answer-limits[open] summary{color:#edb9ca}
.reader-dialog[open]{animation:reader-arrive .3s var(--ease) both}
.reader-dialog::backdrop{animation:backdrop-arrive .25s ease-out both}
.nav-backdrop{animation:backdrop-arrive .2s ease-out both}

@keyframes ambient-tide{0%{opacity:.65;transform:translate3d(-6px,0,0) scale(.98)}100%{opacity:1;transform:translate3d(6px,5px,0) scale(1.02)}}
@keyframes ambient-glow{50%{opacity:.65}}
@keyframes halo-sway{from{transform:rotate(-32deg)}to{transform:rotate(-9deg)}}
@keyframes intro-halo-sway{from{transform:translate(-50%,-50%) rotate(-33deg)}to{transform:translate(-50%,-50%) rotate(-10deg)}}
@keyframes halo-cross{from{transform:rotate(35deg)}to{transform:rotate(65deg)}}
@keyframes orbital-light{50%{opacity:.4;box-shadow:0 0 6px #ef557b55}}
@keyframes core-wave{0%{transform:scale(.97);opacity:0}20%{opacity:.5}75%,100%{transform:scale(1.28);opacity:0}}
@keyframes paper-hover-left{0%,100%{transform:translate(-24px,1px) rotate(-12deg)}50%{transform:translate(-28px,-5px) rotate(-15deg)}}
@keyframes paper-hover-right{0%,100%{transform:translate(28px,7px) rotate(9deg)}50%{transform:translate(31px,0) rotate(12deg)}}
@keyframes paper-scan{0%,15%,100%{transform:translateY(20px) rotate(-6deg);opacity:.15}48%{transform:translateY(-25px) rotate(-6deg);opacity:.8}75%{opacity:.15}}
@keyframes context-flow{to{stroke-dashoffset:-110}}
@keyframes context-beacon{50%{stroke:#ffc0d1;fill:#66263f}}
@keyframes evidence-hover{0%,100%{transform:translateY(0) rotate(-5deg)}50%{transform:translateY(-6px) rotate(-2deg)}}
@keyframes evidence-seal{0%,100%{transform:translateY(0) rotate(8deg)}50%{transform:translateY(-5px) rotate(2deg)}}
@keyframes composer-focus{0%,100%{opacity:.35}50%{opacity:.85}}
@keyframes focus-spark{0%{transform:rotate(-15deg) scale(.8)}60%{transform:rotate(7deg) scale(1.1)}100%{transform:none}}
@keyframes reader-arrive{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
@keyframes backdrop-arrive{from{opacity:0}to{opacity:1}}

/* Small-screen decoration stays clipped; controls never move with the scene. */
@media(max-width:760px){
  .hero::before,.search-intro::before{animation-name:ambient-glow}
  .intro-orb{overflow:clip}
  .feature-card .paper-sheet,.feature-card .evidence-sheet{animation-duration:10s}
}
html.motion-off *,html.motion-off *::before,html.motion-off *::after,
html.tab-hidden *,html.tab-hidden *::before,html.tab-hidden *::after{animation:none!important;transition:none!important}
html.motion-off .motion-click-feedback{display:none}
html.motion-off *{transition-delay:0ms!important}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .motion-click-feedback{display:none}
  .motion-ready .reveal{opacity:1;transform:none}
  .motion-ready .feature-card.is-visible:hover{transform:none}
}
