/* =========================================================
   layout.css — Wrapper, Panel, Footer
   ========================================================= */

/* Wrapper */
#wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  perspective: 1000px;
  min-height: 100vh;
  padding: 3em;
  width: 100%;
}

@media screen and (max-width: 1280px) {
  #wrapper {
    padding: 1.5em;
  }
}

@media screen and (max-width: 980px) {
  #wrapper {
    padding: 2em;
  }
}

@media screen and (max-width: 736px) {
  #wrapper {
    padding: 1em;
  }
}

/* Panel */
.panel {
  display: flex;
  align-items: stretch;
  justify-content: center;
  transition: opacity var(--duration-nav) ease, transform var(--duration-nav) ease;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.14),
    0 6px 20px rgba(0, 0, 0, 0.07);
  max-width: calc(100vw - 6em);
  width: 86em;
}

.panel > .image {
  transition: transform var(--duration-nav) ease;
  background-color: #777;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 0;
  min-height: 50em;
  width: 50%;
  z-index: 1;
}

.panel > .image img {
  border-radius: 0;
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.panel > .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform var(--duration-nav) ease;
  background-color: var(--color-bg-alt);
  padding: 3em;
  width: 50%;
}

.panel.inactive {
  opacity: 0;
}

.panel.special {
  text-align: center;
}

.panel.special > .content > .inner > :nth-child(n+2):nth-last-child(n+2) {
  margin: 3em 0;
}

.panel.special.inactive {
  transform: translateZ(-2em);
}

.panel.special.inactive > .image,
.panel.special.inactive > .content {
  transform: none;
}

.panel.secondary > .content {
  justify-content: space-between;
}

.panel.secondary > .content > .actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0;
  margin-left: 0;
  margin-top: 0;
  width: 100%;
}

.panel.secondary > .content > .actions li {
  margin: 0;
}

@media screen and (max-width: 1680px) {
  .panel {
    width: 75em;
  }

  .panel > .image {
    min-height: 45em;
  }
}

@media screen and (max-width: 1280px) {
  .panel {
    max-width: calc(100vw - 3em);
  }

  .panel > .image {
    min-height: 35em;
  }

  .panel > .content {
    padding: 3em 2.5em;
  }
}

@media screen and (max-width: 980px) {
  .panel {
    flex-direction: column;
  }

  .panel > .image {
    min-height: 60vh;
    width: 100%;
  }

  .panel > .content {
    display: block;
    padding: 3em;
    width: 100%;
  }
}

@media screen and (max-width: 736px) {
  .panel {
    max-width: calc(100vw - 2em);
    width: 30em;
  }

  .panel > .image {
    min-height: 18em;
    max-height: 30vh;
  }

  .panel > .content {
    padding: 2em;
  }

  .panel.special > .content > .inner > :nth-child(n+2):nth-last-child(n+2) {
    margin: 2em 0;
  }
}

@media screen and (max-width: 480px) {
  .panel > .content {
    padding: 2em 1.5em;
  }
}

@media screen and (max-width: 360px) {
  .panel > .image {
    min-height: 15em;
  }
}

/* Preload animations */
body.is-preload-0 .panel {
  opacity: 0;
}

body.is-preload-0 .panel > .image {
  transform: translateX(4em);
}

body.is-preload-0 .panel > .content {
  transform: translateX(-4em);
}

@media screen and (max-width: 980px) {
  body.is-preload-0 .panel {
    transform: translateZ(-2em);
  }

  body.is-preload-0 .panel > .image,
  body.is-preload-0 .panel > .content {
    transform: none;
  }
}

body.is-preload-1 .panel {
  transition: opacity 2s ease, transform var(--duration-nav) ease;
}

body.is-preload-1 .panel > .image,
body.is-preload-1 .panel > .content {
  transition: transform 1s ease;
}

/* Footer */
#footer {
  transition: opacity var(--duration-nav) ease;
  margin: 3em 0 0 0;
  opacity: 1;
  text-align: center;
}

#footer .copyright {
  color: var(--color-fg-light);
  font-size: 0.8em;
  letter-spacing: var(--letter-spacing-alt);
  margin-bottom: 0;
  text-transform: none;
}

#footer.inactive {
  opacity: 0;
}

@media screen and (max-width: 1680px) {
  #footer {
    margin: 2em 0 0 0;
  }
}

@media screen and (max-width: 1280px) {
  #footer {
    margin: 1.5em 0 0 0;
  }
}

body.is-preload-0 #footer {
  opacity: 0;
}
