/*
 * Aptiora Notes Experience Layer v1.6.0 — Living Interface Engine
 * Native, page-aware motion. No floating companion. No scroll hijacking.
 */

:root{
  --anxl-violet:#797EF6;
  --anxl-gold:#EABF4B;
  --anxl-teal:#2DD4BF;
  --anxl-ink:#0B0C10;
  --anxl-navy:#13233D;
  --anxl-ease:cubic-bezier(.22,.75,.18,1);
  --anxl-soft-ease:cubic-bezier(.16,.7,.25,1);
  --anxl-page-progress:0;
  --anxl-scene-accent:var(--anxl-violet);
}

.anxl-living-interface{
  scroll-behavior:auto!important;
}

.anxl-living-interface *{
  -webkit-tap-highlight-color:transparent;
}

body[data-anxl-stage="orient"]{--anxl-scene-accent:var(--anxl-violet)}
body[data-anxl-stage="explore"]{--anxl-scene-accent:var(--anxl-violet)}
body[data-anxl-stage="understand"]{--anxl-scene-accent:var(--anxl-gold)}
body[data-anxl-stage="delegate"]{--anxl-scene-accent:var(--anxl-violet)}
body[data-anxl-stage="choose"]{--anxl-scene-accent:var(--anxl-gold)}
body[data-anxl-stage="prepare"]{--anxl-scene-accent:var(--anxl-teal)}
body[data-anxl-stage="decide"]{--anxl-scene-accent:var(--anxl-teal)}
body[data-anxl-stage="verify"]{--anxl-scene-accent:var(--anxl-gold)}
body[data-anxl-stage="act"]{--anxl-scene-accent:var(--anxl-navy)}

/* --------------------------------------------------------------------------
   PAGE GENOME / SCENE GRAPH
   The scene exists in the page's own geometry. No external experience chrome.
   -------------------------------------------------------------------------- */
.anxl-living-interface :where(.anxl-native-scene){
  --anxl-scene-progress:0;
  position:relative;
  transition:filter .72s ease,opacity .58s ease,transform .82s var(--anxl-soft-ease);
  transform-origin:50% 44%;
}

.anxl-living-interface :where(.anxl-native-scene h1,.anxl-native-scene h2,.anxl-native-scene h3){
  transition:letter-spacing .72s var(--anxl-ease),opacity .5s ease,transform .72s var(--anxl-ease);
}

.anxl-living-interface :where(.anxl-scene-current h1,.anxl-scene-current h2){
  letter-spacing:-.018em;
}

/* A scene signals importance through the heading itself, not a label beside it. */
.anxl-living-interface :where(.anxl-scene-current h1,.anxl-scene-current h2)::after{
  content:"";
  display:block;
  width:clamp(34px,5vw,72px);
  height:1px;
  margin-top:.34em;
  background:linear-gradient(90deg,var(--anxl-scene-accent),transparent);
  opacity:.38;
  transform-origin:left center;
  animation:anxl-heading-resolve .82s var(--anxl-ease) both;
}
@keyframes anxl-heading-resolve{from{transform:scaleX(.28);opacity:.12}to{transform:scaleX(1);opacity:.38}}

.anxl-motion-cinematic:not(.anxl-session-deep) :where(.anxl-scene-after){
  filter:saturate(.985);
}
.anxl-motion-cinematic:not(.anxl-session-deep) :where(.anxl-scene-current){
  filter:saturate(1.018);
}
.anxl-session-expert :where(.anxl-native-scene){transition-duration:.42s}

/* Progressive scroll-driven breathing. It is deliberately tiny. */
@supports (animation-timeline:view()){
  .anxl-motion-cinematic:not(.anxl-session-deep) :where(.anxl-native-scene){
    animation-name:anxl-view-breathe;
    animation-timing-function:linear;
    animation-fill-mode:both;
    animation-timeline:view();
    animation-range:entry 8% exit 92%;
  }
  @keyframes anxl-view-breathe{
    0%{opacity:.95;transform:translateY(5px)}
    38%,62%{opacity:1;transform:translateY(0)}
    100%{opacity:.97;transform:translateY(-2px)}
  }
}

/* --------------------------------------------------------------------------
   ACTION COMPASS
   Existing buttons become relevant. Nothing new is created.
   -------------------------------------------------------------------------- */
.anxl-living-interface :where(.anxl-action-relevant){
  position:relative;
  isolation:isolate;
  transition:transform .45s var(--anxl-ease),box-shadow .45s ease,filter .4s ease,opacity .35s ease!important;
  transform:translateY(-1px);
  filter:saturate(1.035);
}
.anxl-living-interface :where(.anxl-action-relevant)::after{
  content:"";
  position:absolute;
  inset:-3px;
  border:1px solid color-mix(in srgb,var(--anxl-scene-accent) 38%,transparent);
  border-radius:inherit;
  opacity:.45;
  pointer-events:none;
  animation:anxl-action-settle .9s var(--anxl-ease) both;
}
@keyframes anxl-action-settle{from{inset:-8px;opacity:0}55%{opacity:.5}to{inset:-3px;opacity:.3}}

/* --------------------------------------------------------------------------
   HOME — narrative motion through existing sections.
   -------------------------------------------------------------------------- */
.anxl-page-home :where(.anxl-home-sequence){
  --anxl-process-progress:0;
  position:relative;
  isolation:isolate;
}
.anxl-page-home :where(.anxl-home-sequence)::before{
  content:"";
  position:absolute;
  left:3%;right:3%;bottom:-1px;height:1px;
  background:linear-gradient(90deg,var(--anxl-violet) 0 calc(var(--anxl-process-progress)*100%),rgba(121,126,246,.10) calc(var(--anxl-process-progress)*100%));
  opacity:.34;
  pointer-events:none;
}
.anxl-page-home :where(.anxl-process-step){
  transition:opacity .48s ease,transform .65s var(--anxl-ease),border-color .45s ease;
}
.anxl-page-home :where(.anxl-process-live){transform:translateY(-2px)}

.anxl-page-home :where(.anxl-radar-system){
  isolation:isolate;
}
.anxl-page-home :where(.anxl-radar-source){
  transition:opacity .46s ease,transform .62s var(--anxl-ease);
}
.anxl-page-home :where(.anxl-scene-current.anxl-radar-system .anxl-radar-source){
  opacity:1;
  transform:translateX(0);
}
.anxl-page-home :where(.anxl-radar-metric){
  display:inline-block;
  transform-origin:left center;
  transition:transform .7s var(--anxl-ease),opacity .45s ease;
}
.anxl-page-home :where(.anxl-scene-current .anxl-radar-metric){transform:translateY(-1px)}

/* When the final decision arrives, the interface deliberately becomes still. */
.anxl-stillness :where(.anxl-native-scene,.anxl-opportunity-card,.anxl-process-step){
  animation:none!important;
  transition-duration:.18s!important;
}

/* --------------------------------------------------------------------------
   OPPORTUNITY / SEARCH CARDS — consideration has weight, not spectacle.
   -------------------------------------------------------------------------- */
.anxl-living-interface :where(.anxl-opportunity-card){
  position:relative;
  transition:transform .58s var(--anxl-ease),box-shadow .55s ease,border-color .42s ease,opacity .38s ease,filter .4s ease;
  will-change:transform;
}
.anxl-living-interface :where(.anxl-card-considered){
  transform:translateY(-4px) scale(1.002);
  box-shadow:0 18px 42px rgba(11,12,16,.07)!important;
  border-color:color-mix(in srgb,var(--anxl-violet) 26%,transparent)!important;
}
.anxl-living-interface :where(.anxl-seen-opportunity){opacity:.94}
.anxl-living-interface :where(.anxl-seen-opportunity)::before{
  content:"";
  position:absolute;
  width:5px;height:5px;border-radius:50%;
  right:12px;bottom:10px;
  background:var(--anxl-violet);
  opacity:.20;
  pointer-events:none;
}

/* --------------------------------------------------------------------------
   MARKET — search behaves like a lens; result changes reflow physically.
   -------------------------------------------------------------------------- */
.anxl-page-market :where(.anxl-search-lens){
  position:relative;
  isolation:isolate;
  transition:transform .46s var(--anxl-ease),box-shadow .46s ease,border-color .4s ease;
}
.anxl-page-market :where(.anxl-search-lens)::after{
  content:"";
  position:absolute;
  left:4%;right:4%;bottom:-2px;height:1px;
  background:linear-gradient(90deg,transparent,var(--anxl-violet),transparent);
  opacity:0;
  transform:scaleX(.18);
  transform-origin:center;
  transition:opacity .35s ease,transform .72s var(--anxl-ease);
  pointer-events:none;
}
.anxl-page-market :where(.anxl-search-live){
  transform:translateY(-1px);
  box-shadow:0 13px 34px rgba(11,12,16,.045);
}
.anxl-page-market :where(.anxl-search-live)::after{opacity:.44;transform:scaleX(1)}
.anxl-page-market :where(.anxl-result-grid){transition:opacity .35s ease,filter .35s ease}
.anxl-page-market :where(.anxl-refining .anxl-result-grid){opacity:.88;filter:saturate(.96)}
.anxl-page-market :where(.anxl-result-count){display:inline-block;transition:transform .42s var(--anxl-ease),opacity .35s ease}
.anxl-page-market :where(.anxl-refining .anxl-result-count){transform:translateY(-1px);opacity:.72}

/* --------------------------------------------------------------------------
   OPPORTUNITY — existing Your Aptiora rail becomes a decision instrument.
   -------------------------------------------------------------------------- */
.anxl-page-opportunity :where(.anxl-decision-host){
  --anxl-rail-accent:var(--anxl-violet);
}
.anxl-page-opportunity :where(.anxl-decision-host[data-anxl-phase="requirements"]){--anxl-rail-accent:var(--anxl-gold)}
.anxl-page-opportunity :where(.anxl-decision-host[data-anxl-phase="evidence"]){--anxl-rail-accent:var(--anxl-teal)}
.anxl-page-opportunity :where(.anxl-decision-host[data-anxl-phase="application-path"]){--anxl-rail-accent:var(--anxl-teal)}
.anxl-page-opportunity :where(.anxl-decision-host[data-anxl-phase="verification"]){--anxl-rail-accent:var(--anxl-gold)}

.anxl-page-opportunity :where(.anxl-decision-instrument){
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:baseline;
  gap:3px 8px;
  margin:7px 0 10px;
  padding:0;
  color:inherit;
  background:transparent;
  border:0;
}
.anxl-page-opportunity :where(.anxl-decision-state){
  color:var(--anxl-rail-accent);
  font:700 8px/1.2 Montserrat,Inter,system-ui,sans-serif;
  letter-spacing:.095em;
  text-transform:uppercase;
  white-space:nowrap;
  transition:color .4s ease,opacity .3s ease;
}
.anxl-page-opportunity :where(.anxl-decision-detail){
  min-width:0;
  color:inherit;
  opacity:.46;
  font:500 8.5px/1.25 Montserrat,Inter,system-ui,sans-serif;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.anxl-page-opportunity :where(.anxl-decision-line){
  grid-column:1/-1;
  display:block;
  height:1px;
  overflow:hidden;
  background:rgba(11,12,16,.075);
}
.anxl-page-opportunity :where(.anxl-decision-line i){
  display:block;width:100%;height:100%;
  transform:scaleX(.08);
  transform-origin:left;
  background:linear-gradient(90deg,var(--anxl-rail-accent),color-mix(in srgb,var(--anxl-rail-accent) 30%,transparent));
  transition:transform .82s var(--anxl-ease),background .42s ease;
}
.anxl-page-opportunity :where(.anxl-decision-instrument.anxl-system-event .anxl-decision-state){animation:anxl-system-state .7s var(--anxl-ease) both}
@keyframes anxl-system-state{0%{opacity:.35;transform:translateY(2px)}100%{opacity:1;transform:none}}

/* Requirement reading changes the requirement itself and the native rail progress. */
.anxl-page-opportunity :where(.anxl-requirement-item){
  position:relative;
  transition:transform .5s var(--anxl-ease),background .42s ease,border-color .42s ease,opacity .38s ease;
}
.anxl-page-opportunity :where(.anxl-requirement-item)::before{
  content:"";
  position:absolute;
  left:0;top:18%;bottom:18%;width:1px;
  background:var(--anxl-teal);
  transform:scaleY(.12);
  transform-origin:top;
  opacity:0;
  transition:transform .62s var(--anxl-ease),opacity .35s ease;
  pointer-events:none;
}
.anxl-page-opportunity :where(.anxl-requirement-read)::before{transform:scaleY(1);opacity:.34}
.anxl-page-opportunity.anxl-motion-cinematic :where(.anxl-requirement-read){transform:translateX(2px)}

/* Evidence is a change of perspective, not a popup. */
.anxl-page-opportunity :where(.anxl-evidence-focus){
  transition:box-shadow .72s ease,background .72s ease,transform .72s var(--anxl-ease);
}
.anxl-page-opportunity :where(.anxl-evidence-focus.anxl-scene-current){
  box-shadow:inset 2px 0 0 color-mix(in srgb,var(--anxl-teal) 42%,transparent);
}
.anxl-page-opportunity :where(.anxl-decision-host[data-anxl-phase="evidence"] button:not(.anxl-action-relevant),
                               .anxl-decision-host[data-anxl-phase="application-path"] button:not(.anxl-action-relevant)){
  opacity:.80;
}

/* --------------------------------------------------------------------------
   MEMBERSHIP — comparison through focus only.
   -------------------------------------------------------------------------- */
.anxl-page-membership :where(.anxl-plan-card){
  transition:transform .62s var(--anxl-ease),box-shadow .55s ease,opacity .42s ease,filter .42s ease,border-color .42s ease;
}
.anxl-page-membership :where(.anxl-plan-live){
  transform:translateY(-4px);
  box-shadow:0 20px 50px rgba(11,12,16,.065)!important;
  filter:saturate(1.02);
}
.anxl-page-membership.anxl-motion-cinematic :where(.anxl-plan-card:not(.anxl-plan-live)){opacity:.94}
.anxl-page-membership :where([data-anxl-price="1"]){display:inline-block;transform-origin:left center}

/* --------------------------------------------------------------------------
   SUPER CV / ORGANIZATIONS — processes become one continuous system.
   -------------------------------------------------------------------------- */
.anxl-page-supercv :where(.anxl-process-track),
.anxl-page-organization :where(.anxl-process-track){
  --anxl-process-progress:0;
  position:relative;
  isolation:isolate;
}
.anxl-page-supercv :where(.anxl-process-track)::before,
.anxl-page-organization :where(.anxl-process-track)::before{
  content:"";
  position:absolute;
  left:3%;right:3%;top:50%;height:1px;
  background:linear-gradient(90deg,
    var(--anxl-scene-accent) 0 calc(var(--anxl-process-progress)*100%),
    rgba(11,12,16,.08) calc(var(--anxl-process-progress)*100%) 100%);
  opacity:.34;
  pointer-events:none;
  z-index:0;
}
.anxl-page-supercv :where(.anxl-process-step),
.anxl-page-organization :where(.anxl-process-step){
  position:relative;
  z-index:1;
  transition:transform .62s var(--anxl-ease),opacity .46s ease,border-color .42s ease,background .42s ease;
}
.anxl-page-supercv :where(.anxl-process-live),
.anxl-page-organization :where(.anxl-process-live){transform:translateY(-3px)}
.anxl-page-supercv :where(.anxl-cv-preview){
  transform-origin:50% 48%;
  transition:transform .9s var(--anxl-ease),box-shadow .72s ease,filter .5s ease;
}
.anxl-page-supercv :where(.anxl-cv-preview-live){transform:translateY(-4px) rotateX(.3deg);box-shadow:0 22px 58px rgba(11,12,16,.075)!important}

/* --------------------------------------------------------------------------
   OBJECT CONTINUITY
   -------------------------------------------------------------------------- */
.anxl-living-interface :where(.anxl-continuity-target){animation:anxl-continuity-in .86s var(--anxl-ease) both}
@keyframes anxl-continuity-in{0%{filter:saturate(.92);transform:translateY(7px);opacity:.82}100%{filter:none;transform:none;opacity:1}}
.anxl-living-interface :where(.anxl-native-focus){animation:anxl-native-focus 1.25s var(--anxl-ease) 1}
@keyframes anxl-native-focus{0%,100%{box-shadow:0 0 0 0 rgba(121,126,246,0)}42%{box-shadow:0 0 0 4px rgba(121,126,246,.09)}}

@view-transition{navigation:auto}
::view-transition-old(aptiora-focus),::view-transition-new(aptiora-focus){animation-duration:.58s;animation-timing-function:var(--anxl-ease)}

/* --------------------------------------------------------------------------
   MOBILE / ACCESSIBILITY / PERFORMANCE
   -------------------------------------------------------------------------- */
@media(max-width:760px){
  .anxl-living-interface :where(.anxl-scene-current h1,.anxl-scene-current h2)::after{width:42px;opacity:.28}
  .anxl-living-interface :where(.anxl-card-considered){transform:none;box-shadow:0 10px 24px rgba(11,12,16,.045)!important}
  .anxl-page-opportunity :where(.anxl-decision-instrument){gap:3px 6px;margin:6px 0 9px}
  .anxl-page-opportunity :where(.anxl-decision-detail){font-size:8px}
  .anxl-page-opportunity :where(.anxl-requirement-read){transform:none!important}
  .anxl-page-supercv :where(.anxl-process-track)::before,
  .anxl-page-organization :where(.anxl-process-track)::before,
  .anxl-page-home :where(.anxl-home-sequence)::before{display:none}
  .anxl-page-supercv :where(.anxl-process-live),
  .anxl-page-organization :where(.anxl-process-live),
  .anxl-page-membership :where(.anxl-plan-live){transform:none}
}

@media(prefers-reduced-motion:reduce){
  .anxl-living-interface *,
  .anxl-living-interface *::before,
  .anxl-living-interface *::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
  .anxl-living-interface :where(.anxl-card-considered,.anxl-plan-live,.anxl-process-live,.anxl-cv-preview-live){transform:none!important}
}
