:root {
  --fg-color: #ffffff;
  --bg-color: #214478;
  --font-family: "IBM Plex Sans Condensed", sans-serif;
  --font-size: 16px;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.container {
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  font-size: var(--font-size);
  overflow-x: hidden;
  overflow-y: auto;
  height: 100%;
  background-size: cover;
  background: url("../images/3rdparty/unsplash/mountains.jpg") fixed center;

  header, main {
    position: relative;
    flex: 1 0 auto;
  }

  header {
    height: 100%;
    background-color: var(--bg-color);
    color: var(--fg-color);

    display: flex;
    justify-content: center;

    img {
      width: 60%;
      max-width: 320px;
    }
  }

  main {
    min-height: 100%;
    color: var(--bg-color);

    .page {
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin: 200px 0;

      .centered-block {
        width: 500px;
        max-width: 80%;
      }
    }

    h2, p {
      margin-top: 0;
      background-color: var(--fg-color);
      color: var(--bg-color);
    }

    p {
      padding: 15px 20px;
    }

    h2 {
      padding: 10px 20px;
      display: inline-block;
      letter-spacing: .1rem;

      a {
        color: var(--bg-color);
        text-decoration: none;

        &:hover {
          color: var(--bg-color);
          text-decoration: underline;
        }

        &:active {
          color: var(--bg-color);
        }

        &::after {
          content: "";
          width: 12px;
          height: 12px;
          margin-left: 8px;
          background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Ctitle%3E external link %3C/title%3E%3Cpath fill='currentColor' d='M6 1h5v5L8.86 3.85 4.7 8 4 7.3l4.15-4.16L6 1Z M2 3h2v1H2v6h6V8h1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E");
          background-position: center;
          background-repeat: no-repeat;
          background-size: contain;
          display: inline-block;
          vertical-align: super;
        }
      }
    }
  }
}

@media only screen and (min-width: 1024px) {
  .container {
    flex-direction: row;
    align-items: stretch;
    overflow-y: hidden;

    header, main {
      width: 50%;
    }

    header {
      img {
        width: 320px;
      }
    }

    main {
      overflow-y: auto;

      .page {
        .centered-block {
          max-width: 70%;
        }
      }
    }
  }
}

@media only screen and (min-width: 1600px) {
  .container {
    header {
      justify-content: right;

      img {
        margin-right: 144px;
      }
    }

    main {
      .page {
        align-items: flex-start;

        .centered-block {
          margin-left: 144px;
        }
      }
    }
  }
}

/** Scroll snapping on devices with more than 750px height **/
@media only screen and (min-height: 750px) {
  .container {
    scroll-snap-type: y mandatory;

    header {
      scroll-snap-align: start;
    }

    main {
      scroll-snap-type: y mandatory;

      .page {
        scroll-snap-align: start;
        height: 100vh;
        margin: 0;
      }
    }
  }
}