/* ****************************************************** Base ****************************************************** */

@import url('https://fonts.googleapis.com/css2?family=Zen+Dots&display=swap');

:root{

--logo-width:70vmin;
--logo-hex: #0077B6;
--logo-rgba: rgba(0, 119, 182, 1);
--logo-faded: rgba(0, 119, 182, 0.1);
--background: #0A0A0A;
--list-color: #a5b4cb;
--opacity: 0;

}
/* ****************************************************** HTML elements ****************************************************** */

body{

background-color: var(--background);
color: var(--list-color);
font-family: monospace;
}

main{

display: flex;
flex-direction: row;
flex-wrap: nowrap;
place-items: center;
justify-content: space-evenly;
align-items: center;
border: none;
  /*transform: translateY(-100vh);*/
}

h1{
color: #3B82F6;
font-size: 1.2em;
}

ul{
list-style-type: none;
}

footer{
  position: fixed;
  bottom: 0;
  width: 100%;
  padding-bottom: 1em;
  height: 6em;
  background-color: var(--background);
}

/* ****************************************************** layout ****************************************************** */

/* ****************** layout Main ****************** */
.hero{
height: 90vh; align-content: calc(100vmin/2);
/*width: 100vw;*/
display: grid;
place-items: center;
border-style: none;
border: none;
}
.container-hero{
width: calc(var(--logo-width)/2);
height: calc(var(--logo-width)/2);
border-style: solid;
border-radius: 50%;
border-width: 0.5em;
border-color: var(--logo-faded);
display: grid;
place-items: center;
animation: shadow 4s infinite;
}
.logo{
font-size: calc(var(--logo-width)/4);
color: var(--logo-faded);
animation: pulse 4s infinite;
}
/* LOGO SKRIFT */
.zen-dots-regular {
font-family: "Zen Dots", sans-serif;
font-weight: 400;
font-style: normal;
}
.message{
color: var(--list-color);
display: grid;
align-content: center;
height: 90vh;
border: none;
opacity: 1;
/*animation: delay 1s forwards, move-in 1s forwards;
animation-delay: 10s, 13s;*/
}

/*.message {
  animation: test 1s steps(600, end) forwards;
  animation-delay: 10s, 13s, 18s;  Show 5s, then fade 
}
*/
.message{
animation: corrupt 2s infinite alternate;

animation-delay: 1s; 
}

.m1,.m2, .m3, .m4, .m5, .m6, .m7, .m8, .m9{
  opacity: 0;
  animation: delay 3s forwards;
  animation-delay: 13s;
}
/* ****************** layout footer ****************** */
.foot-container{
display: flex;
}
.typewriter {
overflow: hidden;
white-space: nowrap;
width: 0;
animation: typing 4s steps(23, end) forwards;
animation-iteration-count: 1;
animation-delay: 2s;
}
.cursor-after{
opacity: 0;
border-left: 2px solid var(--list-color);
animation: blink 0.8s step-start 8;
}
.container-load{
display: flex;
opacity: 0;
animation: delay 1s forwards, hide-load 0.5s forwards;
animation-delay: 6s, 12s;
}
.loading-dots{
width: 0;
overflow: hidden;
white-space: nowrap;
animation: loading 2s steps(4, end) forwards 3;
animation-delay: 6s;
}
.incomming{
  opacity: 0;
  animation: delay 1s forwards;
  animation-delay: 12s;
}
.unstable{
  opacity: 0;
  animation: delay 1s forwards;
  animation-delay: 13s;
}
.terminated{
  opacity: 0;
  animation: delay 1s forwards;
  animation-delay: 15s; 
}
/* ****************************************************** Animations ****************************************************** */

/* ****************** Animation timeline ****************** */
/* Animation timing
Time  class                   animation   duration
0s    .cursor-after           blink       0.8s
0s    .message p, .message ul corrupt     2s
0s    .container              shadow      4s
0s    .logo                   pulse       4s
2s    .typewriter             typing      4s
6s    .container-delay        delay       6s
6s    .load                   loading     2s x3
10s   .message                delay       1s
12s   .incomming              delay       1s
13s   .unstable               delay       1s
12s   .container-delay        hide-load   0.5s
13s   .message                move-in     1s
15s   .terminated             [To do: Display Connection terminated in terminal ]
.15s  .hero                   move-in     1s
*/
@keyframes test{
 100%{
   transform: translateY(-1em);
 } 
}
@keyframes fade-out {
  to {
    opacity: 0;
    transform: translateY(-50vh);
  }
}
@keyframes move-in{
0%{
  transform: translateY(-100vh);
  opacity: 0;
}
50%{
  transform: translateY(0);
  opacity: 0;
}
100%{
  transform: translateY(0);
  opacity: 1;
  }
}
@keyframes pulse{
5%{
color:var(--logo-rgba);
}
6%{
color:var(--logo-faded);
}
10%{
color: var(--logo-rgba);
}
80%{
color:var(--logo-faded);
}
}
@keyframes shadow{
5%{
  border-color: var(--logo-rgba);
  box-shadow: 0 0 0 0;
}
6%{
  border-color: var(--logo-faded);
  box-shadow: 0 0 0 0;
}
10%{
  border-color: var(--logo-rgba);
  box-shadow: 0px 0px 0.5em 2em var(--logo-rgba);
}
80%{
  box-shadow: 0px 0px 0.5em 2em transparent;
}
}
@keyframes corrupt{
  10%, 20%, 70%, 80%, 100%{
    color: var(--list-color);
  }
  30%{
    color: var(--background);
  }
  40%, 60%{
    color: var(--background);
    text-shadow: 0 0 2px var(--list-color);
  }
  50%, 90%{
    color: var(--list-color);
    text-shadow: 0 0 10px var(--list-color);
  }
}
@keyframes loading{
  from  { width: 0; }
  to    { width: 4ch; }
}
@keyframes hide-load{
  from  { opacity: 1; }
  to    { opacity: 0; }
}
@keyframes delay{
  from {opacity: 0;}
  to {opacity: 1;}
}
@keyframes blink{
  50%{
    opacity: 1;
  }
}
@keyframes typing {
  from { width: 0; }
  to   { width: 23ch; }  /*23 characters wide, revealed one at a time */
}