* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

div {
    background-image: url(logo.png);
    background-size: cover;
    background-position: center 50%;
    width: 100vw;
    height: 100vw;
    max-height: 100vh;
    max-width: 100vh;
    margin: 0 auto;
}

@media (orientation: landscape) {
  div {
    width: 100vh;
    height: 100vh;
  }
}

@media (orientation: portrait) {
  div {
    position: absolute;
    width: 100vw;
    height: 100vw;
    top: calc(50vh - 50vw);
  }
}