[data-case-showcase] {
  --showcase-ink: #241b2e;
  --showcase-paper: #fbf7f2;
  --showcase-line: #b8aab74d;
  --showcase-accent: #d5beff;
  --showcase-ease: cubic-bezier(.2, .75, .25, 1);
  color: var(--showcase-ink);
}

.feature-work .showcase-directory {
  min-height: 45px;
  border-color: #855c9590;
  color: #382343;
}

.feature-work .showcase-directory:hover { background: #ede3f3; border-color: #68478c; }

.showcase-controls { display: none; }

[data-showcase-ready] .showcase-controls {
  display: flex;
  gap: 0;
  margin-bottom: 17px;
  border-block: 1px solid var(--showcase-line);
}

.showcase-controls [data-showcase-select] {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 51px;
  padding: 11px clamp(10px, 1.8vw, 25px);
  border: 0;
  border-inline-end: 1px solid var(--showcase-line);
  background: transparent;
  color: #65576a;
  text-align: start;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: background-color .25s, color .25s;
}

.showcase-controls [data-showcase-select]:last-child { border-inline-end: 0; }

[data-showcase-ready] .showcase-controls { position: relative; }
.showcase-controls::after {
  position: absolute; z-index: 1; top: 0; left: 0; height: 2px; width: var(--tab-width, 0);
  transform: translate(var(--tab-x, 0), var(--tab-y, 0)); background: #74568a;
  pointer-events: none; content: ""; transition: transform .46s var(--showcase-ease), width .46s var(--showcase-ease);
}

.showcase-controls [data-showcase-select]:hover,
.showcase-controls [data-showcase-select]:focus-visible { color: var(--showcase-ink); background: #f9f3ed; }
.showcase-controls [data-showcase-select][aria-selected="true"] { color: var(--showcase-ink); background: #ede3f3; }
.showcase-controls [data-showcase-select]:focus-visible { z-index: 1; outline-offset: -3px; }

.showcase-frame {
  position: relative; isolation: isolate;
  overflow: hidden;
  border: 1px solid #382841;
  border-radius: clamp(16px, 2vw, 26px);
  background: var(--showcase-ink);
  box-shadow: 0 23px 48px -34px #25142fc4;
  color: var(--showcase-paper);
}

.showcase-panel {
  position: relative; z-index: 1; background: var(--showcase-ink);
  display: grid;
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  min-height: clamp(403px, 39vw, 516px);
}

.showcase-panel[data-showcase-exit] {
  position: absolute; z-index: 0; inset: 0; pointer-events: none;
}
.showcase-art { touch-action: pan-y pinch-zoom; }

.showcase-copy {
  align-self: center;
  min-width: 0;
  padding: clamp(26px, 4vw, 58px) clamp(25px, 3.8vw, 54px);
}

.showcase-meta {
  margin-bottom: 13px;
  color: #e0cfff;
  font-size: 12px;
  font-weight: 670;
  line-height: 1.55;
  letter-spacing: .085em;
}

.showcase-copy h3 {
  color: var(--showcase-paper);
  font-size: clamp(28px, 3.25vw, 48px);
  font-weight: 680;
  line-height: 1.14;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.showcase-summary {
  margin-top: 15px;
  max-width: 38ch;
  color: #dad1df;
  font-size: clamp(14px, 1.24vw, 17px);
  line-height: 1.7;
  text-wrap: pretty;
}

.showcase-proof {
  display: grid;
  grid-template-columns: fit-content(6em) minmax(0, 1fr);
  margin-top: 22px;
  border-top: 1px solid #e9dafa31;
  font-size: clamp(12px, 1.07vw, 14px);
  line-height: 1.55;
}

.showcase-proof > div { display: contents; }
.showcase-proof :is(dt, dd) { padding-block: 9px; border-bottom: 1px solid #e9dafa31; }
.showcase-proof dt { padding-inline-end: min(2.1vw, 19px); color: #bdb0cb; overflow-wrap: anywhere; }
.showcase-proof dd { color: var(--showcase-paper); }

.showcase-link {
  display: inline-flex;
  align-items: center;
  min-height: 43px;
  margin-top: 24px;
  padding: 0 17px;
  border: 1px solid #b696d46f;
  border-radius: var(--control-radius);
  color: var(--showcase-paper);
  font-size: 13px;
  font-weight: 670;
  transition: background-color .25s, color .25s, border-color .25s;
}

.showcase-link:hover { border-color: var(--showcase-accent); background: var(--showcase-accent); color: var(--showcase-ink); }

.showcase-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background-color: #dcd0ef;
  perspective: 1050px;
}

.showcase-art::before,
.showcase-art::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.showcase-art::before {
  z-index: -1;
  background:
    linear-gradient(0deg, #241b2e26, transparent 42%),
    linear-gradient(156deg, #fff5, #fff0 42%),
    repeating-linear-gradient(0deg, #3325490e 0 1px, transparent 1px 27px),
    repeating-linear-gradient(90deg, #3325490e 0 1px, transparent 1px 27px);
  mask-image: linear-gradient(111deg, #000b, #0007 46%, #000e);
}

.showcase-art::after {
  background: radial-gradient(ellipse at var(--showcase-light-x, 50%) var(--showcase-light-y, 48%), #fff8, transparent 62%);
  mix-blend-mode: soft-light;
}

.showcase-art img {
  width: 86%;
  height: 88%;
  max-height: 435px;
  object-fit: contain;
  filter: drop-shadow(0 24px 21px #23163345);
  transform: translate3d(calc(var(--showcase-x, 0) * 12px), calc(var(--showcase-y, 0) * 8px), 0)
    rotateX(calc(var(--showcase-y, 0) * -3deg)) rotateY(calc(var(--showcase-x, 0) * 4deg));
  transition: transform .32s var(--showcase-ease);
}

.showcase-panel[data-showcase-enter="forward"] { --showcase-shift: 6%; }
.showcase-panel[data-showcase-enter="backward"] { --showcase-shift: -6%; }
@media (prefers-reduced-motion: no-preference) {
  .showcase-panel[data-showcase-enter] .showcase-art img { animation: projector-image .68s var(--showcase-ease) backwards; }
  .showcase-panel[data-showcase-enter] .showcase-copy > * { animation: projector-type .54s var(--showcase-ease) backwards; }
  .showcase-panel[data-showcase-enter] .showcase-proof { animation-delay: .08s; }
  .showcase-panel[data-showcase-enter] .showcase-link { animation-delay: .1s; }
}
@keyframes projector-image { from { translate: var(--showcase-shift) 0; scale: 1.09; } }
@keyframes projector-type { from { translate: 0 14px; opacity: .34; } }

@media (max-width: 740px) {
  .showcase-panel { grid-template-columns: minmax(0, 1fr); }
  .showcase-art { grid-row: 1; min-height: 0; aspect-ratio: 1.34; }
  .showcase-art img { width: 88%; height: 88%; max-height: none; }
  .showcase-copy { width: 100%; padding: 25px clamp(18px, 4.2vw, 31px) 29px; }
  .showcase-meta { margin-bottom: 9px; }
  .showcase-summary { margin-top: 11px; }
  .showcase-proof { margin-top: 17px; }
  .showcase-proof dt { padding-inline-end: 11px; }
  .showcase-link { margin-top: 20px; }
}

@media (max-width: 540px) {
  .feature-work .showcase-directory { margin-top: 15px; }
}

@media (max-width: 510px) {
  [data-showcase-ready] .showcase-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 13px; border: 0; }
  .showcase-controls [data-showcase-select] { min-height: 44px; border: 1px solid var(--showcase-line); border-inline-end: 0; border-bottom: 0; }
  .showcase-controls [data-showcase-select]:nth-child(2n),
  .showcase-controls [data-showcase-select]:last-child { border-inline-end: 1px solid var(--showcase-line); }
  .showcase-controls [data-showcase-select]:nth-last-child(-n + 2) { border-bottom: 1px solid var(--showcase-line); }
}

@media (prefers-reduced-motion: reduce) {
  [data-case-showcase] *, .showcase-controls::after { transition: none; }
  .showcase-art img { transform: none; }
}
