/* ============================================================
   intro.css  -  the gate in front of the home page.
   intro.js adds  html.mvi  before first paint when the intro
   will play, and swaps it for  html.mvi-out  as the page opens.
   ============================================================ */
html.mvi,html.mvi body{overflow:hidden}
html.mvi nav,html.mvi main,html.mvi footer{visibility:hidden}
html.mvi-out nav,html.mvi-out main,html.mvi-out footer{animation:mviIn 1.1s cubic-bezier(.16,1,.3,1) .12s both}
@keyframes mviIn{from{opacity:0}to{opacity:1}}

#mvIntro{position:fixed;inset:0;z-index:90;background:#000;overflow:hidden;
  -webkit-tap-highlight-color:transparent;touch-action:none;
  font-family:var(--mono,'JetBrains Mono',ui-monospace,Menlo,monospace);color:var(--bone,#EFECE6)}
#mvIntro.gl{background:transparent}
#mvIntro canvas{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
#mvIntro button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;border-radius:0}

/* the whole stage is the way in */
.mvi-go{position:absolute;inset:0;width:100%;height:100%;display:block;outline:0}
.mvi-go svg{position:absolute;left:50%;top:47%;width:min(50vw,1040px);min-width:300px;max-width:84vw;
  transform:translate(-50%,-50%);overflow:visible;display:block}
#mvIntro.gl .mvi-go svg{display:none}
.mvi-go polyline{fill:none;stroke:var(--bone,#EFECE6);stroke-width:4.96;stroke-linejoin:round;
  filter:drop-shadow(0 0 5px rgba(239,236,230,.7)) drop-shadow(0 0 22px rgba(204,34,41,.75));
  stroke-dasharray:560;stroke-dashoffset:560;animation:mviDraw 1.25s cubic-bezier(.65,0,.35,1) .2s forwards}
@keyframes mviDraw{to{stroke-dashoffset:0}}

.mvi-hint{position:absolute;left:0;right:0;top:var(--mvi-hint,68%);text-align:center;pointer-events:none;
  font-size:10px;letter-spacing:.42em;text-transform:uppercase;text-indent:.42em;
  color:var(--bone,#EFECE6);opacity:0;transition:opacity .9s ease,letter-spacing .5s cubic-bezier(.16,1,.3,1),color .3s}
.mvi-hint i{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--red,#CC2229);
  box-shadow:0 0 10px var(--red,#CC2229);margin-right:14px;vertical-align:1px;animation:mviLed 1.6s ease-in-out infinite}
@keyframes mviLed{0%,100%{opacity:.25}50%{opacity:1}}
#mvIntro.ready .mvi-hint{opacity:.78}
#mvIntro.hot .mvi-hint{opacity:1;letter-spacing:.56em}
#mvIntro.going .mvi-hint,#mvIntro.going .mvi-bar{opacity:0;transition:opacity .25s}

.mvi-bar{position:absolute;left:0;right:0;bottom:calc(clamp(18px,3.4vh,34px) + env(safe-area-inset-bottom));
  display:flex;justify-content:space-between;align-items:center;padding:0 var(--pad,clamp(20px,5vw,80px));
  opacity:0;transition:opacity .9s ease .2s;pointer-events:none}
#mvIntro.ready .mvi-bar{opacity:1}
.mvi-bar button{pointer-events:auto;font-size:9.5px!important;letter-spacing:.24em;text-transform:uppercase;
  color:var(--dim,rgba(239,236,230,.52))!important;padding:12px 2px!important;transition:color .3s}
.mvi-bar button:hover,.mvi-bar button:focus-visible{color:var(--bone,#EFECE6)!important;outline:0}
.mvi-bar button b{font-weight:400;color:var(--red,#CC2229)}
.mvi-snd{display:inline-flex;align-items:center;gap:11px}
#mvIntro.quiet .mvi-snd b{color:inherit}
#mvIntro:not(.snd):not(.quiet) .mvi-snd{color:var(--bone,#EFECE6)!important}

/* three bars: still when silent, moving when YIRAH is on. Shared by the intro and the in-site chip */
.bars{display:inline-flex;align-items:flex-end;gap:2px;height:12px}
.bars i{display:block;width:2px;height:100%;background:var(--red,#CC2229);transform-origin:50% 100%;transform:scaleY(.3)}
#mvIntro.snd .bars i,#mvSound.on .bars i{animation:mvBar .52s ease-in-out infinite alternate}
.bars i:nth-child(2){animation-delay:-.3s!important}.bars i:nth-child(3){animation-delay:-.13s!important}
#mvIntro:not(.snd):not(.quiet) .bars i{animation:mviLed 1.6s ease-in-out infinite}
@keyframes mvBar{from{transform:scaleY(.2)}to{transform:scaleY(1)}}

#mvSound{position:fixed;right:var(--pad,clamp(20px,5vw,80px));bottom:calc(clamp(16px,3vh,28px) + env(safe-area-inset-bottom));z-index:40;
  display:inline-flex;align-items:center;gap:11px;cursor:pointer;border-radius:0;
  font-family:var(--mono,'JetBrains Mono',ui-monospace,Menlo,monospace);font-size:9.5px;letter-spacing:.24em;text-transform:uppercase;
  color:#EFECE6;background:rgba(0,0,0,.78);border:1px solid rgba(239,236,230,.22);padding:11px 14px;
  transition:border-color .3s,color .3s;animation:mviIn .6s ease both}
#mvSound:hover,#mvSound:focus-visible{border-color:#CC2229;color:#fff;outline:0}
#mvSound:not(.on){color:rgba(239,236,230,.6)}
html.mvi #mvSound{visibility:hidden}
#mvIntro.ready .mvi-go:focus-visible ~ .mvi-hint{opacity:1;letter-spacing:.56em}

/* no WebGL, or a plain fade out for reduced motion */
#mvIntro.fade{transition:opacity .6s ease;opacity:0}

@media (prefers-reduced-motion:reduce){
  .mvi-go polyline{animation:none;stroke-dashoffset:0}
  .mvi-hint i{animation:none;opacity:1}
  .bars i{animation:none!important}
  #mvSound.on .bars i,#mvIntro.snd .bars i{transform:scaleY(.8)}
  html.mvi-out nav,html.mvi-out main,html.mvi-out footer{animation-duration:.4s;animation-delay:0s}
}
