body {
    overflow-x: hidden;
}

.begin {
    width: 100vw;
    height: 100vh;
    background-color: white;
    position: fixed;
    opacity: 1;
}

.begin img {
    width: 100%;
    height: 100%;
}

.home-header {
    width: 100%;
    height: 80vh;
}

.bk {
    background-image: url("https://static.igem.wiki/teams/4157/wiki/bk-home.png");
    background-size: 100%;
    background-repeat: repeat;
}

@keyframes revolve {

    0% {
        -webkit-transform: rotate(0deg);
    }

    50% {
        -webkit-transform: rotate(-180deg);
    }

    100% {
        -webkit-transform: rotate(-360deg);
    }
}

@import url('https:fonts.googleapis.com/css2?family=Righteous&display=swap');
* {
    padding: 0;
    margin: 0;
}

.main-content {
    margin-top: -8px;
}

.main {
    width: 100vw;
    position: relative;
    text-align: center;
    color: white;
}

.waves {
    position: relative;
    width: 100%;
    height: 15vh;
    margin-bottom: -7px; /*Fix for safari gap*/
    min-height: 100px;
    max-height: 150px;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax > use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax > use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax > use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax > use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }
    100% {
        transform: translate3d(85px, 0, 0);
    }
}

/*Shrinking for mobile*/
@media (max-width: 768px) {
    .waves {
        height: 40px;
        min-height: 40px;
    }

    .content {
        height: 30vh;
    }

    h1 {
        font-size: 24px;
    }
}

.end {
    position: absolute;
    bottom: 0;
    height: auto;
    width: 100%;
    max-height: 908px;
}

.body {
    width: 100%;
    height: 4500px;
    display: flex;
    overflow: hidden;
    font-family: Righteous;
    position: relative;
    background: linear-gradient(rgb(177, 216, 255), rgb(0, 117, 207));
}

.g-svg {
    position: absolute;
    top: 0;
    left: 50%;
    width: 700px;
    height: 4500px;
    transform: translate(-50%, 0);
}

.g-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 700px;
    height: 4500px;

    &::before {
        content: "";
        position: absolute;
        inset: 0 -30vw;
        background: linear-gradient(#b1d8ff, #0075cf);
    }
}

.ball {
    position: absolute;
    width: 40px;
    height: 40px;
    background: url('https://static.igem.wiki/teams/4581/wiki/mao.png') no-repeat;
    background-size: contain;
    offset-path: path("M 350 40 C 1200 1000, -550 1000, 350 1960, M 350 1960 C 1200 2920, -550 2920, 350 4300");
    offset-rotate: 0deg;
    animation: move 1s linear;
    animation-timeline: scroll(root);
    z-index: 10;
}

#svgpath {
    stroke-dasharray: 2222, 2222;
    animation: lineMove 3s linear;
    animation-timeline: scroll();
    stroke: #ffffff;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 65;
    stroke-linecap: round;
}

.point {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #3685d6;
    opacity: 0;
    animation: show 1s linear forwards;
    animation-timeline: scroll(root);

    &::before,
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .5);
        animation: circleScale 2s infinite ease-in;
        z-index: -1;
    }

    &::after {
        animation-delay: -.5s;
    }
}

.point0 {
    top: 200px;
    left: 460px;
    animation-range: 250px 300px;
}

.point1 {
    top: 570px;
    left: 570px;
    animation-range: 450px 500px;
}

.point2 {
    top: 910px;
    left: 370px;
    animation-range: 800px 850px;
}

.point3 {
    top: 1410px;
    left: 66px;
    animation-range: 1530px 1580px;
}

.point4 {
    top: 1910px;
    left: 300px;
    animation-range: 2050px 210px;
}

.point5 {
    top: 2488px;
    left: 566px;
    animation-range: 2750px 2800px;
}

.point6 {
    top: 3047px;
    left: 247px;
    animation-range: 3300px 3350px;
}

.point7 {
    top: 3375px;
    left: 70px;
    animation-range: 3500px 3550px
}

.p {
    position: absolute;
    padding: 16px;
    /* border: 4px dashed #fff; */
    width: 50vw;
    color: white;
    font-size: 24px;
    text-align: left;
    text-wrap: wrap;
    font-style: italic;
    word-wrap: break-word;
    opacity: 0;
    animation: textShow 2s linear forwards;
    animation-timeline: scroll(root);
}

.p0 {
    top: 100px;
    left: -100px;
    width: 400px;
    animation-range: 250px 300px;
}

.p1 {
    --x: -500px;
    top: 480px;
    left: 60px;
    width: 400px;
    animation-range: 450px 500px;
}

.p2 {
    --x: -150px;
    width: 500px;
    top: 840px;
    left: 450px;
    animation-range: 800px 850px;
}

.p2::before {
    content: "";
    float: left;
    shape-outside: polygon(80% 0, 90% 0, 0 90%, 0 80%);
}

.p2 {
    --scale: .2;
    --x: 900px;
    top: 900px;
    animation: show 1s linear forwards;
    animation-timeline: scroll(root);
    animation-range: 800px 850px;
}

.p3 {
    --x: 500px;
    top: 1310px;
    left: 190px;
    width: 450px;
    animation-range: 1530px 1580px;
}

.p4 {
    top: 1850px;
    width: 500px;
    left: 450px;
    animation: show 1s linear forwards;
    animation-timeline: scroll(root);
    animation-range: 2050px 210px;
}

.p5 {
    --x: -300px;
    top: 2390px;
    left: -70px;
    width: 550px;
    animation-range: 2750px 2800px;
}

.p6 {
    --x: 400px;
    top: 3000px;
    left: 400px;
    width: 350px;
    animation-range: 3300px 3350px;
}

.p7 {
    top: 3240px;
    left: 200px;
    width: auto;
    animation-range: 3500px 3550px
}

@keyframes lineMove {
    0% {
        stroke-dashoffset: 2222;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes move {
    0% {
        offset-distance: 0%;
    }
    50% {
        transform: scale(2.5);
    }
    100% {
        offset-distance: 100%;
    }
}

@keyframes circleScale {
    80%,
    100% {
        transform: scale(4);
        opacity: .1;
    }
}

@keyframes show {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes textShow {
    0% {
        transform: translate(var(--x), 0);
        opacity: 0;
    }
    100% {
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes end {
    0% {
        transform: translate(-50%, 120%);
    }
    100% {
        transform: translate(-50%, 0);
    }
}
