@import "variables";

@mixin texture-bg {
    background-color: #1a1a1a;
    box-shadow: inset 0px 0px 15px 8px rgba(0, 0, 0, 0.75);
    background-image: url("/header-bg.png");
    background-attachment: fixed;
    background-blend-mode: darken;
}

.landing-page {

    h2 {
        font-family: $brand-font-face;
        font-size: 3em;
        font-weight: normal;
        color: $brand-color;
        @media screen and (max-width: $sm-breakpoint) {
            font-size: 2em;
        }
    }

    h3 {
        font-family: $brand-font-face;
        font-size: 2.5em;
        font-weight: normal;
        color: $gray-600;
        @media screen and (max-width: $sm-breakpoint) {
            font-size: 1.8em;
        }
    }

    p.lead {
        font-size: 1.4em;
        font-weight: lighter;
        line-height: 1.6em;
        @media screen and (max-width: $sm-breakpoint) {
            font-size: 1.2em;
        }
    }

    .content {
        padding: 20px;
        max-width: $container-max-width;
        margin: auto;

        a:link, a:visited {
            color: darken($brand-color, 20%);
        }

        a:hover, a:active {
            color: $brand-color;
        }
    }

    .vimeo-player {
        width: 100%;
        height: 40vw;
        max-height: 80vh;
        margin-bottom: 30px;
    }

    .section-1 {
        text-align: center;
        color: $gray-300;
        @include texture-bg;

        .stack-logos {
            display: flex;
            align-items: center;
            justify-content: space-evenly;
            padding-bottom: 36px;

            @media screen and (max-width: $sm-breakpoint) {
                flex-wrap: wrap;
            }

            .stack-logo {
                max-width: 200px;
                margin: 0 12px;
                height: 100px;
                display: flex;
                align-items: center;

                @media screen and (max-width: $sm-breakpoint) {
                    max-width: 100px;
                }

                img {
                    max-height: 100%;
                    max-width: 100%;
                }
            }
            .ts-logo {
                width: 200px;
            }
            .nest-logo {
                filter: saturate(0%) brightness(2);
            }
        }
    }

    .section-2 {
        background-color: $gray-100;
    }

    .features {
        .feature {
            display: flex;
            align-items: center;

            @media screen and (min-width: $sm-breakpoint) {
                &:nth-child(even) {
                    flex-direction: row-reverse;
                }
            }
            @media screen and (max-width: $sm-breakpoint) {
                flex-direction: column;
            }
            color: $gray-700;
        }
        .feature-copy {
            padding: 0 16px;
        }
        .feature-image {
            max-width: 100%;
            min-width: 400px;
            margin-top: 40px;
            display: flex;
            align-items: center;
            @media screen and (max-width: $sm-breakpoint) {
                min-width: 0;
                flex-direction: column;
            }
            @media screen and (min-width: $lg-breakpoint) {
                min-width: 600px;
            }
            img {
                width: 100%;
            }
        }
    }

    .section-3 {
        .features {
            column-width: 600px;
            margin: 0 auto;
        }

        ul.feature-list {
            margin: 0;
            padding: 0;
            list-style-type: none;
            font-size: 18px;
            li {
                color: $gray-700;
                &:not(:first-child) {
                    margin-top: 12px;
                }
                img {
                    width: 24px;
                    height: 24px;
                    margin-right: 6px;
                }
            }
        }
        small {
        }
    }

    .section-4 {
        .getting-started {
            display: flex;
            @media all and (max-width: $sm-breakpoint){
                flex-direction: column;
            }
        }
        .install-code, .getting-started-link {
            flex: 1;
        }
        .getting-started-link {
            padding: 16px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .getting-started-button {
            text-transform: uppercase;
            font-size: 1.4em;
            padding: 12px 24px;
            background-color: $color-success;
            box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.23);
            white-space: nowrap;
            border-radius: 4px;
            transition: background-color 0.2s;
            &:link, &:visited {
                color: #ceeabe;
            }
            &:hover {
                background-color: lighten($color-success, 4%);
            }
        }
    }

    @media all and (min-width: 600px) {
        .hero {
            padding: 100px;
        }
        .logo img {
            max-width: 160px;
        }
        .logo h1 {
            font-size: 5em;
        }
        .top-header {
            flex-direction: row;
        }
        .subhead {
            font-size: 2em;
        }
        .features {
            flex-direction: row;
        }
    }
}
