*{box-sizing:border-box}

html,body{
  margin:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:#071116;
  color:#eefbf5;
  font-family:Inter,system-ui,Segoe UI,sans-serif
}

canvas{
  display:block;
  width:100%;
  height:100%
}

.hud{
  position:fixed;
  inset:0;
  pointer-events:none
}

.panel{
  background:rgba(5,14,18,.86);
  border:1px solid rgba(190,240,220,.18);
  border-radius:14px;
  backdrop-filter:blur(12px);
  box-shadow:0 15px 50px rgba(0,0,0,.3)
}

#stats{
  position:absolute;
  left:18px;
  top:18px;
  width:245px;
  padding:15px
}

.brand{
  font-weight:900;
  letter-spacing:.18em;
  font-size:13px
}

.sub{
  color:#829890;
  font-size:10px;
  margin-top:4px;
  letter-spacing:.1em
}

.label{
  margin-top:12px;
  color:#81958e;
  font-size:9px;
  letter-spacing:.14em
}

.bar{
  height:7px;
  margin-top:5px;
  background:#17252a;
  border-radius:99px;
  overflow:hidden
}

.fill{
  height:100%;
  background:#b9efc8;
  transition:.15s
}

.res{
  margin-top:10px;
  font-size:12px
}

.objective{
  position:absolute;
  right:18px;
  top:18px;
  width:330px;
  padding:15px
}

.objective h3{
  margin:0;
  color:#aee9bb;
  font-size:9px;
  letter-spacing:.16em
}

.objective strong{
  display:block;
  font-size:16px;
  margin-top:5px
}

.objective p{
  margin:5px 0 0;
  color:#94a8a1;
  font-size:12px;
  line-height:1.45
}

.prompt{
  position:absolute;
  left:50%;
  bottom:110px;
  transform:translateX(-50%);
  padding:10px 15px;
  opacity:0;
  transition:.2s
}

.prompt.show{
  opacity:1
}

.dialogue{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  width:min(760px,calc(100vw - 30px));
  padding:15px 18px;
  opacity:0;
  transition:.2s
}

.dialogue.show{
  opacity:1
}

.speaker{
  color:#b9efc8;
  font-size:10px;
  font-weight:900;
  letter-spacing:.16em
}

.dialogueText{
  margin-top:6px;
  line-height:1.5
}

.screen{
  position:fixed;
  inset:0;
  z-index:50;
  display:grid;
  place-items:center;
  background:rgba(2,8,11,.94)
}

.hidden{
  display:none!important
}

.story{
  width:min(720px,90vw);
  padding:40px;
  border:1px solid rgba(220,240,230,.15);
  border-radius:24px;
  background:linear-gradient(145deg,#12252b,#071015);
  box-shadow:0 40px 120px rgba(0,0,0,.6)
}

.tag{
  color:#aee9bb;
  font-size:10px;
  font-weight:900;
  letter-spacing:.18em
}

.story h1{
  font-size:clamp(44px,8vw,82px);
  line-height:.84;
  margin:12px 0 22px
}

.story p{
  color:#afc0ba;
  line-height:1.6
}

.story button{
  margin-top:14px;
  padding:13px 20px;
  border:0;
  border-radius:10px;
  background:#d9f3df;
  color:#07120c;
  font-weight:900;
  cursor:pointer
}

.controls{
  margin-top:18px;
  padding:13px;
  background:rgba(255,255,255,.04);
  border-radius:10px;
  color:#91a59e;
  font-size:12px;
  line-height:1.7
}

/* CUTSCENES */

.cutscene{
  position:fixed;
  inset:0;
  z-index:80;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:0 18px 7vh;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(90,180,150,.15),
      rgba(2,7,10,.97) 70%
    );
  opacity:0;
  pointer-events:none;
  transition:.7s
}

.cutscene.show{
  opacity:1;
  pointer-events:auto
}

.tower{
  position:absolute;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  height:72vh;
  width:150px;
  border-left:5px solid rgba(150,180,175,.25);
  border-right:5px solid rgba(150,180,175,.25);
  background:repeating-linear-gradient(
    0deg,
    transparent 0 65px,
    rgba(160,190,183,.14) 66px 70px
  )
}

.glow{
  position:absolute;
  left:50%;
  top:31%;
  width:300px;
  height:300px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:radial-gradient(
    circle,
    rgba(185,239,200,.3),
    transparent 68%
  );
  animation:pulse 2.4s infinite
}

.person{
  position:absolute;
  bottom:0;
  width:125px;
  height:250px;
  border-radius:60px 60px 0 0;
  background:linear-gradient(#152226,#05090b)
}

.mara{
  left:12%
}

.survivor{
  right:12%
}

.person:before{
  content:"";
  position:absolute;
  width:70px;
  height:70px;
  left:50%;
  top:-58px;
  transform:translateX(-50%);
  border-radius:50%;
  background:#111b1d
}

.cutbox{
  position:relative;
  z-index:2;
  width:min(780px,94vw);
  padding:18px 22px;
  border:1px solid rgba(205,239,220,.2);
  border-radius:16px;
  background:rgba(3,10,12,.9);
  box-shadow:0 20px 80px rgba(0,0,0,.55)
}

.cutSpeaker{
  color:#b9efc8;
  font-size:10px;
  font-weight:900;
  letter-spacing:.18em
}

.cutText{
  margin-top:7px;
  font-size:17px;
  line-height:1.55
}

.skip{
  margin-top:8px;
  color:#637873;
  font-size:9px;
  letter-spacing:.12em
}

/* UNDERGROUND LOOK */

.cutscene.tunnelScene{
  background:
    radial-gradient(
      ellipse at 50% 35%,
      rgba(80,150,130,.16),
      rgba(2,7,9,.98) 72%
    )
}

@keyframes pulse{
  50%{
    transform:translate(-50%,-50%) scale(1.15);
    opacity:.65
  }
}
