/* IQAI Evidence Wake
   Semantic interaction for the homepage architecture.
   At rest the diagram remains unchanged. Under attention an outcome reveals its
   route backward through IQAI toward the inputs that support it. */

.arch-wrap{
  --iq-wake-ink:#111;
  --iq-wake-muted:.16;
}

.iq-wake-layer{
  pointer-events:none;
}

.iq-wake-path{
  fill:none;
  stroke:var(--iq-wake-ink);
  stroke-width:1.15;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
  path-length:100;
  stroke-dasharray:100;
  stroke-dashoffset:100;
  opacity:0;
  transition:opacity 420ms ease;
}

.iq-wake-path.is-active{
  opacity:.92;
  animation:iqWakeDraw 660ms cubic-bezier(.22,1,.36,1) forwards;
  animation-delay:var(--iq-wake-delay,0ms);
}

@keyframes iqWakeDraw{
  to{stroke-dashoffset:0}
}

/* Interaction temporarily replaces the ambient sequence with a readable proof path. */
.arch-wrap.iq-wake-active :is(
  .arch-problem,.arch-evidence,.arch-domain,.arch-constraints,
  .arch-core-group,.arch-working,.arch-reuse
){
  animation:none!important;
  transform:none!important;
  opacity:1!important;
}

.arch-wrap.iq-wake-active .arch-dotted.live,
.arch-wrap.iq-wake-active .arch-flow.live{
  animation-play-state:paused!important;
}

.arch-wrap.iq-wake-active .arch-dotted.live{
  opacity:.14!important;
}

.arch-wrap.iq-wake-active .arch-flow.live{
  opacity:.12!important;
}

.arch-wrap.iq-wake-active .arch-guide{
  opacity:.22!important;
}

.arch-wrap.iq-wake-active .arch-working:not(.iq-wake-trigger-active)>*,
.arch-wrap.iq-wake-active .arch-reuse:not(.iq-wake-trigger-active)>*{
  opacity:.18!important;
  transition:opacity 240ms ease;
}

.arch-wrap.iq-wake-active .iq-wake-trigger-active .arch-box{
  stroke:#111;
  stroke-width:1.35;
}

.arch-wrap.iq-wake-active :is(
  .arch-problem,.arch-evidence,.arch-domain,.arch-constraints
) .arch-box{
  stroke:#111;
  stroke-width:1.05;
}

.arch-wrap.iq-wake-active .arch-core-group .arch-box-bg{
  stroke:#333;
  opacity:.9;
}

.arch-wrap.iq-wake-active .arch-core-group .arch-core{
  fill:#000;
}

/* Keep the evidence/provenance/learning shelves readable while highlighted.
   Rectangles have transparent fills; text alone receives the stronger ink. */
.arch-wrap.iq-wake-active [data-iq-wake-shelf="evidence"] rect,
.arch-wrap.iq-wake-active [data-iq-wake-shelf="provenance"] rect,
.arch-wrap.iq-wake-active.iq-wake-reuse [data-iq-wake-shelf="learning"] rect{
  opacity:1!important;
  stroke:#111;
  fill:transparent;
}

.arch-wrap.iq-wake-active [data-iq-wake-shelf="evidence"] text,
.arch-wrap.iq-wake-active [data-iq-wake-shelf="provenance"] text,
.arch-wrap.iq-wake-active.iq-wake-reuse [data-iq-wake-shelf="learning"] text{
  opacity:1!important;
  fill:#111;
  stroke:none;
}

/* Tiny cue only while the interaction is live. */
.iq-wake-caption{
  position:absolute;
  right:28px;
  bottom:24px;
  z-index:3;
  margin:0;
  padding:5px 8px;
  background:rgba(243,243,243,.9);
  border:1px solid rgba(17,17,17,.18);
  font-size:9px;
  line-height:1.25;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#555;
  opacity:0;
  transform:translateY(3px);
  pointer-events:none;
  transition:opacity 180ms ease,transform 220ms cubic-bezier(.22,1,.36,1);
}

.arch-wrap.iq-wake-active .iq-wake-caption{
  opacity:1;
  transform:none;
}

@media(max-width:760px){
  .iq-wake-layer,.iq-wake-caption{display:none!important}
}

@media(prefers-reduced-motion:reduce){
  .iq-wake-path.is-active{
    animation:none!important;
    stroke-dashoffset:0!important;
  }
  .iq-wake-caption{transition:none}
}
