/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v7.0.29,
* Autoprefixer: v9.7.6
* Browsers: last 4 version
*/

/* Yleiset määrittelyt */

* {
  margin: 0 auto;
  padding: 0;
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

/* Gridin määrittely */

.grid-container {
  display: grid;

  /*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v7.0.29,
* Autoprefixer: v9.7.6
* Browsers: last 4 version
*/

display: -ms-grid;
-webkit-transition: all .5s;
-o-transition: all .5s;
transition: all .5s;
}

@supports (display: grid) {
.grid {
  display: -ms-grid;
  display: grid;
}
}

::-moz-selection { /* Code for Firefox */
  color: white;
  background: black;
}

::selection {
  color: white;
  background: rgba(0, 0, 0, 1);
}

/* Yleiset fontti-määrittelyt */

h1, h2, h4 {
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  font-weight: 700;
}

p, ul, h3 {
  font-family: "Raleway", sans-serif;
}

p {
  font-weight: 400;
  font-size: 1.1em;
  line-height: 1.7em;
}

/* unvisited link */
a:link {
  color: #4236b1;
  text-decoration: none;
}

/* visited link */
a:visited {
  color: #4236b1;
  text-decoration: none;
}

/* mouse over link */
a:hover {
  color: #4236b1;
  text-decoration: underline
}

/* selected link */
a:active {
  color: #4236b1;
}

/* Header-logo */

.headerlogo {
  text-align: center;
  -ms-grid-column: 1;
  -ms-grid-column-span: 12;
  grid-column: 1  / span 12;
  -ms-grid-row: 1;
  grid-row: 1;
  margin-top: 2em;
  width: 6em;
}

/* Header-kuva */

.headerimage {
  width: 100%;
}

/* Footer-osio */

.footerlogo {
  -ms-grid-row: 1;
  grid-row: 1;
  -ms-grid-column: 1;
  grid-column: 1;
  width: 8em;

}

.contact {
  -ms-grid-row: 2;
  grid-row: 2;
  -ms-grid-column: 1;
  grid-column: 1;
}

.contact h4 {
  margin-bottom: 0.5em;
}

address {
  font-style: normal;
}

.contact-stripe {
  background-color: black;
  height: 6em;
  width: 100%;
  margin-top: 8em;
  text-align: center;
  padding-top: 2em;
}

.contact-stripe img {
  padding: 0 0.5em;
}

/* Tästä alkaa responsiiviset määrittelyt */

/* On screens that are 1920px wide or less, go from four columns to two columns */
@media screen and (max-width: 15000px) {
  .grid-container {
    max-width: 75em;
    grid-gap: 3em 3em;
    -ms-grid-columns: 1fr;
    grid-template-columns: repeat(1, 1fr);
  }

  h1 {
    font-size: 10em;
    line-height: 1em;
  }

  h2 {
    font-size: 4em;
    line-height: 1em;
  }

  h3 {
    font-size: 1.5em;
    line-height: 1.5em;
    font-weight: 400;
  }

  h4 {
    font-size: 3em;
    line-height: 1em;
  }

  .headline {
    -ms-grid-column: 1;
    -ms-grid-column-span: 9;
    grid-column: 1 / 10;
    -ms-grid-row: 3;
    grid-row: 3;
    -ms-grid-row-align: start;
        align-self: start;
    margin-top: 4em;
  }

  .ingress {
    -ms-grid-column: 1;
    -ms-grid-column-span: 5;
    grid-column: 1 / 6;
    -ms-grid-row: 3;
    grid-row: 3;
    -ms-grid-row-align: start;
        align-self: start;
    margin-top: 2em;
  }

  .headerimage {
    -ms-grid-column: 5;
    -ms-grid-column-span: 7;
    grid-column: 5 / 12;
    -ms-grid-row: 3;
    grid-row: 3;
    -ms-grid-column-align: stretch;
        justify-self: stretch;
  }

  .border_vertical {
    border: 1em solid black;
    -ms-grid-column: 5;
    grid-column: 5 / 5;
    -ms-grid-row: 6;
    grid-row: 6;
  }

  .border_horizontal {
    border-style: hidden;
  }

  .intro_headline {
    -ms-grid-column: 1;
    -ms-grid-column-span: 1;
    grid-column: 1 / 2;
    -ms-grid-row: 6;
    grid-row: 6;
  }

  .intro_headline h2 {
    text-align: right;
  }

  .intro_text {
    -ms-grid-column: 8;
    -ms-grid-column-span: 4;
    grid-column: 8 / 12;
    -ms-grid-row: 6;
    grid-row: 6;
  }

  .intro_text h3 {
    margin-bottom: 1em;
  }

  .works {
    -ms-grid-row: 9;
    grid-row: 9;
    -ms-grid-column: 1;
    -ms-grid-column-span: 11;
    grid-column: 1 / 12;
  }

  .works h2 {
    text-align: center;
  }
}

/* On screens that are 1200px wide or less, make the columns stack on top of each other instead of next to each other */
@media screen and (max-width: 1200px) {
  .grid-container {
    max-width: 100%;
    grid-gap: 3em;
    -ms-grid-columns: 1fr;
    grid-template-columns: repeat(1, 1fr);
  }
  h1 {
    font-size: 8em;
    line-height: 1em;
  }

  .headline {
    -ms-grid-column: 2;
    -ms-grid-column-span: 4;
    grid-column: 2 / 6;
    -ms-grid-row: 3;
    -ms-grid-row-span: 2;
    grid-row: 3 / 5;
  }
  .headerimage {
    -ms-grid-column: 4;
    -ms-grid-column-span: 8;
    grid-column: 4 / 12;
    -ms-grid-row: 4;
    grid-row: 4;
    -ms-grid-column-align: stretch;
        justify-self: stretch;
  }

  .ingress {
    -ms-flex-item-align: start;
        -ms-grid-row-align: start;
        align-self: start;
    margin-top: 1em;
  }

  .intro_headline {
    -ms-grid-column: 2;
    -ms-grid-column-span: 3;
    grid-column: 2 / 5;
    -ms-grid-row: 6;
    grid-row: 6;
  }

  .border_vertical {
    border-style: hidden;
  }

  .intro_text {
    -ms-grid-column: 6;
    -ms-grid-column-span: 5;
    grid-column: 6 / 11;
    -ms-grid-row: 6;
    grid-row: 6;
  }
}

/* On screens that are 960px wide or less, make the columns stack on top of each other instead of next to each other */
@media screen and (max-width: 960px) {
  .grid-container {
    max-width: 100%;
    -ms-grid-columns: 1fr;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 3em;
  }
  h1 {
    font-size: 6em;
    line-height: 1em;
  }

  h2 {
    font-size: 3em;
    line-height: 1em;
  }

  h4 {
    font-size: 2em;
    line-height: 1em;
  }

  .headline {
    -ms-grid-column: 2;
    -ms-grid-column-span: 3;
    grid-column: 2 / 5;
    -ms-grid-row: 3;
    -ms-grid-row-span: 2;
    grid-row: 3 / 5;
  }
  .headerimage {
    -ms-grid-column: 4;
    -ms-grid-column-span: 8;
    grid-column: 4 / 12;
    -ms-grid-row: 4;
    grid-row: 4;
    -ms-grid-column-align: stretch;
        justify-self: stretch;
  }

  .ingress {
    -ms-flex-item-align: start;
        -ms-grid-row-align: start;
        align-self: start;
    margin-top: 1em;
  }

  .intro_headline {
    -ms-grid-column: 2;
    -ms-grid-column-span: 9;
    grid-column: 2 / 11;
    -ms-grid-row: 6;
    grid-row: 6;
  }

  .intro_text {
    -ms-grid-column: 2;
    -ms-grid-column-span: 10;
    grid-column: 2 / 12;
    -ms-grid-row: 7;
    grid-row: 7;
  }

  .intro_headline h2 {
    text-align: left;
  }

  .footerlogo {
    -ms-grid-row: 1;
    grid-row: 1;
    -ms-grid-column: 1;
    -ms-grid-column-span: 11;
    grid-column: 1 / 12;
    -ms-grid-row-align: center;
        align-self: center;
    margin-top: 2em;
    margin-bottom: -2em;
  }

  .contact {
    -ms-grid-row: 3;
    grid-row: 3;
    -ms-grid-column: 1;
    -ms-grid-column-span: 11;
    grid-column: 1 / 12;
  }
}

/* On screens that are 640px wide or less, make the columns stack on top of each other instead of next to each other */
@media screen and (max-width: 640px) {
  .grid-container {
    max-width: 100%;
    -ms-grid-columns: 1fr;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 1em;
    row-gap: 3em;
  }

  h1 {
    font-size: 4em;
    line-height: 1em;
  }

  h2 {
    font-size: 2em;
    line-height: 1em;
  }

  h4 {
    font-size: 1.5em;
    line-height: 1em;
  }

  .headline {
    -ms-grid-column: 2;
    -ms-grid-column-span: 10;
    grid-column: 2 / 12;
    -ms-grid-row: 2;
    -ms-grid-row-span: 4;
    grid-row: 2 / 6;
    -ms-grid-row-align: end;
        align-self: end;
  }

  .headerimage {
    -ms-grid-column: 1;
    -ms-grid-column-span: 12;
    grid-column: 1 / span 12;
    -ms-grid-row: 2;
    grid-row: 2;
  }

  .ingress {
    -ms-grid-row-align: start;
        align-self: start;
    margin-top: 1em;
    -ms-grid-column: 2;
    -ms-grid-column-span: 2;
    grid-column: 2 / 4;
  }

  .border_horizontal {
    border: 0.5em solid black;
    width: 100%;
    -ms-grid-column: 2;
    -ms-grid-column-span: 9;
    grid-column: 2 / 11;
    -ms-grid-row: 6;
    grid-row: 6;
  }

  .intro_headline {
    -ms-grid-column: 2;
    -ms-grid-column-span: 9;
    grid-column: 2 / 11;
    -ms-grid-row: 7;
    grid-row: 7;
  }

  .intro_text {
    -ms-grid-column: 2;
    -ms-grid-column-span: 9;
    grid-column: 2 / 11;
    -ms-grid-row: 8;
    grid-row: 8;
  }

  .works {
    -ms-grid-row: 9;
    grid-row: 9;
    -ms-grid-column: 1;
    -ms-grid-column-span: 11;
    grid-column: 1 / 12;
  }
}

/* Tästä alkaa masonry-grid-määrittelyt ja ohjeet */
.masonry-wrapper {
  padding: 1.5em;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}
.masonry {
  -webkit-columns: 1;
     -moz-columns: 1;
          columns: 1;
  -webkit-column-gap: 10px;
     -moz-column-gap: 10px;
          column-gap: 10px;
  padding: 4em 0em ;
}
.masonry-item {
  display: inline-block;
  vertical-align: top;
  margin-bottom: 10px;
}
@media only screen and (max-width: 1023px) and (min-width: 640px) {  .masonry {
    -webkit-columns: 2;
       -moz-columns: 2;
            columns: 2;
  }
}
@media only screen and (min-width: 1024px) {
  .masonry {
    -webkit-columns: 3;
       -moz-columns: 3;
            columns: 3;
  }
}

.masonry img {
  filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */    
 -webkit-filter: grayscale(100%);
 -moz-filter: grayscale(100%);
 -ms-filter: grayscale(100%);
 filter: grayscale(100%);
 -webkit-filter: gray;
         filter: gray; /* IE 6-9 */
 -webkit-transition: 0.25s;
 -o-transition: 0.25s;
 transition: 0.25s;
 -webkit-transition-timing-function: ease-out;
      -o-transition-timing-function: ease-out;
         transition-timing-function: ease-out;
}

.masonry img:hover {
  -webkit-filter: none;
  -moz-filter: none;
  -ms-filter: none;
  filter: none;
  cursor: pointer;
}