@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap');

/*      CSS custom property     */ 
:root {
    --primary-color: #047aed;
    --secondary-color: #1c3fa8;
    --dark-color: #002240;
    --light-color: #f4f4f4;
    --success-color: #5cb85c;
    --fail-color: #d9d9d9534f;
}


/*   Universal Rules   */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Lato', sans-serif;
    color: #333;
    line-height: 1.6;
}

ul {
    list-style-type: none;
}

a {
    text-decoration: none;
    color: #333;
}

h1, h2, h3 {
    font-weight: 300; /* Less bold*/
    line-height: 1.2; /* lessen the line-height */
    margin: 10px 0;
}

p {
    margin: 10px 0;  /* Create left and right margin to tell the paragraphs apart*/
}

img {
    width: 100%; /* So the image will fill to the size of the container and not spill out */
}

code, pre {
    background-color: #333;
    color: #fff;
    padding: 10px;

}

.hidden {
    height: 0;
    visibility: hidden;
}


/*      Navbar      */
.navbar {
    background-color: var(--primary-color);
    color: white;
    height: 70px;
}

.navbar ul {
    display: flex;
}

.navbar a {
    color: white;
    padding: 10px;
    margin: 0 5px;
}

.navbar a:hover {
    border-bottom: 2px solid white;
}

.navbar .flex {
    justify-content: space-between;
}



/*      Showcase         */

.showcase {
    height: 400px;
    background-color: var(--primary-color);
    color: white;
    position: relative;
}

.showcase-text {
    animation: slideInFromLeft 1s ease-in;
}

.showcase h1 {
    font-size: 40px;
}

.showcase p {
    margin: 20px 0;
}

.showcase .grid {
    overflow: visible;
    grid-template-columns: 55% 45%;
    gap: 30px;
}

.showcase-form {
    position: relative;
    top: 60px;
    height: 350px;
    width: 400px;
    padding: 40px;
    z-index: 100;
    animation: slideInFromRight 1s ease-in;
}

.showcase-form .form-control {
    margin: 30px 0;
}

.showcase-form input[type='text'],
.showcase-form input[type='email'] {
    border: 0;
    border-bottom: 1px solid #b4becb;
    width: 100%;
    padding: 3px;
    font-size: 16px;
}

.showcase-form input:focus {
    outline: none;
}

.showcase::after {
    content: '';
    background-color: white;
    position: absolute;
    height: 100px;
    bottom: -60px;
    right: 0;
    left: 0;
    transform: skewY(-3deg);
    -webkit-transform: skewY(-3deg); 
    -moz-transform: skewY(-3deg);
    -ms-transform: skewY(-3deg);
}

/*      Stats       */

.stats {
    padding-top: 100px;
    animation: slideInFromBottom 1s ease-in;
}

.stats .flex {
    justify-content: space-around;
    flex-wrap: wrap;
}

.stats-heading {
    max-width: 500px;
    margin: auto;
    font-weight: bold;
}

.stats .flex h3 {
    font-size: 35px;
}

.stats .flex p {
    font-size: 20px;
    font-weight: bold;
}


/*      CLI     */

.cli .grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
}

.cli img {
    grid-area: 1 / 1 / span 2 / span 2;
}

.cli h3 {
    padding-left: 15px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/*     Cloud     */
.cloud .grid {
    grid-template-columns: 4fr 3fr;
}

/*      Languages     */
.languages h2 {
    font-weight: bold;
    font-size: 30px;
}

.languages .flex {
    flex-wrap: wrap;
}

.languages {
    margin-top: 30px;
}

.languages .container {
    padding-top: 10px;
}

.languages .card img {
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
}

.languages .card h3 {
    padding-top: 15px;
}

/* Animation effect on languages */
.languages .card {
    transition: transform 0.2s ease-in;
}

.languages .card:hover {
    transform: translateY(-10px);
}


/*    Features     */
.features-head img {
    width: 200px;
    justify-self: center;
}

.sub-head img {
    width: 250px;
    justify-self: center;
}

.features-main .card > i {
    margin: auto 20px;
}

.features-main .grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 30px;
}

.features-main .grid >*:first-child {
    grid-column: 1 / span 3;
}

.features-main .grid >*:nth-child(2) {
    grid-column: 1 / span 2;
}

/*      Docs       */
.docs-head img {
    width: 200px;
}

.docs-main .grid {
    grid-template-columns: 1fr 2fr;
    align-items: flex-start;
}

.docs-main h3 {
    margin: 20px 0;
}

.docs-main nav li {
    font-size: 17;
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1px #ccc solid;
}

.docs-main a:hover {
    font-weight: bold;
}





/*      Footer     */
footer {
    margin-top: 50px;    
}

footer .grid {
    grid-template-columns: repeat(3, 1fr);
}

footer nav a {
    color: white;
}

footer nav a i {
    color: white;
}

.footer .social a {
    margin: 0 10px;
}

/*    Animations    */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Tablets and under */ 
@media (max-width: 768px) {
    .grid,
    .showcase .grid,
    .stats .grid,
    .cli .grid,
    .cloud .grid, .features-main .grid, .docs-main .grid {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    .showcase {
        height: auto;
    }

    .showcase-text {
        text-align: center;
        margin-top: 40px;
        animation: slideInFromTop 1s ease-in;
    }

    .showcase-form {
        justify-self: center;
        margin: auto;
        animation: slideInFromBottom 1s ease-in;
    }

    .cli img {
        grid-column: 1;
    }

    .cli .grid {
        text-align: center;
    }

    .features-main .grid > *:first-child, 
    .features-main .grid > *:nth-child(2) {
        grid-column: 1;
    } 
}

/*       Mobile        */
@media (max-width: 500px) {
    .navbar {
        height: 110px;
    }

    .navbar .flex {
        flex-direction: column;
    }

    .navbar ul {
        padding: 10px;
        background-color: rgba(0, 0, 0, 0.1); 
    }
}