@import "lib.less";
@import "reset.less";
@import "fonts.less";
@import "buttons.less";

/* {{{ Basic Colors, Text, Links */

html { background: #fff; }

body {
    font-size: @baseFontSize;
    line-height: 1.5;
    font-family: @baseFontFamily;
    color: @textColorPrimary;
    background: #fff;
}

#outer-wrapper {
    position: relative;
    border-top: 2px solid #fff;
    background: #f9f9f9 url(/static/img/bg-stone.png) 0 0 repeat-x;
}

#wrapper {
    padding-bottom: @baseLine * 2;
    width: @widthDesktop;
    margin: 0 auto;
    position: relative;
}

#strings { /* An arbitrary container for translatable strings to use in in scripts */
    display: none;
}

a {
    color: @linkBlue;
    text-decoration: none;
    &:hover,
    &:active {
        color: darken(@linkBlue, 10%);
        text-decoration: underline;
    }
}

.sand {
    #outer-wrapper {
        background: #f5f1e8 url(/media/img/sandstone/bg-sand.png) repeat;
        background: url(/media/img/sandstone/bg-gradient-sand.png) repeat-x 0 0,
                    url(/media/img/sandstone/bg-sand.png) repeat 0 0,
                    #f5f1e8;
    }
}

.sky {
    #outer-wrapper {
        background: #eee url(/media/img/sandstone/grain.png) repeat;
        background: url(/media/img/sandstone/bg-gradient-sky.png) repeat-x 0 0,
                    url(/media/img/sandstone/grain.png) repeat 0 0,
                    #eee;
    }

    a {
        color: @linkSkyBlue;
        &:hover,
        &:active {
            color: darken(@linkSkyBlue, 10%);
        }
    }

}

.space {
    color: #fff;

    #outer-wrapper {
        background-color: #04020b;
        background-image: url(/media/img/sandstone/bg-space.png);
        background-repeat: repeat-x;
    }

    a {
        color: @linkSpaceBlue;
        &:hover,
        &:active {
            color: lighten(@linkSpaceBlue, 10%);
        }
    }

    h1, h2, h3, h4, h5, h6, .huge, .large {
        color: #fff;
        text-shadow: none;
    }

    #masthead nav li {
        a,
        a:link,
        a:visited {
            color: @linkSpacePurple;
        }
        li {
            a,
            a:link,
            a:visited {
                color: @textColorSecondary;
            }
        }
    }

}

h1, h2, h3, h4, h5, h6, .huge, .large {
    .open-sans-light;
    display: block;
    margin: 0 0 12px 0;
    line-height: 100%;
    text-shadow: 0px 1px 0px rgba(255,255,255,0.75);
    color: @textColorSecondary;
}

.huge,
.huge h1 {
    font-size: 108px;
    letter-spacing: -4px;
    line-height: 100%;
}

.large,
.large h1 {
    font-size: 72px;
    letter-spacing: -3px;
    line-height: 100%;
}

h1,
.huge h2,
.large h2,
.billboard h2 {
    font-size: 48px;
    letter-spacing: -2px;
}

h2 {
    font-size: 32px;
    letter-spacing: -1px;
}

h3 {
    font-size: 28px;
    letter-spacing: -0.5px;
}

h4 {
    font-size: 24px;
    letter-spacing: -0.25px;
}

h5 {
    font-size: 16px;
}

h6 {
    font-size: 14px;
}

.small,
small {
    font-size: 12px;
    line-height: 16px;
}

hgroup {
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0;
    }
}

p,
ul,
ol,
dl,
hgroup {
    margin: 0 0 @baseLine 0;
}

ul.unstyled,
ol.unstyled {
    li {
        list-style-type: none;
        margin-left: 0;
    }
    li li {
        list-style-type: disc;
        margin-left: 20px;
    }
}

li > ul {
    margin-bottom: 0;
}

li {
    margin-left: 20px;
}

dl dt {
    .open-sans-light;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: -1px;
    margin-bottom: @baseLine / 2;
}

dl dd {
    margin-bottom: @baseLine * 2;
}

dl.faq dt {
    font-size: 1.125em;
}

dl.faq dd {
    margin-bottom: 1.5em;
}

pre,
code {
    color: @textColorTertiary;
    font-size: 14px;
}

.center {
    text-align: center;
}

img {
    max-width: 100%;
    -ms-interpolation-mode: bicubic;
}

/* }}} */
/* {{{ Forms */

textarea,
input[type=email],
input[type=password],
input[type=search],
input[type=text] {
    height: @baseLine;
    background: #fff;
    border-color: #b2b2b2;
    border-style: solid;
    border-width: 1px;
    @shadow: 0 1px rgba(255,255,255,0.5);
    font-size: @smallFontSize;
    .open-sans;
    padding: (@baseLine / 6)  (@baseLine / 3);
    .border-radius(3px);
    .box-shadow(@shadow);
    .transition(all linear .1s);
}

textarea { height: auto; }

textarea:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=search]:focus,
input[type=text]:focus,
input.focus {
    border-color: #42a4e0;
    @shadow: 0 0 0 2px rgba(73,173,227,0.4);
    .box-shadow(@shadow);
    .transition(all linear .1s);
}

.form-field {
    margin-bottom: @baseLine / 3;
}

.errorlist {
    margin: 0;
    .open-sans;
    color: #c00;

    li {
        list-style-type: none;
        margin: 0;
    }
}

.field-error {
    input[type=email],
    input[type=password],
    input[type=text] {
        .form-field-error;
    }
}

input[type=email], input[type=password], input[type=text] {
    &.error {
        .form-field-error;
    }
}

.tooltip {
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px #333;
    text-align: center;
    line-height: 16px;
    background-color: #aa1401;
    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(218, 81, 50, 0.9)), to(rgba(169, 19, 0, 1)));
    background-image: -webkit-linear-gradient(top, rgba(218, 81, 50, 0.9), rgba(169, 19, 0, 1));
    background-image:    -moz-linear-gradient(top, rgba(218, 81, 50, 0.9), rgba(169, 19, 0, 1));
    background-image:     -ms-linear-gradient(top, rgba(218, 81, 50, 0.9), rgba(169, 19, 0, 1));
    background-image:      -o-linear-gradient(top, rgba(218, 81, 50, 0.9), rgba(169, 19, 0, 1));
    background-image:         linear-gradient(top, rgba(218, 81, 50, 0.9), rgba(169, 19, 0, 1));
    border-radius: 4px;
    padding: 10px 15px;
    box-shadow: 0 1px #666;
    max-width: 275px;
    position: relative;
    &:after {
        content: "";
        position: absolute;
        top: 100%;
        left: 15px;
        border-top: 10px solid blue;
        border-top-color: #a91300;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
    }
}

label.error {
    .open-sans;
    font-size: 12px;
    color: rgb(175,50,50);
    font-weight: bold;
    text-transform: uppercase;
}

.super-priority-field {
    display: none;
    visibility: hidden;
}

/* }}} */
/* {{{ Layout */

#main-content,
#main-feature {
    padding-bottom: 48px;
}

.main-column {
    .span(7);
}

.sidebar {
    .span(3);
    .offset(2);
}

.divider.container,
.divider {
    border-bottom: 1px dotted @borderColor;
    padding-bottom: @baseLine * 2;
    margin-bottom: @baseLine *2;
}

.divider-last.container,
.divider-last {
    border-bottom: 0;
    padding-bottom: @baseLine * 2;
}

/* }}} */
/* {{{ Grid containers */
#masthead,
#main-feature,
#main-content,
#colophon,
.billboard,
.container {
    display: block;
    margin: 0 auto;
    padding-left: @gridGutterWidth;
    padding-right: @gridGutterWidth;
    position: relative;
    .clearfix;
}
/* }}} */
/* {{{ Header Nav */
#masthead {

    h2 {
        padding: (@baseLine * 1.5) 0 @baseLine;
        margin: 0 (@gridGutterWidth / 2);
    }

    nav {
        float: right;
        margin-right: 16px;
        text-transform: uppercase;
        font-size: 13px;
        .open-sans;

        li {
            .inline-block;
            list-style-type: none;
            margin: 0;

            a,
            b {
                display: inline-block;
                padding: 12px;
                font-weight: normal;
            }

            b,
            .current {
                background-position: 50% 0;
                background-repeat: no-repeat;
                background-image: url(/media/img/sandstone/menu-current.png);
            }


            a,
            a:link,
            a:visited {
                color: @textColorSecondary;
            }

        }

    }

}

#nav-main .toggle {
    display: none; /* Hidden in non-mobile views */
}


/* }}} */
/* {{{ Header Breadcrumbs */

#masthead {

    nav.breadcrumbs {
        padding: 0 10px (@baseLine / 2) 10px;
        float: none;

        a,
        span {
            margin-right: .5em;
            margin-left: .5em;
        }

        a:first-child,
        span:first-child {
            margin-left: 0;
        }

    }

}

/* }}} */
/* {{{ Menu Bars */

.billboard {
    padding-top: @baseLine * 2;
    padding-bottom: @baseLine * 2;
    margin-bottom: @baseLine * 2;
    @shadow: 0 0 0 1px #fff inset;
    .box-shadow(@shadow);
    background: #fff;
    border-bottom: 1px solid #ddd;
    .clearfix;
    h1, h2, h3, h4, h5, h6, .huge, .large {
        color: @textColorSecondary;
    }
}

nav.menu-bar {
    text-align: center;
    .open-sans-light;
    margin-bottom: @baseLine * 2;
    padding-top: 0;
    padding-bottom: 0;

    ol,
    ul {
        margin: 0;
        li {
            .inline-block;
            margin: 0;
        padding-top: (@baseLine / 2);
        padding-bottom: (@baseLine / 2);
            a {
                .inline-block;
                border-left: 1px dotted @borderColor;
                padding: @baseLine / 3 @baseLine;
                span {
                    display: block;
                }
            }
            &:first-child a {
                border-left: 0;
            }
        }
    }
}

/* }}} */
/* {{{ Tables */

.table {
    border-collapse: collapse;
    border-spacing: 0;
    caption {
        text-align:left;
        padding-bottom:1px; /* fix to get it to look nice in many browsers */
        margin-bottom:-1px;
        width:100%;
    }
    th,
    td {
        border-top: 1px solid rgba(0,0,0,0.2);
        padding: 10px @gridGutterWidth 10px 0;
        text-align: left;
    }
    thead {
        th,
        td {
            border-top: 0;
            padding-top: 0;
            font-size: 16px;
            .open-sans-light;
        }
    }
}

/* }}} */
/* {{{ Sidebar */

.sidebar {

    nav {
        .open-sans-light;
        font-size: 16px;
        color: @textColorSecondary;

        li {
            list-style-type: none;
            border-bottom: 1px dotted #ccc;
            margin: 0;

            a,
            b {
                display: block;
                padding: 8px 0;
            }

            li b {
                font-weight: bold;
            }

        }

        li:first-child {
            font-size: 24px;
        }

    }

    .reference {
        margin: @baseLine * 2  auto;

        .more {
            display: block;
            padding: (@baseLine / 2) 0;
            border-bottom: 1px dotted @borderColor;
            .open-sans-light;
        }

        p {
            margin: 0;
        }
    }
}

/* }}} */
/* {{{ Footer Email Form */

#footer-email-form {
    padding-top: @baseLine;
    padding-bottom: @baseLine;
    margin-bottom: 0;

    h3 {
        .span(4);
    }

    .form-contents {
        .span(4);
    }

    .form-submit {
        .span(3);
    }

    .field {
        padding: 0 0 8px 0;
    }

    select {
        max-width: 80%;
    }

    input[type=email] {
        width: 80%;
    }

    .field-privacy {
        font-size: @smallFontSize;
        input {
            float: left;
        }
        .title {
            display: block;
            padding-left: 25px;
        }
    }

}

#footer-email-form.thank {
    h3 {
        width: auto;
        margin: auto;
        padding: 0;
        float: none;
    }
}
.js {
    #form-details,
    .form-details { display: none; }
    .has-errors #form-details,
    .has-errors .form-details { display: block; }
    p.form-details {
        margin-top: 8px;
        line-height: 1;
        color: @textColorSecondary;
    }
}

#footer-email-errors .errorlist {
    .container;
    background: #AF3232;
    color: #fff;
    padding-top: @baseLine / 2;
    padding-bottom: @baseLine / 2;
}


/* }}} */
/* {{{ Footer */

#colophon {
    color: @textColorTertiary;
    padding: (@baseLine * 2) 0;
    font-size: .875em;
    line-height: 1.285;
    background: #fff;
    width: 100%;
    margin: 1em 0 0;

    .row {
        width: @widthDesktop - (@gridGutterWidth * 2);
        margin: 0 auto;
        .clearfix;
    }

    .footer-logo,
    .footer-license,
    .footer-nav {
        margin: 0 (@gridGutterWidth / 2);
    }

    .footer-logo {
        .span(4);
    }

    .footer-license {
        .span(3);
    }

    .footer-nav {
        .span(2);
    }

    a,
    a:link,
    a:visited {
        color: @linkBlue;
    }

    a:hover,
    a:active {
        color: darken(@linkBlue, 10%);
    }

    p {
        margin-bottom: @baseLine / 2;
    }

    .footer-nav {
        .open-sans;

        li {
            list-style-type: none;
            margin: 0 0 2px 0;
        }

    }

}

/* }}} */
/* {{{ Responsive Grid */

/* Tablet Layout: 760px */
@media only screen and (min-width: @breakTablet) and (max-width: @breakDesktop) {

    #wrapper {
      width: @widthTablet;
    }

    #masthead,
    #main-feature,
    #main-content,
    .billboard,
    .container {
        width: @widthTablet - (@gridGutterWidth * 2);
    }

    .main-column {
        .span_narrow(8);
    }

    nav.menu-bar {
        font-size: .9375em;
    }

    .sidebar {
        .span_narrow(3);
        .offset_narrow(1);
    }

    #footer-email-form {
        h3 {
            .span_narrow(4);
            padding-top: 4px;
        }

        .form-contents {
            .span_narrow(5);
        }

        .form-submit {
            .span_narrow(3);
        }
    }

    #colophon {
        .row {
            width: @widthTablet - (@gridGutterWidth * 2);
        }
        .footer-logo {
            .span_narrow(4);
        }
        .footer-license {
            .span_narrow(3);
        }
        .footer-nav {
            .span_narrow(2);
        }

    }

}


/* Mobile Layout: 320px */
@media only screen and (max-width: @breakTablet) {

    #wrapper {
      width: @widthMobile;
    }

    #masthead,
    #main-feature,
    #main-content,
    #colophon,
    .billboard,
    .container,
    .main-column,
    .sidebar {
        width: auto;
        padding-left: @gridGutterWidth / 2;
        padding-right: @gridGutterWidth / 2;
        padding-bottom: @gridGutterWidth;
    }

    .main-column,
    .sidebar {
        padding-left: 0;
        padding-right: 0;
        .span-all();
    }

    .row {
        margin-left: auto;
    }


    #masthead {
        h2 {
            padding-top: @baseLine / 2;
            padding-bottom: @baseLine / 2;
        }

        nav {
            float: none;
            padding-top: 10px;
            margin-left: 10px;

            ul li {
                display: block;
                a,
                b {
                    display: block;
                    padding: 0;
                }

                b,
                .current {
                    background-image: none;
                }
            }
        }

        nav.breadcrumbs {
            margin-left: 0;
            a,
            span {
                margin-right: .3em;
                margin-left: .3em;
            }
        }

    }

    .huge,
    .huge h1,
    .large,
    .large h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }

    h1,
    .large h2 {
        font-size: 32px;
        letter-spacing: -1px;
    }

    h2,
    .billboard h2 {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    h3 {
        font-size: 24px;
        letter-spacing: -0.25px;
    }

    h4 {
        font-size: 16px;
    }

    h5 {
        font-size: 14px;
    }

    dl dt {
        font-size: 24px;
    }

    nav.menu-bar {
        text-align: inherit;
        line-height: 100%;

        ul {
            padding-top: @baseLine / 2;
            padding-bottom: @baseLine / 2;
            li {
                display: block;
                padding: 0;
                a {
                    padding: @baseLine / 2;
                    border: 0;
                    display: block;
                    border-top: 1px dotted @borderColor;
                    border-left: 0;
                }
                &:first-child a {
                    border-top: 0;
                }
            }
        }
    }

    #footer-email-form {
        h3,
        .form-contents,
        .form-submit {
            width: auto;
            float: none;
        }

        .form-submit {
            margin-top: @baseLine / 2;
        }
    }

    #colophon {
        .row {
            width: @widthMobile - @gridGutterWidth;
        }
        .footer-logo,
        .footer-license,
        .footer-nav {
            width: auto;
            float: none;
        }
        .footer-logo,
        .footer-license {
            margin-bottom: @baseLine;
        }
    }

    #nav-main {
        .toggle {
            display: block;
            width: 32px;
            height: 32px;
            margin: -3px 0 0 -3px;
            background: no-repeat center top url(/media/img/sandstone/icn-menu.png);
            text-indent: -999em;
            overflow: hidden;
            cursor: pointer;
        }
        .toggle.open {
            background-position: center -100px;
        }

        #nav-main-menu li {
            display: block;
            float: none;
            margin: 0 10px;
            border-bottom: 1px solid #f2f2f2;
        }

        #nav-main-menu li:last-child {
            border: 0;
        }

        #nav-main-menu a,
        #nav-main-menu b {
            cursor: pointer;
            display: block;
            text-transform: none;
            padding: 12px 35px 12px 10px;
            margin: 0 -10px;
        }

        #nav-main-menu a.submenu-item {
            background: 94% 50% no-repeat url(/media/img/sandstone/arrow-go.png);
        }

        #nav-main-menu a:hover,
        #nav-main-menu a:focus,
        #nav-main-menu a:active {
            color: #fff;
            text-decoration: none;
            text-shadow: 1px 1px 0 rgba(0,0,0,.25);
            background-color: #247ac1;
            background-position: 94% 50%;
            background-repeat: no-repeat;
            background-image: -moz-linear-gradient(#43a6e2, #247ac1);
            background-image: -ms-linear-gradient(#43a6e2, #247ac1);
            background-image: -o-linear-gradient(#43a6e2, #247ac1);
            background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#43a6e2), color-stop(100%,#247ac1));
            background-image: -webkit-linear-gradient(#43a6e2, #247ac1);
            background-image: linear-gradient(#43a6e2, #247ac1);
        }

        #nav-main-menu a.submenu-item:hover,
        #nav-main-menu a.submenu-item:focus,
        #nav-main-menu a.submenu-item:active {
            background-image: url(/media/img/sandstone/arrow-go.png), -moz-linear-gradient(#43a6e2, #247ac1);
            background-image: url(/media/img/sandstone/arrow-go.png), -ms-linear-gradient(#43a6e2, #247ac1);
            background-image: url(/media/img/sandstone/arrow-go.png), -o-linear-gradient(#43a6e2, #247ac1);
            background-image: url(/media/img/sandstone/arrow-go.png), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#43a6e2), color-stop(100%,#247ac1));
            background-image: url(/media/img/sandstone/arrow-go.png), -webkit-linear-gradient(#43a6e2, #247ac1);
            background-image: url(/media/img/sandstone/arrow-go.png), linear-gradient(#43a6e2, #247ac1);
        }

        #nav-main-menu li.first > a {
            border-radius: 10px 10px 0 0;
        }

        #nav-main-menu li.last > a {
            border-radius: 0 0 10px 10px;
        }
    }

    #nav-main-menu {
        background: #fff;
        position: absolute;
        z-index: 99;
        width: 200px;
        margin: 15px 0 0 -10px;
        left: -999em;
        top: 35px;
        overflow: visible;
        .border-radius(10px);
        .box-shadow(0 1px 3px 0 rgba(0,0,0,.5));
    }

    #nav-main:hover #nav-main-menu,
    #nav-main-menu:target {
        left: auto;
    }

    .js #nav-main-menu {
        left: auto;
        display: none;
    }

    #nav-main-menu:before {
        content: "";
        display: block;
        width: 28px;
        height: 10px;
        background: no-repeat url(/media/img/sandstone/menu-point.png);
        position: absolute;
        left: 12px;
        top: -10px;
    }

}


/* Wide Mobile Layout: 480px */
@media only screen and (min-width: @breakMobileLandscape) and (max-width: @breakTablet) {

    #wrapper {
        width: @widthMobileLandscape;
    }

    #masthead,
    #main-feature,
    #main-content,
    .billboard,
    .container,
    .main-column,
    .sidebar {
        width: auto;
    }

    .main-column,
    .sidebar {
        padding-left: 0;
        padding-right: 0;
    }

    #colophon {
        .row {
            width: @widthMobileLandscape - @gridGutterWidth;
        }
    }

}
/* }}} */

// Don't display the dynamic platform images when js is disabled
// because the ones in the noscript tag will be shown
.no-js .platform-img.js {
    display: none;
}

/* }}} */
