/* Specimen Shelf (v03): the landing. Shelves, the plinth and the jar held up to the light. */

.shelves { position: relative; }

.jar {
  position: relative;
  display: block;
  width: var(--jw);
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.jar--empty { cursor: default; }
.jar .jar-art { transition: transform .35s cubic-bezier(.3, .7, .3, 1); }
@media (hover: hover) and (pointer: fine) {
  .jar:hover .jar-art { transform: translateY(-2.4%); }
  .jar:hover .label { transform: rotate(0deg); }
  .jar--empty:hover .jar-art { transform: none; }
}
.jar:focus-visible .jar-art {
  outline: 2px solid #fff7df;
  outline-offset: 2px;
  border-radius: 10px;
  box-shadow: 0 0 0 5px rgba(42, 24, 8, .55);
}

/* The jar that has been lifted leaves a ring in the dust. */
.slot.is-out .jar-art { visibility: hidden; }
.slot.is-out .jar::after {
  content: "";
  position: absolute;
  left: 22%; right: 22%;
  bottom: 4.6%;
  height: 3.2%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 238, 205, .5), 0 0 10px rgba(255, 230, 190, .35);
}

.shelf.is-idle .j-spec,
.shelf.is-idle .q-dot,
.shelf.is-idle .j-bub i,
.shelf.is-idle .j-sweep::before { animation-play-state: paused; }

.plinth {
  position: relative;
  z-index: 2;
  margin: 0 calc(-1 * var(--post) - var(--over));
  padding: 20px 16px 26px;
  text-align: center;
  background:
    repeating-linear-gradient(180deg, rgba(255, 210, 160, .04) 0 1px, rgba(0, 0, 0, 0) 1px 5px, rgba(0, 0, 0, .06) 5px 6px, rgba(0, 0, 0, 0) 6px 10px),
    linear-gradient(180deg, #4a2c18, #2a170b 60%, #1a0d05);
  border-top: 5px solid #6a4224;
  box-shadow: inset 0 8px 12px rgba(0, 0, 0, .45);
}
.plinth-plate {
  display: inline-block;
  padding: 3px 14px 2px;
  font: 400 16px/1.4 var(--print);
  letter-spacing: .12em;
  color: #3a2610;
  background: linear-gradient(180deg, #f4dc98, #c3923f 55%, #8a6224);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.plinth-plate:empty { display: none; }

/* ---------- Held up to the light ---------- */

html.is-lifted { overflow: hidden; }

.lift {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: center;
  row-gap: 8px;
  padding: max(14px, env(safe-area-inset-top)) 16px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink);
}
.lift[hidden] { display: none !important; }

.lift-veil {
  position: fixed; inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 90% 80% at var(--cx, 50%) var(--cy, 40%), rgba(38, 22, 8, .62), rgba(10, 6, 2, .93) 72%);
  opacity: 0;
  transition: opacity .45s ease;
}
.lift-light {
  position: fixed;
  left: var(--cx, 50%); top: var(--cy, 40%);
  z-index: 1;
  width: min(118vmin, 1080px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fffdf6 0%, #fdf0d2 18%, rgba(246, 214, 160, .62) 36%, rgba(232, 186, 120, .22) 54%, rgba(232, 186, 120, 0) 70%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.45);
  transition: opacity .5s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}
.lift-bloom {
  position: fixed;
  left: var(--cx, 50%); top: var(--cy, 40%);
  z-index: 9;
  width: 50vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fffef9 0%, #fffaf0 45%, rgba(255, 248, 232, 0) 70%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.2);
}
.lift.is-on .lift-veil { opacity: 1; }
.lift.is-on .lift-light { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.lift.is-opening .lift-bloom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(7);
  transition: opacity .3s ease .12s, transform .62s cubic-bezier(.5, 0, .7, .4) .08s;
}
.lift.is-opening .j-lid {
  transform: translate(10%, -22%) rotate(-24deg);
  opacity: 0;
  transition: transform .5s cubic-bezier(.3, .6, .25, 1), opacity .35s ease .15s;
}

.lift-stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: min(42vh, 400px);
  height: min(42svh, 400px);
  touch-action: pan-y;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.lift-jar {
  grid-area: 1 / 1;
  position: relative;
  width: min(64vw, calc(min(42vh, 400px) * .625));
  width: min(64vw, calc(min(42svh, 400px) * .625));
  transform-origin: 0 0;
}
.lift-tilt { transform-origin: 50% 92%; }
.lift .j-lag { transition: none; }
.lift .j-bub i { animation-duration: calc(var(--bd, 14s) * .45); }

.lift-card {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 460px;
  padding: 20px 20px 16px;
  background:
    radial-gradient(circle at 92% 8%, rgba(168, 118, 52, .12) 0 14px, rgba(168, 118, 52, 0) 20px),
    radial-gradient(circle at 6% 88%, rgba(150, 100, 40, .1) 0 18px, rgba(150, 100, 40, 0) 26px),
    linear-gradient(180deg, #f8f0de, var(--paper-2));
  box-shadow: inset 0 0 0 1px var(--rule), inset 0 0 0 6px rgba(0, 0, 0, 0), inset 0 0 0 7px var(--rule-2), 0 18px 40px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translateY(14px) rotate(-.6deg);
  transition: opacity .4s ease .16s, transform .5s cubic-bezier(.2, .7, .2, 1) .12s;
}
.lift.is-on .lift-card { opacity: 1; transform: rotate(-.6deg); }
.lift-card.is-swap { animation: card-swap .4s ease; }
@keyframes card-swap { 0% { opacity: .2; } 100% { opacity: 1; } }

.lc-no { margin: 0; font-family: var(--hand); font-size: 30px; line-height: 1.1; }
.lc-pre { font-family: var(--print); font-size: 18px; font-variant: small-caps; letter-spacing: .06em; color: var(--ink-2); }
.lc-title {
  margin: 6px 0 2px;
  font-family: var(--print);
  font-weight: 400;
  font-size: clamp(27px, 2.7vw, 40px);
  line-height: 1.08;
  overflow-wrap: break-word;
}
.lc-kind { margin: 0 0 12px; font-family: var(--hand); font-size: 22px; line-height: 1.3; color: var(--ink-2); }
.lc-tag { margin: 0 0 10px; font-style: italic; font-size: 20px; line-height: 1.38; }
.lc-lede { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.lc-tag[hidden], .lc-lede[hidden] { display: none; }

.lc-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.lc-open, .lc-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  font: 400 18px/1.1 var(--print);
  letter-spacing: .05em;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}
.lc-open {
  flex: 1 1 auto;
  color: var(--paper);
  background: linear-gradient(180deg, #3a2716, #22150a);
  border: 1px solid #1a0f06;
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, .18);
}
.lc-open:hover { background: linear-gradient(180deg, #4a321c, #2a1a0c); }
.lc-back {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
}
.lc-back:hover { background: rgba(120, 88, 48, .1); }

.lc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-2);
}
.lc-step {
  min-height: 44px;
  padding: 6px 4px;
  font: 400 16px/1.2 var(--print);
  color: var(--ink-2);
  background: none;
  border: 0;
  cursor: pointer;
}
.lc-step:hover { color: var(--ink); }
.lc-step[hidden] { display: none; }
.lc-count { font-family: var(--hand); font-size: 18px; color: var(--ink-2); }

.lift a:focus-visible, .lift button:focus-visible {
  outline: 2px solid #8a5a1f;
  outline-offset: 3px;
}

@media (min-width: 900px) {
  .lift {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    align-content: center;
    align-items: center;
    column-gap: clamp(28px, 5vw, 90px);
    padding: 5vh 7vw;
  }
  .lift-stage { height: min(80vh, 700px); }
  .lift-jar { width: min(100%, calc(min(80vh, 700px) * .6)); }
  .lift-card { justify-self: start; padding: 28px 30px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .lift-veil, .lift-light, .lift-card { transition: none; }
  .lift-light { transform: translate(-50%, -50%) scale(1); }
  .lift-card.is-swap { animation: none; }
  .lift.is-opening .lift-bloom, .lift.is-opening .j-lid { transition: none; }
}
