/* Audio Magic Lab: opus (loaded only where used; split from components/demos in task 0056). */

.opus { overflow-x: hidden; overflow-x: clip; overflow-y: visible; }
.opus__room {
  position: relative; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 230px); gap: clamp(16px, 3vw, 44px); align-items: end;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.opus__scene { position: relative; aspect-ratio: 1280 / 1024; width: 100%; }
.opus__base { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none;
  filter: drop-shadow(0 40px 40px rgba(40, 24, 10, .22)); }
.opus__tv { position: absolute; left: 14.06%; right: 14.22%; top: 5.47%; bottom: 43.46%; overflow: hidden; background: #000; border-radius: .2%; }
.opus__ui { position: absolute; inset: 0; container-type: size; }
.opus__belt { position: absolute; left: 13.57%; width: 72.8%; top: 59%; height: 9%; display: flex; gap: .151%; }
.opus__fin {
  position: relative; flex: 1 1 0; border-radius: 1px;
  background: #b18a62 url("../assets/images/opus-one/layers/fin-wood.png") 50% 50% / 200% 100% repeat-y;
  transform: perspective(300px) rotateY(var(--a, 0deg));
  backface-visibility: visible;
  will-change: transform;
}
.opus__fin i { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(to right, transparent 50%, #000 100%); }
.opus__fin i.is-neg { background: linear-gradient(to left, transparent 50%, #000 100%); }
.opus__remote { display: flex; flex-direction: column; align-items: center; padding-bottom: 6%; }
.opus__readout { text-align: center; }
.opus__fallback { display: none; max-width: 960px; margin: 0 auto; }
html:not(.js) .opus__room { display: none; }
html:not(.js) .opus__fallback { display: block; }
@media (max-width: 760px) {
  .opus__room { grid-template-columns: 1fr; justify-items: center; }
  .opus__scene { margin-inline: calc(var(--gutter) * -1 + 4px); width: calc(100% + var(--gutter) * 2 - 8px); }
}
.cf__bloom { position: absolute; inset: -25%; background: center / cover no-repeat; filter: blur(7.9cqw) saturate(1.35) brightness(.55);
  opacity: 0; transform: scale(1.4); transition: opacity .6s cubic-bezier(.22, .61, .36, 1); animation: cf-drift 22s ease-in-out infinite alternate; }
.cf__bloom.is-on { opacity: .55; }
@keyframes cf-drift { to { transform: scale(1.5) translate(2%, -1%); } }
.cf__track { position: absolute; inset: 0; perspective: 132cqw; transform-style: preserve-3d; }
.cf__tile { position: absolute; left: 50%; top: 44%; width: 24.2cqw; height: 24.2cqw;
  background: #111 center / cover no-repeat; transform-style: preserve-3d;
  transition: transform 320ms cubic-bezier(.3, .8, .4, 1), opacity 360ms ease, filter 200ms ease; will-change: transform; }
.cf__tile.is-active { box-shadow: 0 2cqw 6.6cqw rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .05), 0 0 8.8cqw rgba(120, 200, 255, .22), 0 0 3cqw rgba(255, 255, 255, .1); }
.cf__reflect { position: absolute; left: 50%; top: 70.5%; width: 24.2cqw; height: 24.2cqw; transform: translateX(-50%) scaleY(-1); opacity: .18; filter: blur(.7cqw);
  background: center / cover no-repeat; -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .65), transparent 65%); mask-image: linear-gradient(to top, rgba(0, 0, 0, .65), transparent 65%); }
.cf__artist { position: absolute; left: 0; right: 0; bottom: 7.4%; text-align: center; font-size: 1.5cqw; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .78); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.cf__artist.is-flip { animation: cf-flip 380ms cubic-bezier(.16, 1, .3, 1); }
@keyframes cf-flip { from { opacity: 0; transform: translateY(.9cqw); letter-spacing: .32em; filter: blur(2px); } }
.cf__np { position: absolute; left: 50%; top: 4.6%; transform: translate(-50%, -30%); max-width: 57cqw; padding: .9cqw 2.4cqw; text-align: center;
  background: rgba(12, 16, 24, .5); border-block: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .96); opacity: 0; transition: opacity .4s ease, transform .4s var(--ease); }
.cf__np b { display: block; font-size: 1.6cqw; font-weight: 600; }
.cf__np span { display: block; font-size: 1.2cqw; opacity: .7; margin-top: .2cqw; }
.opus.is-playing .cf__np { opacity: 1; transform: translate(-50%, 0); }

.opus__fin u { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transform-origin: left center; transform: scaleX(0); pointer-events: none;
  background: linear-gradient(90deg, #F2DEBE, #E2C79F 70%, rgba(226, 199, 159, 0)); border-radius: inherit; }
.opus__fin u.is-neg { transform-origin: right center; left: auto; right: 0; background: linear-gradient(270deg, #F2DEBE, #E2C79F 70%, rgba(226, 199, 159, 0)); }
@media (min-width: 761px) {
  .opus__room { grid-template-columns: minmax(0, 1fr) 210px; gap: 0; }
  .opus__remote { margin-left: max(-9vw, -130px); padding-bottom: 7%; align-self: end; }
}
@media (max-width: 760px) { .opus__remote { margin-top: calc(-1 * var(--s-3)); --block: min(200px, 52vw); } .opus__readout { margin-top: var(--s-3); } }
.opus__readout { margin-top: var(--s-4); font: 500 var(--fs-small)/1.4 var(--sans); letter-spacing: .04em; text-transform: none; color: var(--ink-strong); min-height: 1.4em; }
.opus__guide { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: 6px; width: 100%; max-width: 200px; }
.opus__guide li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; font: 400 12.5px/1.3 var(--sans); color: var(--ink-soft); }
.opus__guide b { font-weight: 500; color: var(--ink-body); }
.opus__guide li.is-on { background: rgba(255, 255, 255, .55); color: var(--ink-strong); box-shadow: inset 0 0 0 1px var(--line); }
.opus__guide li.is-on b { color: var(--burgundy); }
.opus__scene::before { content: ''; position: absolute; left: 0; right: 0; top: 30%; height: 80%; z-index: -1; pointer-events: none; opacity: .24;
  background: radial-gradient(50% 45% at 50% 55%, rgba(255, 206, 160, .8), rgba(255, 214, 184, 0) 70%); }
.opus__scene::after { content: ''; position: absolute; left: 35%; width: 28%; top: 93.6%; height: 4.5%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(40, 24, 10, .34), rgba(40, 24, 10, 0)); }
.opus__block::after { content: ''; position: absolute; left: 50%; top: 42%; width: 52%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(110, 31, 46, .38); transform: translate(-50%, -50%) scale(1); opacity: 0; }
.opus:not(.is-used) .opus__block::after { animation: invite 3.6s var(--ease) 1.2s infinite; }
@keyframes invite { 0% { transform: translate(-50%, -50%) scale(1); opacity: .9; } 70%, 100% { transform: translate(-50%, -50%) scale(1.42); opacity: 0; } }
.opus:not(.is-used) .opus__guide li:not(:first-child) { opacity: 0; visibility: hidden; }
.opus:not(.is-used) .opus__guide li:first-child { background: rgba(255, 255, 255, .45); color: var(--ink-strong); box-shadow: inset 0 0 0 1px var(--line); }
.opus:not(.is-used) .opus__guide li:first-child b { color: var(--burgundy); }
.opus__guide li { transition: background .3s var(--ease), color .3s var(--ease), opacity .6s var(--ease); }
.opus__scene { isolation: isolate; }
.opus__floor { position: absolute; left: -18%; right: -18%; top: 95.3%; height: 22%; z-index: -2; pointer-events: none;
  background: radial-gradient(50% 100% at 50% 0%, rgba(150, 112, 84, .2), rgba(150, 112, 84, .07) 45%, rgba(150, 112, 84, 0) 75%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.opus__floor::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, rgba(120, 90, 70, 0), rgba(120, 90, 70, .16), rgba(120, 90, 70, 0)); }
/* the TV's screens, Home and Albums (task 0098, the Dial Interface prototype). Sizes in TV container units (a 908.8px reference screen). */
.opus__ui { background: #000; font-family: var(--sans); }
.os { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateY(40%);
  transition: transform 360ms cubic-bezier(.33, 1, .68, 1), opacity 320ms ease, visibility 0s linear 360ms; }
.os.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.os.is-gone { transform: translateY(-40%); }
.os.is-below { transform: translateY(40%); transition: none; }
.os--home.is-peek { visibility: visible; transform: none; opacity: var(--peek, 0); transition: none; }
.oh__dock { position: absolute; left: 50%; bottom: 6cqw; display: flex; gap: 3.12cqw;
  transform: translate(calc(-50% + var(--rb, 0cqw)), calc(2.64cqw + var(--py, 0cqw))); transition: transform 260ms cubic-bezier(.18, .8, .35, 1); }
.os--home.is-peek .oh__dock { --py: calc((1 - var(--peek, 0)) * 24.2cqw); transition: none; }
.oh__item { position: relative; width: 6cqw; aspect-ratio: 1; border-radius: 50%; background: rgba(15, 20, 30, .65); display: grid; place-items: center;
  opacity: .85; filter: brightness(.9); transform: translateY(var(--y, 0cqw)) scale(.9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 1.3cqw 3cqw rgba(0, 0, 0, .35);
  transition: transform 420ms cubic-bezier(.33, 1, .68, 1), opacity 200ms ease, filter 200ms ease, box-shadow 200ms ease; }
.oh__item img { width: 66%; height: 66%; object-fit: contain; filter: drop-shadow(0 1.1cqw 2.2cqw rgba(0, 0, 0, .32)); }
.oh__item.is-on { opacity: 1; filter: brightness(1.05); transform: translateY(var(--y, 0cqw)) scale(1.04); }
.oh__item.is-on img { filter: drop-shadow(0 1.5cqw 3.7cqw rgba(90, 215, 255, .45)); }
.os--home.is-press .oh__item.is-on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 2.4cqw 4.6cqw rgba(90, 215, 255, .55); filter: saturate(1.12) brightness(1.12); }
.oh__item b { position: absolute; left: 50%; top: calc(100% + 1cqw); transform: translateX(-50%); font-size: max(1.1cqw, 6px); font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255, 255, 255, .86); text-shadow: 0 2px 14px rgba(0, 0, 0, .85); white-space: nowrap; opacity: 0; transition: opacity 200ms ease; }
.os--home.is-present .oh__item.is-on b { opacity: .49; }
.os--home:not(.is-present) .oh__item { --y: 11cqw; }
.oh__dock.is-low .oh__item { --y: 24.2cqw; transition: none; }
.oh__try { position: absolute; left: 50%; bottom: calc(100% + .4cqw); display: flex; flex-direction: column; align-items: center; gap: .3cqw;
  font-style: normal; font-size: max(1.4cqw, 8px); font-weight: 500; letter-spacing: .04em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); white-space: nowrap;
  opacity: 0; transform: translate(-30%, 1cqw); transition: opacity 300ms ease, transform 420ms cubic-bezier(.33, 1, .68, 1); pointer-events: none; }
.oh__try svg { width: max(1.9cqw, 9px); height: max(3.2cqw, 15px); margin-right: 30%; fill: none; stroke: rgba(90, 215, 255, .95); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 .6cqw rgba(90, 215, 255, .5)); }
.oh__try.is-on { opacity: 1; transform: translate(-30%, 0); }
.oh__try.is-on svg { animation: oh-try 1.1s ease-in-out infinite alternate; }
@keyframes oh-try { to { transform: translateY(.5cqw); } }
@media (prefers-reduced-motion: reduce) { .oh__try.is-on svg { animation: none; } }
.os--albums { transition-property: transform, opacity, visibility, filter; }
.cf__track, .cf__artist, .cf__reflect, .cf__menu { translate: 0 calc(var(--lift, 0) * -17.6cqw); transition: translate .3s var(--ease); }
.opus.is-turning .cf__track, .opus.is-turning .cf__artist, .opus.is-turning .cf__reflect { transition: none; }
.cf__menu { position: absolute; left: 50%; top: 44%; z-index: 3; transform: translate(-50%, -50%) translateY(-3.3cqw); text-align: center; pointer-events: none;
  color: rgba(255, 255, 255, .9); font-size: 5.3cqw; letter-spacing: .12em; text-transform: uppercase; line-height: 1.05; text-shadow: 0 4px 12px rgba(0, 0, 0, .85);
  opacity: 0; transition: opacity 140ms cubic-bezier(.16, 1, .3, 1); }
.cf__menu span { display: block; white-space: pre-line; font-size: 40%; opacity: .4; transition: opacity 160ms ease; }
.cf__menu span.is-on { opacity: 1; color: #fff; }
.cf__menu em { display: block; font-style: normal; font-size: 140%; letter-spacing: .22em; }
.opus.is-menu .cf__menu { opacity: .95; }
.opus.is-menu .cf__tile:not(.is-active) { opacity: 0 !important; }
.opus.is-menu .cf__artist, .opus.is-menu .cf__reflect { opacity: 0; }
.opus.is-menu .cf__bloom.is-on { opacity: .18; }

/* the soundbar in 3D (opusbar3d.js): the model takes the image's place; the TV and the belt are laid over it */
.opus__bar { position: absolute; top: 0; left: -15%; width: 130%; height: 100%; z-index: -1; pointer-events: none; }   /* SIDE in opusbar3d.js */
/* while the 3D loads (opus-one.html's head script), the soundbar and the remote wait unseen, then fade in as 3D or,
   if it can't load, as the images: never the images first. The readout and guide go as in 3D, so nothing jumps */
.opus__scene, .opus__remote { transition: opacity .35s ease; }
.wait-bar-3d .opus__scene, .wait-remote-3d .opus__remote { opacity: 0; transition: none; }
.wait-remote-3d :is(.opus__readout, .opus__guide) { display: none; }
.opus.is-bar-3d .opus__base { visibility: hidden; }
.opus.is-bar-3d .opus__belt, .opus.is-bar-3d .opus__floor { visibility: hidden; }
.opus.is-bar-3d .opus__scene::before, .opus.is-bar-3d .opus__scene::after { content: none; }   /* the image's backlight and plinth shadow: the model is lit and casts its own */
