:root {
  --scroll-y: 0px;
  --page-bg: #3b2a1a;
  --text-color: #f1aae2;
  --portal-size: 530px;
  --about-me-height: 110px;
  --pigeon-height: 140px;
  --text1-width: 750px;
  --text1-height: 420px;
  --frame-extra-size: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: 'DreamerTM', sans-serif;
  font-size: 70px;
  background-color: var(--page-bg);
  background-image: url('sand.png');
  background-repeat: repeat;
  background-position: 0 0;
  background-attachment: fixed;
  background-size: auto 900px;
  color: var(--text-color);
}

main {
  width: 100%;
}

/* Landing section */
.landing {
  position: relative;
  height: 100vh;
  width: 100%;
}

.portal-layer {
  position: absolute;
  inset: 0;
  background-image: url('End_Portal.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--portal-size) auto;
  transform: translateY(calc(var(--scroll-y, 0px) * -0.06));
  z-index: 0;
  pointer-events: none;
}

.scroll-down-image {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(calc(265px + 30px));
  z-index: 1;
  width: 300px;
  height: auto;
  pointer-events: none;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  pointer-events: none;
  z-index: 3;
}

.about-me-image {
  position: absolute;
  top: calc(2rem + 70px + 50px);
  left: 50%;
  transform: translateX(-50%) translateY(calc(var(--scroll-y, 0px) * -0.08));
  z-index: 3;
  height: var(--about-me-height);
  width: auto;
}

.info-bar-image {
  position: fixed;
  top: -49.5px;
  right: 0.5rem;
  width: 400px;
  max-width: 25vw;
  height: auto;
  z-index: 3;
  transform: none;
}

.pigeon-name {
  position: absolute;
  top: calc(8rem + 70px + 50px);
  left: 50%;
  transform: translateX(-50%) translateY(calc(var(--scroll-y, 0px) * -0.1));
  z-index: 3;
  display: inline-block;
  white-space: nowrap;
}

.pigeon-name img {
  display: inline-block;
  vertical-align: middle;
  height: var(--pigeon-height);
  width: auto;
}


.frame1 {
  position: relative;
  height: 100vh;
  width: 100%;
  background-image: url('frame1.png');
  background-size: 900px 500px;
  background-position: center;
  background-repeat: no-repeat;
}

.extra-space {
  width: 100%;
  height: 40vh;
  background: transparent;
}

.bottom-gallery {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 3rem 2rem;
  scroll-margin-top: 2rem;
}

.bottom-gallery.is-hidden {
  display: none;
}

.bottom-image {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 1150px);
  height: auto;
  display: block;
  object-fit: contain;
}

.bottom-image.is-hidden {
  display: none;
}

.music-image {
  cursor: grab;
}

.music-image.dragging {
  cursor: grabbing;
  z-index: 10;
}

.layout-image {
  z-index: 1;
}

/* Layout overlay buttons */
.layout-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 60px), -50%) scale(1.21);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  z-index: 4;
  pointer-events: auto;
  transform-origin: center;
}

.layout-button.is-hidden {
  display: none;
}

/* Art overlays stacked on top of the layout */
.layout-art {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% + 60px), -50%) scale(1.21);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  z-index: 3;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transform-origin: center;
}

.layout-art.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.musicbox-image {
  z-index: 2;
}

.music-image {
  z-index: 3;
}

.frame1 .frame-images {
  position: relative;
  height: 100%;
  width: 100%;
}

.frame1 .text1-image {
  position: absolute;
  top: calc(50% - 120px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 310px;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

.frame1 .frame-extra {
  position: absolute;
  width: var(--frame-extra-size);
  height: var(--frame-extra-size);
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}

.frame1 .frame-extra[data-target-image] {
  pointer-events: auto;
  cursor: pointer;
}

.frame1 .frame-extra.left {
  left: calc(50% - 75px);
}

.frame1 .frame-extra.right {
  left: calc(50% + 80px);
}

.frame1 .frame-extra:not(.down) {
  top: 40%;
}

.frame1 .frame-extra.down {
  top: 60%;
}

.frame1 .frame-extra.one {
  top: calc(40% + 10px);
  transform: translateY(30px);
}

.frame1 .frame-extra.three {
  top: calc(60% - 30px);
  transform: translateY(-30px);
}

.frame1 .frame-extra.two {
  left: calc(50% + 15px);
  top: calc(40% + 10px);
  transform: translateY(30px);
}

.frame1 .frame-extra.four {
  left: calc(50% + 15px);
  top: calc(60% - 30px);
  transform: translateY(-30px);
}