/* EQUILIBRIUM — Immersive Pass 20
   Purpose: make existing worlds readable and spatially alive without replacing their canonical scenes. */

/* -------------------------------------------------------------------------- */
/* RÉSONANCE — reveal the cathedral and make the signal visibly inhabit space. */
/* -------------------------------------------------------------------------- */
.resonance-v2[data-resonance-pass20="true"] [data-resonance-world]{
  background:
    radial-gradient(ellipse at 50% 58%,rgba(87,225,237,.15),transparent 34%),
    radial-gradient(ellipse at 50% 18%,rgba(232,164,255,.10),transparent 31%),
    linear-gradient(180deg,#0b1b26 0%,#091720 48%,#061018 100%)!important;
}
.resonance-v2[data-resonance-pass20="true"] [data-resonance-world] > canvas:not(.resonance-spectrum-overlay){
  filter:brightness(1.24) saturate(1.18) contrast(1.035);
}
.resonance-v2[data-resonance-pass20="true"] [data-resonance-world]::before{
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:
    linear-gradient(90deg,rgba(117,240,255,.055) 1px,transparent 1px) 50% 50%/9.2vw 100%,
    radial-gradient(ellipse at 50% 74%,rgba(109,238,246,.12),transparent 45%),
    linear-gradient(180deg,rgba(255,255,255,.035),transparent 25%,transparent 72%,rgba(1,8,13,.2));
  mix-blend-mode:screen;opacity:.8;
}
.resonance-v2[data-resonance-pass20="true"] .resonance-spectrum-overlay{
  position:absolute;inset:0;z-index:3;width:100%;height:100%;display:block;pointer-events:none;
  opacity:.9;mix-blend-mode:screen;
  filter:saturate(1.12);
}
.resonance-v2[data-resonance-pass20="true"] .signal-readout{
  background:rgba(5,14,20,.38)!important;
  border-color:rgba(181,247,244,.22)!important;
  box-shadow:0 1.2rem 4rem rgba(0,0,0,.18),inset 0 1px rgba(255,255,255,.1),0 0 3.2rem color-mix(in srgb,var(--band,#68eff6) 8%,transparent)!important;
}
.resonance-v2[data-resonance-pass20="true"] .frequency-rail{
  background:rgba(4,13,19,.42)!important;
  border-color:rgba(181,247,244,.2)!important;
}
.resonance-v2[data-resonance-pass20="true"] .band-group{
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.014))!important;
}

/* -------------------------------------------------------------------------- */
/* TRIPPY MOUNTAINS — keep the 3D world visible and add parallax depth cues.   */
/* -------------------------------------------------------------------------- */
.trippy-page[data-pass20-trippy="true"] .trippy-world{
  inset:-1%!important;
  filter:saturate(1.06);
}
.trippy-page[data-pass20-trippy="true"] .trippy-world canvas{
  filter:brightness(1.2) saturate(1.2) contrast(1.035);
}
.trippy-page[data-pass20-trippy="true"] .trippy-grade{
  background:
    linear-gradient(90deg,rgba(7,5,17,.58) 0%,rgba(7,5,17,.12) 35%,rgba(6,5,16,.035) 58%,rgba(6,5,16,.28) 100%),
    linear-gradient(0deg,rgba(4,3,12,.42),transparent 30%,rgba(9,5,18,.08))!important;
  mix-blend-mode:normal!important;
}
.trippy-page[data-pass20-trippy="true"] .trippy-grade::after{
  background:
    radial-gradient(circle at 48% 28%,rgba(255,91,184,.13),transparent 27%),
    radial-gradient(circle at 57% 66%,rgba(79,231,241,.12),transparent 35%),
    radial-gradient(ellipse at 50% 88%,rgba(240,204,126,.08),transparent 34%)!important;
}
.trippy-depth-field,.trippy-prism-field{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.trippy-depth-field{z-index:2;mix-blend-mode:screen;opacity:.92}
.trippy-depth-field .ridge{position:absolute;left:-10%;width:120%;transform-origin:50% 100%;will-change:transform,opacity}
.trippy-depth-field .ridge-a{bottom:-4%;height:35%;opacity:.2;background:linear-gradient(180deg,rgba(95,238,245,.08),rgba(7,19,31,.36));clip-path:polygon(0 100%,0 70%,8% 55%,14% 68%,23% 38%,31% 61%,40% 29%,48% 57%,59% 31%,67% 63%,77% 35%,86% 58%,94% 42%,100% 68%,100% 100%);transform:translate3d(calc((var(--trippy-progress,0) - .5)*-2.5vw),0,0) scaleY(calc(.92 + var(--trippy-progress,0)*.08))}
.trippy-depth-field .ridge-b{bottom:8%;height:27%;opacity:.16;background:linear-gradient(180deg,rgba(255,112,196,.13),rgba(27,10,41,.12));clip-path:polygon(0 100%,0 80%,10% 47%,18% 70%,29% 33%,38% 64%,49% 41%,58% 67%,69% 27%,78% 58%,88% 36%,100% 73%,100% 100%);transform:translate3d(calc((var(--trippy-progress,0) - .5)*4vw),calc(var(--trippy-progress,0)*-1.1vh),0)}
.trippy-depth-field .ridge-c{bottom:22%;height:18%;opacity:.12;background:linear-gradient(180deg,rgba(241,207,132,.16),transparent);clip-path:polygon(0 100%,0 82%,12% 52%,21% 72%,35% 35%,46% 67%,61% 38%,72% 69%,83% 46%,100% 76%,100% 100%);transform:translate3d(calc((var(--trippy-progress,0) - .5)*-6vw),calc(var(--trippy-progress,0)*-2vh),0)}
.trippy-depth-field .light-column{position:absolute;top:8%;bottom:3%;width:1px;background:linear-gradient(180deg,transparent,rgba(118,239,244,.2) 24%,rgba(255,137,205,.17) 66%,transparent);box-shadow:0 0 1.4rem rgba(109,237,244,.18);opacity:calc(.2 + var(--trippy-progress,0)*.35);transform:rotate(7deg) scaleY(calc(.72 + var(--trippy-progress,0)*.32));transform-origin:50% 100%}
.trippy-depth-field .light-column:nth-of-type(4){left:26%}.trippy-depth-field .light-column:nth-of-type(5){left:52%;transform:rotate(-4deg) scaleY(calc(.78 + var(--trippy-progress,0)*.25))}.trippy-depth-field .light-column:nth-of-type(6){left:76%;transform:rotate(9deg) scaleY(calc(.68 + var(--trippy-progress,0)*.38))}
.trippy-prism-field{z-index:3;mix-blend-mode:screen}
.trippy-prism-field i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);border:1px solid rgba(153,244,247,.34);background:radial-gradient(circle at 35% 28%,rgba(255,255,255,.52),rgba(114,239,245,.14) 28%,rgba(255,115,199,.08) 55%,transparent 72%);clip-path:polygon(50% 0,100% 35%,78% 100%,20% 82%,0 34%);opacity:var(--o);filter:blur(var(--b));transform:translate3d(calc((var(--trippy-progress,0) - .5)*var(--drift)),calc(sin(var(--trippy-progress,0))*0px),0) rotate(calc(var(--r) + var(--trippy-progress,0)*90deg));will-change:transform}
.trippy-page[data-pass20-trippy="true"] .trippy-horizon{opacity:.42!important;filter:drop-shadow(0 0 1.4rem rgba(117,238,243,.12))}
.trippy-page[data-pass20-trippy="true"] .trippy-chapters article{background:linear-gradient(270deg,rgba(4,8,19,.58),rgba(4,8,19,.06))!important;border-color:rgba(128,234,239,.55)!important}

@media(max-width:820px){
  .resonance-v2[data-resonance-pass20="true"] [data-resonance-world] > canvas:not(.resonance-spectrum-overlay){filter:brightness(1.3) saturate(1.12) contrast(1.02)}
  .resonance-v2[data-resonance-pass20="true"] .signal-readout,.resonance-v2[data-resonance-pass20="true"] .frequency-rail{background:rgba(4,12,18,.5)!important}
  .trippy-page[data-pass20-trippy="true"] .trippy-grade{background:linear-gradient(180deg,rgba(6,5,16,.22),rgba(6,5,16,.04) 45%,rgba(4,3,12,.34))!important}
  .trippy-depth-field .ridge-a{opacity:.18}.trippy-depth-field .ridge-b{opacity:.13}.trippy-depth-field .ridge-c{opacity:.09}
}
@media(prefers-reduced-motion:reduce){.trippy-depth-field .ridge,.trippy-depth-field .light-column,.trippy-prism-field i{transform:none!important}}
