.how-visual {
  --set-light: #813bc1;
  --set-fill: #282042;
  --rim: #cbb0fb;
  --studio-duration: 6.8s;
  --play-state: paused;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(ellipse at 18% 1%, color-mix(in srgb, var(--set-light) 60%, transparent), transparent 61%),
    linear-gradient(148deg, var(--set-fill), #0b0b11 74%);
  border-color: #ffffff24;
  color: #f4eff8;
}
.how-visual[data-finish="silver"] { --set-light: #8aabc9; --set-fill: #213540; --rim: #c1dded; }
.how-visual[data-finish="black"] { --set-light: #627b9b; --set-fill: #141e2b; --rim: #8bbec8; }
.how-visual[data-finish="gold"] { --set-light: #ad733c; --set-fill: #3e2424; --rim: #f3bc82; }
.how-visual.is-playing { --play-state: running; }
.studio-header, .studio-finishes { z-index: 1; position: relative; }
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 1.8vw, 24px);
}
#motion-finish { font-size: 11px; letter-spacing: .16em; font-weight: 750; text-transform: uppercase; }
.motion-toggle {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  padding: 0;
  border: 1px solid #ffffff59;
  border-radius: 50%;
  background: #11101977;
}
.motion-toggle:hover { background: #ffffff23; }
.motion-toggle .ui-icon { width: 15px; height: 15px; }
.studio-scene {
  position: absolute;
  inset: 0;
  perspective: 950px;
  overflow: hidden;
  pointer-events: none;
}
.studio-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, transparent 44%, #f6e9fe0a 52%, transparent 56%),
    radial-gradient(ellipse 76% 27% at 57% 80%, color-mix(in srgb, var(--rim) 29%, transparent), transparent 72%);
}
.studio-ground {
  position: absolute;
  left: 24%;
  top: 68%;
  width: 52%;
  height: 10%;
  border-radius: 50%;
  background: #06050a;
  filter: blur(12px);
  animation: studio-shadow var(--studio-duration) ease-in-out infinite;
  animation-play-state: var(--play-state);
}
.studio-card {
  position: absolute;
  top: 47%;
  left: 50%;
  width: 62%;
  max-width: 560px;
  aspect-ratio: 1.586;
  --half-thickness: 1.1px;
  transform-style: preserve-3d;
  container-type: inline-size;
  border-radius: 4.25% / 6.75%;
  box-shadow: -1px 1px 0 var(--rim), -2px 2px 0 #746971, -3px 3px 0 #2c2831, 0 12px 20px #0004;
  animation: studio-orbit var(--studio-duration) ease-in-out infinite;
  animation-play-state: var(--play-state);
}
.studio-card .bm-metal-surface { background-image: var(--metal-large); }
.studio-card .bm-metal-reflection::before {
  animation: studio-light var(--studio-duration) ease-in-out infinite;
  animation-play-state: var(--play-state);
}
.studio-card .bm-gallery-chip::after {
  animation: studio-chip var(--studio-duration) ease-in-out infinite;
  animation-play-state: var(--play-state);
}
.studio-card .bm-gallery-brand b {
  --studio-light-center: 50%;
}
.studio-card .bm-gallery-brand b,
.studio-card .bm-face-mark::before {
  animation: studio-etch var(--studio-duration) ease-in-out infinite;
  animation-play-state: var(--play-state);
}
.studio-finishes {
  display: flex;
  justify-content: center;
  align-self: center;
  gap: 2px;
  margin: 0 8px clamp(12px,1.5vw,20px);
  padding: 3px;
  border: 1px solid #ffffff2a;
  border-radius: 24px;
  background: #101018d9;
}
.studio-finishes button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px clamp(6px, .72vw, 12px);
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 20px;
  color: #c9c6cb;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}
.studio-finishes button::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #fffa, transparent 55%, #0004), var(--swatch);
  border: 1px solid #ffffff57;
}
.studio-finishes button[aria-pressed="true"] { color: white; background: #ffffff18; border-color: #ffffff3b; }
.studio-finishes button:hover { color: white; background: #ffffff12; }
.studio-finishes button:focus-visible { outline-offset: 1px; }
@keyframes studio-orbit {
  0% { transform: translate(-50%,-50%) rotateX(13deg) rotateY(-22deg) rotateZ(-9deg); }
  18% { transform: translate(-49%,-53%) rotateX(3deg) rotateY(8deg) rotateZ(-5deg); }
  43% { transform: translate(-49%,-53%) rotateX(-3deg) rotateY(175deg) rotateZ(3deg); }
  62% { transform: translate(-50%,-51%) rotateX(2deg) rotateY(185deg) rotateZ(3deg); }
  86% { transform: translate(-51%,-48%) rotateX(10deg) rotateY(330deg) rotateZ(-8deg); }
  100% { transform: translate(-50%,-50%) rotateX(13deg) rotateY(338deg) rotateZ(-9deg); }
}
@keyframes studio-light {
  0%, 100% { transform: translate3d(-12%,-4%,0) rotate(-7deg); }
  48% { transform: translate3d(19%,3%,0) rotate(5deg); }
  74% { transform: translate3d(5%,1%,0) rotate(1deg); }
}
@keyframes studio-chip {
  0%, 100% { transform: translateX(-24%); }
  48% { transform: translateX(39%); }
}
@keyframes studio-etch {
  0%, 100% { background-position: 0 0, calc(var(--studio-light-center, 0%) - 12%) center; }
  48% { background-position: 0 0, calc(var(--studio-light-center, 0%) + 19%) center; }
  74% { background-position: 0 0, calc(var(--studio-light-center, 0%) + 5%) center; }
}
@keyframes studio-shadow {
  0%, 100% { transform: translate(-3%,0) scaleX(.95); opacity: .76; }
  48% { transform: translate(5%,3%) scaleX(.84); opacity: .55; }
}
@media (max-width: 730px) {
  .how-visual { aspect-ratio: 1.5; }
  .studio-card { width: 56%; }
}
@media (max-width: 480px) {
  .how-visual { aspect-ratio: 1.22; }
  .studio-card { width: 66%; }
  .studio-header { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .how-visual .studio-card,
  .how-visual .studio-ground,
  .studio-card .bm-gallery-brand b,
  .studio-card .bm-face-mark::before,
  .studio-card .bm-metal-reflection::before,
  .studio-card .bm-gallery-chip::after {
    /* Stay paused by default, but allow the explicit play control to work. */
    animation-duration: var(--studio-duration) !important;
    animation-iteration-count: infinite !important;
  }
}
