/* Keep the existing landscape, typography, islands and pointer interactions. */
:root {
  --home-footer-height: 50px;
  --home-scene-height: 100%;
  --home-scene-offset: 0px;
}

html, body, #root {
  min-height: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(150px, .85fr) auto minmax(174px, .65fr) auto;
  min-height: calc(100svh - var(--home-footer-height));
  padding-bottom: 60px;
  overflow: hidden;
}

.hero > .scene {
  position: absolute;
  inset: 0 0 auto;
  height: var(--home-scene-height);
  transform: translate3d(0, var(--home-scene-offset), 0);
}

.hero > .header {
  grid-area: 1 / 1;
  width: 100%;
}

.hero > .intro {
  grid-area: 2 / 1;
  align-self: center;
  width: 100%;
  margin: 0;
}

.hero > .island-stage {
  grid-area: 3 / 1;
  margin-top: 0;
  margin-bottom: 0;
}

.hero > .companions {
  grid-area: 4 / 1;
  align-self: center;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

.hero > .greeting {
  grid-area: 5 / 1;
  width: calc(100% - 60px);
  margin-top: 0;
  margin-bottom: 0;
  justify-self: center;
}

.footer-row {
  flex-wrap: wrap;
  min-width: 0;
  white-space: normal;
  row-gap: 7px;
}

.footer-row > a {
  white-space: nowrap;
}

@media (min-width: 1600px) {
  .hero {
    grid-template-rows: auto minmax(168px, .85fr) auto minmax(190px, .65fr) auto;
  }
}

@media (max-width: 760px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - var(--home-footer-height));
    padding-bottom: 76px;
  }

  .hero > .header,
  .hero > .intro,
  .hero > .island-stage,
  .hero > .companions,
  .hero > .greeting {
    flex-shrink: 0;
  }

  .hero > .intro {
    margin: 39px auto 0;
  }

  .hero > .island-stage {
    margin-top: 60px;
  }

  .hero > .companions {
    width: auto;
    margin: 0 26px;
  }

  .hero > .greeting {
    width: auto;
    margin: 2px 26px 0;
  }

  .footer-row {
    justify-content: center;
    text-align: center;
    gap: 8px 12px;
    line-height: 1.8;
  }

  .footer-row > span + span,
  .footer-row > a {
    padding-left: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero > .scene {
    transform: none;
  }
}
