.showcase {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin: 0 auto;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: center;
  padding: calc(var(--bar-h) + 16px) 0 32px;
}

.section-head--side { justify-items: start; text-align: left; gap: 10px; }
.section-head--side h2 { font-size: clamp(2rem, 3.4vw, 3rem); max-width: 12ch; }
.section-head--side .section-lede { font-size: .98rem; }

.showcase__side { display: grid; align-content: center; gap: 22px; }

.devtabs {
  position: relative;
  display: flex;
  width: 100%;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 21, 23, .6);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
.devtabs button {
  position: relative; z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: .9rem; color: var(--dim);
  transition: color .3s;
}
.devtabs button:hover { color: var(--text); }
.devtabs button[aria-selected="true"] { color: var(--void); font-weight: 600; }
.devtabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.devtabs__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(calc(var(--tab, 0) * 100%));
  transition: transform .55s var(--ease-spring);
}

.showcase__layout {
  display: grid;
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}

.showcase__note { max-width: 40ch; font-size: .86rem; line-height: 1.5; color: var(--dim); }

.showcase__chips { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.chip {
  position: relative;
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: 13px;
  color: var(--dim);
  text-align: left;
  font-size: .86rem;
  overflow: hidden;
  transition: color .25s, background .25s, box-shadow .25s;
}
.chip:hover { color: var(--text); background: var(--surface); }
.chip[aria-pressed="true"] { color: var(--text); background: var(--surface-3); }
.chip__icon { width: 18px; height: 18px; flex: none; color: var(--faint); transition: color .25s; }
.chip[aria-pressed="true"] .chip__icon { color: var(--text); }
.chip__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chip__label { white-space: nowrap; }
.chips-label { grid-column: 1 / -1; margin: .6rem 0 .1rem .2rem; font-size: .78rem; color: var(--faint); }
.chip__progress {
  position: absolute; left: 14px; right: 14px; bottom: 3px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  opacity: 0;
}
.chip[data-playing] .chip__progress { opacity: .9; animation: chip-progress var(--autoplay, 6s) linear both; }
@keyframes chip-progress { to { transform: scaleX(1); } }

.showcase__stage {
  --stage-h: min(calc(100svh - var(--bar-h) - 5rem), 46rem);
  position: relative;
  height: var(--stage-h);
  display: grid; place-items: center;
}

.device {
  position: relative;
  margin: 0;
  width: min(100%, calc((var(--stage-h) - 28px) * var(--ratio, 1.6)));
  aspect-ratio: var(--ratio, 1.6);
}
.device__frame {
  position: absolute; inset: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #0c0d0f;
  border: 1px solid var(--line-strong);
  box-shadow: 0 50px 110px -40px rgba(0, 0, 0, .95);
}
.device[data-kind="tablet"] .device__frame {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 0 0 9px #111214, 0 0 0 10px var(--line-strong), 0 50px 110px -40px rgba(0, 0, 0, .95);
}
.device[data-kind="phone"] .device__frame {
  border: 0;
  border-radius: 28px;
  box-shadow: 0 0 0 7px #111214, 0 0 0 8px var(--line-strong), 0 50px 110px -40px rgba(0, 0, 0, .95);
}
.device[data-kind="phone"][data-orient="land"] .device__frame { border-radius: 24px; }
.device[data-kind="tv"] { margin-bottom: 26px; }
.device[data-kind="tv"] .device__frame {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 0 0 6px #0d0e10, 0 0 0 7px var(--line-strong), 0 50px 110px -40px rgba(0, 0, 0, .95);
}
.device[data-kind="tv"]::after {
  content: '';
  position: absolute; left: 50%; top: calc(100% + 7px);
  width: 22%; height: 18px;
  translate: -50% 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(#141518, #0b0c0e);
  border: 1px solid var(--line-strong); border-top: 0;
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}
.device > .device__frame { z-index: 1; }
.device[data-paired] {
  width: min(100% / 1.6, calc((var(--stage-h) - 28px) * var(--ratio, 1.6)));
  translate: -28% 0;
}
.device__mate {
  position: absolute; left: 0; top: 50%; z-index: 0;
  width: 100%;
  aspect-ratio: var(--mate-ratio, var(--ratio, 1.6));
  opacity: 0;
  pointer-events: none;
  transform: translate(20%, -50%) scale(.86);
  transition: transform .7s var(--ease-out), opacity .45s var(--ease);
}
.device[data-paired] .device__mate {
  opacity: 1;
  pointer-events: auto;
  transform: translate(62%, -50%) rotate(6deg) scale(.92);
}
.device__screen { position: absolute; inset: 0; }
.device__shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.device__shot[data-in] { opacity: 1; }

.device__glow {
  position: absolute; inset: -7%; z-index: -1;
  opacity: .35;
  filter: blur(46px) saturate(1.1) brightness(1.2);
  transition: opacity .6s var(--ease), inset .6s var(--ease);
}
.device__glow img { width: 100%; height: 100%; object-fit: cover; }
.device[data-ambient] .device__glow { opacity: .8; inset: -13%; filter: blur(46px) saturate(1.8); }

.device__spots { position: absolute; inset: 0; }
.spot {
  position: absolute;
  left: var(--sx); top: var(--sy);
  width: 30px; height: 30px;
  margin: -15px 0 0 -15px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.spot::before {
  content: '';
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .28), 0 0 16px 4px rgba(255, 255, 255, .45);
  transition: transform .3s var(--ease-spring);
}
.spot::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .7);
  animation: spot-ping 2.6s var(--ease-out) infinite;
}
.spot:hover::before, .spot[aria-expanded]::before { transform: scale(1.35); }
.spot[aria-expanded]::after { animation-duration: 1.4s; }
@keyframes spot-ping { from { transform: scale(.45); opacity: .95; } to { transform: scale(1.9); opacity: 0; } }

.spot-pop {
  position: absolute; left: 0; top: 0; z-index: 5;
  width: max-content; max-width: min(270px, 78%);
  padding: 12px 15px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(24, 25, 27, .94);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, .95);
  transform: translate(var(--x, 0), var(--y, 0));
  pointer-events: none;
  animation: pop-in .35s var(--ease-spring);
}
.spot-pop[hidden] { display: none; }
.spot-pop strong { display: block; font-size: .95rem; letter-spacing: -.01em; }
.spot-pop span { display: block; margin-top: 3px; font-size: .84rem; line-height: 1.42; color: var(--dim); }
@keyframes pop-in { from { opacity: 0; scale: .94; } }

@media (min-width: 901px) and (max-height: 760px) {
  .section-head--side .section-lede { display: none; }
}

@media (max-width: 900px) {
  .showcase { min-height: 0; padding: clamp(56px, 9vh, 96px) 0 24px; }
  .showcase__layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .showcase__side { display: contents; }
  .section-head--side { justify-items: center; text-align: center; order: 1; }
  .section-head--side h2 { max-width: 16ch; }
  .devtabs { order: 2; width: max-content; max-width: 100%; justify-self: center; }
  .showcase__note { order: 2; justify-self: center; text-align: center; }
  .devtabs button { min-width: 112px; padding: 9px 14px; }
  .showcase__stage { order: 3; }
  .showcase__chips {
    order: 4;
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    margin: 0 calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .showcase__chips::-webkit-scrollbar { display: none; }
  .showcase__chips li { flex: none; scroll-snap-align: center; }
  .chip { width: auto; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); }
  .chip[aria-pressed="true"] { border-color: transparent; }
  .chip__progress { left: 16px; right: 16px; bottom: 2px; }
  .showcase__stage { --stage-h: min(66vh, 600px); }
  .showcase__stage[data-kind="desktop"] { --stage-h: calc((100vw - var(--gutter) * 2) / 1.18); }
  .showcase__stage[data-kind="tablet"] { --stage-h: calc((100vw - var(--gutter) * 2) / 1.45); }
  .showcase__stage[data-kind="tv"] { --stage-h: calc((100vw - var(--gutter) * 2) / 1.6); }
  .spot { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}

@media (max-width: 480px) {
  .devtabs { width: 100%; }
  .devtabs button { min-width: 0; padding: 9px 8px; gap: 6px; font-size: .84rem; }
  .devtabs svg { width: 16px; height: 16px; }
}

@media (max-width: 420px) {
  .devtabs button { padding: 9px 4px; font-size: .78rem; }
  .devtabs svg { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spot::after { animation: none; opacity: 0; }
}
