/* =========================================================
   ASTRION — COSMIC ENTRANCE
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

}


html,
body {

    width: 100%;
    height: 100%;

    overflow: hidden;

}


body {

    background: #000;

    color: white;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

}


/* =========================================================
   CANVAS
========================================================= */

#spaceCanvas {

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 0;

    background:
        radial-gradient(
            circle at center,
            #070914 0%,
            #02030a 35%,
            #000 78%
        );

}


/* =========================================================
   NEBULAE
========================================================= */

.nebula {

    position: fixed;

    pointer-events: none;

    border-radius: 50%;

    filter: blur(90px);

    opacity: .22;

    z-index: 1;

    mix-blend-mode: screen;

}


/* Blue-violet */

.nebula-one {

    width: 650px;
    height: 350px;

    left: -180px;
    top: 5%;

    background:
        radial-gradient(
            ellipse,
            rgba(74, 72, 255, .65),
            rgba(45, 20, 120, .25),
            transparent 72%
        );

    transform: rotate(-25deg);

}


/* Purple */

.nebula-two {

    width: 700px;
    height: 420px;

    right: -230px;
    bottom: -100px;

    background:
        radial-gradient(
            ellipse,
            rgba(139, 45, 190, .45),
            rgba(65, 20, 100, .2),
            transparent 70%
        );

    transform: rotate(20deg);

}


/* Cyan */

.nebula-three {

    width: 500px;
    height: 280px;

    right: 5%;
    top: 5%;

    background:
        radial-gradient(
            ellipse,
            rgba(30, 150, 210, .22),
            transparent 70%
        );

    filter: blur(110px);

}


/* =========================================================
   CENTRAL PORTAL
========================================================= */

.portal-wrapper {

    position: absolute;

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -50%);

    width: 600px;
    height: 600px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    z-index: 10;

}


/* =========================================================
   PORTAL
========================================================= */

.portal {

    position: relative;

    width: 430px;
    height: 430px;

    display: flex;

    align-items: center;
    justify-content: center;

    perspective: 1000px;

}


/* =========================================================
   GRAVITY RINGS
========================================================= */

.gravity-ring {

    position: absolute;

    border-radius: 50%;

    border:

        1px solid
        rgba(150,160,255,.12);

    pointer-events: none;

}


.ring-one {

    width: 270px;
    height: 270px;

    transform:

        rotateX(65deg)
        rotateZ(15deg);

    animation:

        ringFloat
        9s
        ease-in-out
        infinite;

}


.ring-two {

    width: 350px;
    height: 350px;

    transform:

        rotateX(65deg)
        rotateZ(-25deg);

    border-color:
        rgba(100,120,255,.08);

    animation:

        ringFloat
        13s
        ease-in-out
        infinite
        reverse;

}


.ring-three {

    width: 440px;
    height: 440px;

    transform:

        rotateX(70deg)
        rotateZ(40deg);

    border-color:
        rgba(160,130,255,.06);

    animation:

        ringFloat
        17s
        ease-in-out
        infinite;

}


/* =========================================================
   ORBIT PARTICLES
========================================================= */

.orbit-particle {

    position: absolute;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: white;

    box-shadow:

        0 0 8px white,
        0 0 18px rgba(140,150,255,.8);

}



/* =========================================================
   ENTER BUTTON
========================================================= */

.enter-button {

    position: absolute;

    bottom: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 18px;

    min-width: 225px;

    padding:

        17px
        27px;

    text-decoration: none;

    color: white;

    border:

        1px solid
        rgba(190,195,255,.3);

    border-radius: 100px;

    background:

        rgba(5,6,15,.35);

    backdrop-filter:

        blur(15px);

    -webkit-backdrop-filter:

        blur(15px);

    overflow: hidden;

    transition:

        transform .45s cubic-bezier(.2,.8,.2,1),

        border-color .45s ease,

        box-shadow .45s ease,

        background .45s ease;

}


/* =========================================================
   BUTTON GLOW
========================================================= */

.button-glow {

    position: absolute;

    width: 100px;
    height: 100px;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    background:

        radial-gradient(
            circle,
            rgba(120,130,255,.3),
            transparent 70%
        );

    filter: blur(20px);

    opacity: .4;

    transition:

        opacity .4s ease;

}


/* =========================================================
   BUTTON TEXT
========================================================= */

.button-text {

    position: relative;

    z-index: 2;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: 4px;

    white-space: nowrap;

}


/* =========================================================
   BUTTON ARROW
========================================================= */

.button-arrow {

    position: relative;

    z-index: 2;

    font-size: 19px;

    transition:

        transform .4s ease;

}


/* =========================================================
   BUTTON HOVER
========================================================= */

.enter-button:hover {

    transform:

        translateY(-5px)
        scale(1.025);

    border-color:

        rgba(220,225,255,.75);

    background:

        rgba(25,27,50,.45);

    box-shadow:

        0 0 25px
        rgba(100,110,255,.16),

        0 0 70px
        rgba(100,80,255,.08);

}


.enter-button:hover
.button-glow {

    opacity: 1;

}


.enter-button:hover
.button-arrow {

    transform:

        translate(5px, -5px);

}


/* =========================================================
   PLANET ONE
========================================================= */

.planet {

    position: fixed;

    border-radius: 50%;

    pointer-events: none;

    z-index: 2;

}


.planet-one {

    width: 170px;
    height: 170px;

    right: -65px;
    top: 16%;

    background:

        radial-gradient(
            circle at 30% 28%,
            #77809c,
            #353b51 45%,
            #111421 72%,
            #030408 100%
        );

    box-shadow:

        inset -30px -20px 50px #000,

        -15px 10px 70px
        rgba(90,100,150,.12);

}


/* Planet atmosphere */

.planet-atmosphere {

    position: absolute;

    inset: -8px;

    border-radius: 50%;

    border:

        1px solid
        rgba(130,150,255,.15);

    box-shadow:

        0 0 25px
        rgba(100,130,255,.12);

}


/* =========================================================
   PLANET TWO
========================================================= */

.planet-two {

    width: 62px;
    height: 62px;

    left: 9%;
    bottom: 16%;

    background:

        radial-gradient(
            circle at 32% 25%,
            #a0b3c9,
            #34445b 50%,
            #0b111b 80%
        );

    box-shadow:

        inset -12px -10px 20px #000,

        0 0 35px
        rgba(80,120,170,.12);

}


/* Ring */

.planet-ring {

    position: absolute;

    width: 105px;
    height: 30px;

    top: 50%;
    left: 50%;

    transform:

        translate(-50%, -50%)
        rotate(-15deg);

    border:

        1px solid
        rgba(180,190,220,.22);

    border-radius: 50%;

}


/* =========================================================
   SHOOTING STARS
========================================================= */

.shooting-star {

    position: fixed;

    width: 130px;
    height: 1px;

    background:

        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.8),
            transparent
        );

    transform: rotate(-35deg);

    opacity: 0;

    z-index: 4;

}


.shooting-one {

    top: 20%;
    right: 15%;

    animation:

        shootingStar
        7s
        linear
        infinite;

}


.shooting-two {

    top: 35%;
    left: 15%;

    animation:

        shootingStar
        11s
        linear
        infinite
        3s;

}


.shooting-three {

    top: 70%;
    right: 25%;

    animation:

        shootingStar
        13s
        linear
        infinite
        6s;

}


/* =========================================================
   VIGNETTE
========================================================= */

.vignette {

    position: fixed;

    inset: 0;

    z-index: 20;

    pointer-events: none;

    background:

        radial-gradient(
            circle,
            transparent 35%,
            rgba(0,0,0,.25) 65%,
            rgba(0,0,0,.8) 100%
        );

}


/* =========================================================
   WARP TRANSITION
========================================================= */

.warp-transition {

    position: fixed;

    inset: 0;

    z-index: 100;

    background:

        radial-gradient(
            circle,
            #151735 0%,
            #03040b 35%,
            #000 70%
        );

    transform:

        scale(0);

    border-radius: 50%;

    pointer-events: none;

}


body.warping
.warp-transition {

    animation:

        warpIn
        1.1s
        cubic-bezier(.7,0,.2,1)
        forwards;

}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes diskRotate {

    from {

        transform:

            rotate(-17deg)
            perspective(500px)
            rotateX(62deg)
            rotateZ(0deg);

    }

    to {

        transform:

            rotate(-17deg)
            perspective(500px)
            rotateX(62deg)
            rotateZ(360deg);

    }

}


@keyframes ringFloat {

    0%,
    100% {

        opacity: .45;

        scale: 1;

    }

    50% {

        opacity: .8;

        scale: 1.025;

    }

}


/* Particle orbit paths */

@keyframes particleOrbit1 {

    from {

        transform:

            rotate(0deg)
            translateX(175px)
            rotate(0deg);

    }

    to {

        transform:

            rotate(360deg)
            translateX(175px)
            rotate(-360deg);

    }

}


@keyframes particleOrbit2 {

    from {

        transform:

            rotate(120deg)
            translateX(210px)
            rotate(-120deg);

    }

    to {

        transform:

            rotate(480deg)
            translateX(210px)
            rotate(-480deg);

    }

}


@keyframes particleOrbit3 {

    from {

        transform:

            rotate(220deg)
            translateX(145px)
            rotate(-220deg);

    }

    to {

        transform:

            rotate(580deg)
            translateX(145px)
            rotate(-580deg);

    }

}


@keyframes particleOrbit4 {

    from {

        transform:

            rotate(310deg)
            translateX(235px)
            rotate(-310deg);

    }

    to {

        transform:

            rotate(670deg)
            translateX(235px)
            rotate(-670deg);

    }

}


@keyframes shootingStar {

    0% {

        opacity: 0;

        transform:

            translate(0, 0)
            rotate(-35deg);

    }

    5% {

        opacity: 1;

    }

    15% {

        opacity: 0;

        transform:

            translate(-280px, 170px)
            rotate(-35deg);

    }

    100% {

        opacity: 0;

    }

}


@keyframes warpIn {

    0% {

        transform: scale(0);

        opacity: 1;

    }

    100% {

        transform: scale(3);

        opacity: 1;

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .portal-wrapper {

        width: 100vw;
        height: 500px;

    }


    .portal {

        width: 340px;
        height: 340px;

    }


    .accretion-disk {

        width: 330px;
        height: 115px;

    }


    .black-hole {

        width: 120px;
        height: 120px;

    }


    .ring-one {

        width: 220px;
        height: 220px;

    }


    .ring-two {

        width: 280px;
        height: 280px;

    }


    .ring-three {

        width: 350px;
        height: 350px;

    }


    .planet-one {

        width: 100px;
        height: 100px;

        right: -45px;

    }


    .planet-two {

        width: 42px;
        height: 42px;

        left: 5%;

    }


    .enter-button {

        bottom: 0;

        min-width: 205px;

        padding: 15px 22px;

    }


    .button-text {

        font-size: 9px;

        letter-spacing: 3px;

    }

}

/* =========================================================
   ASTRION COSMIC CORE
========================================================= */

.cosmic-core {

    position: absolute;

    width: 150px;
    height: 180px;

    display: flex;

    align-items: center;
    justify-content: center;

    z-index: 8;

    transform:
        rotate(-8deg);

}


/* =========================================================
   CORE GLOW
========================================================= */

.crystal-glow {

    position: absolute;

    width: 190px;
    height: 220px;

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse,
            rgba(130, 145, 255, .38),
            rgba(90, 70, 255, .18),
            transparent 70%
        );

    filter: blur(30px);

    animation:
        coreGlow
        4s
        ease-in-out
        infinite;

}


/* =========================================================
   CRYSTAL
========================================================= */

.crystal {

    position: relative;

    width: 82px;
    height: 145px;

    transform:
        rotate(8deg)
        skewY(-8deg);

    clip-path:
        polygon(
            50% 0%,
            82% 22%,
            100% 62%,
            66% 100%,
            35% 84%,
            0% 57%,
            20% 20%
        );

    background:

        linear-gradient(
            125deg,
            #ffffff 0%,
            #bfc7ff 15%,
            #737fff 35%,
            #3b43b8 55%,
            #171a5a 75%,
            #070817 100%
        );

    box-shadow:

        0 0 25px
        rgba(120,130,255,.7),

        0 0 60px
        rgba(90,80,255,.35);

    animation:
        crystalFloat
        5s
        ease-in-out
        infinite;

}


/* =========================================================
   CRYSTAL INTERNAL FACES
========================================================= */

.crystal-face {

    position: absolute;

    display: block;

    opacity: .7;

}


.face-one {

    width: 100%;
    height: 45%;

    top: 0;
    left: 0;

    clip-path:
        polygon(
            50% 0,
            100% 100%,
            0 100%
        );

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.9),
            rgba(120,135,255,.1)
        );

}


.face-two {

    width: 50%;
    height: 75%;

    left: 0;
    top: 20%;

    clip-path:
        polygon(
            0 0,
            100% 20%,
            100% 100%,
            0 70%
        );

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.3),
            rgba(60,70,220,.25)
        );

}


.face-three {

    width: 55%;
    height: 70%;

    right: 0;
    top: 22%;

    clip-path:
        polygon(
            0 15%,
            100% 0,
            100% 78%,
            0 100%
        );

    background:
        linear-gradient(
            180deg,
            rgba(150,160,255,.65),
            rgba(20,25,100,.3)
        );

}


.face-four {

    width: 65%;
    height: 35%;

    bottom: 0;
    left: 18%;

    clip-path:
        polygon(
            0 0,
            100% 0,
            70% 100%,
            30% 100%
        );

    background:
        linear-gradient(
            180deg,
            rgba(30,40,170,.5),
            rgba(0,0,30,.8)
        );

}


/* =========================================================
   ENERGY FIELDS
========================================================= */

.energy-field {

    position: absolute;

    border-radius: 50%;

    pointer-events: none;

    border:
        1px solid
        rgba(145,155,255,.16);

}


/* First field */

.field-one {

    width: 250px;
    height: 250px;

    transform:
        rotateX(65deg)
        rotateZ(20deg);

    animation:
        fieldSpinOne
        12s
        linear
        infinite;

}


/* Second field */

.field-two {

    width: 340px;
    height: 150px;

    border-color:
        rgba(100,120,255,.13);

    transform:
        rotateX(65deg)
        rotateZ(-35deg);

    animation:
        fieldSpinTwo
        16s
        linear
        infinite reverse;

}


/* Third field */

.field-three {

    width: 430px;
    height: 210px;

    border-color:
        rgba(180,150,255,.07);

    transform:
        rotateX(70deg)
        rotateZ(50deg);

    animation:
        fieldSpinThree
        22s
        linear
        infinite;

}


/* =========================================================
   LIGHT RAYS
========================================================= */

.light-ray {

    position: absolute;

    width: 2px;

    height: 260px;

    top: 50%;
    left: 50%;

    transform-origin:
        center center;

    background:

        linear-gradient(
            to bottom,
            transparent,
            rgba(150,160,255,.7),
            transparent
        );

    filter:
        blur(.5px);

    opacity: .35;

    z-index: 3;

}


.ray-one {

    transform:
        translate(-50%, -50%)
        rotate(0deg);

}


.ray-two {

    transform:
        translate(-50%, -50%)
        rotate(45deg);

}


.ray-three {

    transform:
        translate(-50%, -50%)
        rotate(90deg);

}


.ray-four {

    transform:
        translate(-50%, -50%)
        rotate(135deg);

}


/* =========================================================
   FLOATING COSMIC SHARDS
========================================================= */

.cosmic-shard {

    position: absolute;

    width: 7px;
    height: 16px;

    background:

        linear-gradient(
            135deg,
            #ffffff,
            #7c87ff,
            #272b83
        );

    clip-path:
        polygon(
            50% 0,
            100% 50%,
            55% 100%,
            0 60%
        );

    box-shadow:
        0 0 15px
        rgba(130,140,255,.8);

    z-index: 9;

}


/* Individual shard positions */

.shard-one {

    top: 18%;
    left: 34%;

    animation:
        shardOne
        6s
        ease-in-out
        infinite;

}


.shard-two {

    top: 35%;
    right: 18%;

    width: 5px;
    height: 12px;

    animation:
        shardTwo
        8s
        ease-in-out
        infinite;

}


.shard-three {

    bottom: 18%;
    left: 30%;

    width: 6px;
    height: 13px;

    animation:
        shardThree
        7s
        ease-in-out
        infinite;

}


.shard-four {

    bottom: 25%;
    right: 27%;

    width: 4px;
    height: 10px;

    animation:
        shardFour
        9s
        ease-in-out
        infinite;

}


.shard-five {

    top: 28%;
    left: 18%;

    width: 4px;
    height: 9px;

    animation:
        shardFive
        11s
        ease-in-out
        infinite;

}


/* =========================================================
   CORE ANIMATIONS
========================================================= */

@keyframes crystalFloat {

    0%,
    100% {

        transform:
            rotate(8deg)
            translateY(0)
            scale(1);

    }

    50% {

        transform:
            rotate(13deg)
            translateY(-10px)
            scale(1.035);

    }

}


@keyframes coreGlow {

    0%,
    100% {

        opacity: .65;

        transform:
            scale(.9);

    }

    50% {

        opacity: 1;

        transform:
            scale(1.12);

    }

}


/* =========================================================
   ENERGY FIELD ANIMATIONS
========================================================= */

@keyframes fieldSpinOne {

    from {

        transform:
            rotateX(65deg)
            rotateZ(0deg);

    }

    to {

        transform:
            rotateX(65deg)
            rotateZ(360deg);

    }

}


@keyframes fieldSpinTwo {

    from {

        transform:
            rotateX(65deg)
            rotateZ(0deg);

    }

    to {

        transform:
            rotateX(65deg)
            rotateZ(-360deg);

    }

}


@keyframes fieldSpinThree {

    from {

        transform:
            rotateX(70deg)
            rotateZ(0deg);

    }

    to {

        transform:
            rotateX(70deg)
            rotateZ(360deg);

    }

}


/* =========================================================
   SHARD ANIMATIONS
========================================================= */

@keyframes shardOne {

    0%,
    100% {

        transform:
            translate(0, 0)
            rotate(0deg);

        opacity: .35;

    }

    50% {

        transform:
            translate(-18px, -25px)
            rotate(120deg);

        opacity: 1;

    }

}


@keyframes shardTwo {

    0%,
    100% {

        transform:
            translate(0, 0)
            rotate(20deg);

    }

    50% {

        transform:
            translate(25px, -15px)
            rotate(180deg);

    }

}


@keyframes shardThree {

    0%,
    100% {

        transform:
            translate(0, 0)
            rotate(0deg);

    }

    50% {

        transform:
            translate(-20px, 18px)
            rotate(160deg);

    }

}


@keyframes shardFour {

    0%,
    100% {

        transform:
            translate(0, 0);

    }

    50% {

        transform:
            translate(20px, 20px)
            rotate(200deg);

    }

}


@keyframes shardFive {

    0%,
    100% {

        transform:
            translate(0, 0);

        opacity: .25;

    }

    50% {

        transform:
            translate(-20px, -20px)
            rotate(90deg);

        opacity: 1;

    }

}