html, body {
  margin: 0;
  padding: 0;
  background: #eee;
  font-family: sans-serif;
}

main {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-areas:
    "logo"
    "text"
    "gallery";
  grid-template-rows: auto auto 1fr;
  background: #0c4367;
}

#logo {
  grid-area: logo;
  width: 100vw;
  max-height: 50vh;
  background: #fefdf9;
  border-bottom: 4px solid #b63b3a;
}

#logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

#text {
  grid-area: text;
  padding: 16px;
  background: #eee;
  border-top: 4px solid #823835;
  border-bottom: 4px solid #b63b3a;
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
}

#text > :first-child {
  margin-top: 0;
}

#text > :last-child {
  margin-bottom: 0;
}

h4 {
  color: #0c4367;
}

.slogan {
  font-style: italic;
}

#gallery {
  grid-area: gallery;
  display: flex;
  flex-wrap: wrap;
  padding: 8px;
  background: #0c4367;
  border-top: 4px solid #823835;
  align-items: center;
  justify-content: center;
}

#gallery img {
  width: 10vw;
  height: 15vw;
  min-width: 75px;
  min-height: 100px;
  max-width: 135px;
  max-height: 180px;
  margin: 8px;
  border: 8px solid #fefdf9;
  object-fit: cover;
}

@media (min-width: 1024px) or (min-aspect-ratio: 1) {
  main {
    max-width: 1024px;
    margin: 0 auto;
    grid-template-areas:
      "logo    text"
      "gallery gallery";
    grid-template-columns: 1fr 1fr;
  }

  #logo {
    width: 50vw;
    max-width: 512px;
    max-height: 100%;
  }

  #logo img {
    max-height: 100vh;
  }

  #text {
    width: calc(50vw - 32px);
    max-width: 480px;
    background: #fefdf9;
    border-top: none;
  }
}