---
---

@import "_reset";
@import "_pygments";



@mixin prefix($map, $vendors: webkit moz ms o) {
  @each $prop, $value in $map {
    @if $vendors {
      @each $vendor in $vendors {
        #{"-" + $vendor + "-" + $prop}: #{$value};
      }
    }
    // Dump regular property anyway
    #{$prop}: #{$value};
  }
}

$base-font-size: 20px;
$lh: 1.4rem;
$main-color: #0087F7;
$text-color: #646C7F;


$main-width: 720px;
$nav-width: 220px;
$header-background: #F3F4F5;


#dropzone {
  margin-bottom: 3rem;
}

.dropzone {
  border: 2px dashed $main-color;
  border-radius: 5px;
  background: white;

  .dz-message { 
    font-weight: 400;
    .note {
      font-size: 0.8em;
      font-weight: 200;
      display: block;
      margin-top: $lh;
    }
  }
}


*, *:before, *:after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Roboto, "Open Sans", sans-serif;
  font-size: $base-font-size;
  font-weight: 300;
  line-height: $lh;
  background: $header-background;
  color: $text-color;
  text-rendering: optimizeLegibility;
  @media (max-width: 600px) {
    font-size: $base-font-size - 2px;
  }
  @media (max-width: 400px) {
    font-size: $base-font-size - 4px;
  }
}


h1, h2, h3, table th, table th .header {
  font-size: 1.8rem;
  color: $main-color;
  -webkit-font-smoothing: antialiased;
  line-height: 2.2rem;
}
h1, h2, h3 {
  margin-top: 2 * $lh;
  margin-bottom: $lh;  
}
h2 {
  font-size: 1.4rem;
}

h1, h2 {
  &.anchor {
    margin: 0;
    padding: 0;
    height: 1px; // Must be at least one pixel so chrome scrolls to it
    overflow: hidden;
    visibility: hidden;
  }
}

table th {
  font-size: 1.4rem;
  color: $text-color;
}

ul, ol {
  list-style-position: inside;
  li {
    // padding-left: $lh;
  }
}


a {
  color: $main-color;
  text-decoration: none;
  &:hover {
    border-bottom: 2px solid $main-color;
  }
}

p {
  margin: $lh 0;
}

strong {
  font-weight: 400;
}
em {
  font-style: italic;
}


code {
  font-family: Inconsolata, monospace;
  background: rgba(0 , 135, 247 , 0.04);
  padding: 0.2em 0.4em;
}
.highlight code, td:first-child  code {
  background: none;
  padding: 0;
}

aside {
  font-size: 0.8em;
  color: rgba(0, 0, 0, 0.4);
}


hr {
  border: none;
  background: none;
  position: relative;
  height: 2*$lh;
  &:after {
    content: "";
    position: absolute;
    top: $lh;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
  }
}

ul {
  li {
    list-style-type: disc;
    padding-top: $lh/2;
    padding-bottom: $lh/2;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    &:last-of-type {
      border: none;
    }
  }
}



// Code highlighting
.highlight {
  padding: $lh;
  overflow: auto;
  background: rgba(100, 108, 128, 0.04);
  margin-top: 2*$lh;
  margin-bottom: 2*$lh;
}
.bitcoin {
  overflow: auto;
}
blockquote {
  color: $main-color;
  font-size: 1.2rem;
  line-height: 2rem;
  -webkit-font-smoothing: antialiased;
  margin-top: 2*$lh;
  margin-bottom: 2*$lh;
  a {
    border-bottom: 1px solid $main-color;
  }
}


body > header {

  position: relative;

  // &.disappear {
  //   .content {
  //     transform: translateY(-40px);
  //     -webkit-transform: translateY(-40px);
  //     -moz-transform: translateY(-40px);
  //     opacity: 0.4;
  //   }
  // }

  padding: 2*$lh $lh;

  // perspective: 1000px;

  .content {

    opacity: 1;
    // height: 13 * $lh;

    // transition: all 0.5s ease-in-out;
    // transform-origin: top center;

    background: $header-background;

    > * {
      max-width: 700px;
    }

    h1 {
      img {
        max-width: 100%;
      }
      span { display: none; }
      margin-bottom: 2*$lh;
      margin-top: 0;
    }
    z-index: 10;

  }

  z-index: 10;

  #social-buttons {
    @media (min-width: 700px) {
      display: inline-block;
      position: absolute;
      top: 0.5em;
      right: 0;
      opacity: 0.5;
      @include prefix((transition: opacity 0.2s ease));
      &:hover {
        opacity: 1;
      }
    }
    .social-button {
      display: inline-block;
      &.facebook-social-button {
        .fb-like > span {
          vertical-align: top !important;
          top: 1px;
        }
      }
    }
  }

  .scroll-invitation {
    margin-top: 2*$lh;

    // To separate from social icons
    // Gets removed when a certain size is reached
    margin-bottom: 2*$lh;

    a {
      display: block;
      width: 56px;
      height: 56px;
      background: url('../images/arrow.svg') no-repeat;
      &:hover {
        text-decoration: none;
        border: none;
        background-image: url('../images/arrow-hover.svg');
      }
      span {
        display: none;
      }      
    }
  }


  @media (min-width: 700px) {
    height: 100vh;
    margin-bottom: 0;

    .content {
      position: relative;
      top: 50%;
      transform: translateY(-50%);    
      -webkit-transform: translateY(-50%);
      -moz-transform: translateY(-50%);
    }
  }
  @media (min-width: 900px) {
    .content {
      h1 {
        margin-bottom: 3*$lh;
        img {
          width: 550px;
        }
      }
      h2 {
        font-size: 1.5em;
        line-height: 1.4em;
      }
    }
    padding-left: 15%;
  }
  @media (min-width: 1100px) {

    .content h1 {
      margin-bottom: 4*$lh;
      img {
        width: 700px;
      }
    }

    .content > * {
      max-width: 900px;
    }

    h2 {
      margin-top: 2*$lh;
      margin-bottom: 2*$lh;
    }
    font-size: 1em;
    line-height: 1.5em;

    .scroll-invitation {
      margin-top: 4*$lh;
    }
  }

}


main > nav {

  position: absolute;

  &.fixed {
    position: fixed;
  }
  top: 0;
  left: 0;
  bottom: 0;
  width: $nav-width;
  background: #028AF4;
  padding: $lh 0;

  z-index: 200;
  overflow: auto;

  display: none;

  img {
    margin: 0 0 $lh $lh;
    width: 58px;
    height: 58px;
  }

  a:not(.logo) {
    display: block;
    line-height: $lh;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: $lh / 2 $lh;
    font-size: 0.8rem;
    -webkit-font-smoothing: subpixel-antialiased;

    &:hover {
      background: rgba(255, 255, 255, 0.3);
    }
  }

  .sub-sections {
    height: 0;
    overflow: hidden;
    @include prefix((transition: height 0.4s ease));
  }
  .visible {
    background: rgba(255, 255, 255, 0.13);
    .sub-sections {
      display: block;
    }
  }

  a.current {
    background: #4DADF7;
  }

  .level-0 {
    > a {
      font-weight: 400;
    }
  }

  .level-1 {
    > a {
      // display: none;
      padding-left: $lh + 0.5rem;
      color: rgba(255, 255, 255, 0.7);
    }
  }

}

@media (min-width: $nav-width + $main-width) {
  main {
    padding-left: $nav-width;
    > nav {
      display: block;
    }
  }
}

form.donate {
  display: inline-block;
  vertical-align: bottom;
  position: relative;
  top: 0.25em;
  margin: 0 0em 0 0.2em;
}

main {

  position: relative;
  z-index: 100;

  section {

    padding: $lh $lh 2*$lh $lh;

    &:last-of-type {
      padding-bottom: 6*$lh;
    }

    h1, h2 {
      margin-top: 0;
      padding-top: 2 * $lh;
    }

    > * {
      max-width: $main-width;
      margin-left: auto;
      margin-right: auto;
      &.highlight {
        max-width: $main-width + 180px;
      }
    }
    > table {
      max-width: 80rem;
    }

    .video-grid {
      display: flex;
      justify-content: space-between;

      .video-grid__cell {
        display: block;
        position: relative;
        flex: 1;

        margin-left: 1.5rem;
        &:first-child {
          margin-left: 0;
        }

        &:after {
          content: '';
          padding-top: 56.25%;
          // 16:9 ratio
          display: block;
        }

        iframe {
          display: block;
          position: absolute;
          width: 100%;
          height: 100%;
        }
      }
    }
    .embedded-video {
      position: relative;
      width: 100%;
      &:after {
        content: '';
        padding-top: 56.25%;
          // 16:9 ratio
        display: block;
      }
      iframe {
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
      }
    }

    &:nth-child(odd) {
      background: #F3F4F5;
    }
    &:nth-child(even) {
      background: #E8E9EC;
    }


    &.news {
      background: #646C7F;
      color: white;
      h1, h2 {
        color: white;
        -webkit-font-smoothing: subpixel-antialiased;

      }
      a {
        color: #C0E3FE;
        border-color: #C0E3FE;
      }
    }

  }

  .configuration-table-container {
    max-width: 100%;
    overflow-x: scroll;
  }

  table {
    font-size: 0.9rem;
    margin-top: 1*$lh;
    margin-bottom: 3*$lh;
    $border-color: #38A0FE;
    border: 1px solid $border-color;
    border-bottom: none;
    background: white;
    th:first-of-type,
    td:first-of-type {
      text-align: right;
    }
    th, td {
      text-align: left;
      border-bottom: 1px solid $border-color;
      padding: $lh/2 $lh;
    }
    td:first-of-type, th:first-of-type {
      border-right: 1px solid $border-color;
    }
    a.default-value {
      display: block;
      font-weight: normal;
      color: rgba(0, 88, 160, 0.3);
      font-size: 0.9em;
      &:hover {
        border: none;
        color: $main-color;
      }
    }
    td:first-of-type {
      font-weight: bold;
      color: $main-color;
    }
    th.title {
      text-align: center;
      padding-top: 2*$lh;
      padding-bottom: 2*$lh;
      p {
        margin-bottom: 0;
      }
    }
    td.separator {
      font-weight: normal;
      text-align: left;
      color: $text-color;
    }

    p {
      margin: 0;
    }

    @media (max-width: 600px) {
      table, tbody, thead, tr, td, th {
        display: block;
      }
      a.default-value {
        display: inline;
        margin-left: 0.5em;
      }
      td, th {
        &:first-of-type {
          text-align: left;
          border-right: none;
        }
        overflow: auto;
      }
      td.label {
        border-bottom-color: rgba(0, 135, 247, 0.15);
      }
      th.title {
        padding-top: $lh;
        padding-bottom: $lh;
      }

      th:not(.title) {
        display: none;
      }
    }
  }

}

footer {
  background: #2D3038;
  z-index: 5000;
  position: relative;
  display: block;
  padding: $lh $lh 2*$lh $lh;

  font-size: 0.9rem;

  color: white;
  * {
    color: white;
  }
  a:hover {
    border-color: white;
  }

  > * {
    max-width: $main-width;
    margin-left: auto;
    margin-right: auto;
  }


  @media (min-width: $main-width) {
    .license {
      text-align: justify;
    }
  }

  .logo {
    margin: 2*$lh 0;
    width: 270px;
  }

}



.for-hire {
  text-align: center;
  padding: 1em 2em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.3rem;
  line-height: 1.5em;

  h1 {
    padding: 0;
    margin: 1.5rem 0 3rem;
    img {
      max-width: 100%;
      height: auto;
    }
  }
}