.showcase {
  margin: 24px 0 30px;
}
.showcase [hidden] { display: none; }

.showcase-picker {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid #d6c9a6;
  border-radius: 13px;
  background: #fffdf6;
}
.showcase-picker button {
  min-width: 0;
  min-height: 44px;
  padding: 4px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.showcase-picker button:hover { background: #fff3bc; }
.showcase-picker button[aria-pressed="true"] { border-color: var(--ink); background: var(--yellow); }
.showcase :is(button, a):focus-visible { outline: 3px solid #643c94; outline-offset: 3px; }

.showcase-scene {
  --stage: #caa8fa;
  --stage-edge: #e3cffa;
  --screen: #e9dafa;
  --tilt: -8deg;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  min-height: 420px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: 4px 5px 0 var(--ink);
  background: #fffdf6;
}
.showcase-scene[data-showcase-scene="fund"] { --stage: #b3dcf3; --stage-edge: #d8edf9; --screen: #dcf1fc; --tilt: 7deg; }
.showcase-scene[data-showcase-scene="budget"] { --stage: #fed43f; --stage-edge: #ffeb91; --screen: var(--paper); --tilt: -6deg; }
.showcase-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 4vw, 52px);
}
.showcase-index { color: #645b49; font-size: .85rem; font-weight: 700; direction: ltr; }
.showcase-copy h3 {
  max-width: 13ch;
  margin: 12px 0 0;
  font-size: clamp(2.35rem, 4.9vw, 4.6rem);
  letter-spacing: -.025em;
  line-height: .99;
}
.showcase .showcase-copy p { max-width: 32ch; margin: 16px 0 22px; line-height: 1.45; }
.showcase-link {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  gap: 18px;
  padding: 8px 15px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--yellow);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.showcase-link:hover { background: #ffe581; }
.showcase-link span { font-family: Arial, sans-serif; font-size: 1.15rem; }

.showcase-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 400px;
  overflow: hidden;
  isolation: isolate;
  border-inline-start: 2px solid var(--ink);
  background:
    radial-gradient(circle at 50% 42%, transparent 5%, var(--stage-edge) 100%),
    radial-gradient(circle, #15101c25 1px, transparent 1.4px) 0 0 / 15px 15px,
    var(--stage);
}
.showcase-type {
  position: absolute;
  top: 4%;
  inset-inline: 0;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px #382e4c68;
  font-size: clamp(5.8rem, 12vw, 11rem);
  font-weight: 900;
  line-height: .9;
  white-space: nowrap;
  user-select: none;
}
.showcase-orbit {
  position: absolute;
  width: 77%;
  height: 47%;
  border: 1px solid #281e3650;
  border-radius: 50%;
  transform: rotate(-24deg);
}
.showcase-spark {
  position: absolute;
  width: 34px;
  inset-inline-start: 12%;
  top: 29%;
  transform: rotate(-12deg);
}

.showcase-device {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: clamp(168px, 21vw, 224px);
  aspect-ratio: .59;
  padding: 22px 10px 12px;
  border: 5px solid var(--ink);
  border-radius: 28px;
  background: #fffaf0;
  box-shadow: 7px 9px 0 #170f23, 15px 23px 25px #271c3740;
  transform: rotate(var(--tilt));
}
.showcase-device::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 25%;
  height: 7px;
  border-radius: 10px;
  background: var(--ink);
  transform: translateX(-50%);
}
.showcase-device-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: .68rem;
  font-weight: 700;
}
.showcase-device-top img { display: block; width: 34px; }
.showcase-device-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.1;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: var(--screen);
}
.showcase-device-art img { width: 90%; height: auto; aspect-ratio: 1; object-fit: contain; }
.showcase-device > strong { font-size: clamp(.88rem, 1.35vw, 1.12rem); line-height: 1.1; }
.showcase-device-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.showcase-device-options span { padding: 3px 5px; border: 1px solid var(--ink); border-radius: 5px; font-size: .64rem; line-height: 1.12; }
.showcase-device-options .is-highlight { background: var(--yellow); font-weight: 700; }
.showcase-device-caption { color: #554a36; font-size: .63rem; }
.showcase-budget-phone {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(130px, 17vw, 185px);
  height: auto;
  aspect-ratio: 581 / 1228;
  filter: drop-shadow(11px 15px 11px #30291645);
  transform: rotate(var(--tilt));
}
.showcase-sticker {
  position: absolute;
  z-index: 2;
  inset-inline-start: 9%;
  bottom: 16%;
  padding: 9px 12px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(9deg);
  font-size: clamp(.75rem, 1.45vw, 1.1rem);
  font-weight: 900;
  line-height: 1.04;
}
[data-showcase-scene="budget"] .showcase-sticker { background: #e5d0fa; }

.showcase-coins { position: absolute; inset: 0; pointer-events: none; }
.showcase-coin {
  --coin-size: clamp(30px, 6.5vw, 68px);
  --coin-turn: -30deg;
  --coin-x: -38px;
  --coin-y: -80px;
  --coin-delay: 70ms;
  position: absolute;
  top: 17%;
  left: 18%;
  display: grid;
  place-items: center;
  width: var(--coin-size);
  height: var(--coin-size);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fed43f;
  box-shadow: 4px 5px 0 #ac680e, 5px 6px 0 var(--ink);
  font-size: calc(var(--coin-size) * .44);
  font-weight: 900;
  transform: rotate(var(--coin-turn)) scaleX(.82);
}
.showcase-coin::before {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px solid #8d590f;
  border-radius: 50%;
}
.showcase-coin:nth-child(2) {
  --coin-size: clamp(38px, 7.5vw, 79px);
  --coin-turn: 29deg;
  --coin-x: 48px;
  --coin-y: -115px;
  --coin-delay: 140ms;
  top: 51%;
  right: 11%;
  left: auto;
}
.showcase-coin:nth-child(3) {
  --coin-size: clamp(23px, 4.8vw, 48px);
  --coin-turn: -14deg;
  --coin-x: -70px;
  --coin-y: -96px;
  --coin-delay: 240ms;
  top: 75%;
  left: 16%;
}

@media (prefers-reduced-motion: no-preference) {
  .showcase-in-view .showcase-visual { animation: showcase-color 480ms ease-out both; }
  .showcase-in-view :is(.showcase-device, .showcase-budget-phone) { animation: showcase-phone 660ms cubic-bezier(.23,.82,.3,1) both; }
  .showcase-in-view .showcase-coin { animation: showcase-coin 790ms var(--coin-delay) cubic-bezier(.18,.65,.32,1) both; }
}
@keyframes showcase-color {
  from { clip-path: inset(0 10% 0 0 round 12px); }
  to { clip-path: inset(0 round 0); }
}
@keyframes showcase-phone {
  from { opacity: 0; transform: translateY(22px) scale(.88) rotate(calc(var(--tilt) + 11deg)); }
  70% { opacity: 1; transform: translateY(-4px) scale(1.02) rotate(calc(var(--tilt) - 2deg)); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--tilt)); }
}
@keyframes showcase-coin {
  from { opacity: 0; transform: translate(var(--coin-x), var(--coin-y)) rotate(calc(var(--coin-turn) - 210deg)) scale(.38, .65); }
  63% { opacity: 1; transform: translate(0, 9px) rotate(calc(var(--coin-turn) + 12deg)) scale(.93, 1.05); }
  82% { transform: translate(0, -4px) rotate(calc(var(--coin-turn) - 5deg)) scale(.78, .98); }
  to { transform: translate(0, 0) rotate(var(--coin-turn)) scaleX(.82); }
}

@media (max-width: 700px) {
  .showcase { margin-block: 17px 22px; }
  .showcase-picker { width: 100%; }
  .showcase-picker button { flex: 1 1 auto; padding-inline: 5px; }
  .showcase-scene { grid-template-columns: 1fr; min-height: 0; border-radius: 17px; }
  .showcase-copy { padding: 16px; }
  .showcase-index, .showcase-break { display: none; }
  .showcase-copy h3 { max-width: none; margin: 0; font-size: clamp(1.8rem, 7.4vw, 2.6rem); line-height: 1.04; }
  .showcase .showcase-copy p { max-width: 36ch; margin: 8px 0 12px; font-size: .94rem; }
  .showcase-link { width: 100%; }
  .showcase-visual { min-height: clamp(265px, 78vw, 340px); border-inline-start: 0; border-top: 2px solid var(--ink); }
  .showcase-type { top: 9%; font-size: clamp(4.5rem, 22vw, 8rem); }
  .showcase-device { width: 144px; gap: 7px; padding: 19px 8px 8px; border-width: 4px; border-radius: 22px; }
  .showcase-budget-phone { width: 115px; }
  .showcase-spark { width: 24px; }
}
