
.opening {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(100svh - 88px);
  min-height: 620px;
  max-height: 1200px;
  padding: 24px var(--gutter) 36px;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

.opening-window {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  container-type: size;
}

.opening-track {
  position: relative;
  width: min(100cqw, calc(100cqh * 1.7), 1440px);
  aspect-ratio: 1.7;
  overflow: hidden;
  isolation: isolate;
}

.opening-panel {
  position: absolute;
  overflow: hidden;
  opacity: 0;
  border: 0;
  outline: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
}

.opening-panel img {
  display: block;
  width: calc(100% + 1px);
  height: calc(100% + 1px);
  margin: -0.5px;
  object-fit: cover;
  border: 0;
  outline: 0;
}

.opening-graphic {
  background: #315efb url("assets/opening/beyaz-simge.png") center / contain no-repeat;
}

/* The opening composition also serves as the static and reduced-motion view. */
.opening-panel[data-panel="living-room"] {
  inset: 0 auto auto 0;
  width: 25%;
  height: 56%;
  opacity: 1;
}

.opening-panel[data-panel="accent-first"] {
  inset: 59% auto auto 0;
  width: 25%;
  height: 41%;
  opacity: 1;
}

.opening-panel[data-panel="entryway"] {
  inset: 0 auto auto 28%;
  width: 39%;
  height: 100%;
  opacity: 1;
}

.opening-panel[data-panel="jersey"] {
  inset: 0 auto auto 70%;
  width: 30%;
  height: 40%;
  opacity: 1;
}

.opening-panel[data-panel="sunset"] {
  inset: 43% auto auto 70%;
  width: 30%;
  height: 57%;
  opacity: 1;
}

@media (max-width: 999px) {
  .opening {
    height: calc(100svh - 80px);
  }
}

@media (max-width: 760px) {
  .opening {
    height: calc(100svh - 72px);
    min-height: 400px;
    max-height: 620px;
    padding: 20px var(--gutter) 28px;
  }

  .opening-track {
    width: min(100cqw, calc(100cqh * 1.2));
    aspect-ratio: 1.2;
  }
}

.opening-panel .opening-full-image {
  object-fit: contain;
  object-position: center;
}

.opening-yellow {
  background: #ffd329;
}

.opening-red {
  background: #e63832;
}
