/* =========================================================
   ELSEWHERE
   ========================================================= */


/* =========================================================
   INFORMATION BAND
   ========================================================= */

.elsewhere-title-info {
  position: relative;

  /*
    Desktop width is calculated entirely from vertical
    available space by elsewhere.js.
  */

  width: var(--elsewhere-wall-width, 1500px);

  height: 14px;

  margin:
    3px
    auto
    0;
}


/* =========================================================
   LEFT — PROJECT STATEMENT
   ========================================================= */

.elsewhere-title-info__statement {
  position: absolute;

  left: 0;
  top: 0;

  width: 42%;

  margin: 0;

  font-size:
    clamp(
      0.62rem,
      0.59vw,
      0.75rem
    );

  font-weight: 400;

  line-height: 1.3;

  white-space: nowrap;

  opacity: 0.66;
}


/* =========================================================
   CENTRE — PROGRESS
   ========================================================= */

.elsewhere-progress {
  position: absolute;

  left: 50%;
  top: 0;

  margin: 0;

  transform: translateX(-50%);

  color: #000;

  font-size: 0.4rem;
  font-weight: 500;

  line-height: 1;

  letter-spacing: 0.02em;

  text-align: center;
  text-transform: uppercase;

  white-space: nowrap;
}


/* =========================================================
   RIGHT — LOST EXPERIENCE
   ========================================================= */

.elsewhere-title-info__hover {
  position: absolute;

  right: 0;
  top: 0;

  width: 42%;

  min-height: 1.3em;

  margin: 0;

  font-size:
    clamp(
      0.62rem,
      0.6vw,
      0.76rem
    );

  font-weight: 400;

  line-height: 1.3;

  text-align: right;

  white-space: nowrap;
}


/* =========================================================
   WALL AREA
   ========================================================= */

.elsewhere-page {
  width: 100%;

  padding:
    18px
    0
    0;
}


/* =========================================================
   WALL SIZE
   ========================================================= */

.elsewhere-wrap {
  /*
    Width is supplied by JS after measuring
    available VERTICAL space.
  */

  width: var(--elsewhere-wall-width, 1500px);

  margin: 0 auto;
}


/* =========================================================
   9 × 4 GRID
   ========================================================= */

.elsewhere-grid {
  width: 100%;

  display: grid;

  grid-template-columns:
    repeat(9, minmax(0, 1fr));

  gap: 8px;
}


.elsewhere-loading {
  grid-column: 1 / -1;

  margin: 0;

  font-size: 0.72rem;

  text-align: center;
}


/* =========================================================
   TILE
   ========================================================= */

.elsewhere-tile {
  position: relative;

  display: block;

  width: 100%;

  aspect-ratio: 4 / 5;

  margin: 0;
  padding: 0;

  overflow: hidden;

  box-sizing: border-box;
}


/* =========================================================
   UNFINISHED POSITION
   ========================================================= */

.elsewhere-tile--empty {
  background:
    rgba(254, 1, 154, 0.03);

  border:
    2px solid
    rgba(254, 1, 154, 0.26);
}


/* =========================================================
   COMPLETED PORTRAIT
   ========================================================= */

.elsewhere-tile--filled {
  border: 0;

  background: #fff;

  cursor: default;

  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms cubic-bezier(0.22, 1, 0.36, 1);
}


.elsewhere-tile--filled img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}


/* =========================================================
   HOVER
   ========================================================= */

.elsewhere-tile--filled:hover,
.elsewhere-tile--filled:focus-visible {
  z-index: 3;

  transform: scale(1.022);

  box-shadow:
    0 10px 26px
    rgba(0, 0, 0, 0.12);
}


.elsewhere-tile--filled:focus-visible {
  outline:
    1px solid #fe019a;

  outline-offset: 3px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .elsewhere-title-info {
    width: calc(100% - 36px);
    height: auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 12px;
  }


  .elsewhere-title-info__statement,
  .elsewhere-progress,
  .elsewhere-title-info__hover {
    position: static;

    width: min(100%, 520px);

    transform: none;

    text-align: center;

    white-space: normal;
  }


  .elsewhere-page {
    padding-top: 26px;
  }


  .elsewhere-wrap {
    width: calc(100% - 36px);
  }


  .elsewhere-grid {
    grid-template-columns:
      repeat(6, minmax(0, 1fr));

    gap: 9px;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 540px) {

  .elsewhere-title-info {
    width: calc(100% - 28px);
  }


  .elsewhere-wrap {
    width: calc(100% - 28px);
  }


  .elsewhere-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));

    gap: 8px;
  }


  .elsewhere-tile--empty {
    border-width: 1.5px;
  }


  .elsewhere-tile--filled:hover,
  .elsewhere-tile--filled:focus-visible {
    transform: none;

    box-shadow: none;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .elsewhere-tile--filled {
    transition: none;
  }

}
