/* Layout measured from the reference page; the photo layer keeps it full screen on phones */
html {
  --photo-height: 100vh;
  background: #0d1a2b;
  overflow: hidden;
  overscroll-behavior: none;
}

@supports (height:100lvh) {
  html {
    --photo-height: 100lvh;
  }
}

body {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--photo-height);
  background: url(images/background-christmas.webp) no-repeat center top;
  background-size: cover;
  z-index: -1;
}

/* Upright screens: the photo fills the height, and Dolly's center (60.75% across
   a 5:3 photo) is moved to the middle of the screen */
@media(orientation:portrait) {
  body::before {
    background-size: auto 100%;
    background-position: calc(50vw - var(--photo-height) * 1.0125) top;
  }
}

#fx {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body img {
  width: min(55vw, 1000px);
  position: absolute;
  top: 50%;
  transform: translateY(-46%);
  margin-left: 3%;
  pointer-events: none;
}

.rs {
  position: absolute;
  right: 30px;
  bottom: calc(30px + env(safe-area-inset-bottom));
}

.rs a {
  width: 48px;
  height: 48px;
  display: inline-block;
  margin-left: 10px;
  transition: 0.3s;
}

.rs .fb {
  background: url(images/fb.jpg) no-repeat center;
  background-size: 48px;
  border-radius: 50%;
}

.rs .spotify {
  background: url(images/spotify.jpg?v=2) no-repeat center;
  background-size: 48px;
  border-radius: 50%;
}

.mail {
  background: url(images/mail.png) no-repeat center;
  background-size: 48px;
  border-radius: 50%;
}

.rs a:hover {
  transform: scale(1.2);
}

@media(max-width:1023px) {
  body img {
    width: 98%;
    left: 50%;
    margin-left: 0;
    transform: translate(-50%, -46%);
  }

  .rs {
    width: 100%;
    text-align: center;
    right: 0;
  }

  .rs a {
    width: 10vw;
    height: 10vw;
    margin: 0 3vw;
  }

  .rs a, .rs .fb, .rs .spotify {
    background-size: 10vw;
  }
}

/* Sideways phones: on the left and low, so the logo stays below her face */
@media(max-width:1023px) and (orientation:landscape) {
  body img {
    width: min(56%, 500px);
    left: max(20px, env(safe-area-inset-left));
    top: 44%;
    transform: none;
  }

  .rs {
    width: auto;
    right: max(16px, env(safe-area-inset-right));
  }

  .rs a {
    width: 44px;
    height: 44px;
    margin: 0 0 0 12px;
  }

  .rs a, .rs .fb, .rs .spotify {
    background-size: 44px;
  }
}

/* Tablets upright: keep the logo clear of her face */
@media(min-width:600px) and (max-width:1023px) and (orientation:portrait) {
  body img {
    width: 82%;
    top: 60%;
  }
}

/* Logos with a line of text underneath are taller, so the signature keeps its position */
body img.with-text {
  transform: translateY(-35%);
}

@media(max-width:1023px) {
  body img.with-text {
    transform: translate(-50%, -35%);
  }
}

@media(max-width:1023px) and (orientation:landscape) {
  body img.with-text {
    transform: none;
  }
}
