/*
 * Modules
 * These are at the top so that all the utility classes can
 * have precedence
 */

.Grid {
    font-size: 0;
    margin-left: -12px;
}

.Grid-cell {
    box-sizing: border-box;
    display: inline-block;
    width: 100%;
    font-size: 16px;
    padding-left: 12px;
    padding-bottom: 12px;
}


.StretchyCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.StretchyCanvas--fixed {
    position: fixed;
}

.StretchyCanvas--fullscreen {
    height: 100vh;
}


/*
 * ProjectsNav
 */
.ProjectsNav-link {
    display: block;
    color: rgba(200, 200, 200, 1.0);
    background-color: rgba(240, 240, 240, 0.0);
    transition:
        color 950ms cubic-bezier(0.0, 0.0, 0.0, 1.0),
        background-color 950ms cubic-bezier(0.0, 0.0, 0.0, 1.0);
}

.ProjectsNav-link:visited {
    color: rgba(200, 200, 200, 1.0);
}

.ProjectsNav-link:hover {
    color: rgba(0, 0, 255, 1.0);
    background-color: rgba(240, 240, 240, 1.0);
}

.ProjectsNav-link-name {
    display: inline-block;
    width: 60%;
    transition:
        color 950ms cubic-bezier(0.0, 0.0, 0.0, 1.0);
}

.ProjectsNav-link-type {
    color: hsla(0, 0%, 60%, 1);
    text-align: right;
    display: inline-block;
    width: 40%;
    transition:
        color 950ms cubic-bezier(0.0, 0.0, 0.0, 1.0);
}

.ProjectsNav-link:hover .ProjectsNav-link-name,
.ProjectsNav-link:hover .ProjectsNav-link-type {
    color: rgba(255, 255, 255, 1);
}



/*
 * Boxy button, currently only used as a back button on the single project
 */
.BoxButton {
    display: inline-block;
    padding: 4px 12px 4px;
    position: relative;
    z-index: 10;
    color: #00f;
    font-size: 14px;
    border: 4px solid;
    text-decoration: none;
    transition:
        background-color 160ms cubic-bezier(0.0, 0.90, 0.0, 1.0),
        color 160ms cubic-bezier(0.0, 0.90, 0.0, 1.0);
}

.BoxButton:visited {
    color: #00f;
}

.BoxButton:hover {
    background-color: #00f;
    border-color: #00f;
    color: #fff;
}


/*
 * Single project stuff
 * @TODO(Grey): It would be nice if some of this could be refactored
 * into more generic layout helper classes etc.
 */
.ProjectHeader {
    position: relative;
}

.ProjectHeader-image {
    position: relative;
    padding-top: 50%;
}

@media(min-width: 700px) {
    .bp700-ProjectHeader-overlay {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
    }

    .bp700-ProjectHeader-overlay-content {
        position: relative;
        width: 50%;
        top: 50%;
        transform: translateY(-50%);
    }
}

.ProjectHeader-overlay-back {
    position: absolute;
}


.HomeBackground,
.ProjectImages {
    position: relative;
    padding-top: 100%;
    border-top: 1px solid #000;
}

@media (min-width: 1000px) {
    .HomeBackground,
    .ProjectImages {
        padding-top: 0;
        position: fixed;
        width: 50%;
        height: 100%;
        left: 50%;
        top: 0;
        border-left: 1px solid #000;
        border-top: 0;
    }
    .ProjectImages {
        z-index: 10;
    }
    .HomeBackground {
        z-index: 0;
    }
}

.ProjectImages-zoom {
    display: block;
    width: 99%;
    position: absolute;
    box-sizing: border-box;
    bottom: 0;
    left: 0;
    right: 0;
}

.ProjectImages-fullscreen {
    position: absolute;
    right: 24px;
    top: 24px;
    line-height: inherit;
    background-color: transparent;
    transition: filter 400ms ease-out;
}

.ProjectImages-fullscreen.is-unfocused {
    filter: blur(1px);
}

.ProjectImages-fullscreen.is-unfocused:hover {
    filter: blur(0);
}

@media(min-width: 700px) {
    .ProjectImages-fullscreen {
        right: 80px;
        top: 60px;
    }
}

.ProjectImages-fullscreen:focus {
    background-color: #00f;
    border-color: #00f;
    color: #fff;
    outline: none;
}


.HomeContent,
.ProjectContent {
    position: relative;
}

@media (min-width: 1000px) {
    .HomeContent,
    .ProjectContent {
        width: 50%;
        height: 100%;
    }
}

.HomeContent {
    display: flex;
    align-items: center;
}

.ProjectContent p {
    font-size: 24px;
}

.ProjectContent img {
    margin-bottom: 6px;
}

.ProjectContent-images {
    display: none;
}

.no-js .ProjectContent-images {
    display: block;
}


.ProjectContainer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    transition: opacity 350ms ease-in;
}

.ProjectContainer.is-hidden {
    opacity: 0;
    pointer-events: none;
}


/*
 * Defaults
 */

html,
body {
    min-height: 100%;
}

html {
    position: relative;
}

body {
    font-family: itc-officina-sans-pro, "OfficinaSansStd-Book", sans-serif;
    margin: 0;
    line-height: 1.50;
}

@media(min-width: 1000px) {
    body {
        overflow: hidden;
    }
}

::-moz-selection {
    background: rgb(128, 128, 128);
}

::selection {
    background: rgb(128, 128, 128);
}

h1, .as-h1,
h2, .as-h2,
h3, .as-h3,
h4, .as-h4,
h5, .as-h5,
h6, .as-h6 {
    font-weight: 400;
    margin: 0;
}

/* @TODO(Grey): Figure out the proper font scale here */
h1,
.as-h1 {
    font-size: 90px;
    line-height: 1.0;
}

h2,
.as-h2 {
    font-size: 45px;
}

h3,
.as-h3 {
    font-size: 24px;
}

h4,
.as-h4 {
    font-size: 18px;
}

h5,
.as-h5 {
    font-size: 12px;
}

h6,
.as-h6 {
    font-size: 6px;
}

p {
    margin-top: 0;
    font-size: 18px;
}

a {
    color: #00f;
}

a:visited {
    color: #00f;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

img.is-hidden {
    pointer-events: none;
    opacity: 0;
    display: none;
}

canvas {
    vertical-align: middle;
}

hr {
    border: none;
    border-bottom: 3px solid;
}

button {
    font-family: inherit;
    color: inherit;
    font-size: inherit;
}


/*
 * Utilities
 */
.u-cleanlist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.u-cleanlist li {
    padding: 0;
}

.u-cleanlinks a {
    text-decoration: none;
    color: inherit;
}


/*
 * Typography
 */

.t-fs6  { font-size: 6px;  }
.t-fs12 { font-size: 12px; }
.t-fs18 { font-size: 18px; }
.t-fs20 { font-size: 20px; }
.t-fs24 { font-size: 24px; }
.t-fs36 { font-size: 36px; }
.t-fs40 { font-size: 40px; }
.t-fs45 { font-size: 45px; }

.t-fs32  { font-size: 32px;  }
.t-fs48  { font-size: 48px;  }
.t-fs90  { font-size: 90px;  }
.t-fs180 { font-size: 180px; }

@media (min-width: 700px) {
    .bp700-t-fs32 { font-size: 32px; }
    .bp700-t-fs80 { font-size: 80px; }
    .bp700-t-fs90 { font-size: 90px; }
    .bp700-t-fs110 { font-size: 110px; }
    .bp700-t-fs128 { font-size: 128px; }
}

@media (min-width: 1000px) {
    .bp1000-t-fs48 { font-size: 48px; }
    .bp1000-t-fs64 { font-size: 64px; }
    .bp1000-t-fs128 { font-size: 128px; }
}

.t-lh1of1 { line-height: 1.0; }

.t-tal { text-align: left;   }
.t-tac { text-align: center; }
.t-tar { text-align: right;  }


/*
 * Colour
 */

.c-grey20 { color: hsla(0, 0%, 20%, 1); }
.c-grey40 { color: hsla(0, 0%, 40%, 1); }
.c-grey60 { color: hsla(0, 0%, 60%, 1); }
.c-grey80 { color: hsla(0, 0%, 80%, 1); }
.c-grey90 { color: hsla(0, 0%, 90%, 1); }

.c-bg-grey90 { background-color: hsla(0, 0%, 90%, 1); }


/*
 * Layout
 */

.l-pos-relative { position: relative; }

.l-mw560  { max-width: 560px;  }
.l-mw700  { max-width: 700px;  }
.l-mw900  { max-width: 900px;  }
.l-mw1200 { max-width: 1200px; }
.l-mw1560 { max-width: 1560px; }

.l-size1of1 { width: 100%; }

.l-size1of5 { width: 20%; }
.l-size2of5 { width: 40%; }
.l-size3of5 { width: 60%; }
.l-size4of5 { width: 80%; }


.l-mar-none { margin: 0; }

/* @TODO(Grey): Figure out the proper scale here as well */
.l-mar-b6 { margin-bottom: 6px; }
.l-mar-b12 { margin-bottom: 12px; }
.l-mar-b18 { margin-bottom: 18px; }
.l-mar-b24 { margin-bottom: 24px; }
.l-mar-b150 { margin-bottom: 150px; }


.l-pad-t24 { padding-top: 24px; }

.l-pad-x8  { padding-left: 8px;  padding-right: 8px;  }
.l-pad-x24 { padding-left: 24px; padding-right: 24px; }
.l-pad-x60 { padding-left: 60px; padding-right: 60px; }

.l-pad-b80 { padding-bottom: 80px; }

.l-pad-t20 { padding-top: 20px; }
.l-pad-t60 { padding-top: 60px; }

.l-pad-y60  { padding-top: 60px;  padding-bottom: 60px;  }
.l-pad-y190 { padding-top: 190px; padding-bottom: 190px; }

@media (min-width: 700px) {
    .bp700-l-pad-x48 { padding-left: 48px; padding-right: 48px; }
    .bp700-l-pad-x80 { padding-left: 80px; padding-right: 80px; }

    .bp700-l-pad-t60 { padding-top: 60px; }
    .bp700-l-pad-t80 { padding-top: 80px; }
}


/*
 * Colours
 */
.c-blue { color: #00f; }

