/* JLVD 3D storefront v1.1 — exact model geometry ported from owner HTML.
   Isolated from the existing header/footer vinyl animation and all other pages. */
.hero-visual.jlvd-vinyl-scene, .vinyl-preview.jlvd-cd-scene { isolation: isolate; }
.hero-visual .jlvd-3d-stage,
.vinyl-preview.jlvd-cd-scene > .jlvd-3d-stage {
  position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0;
  perspective: 3000px; perspective-origin: 50% 50%;
  touch-action: pan-y; user-select: none; overflow: visible;
  z-index: 1; transition: opacity .12s linear;
}
.hero-visual .jlvd-3d-stage { z-index: 2; }
.vinyl-preview.jlvd-cd-scene { display: block; position: relative; }
.jlvd-3d-stage:not(.jlvd-3d-initialized) { opacity: 0; }
.jlvd-3d-stage:focus-visible { outline: 2px solid #d5d5d5; outline-offset: -3px; }
.jlvd-3d-assembly {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px;
  transform-style: preserve-3d; transform-origin: 0 0;
  will-change: transform; pointer-events: none;
}
.jlvd-3d-pose {
  position: absolute; top: 0; left: 0; width: 1248px; height: 1248px;
  transform-style: preserve-3d; transform-origin: 50% 50%;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 1.15s cubic-bezier(.22,.7,.28,1);
}
.jlvd-3d-pose.jlvd-3d-cd-pose { width: 784px; height: 572px; }
.jlvd-3d-figure {
  margin: 0; position: absolute; background-size: 100% 100%;
  background-repeat: no-repeat; backface-visibility: hidden;
  transform-style: preserve-3d; pointer-events: none;
}
.jlvd-3d-group { position: absolute; transform-style: preserve-3d; }
.jlvd-3d-stage--vinyl { --vinyl-surface: url('/assets/3d/vinyl-surface.webp'); }
.jlvd-3d-stage--cd { --cd-surface: url('/assets/3d/cd-silver.webp'); cursor: pointer; }
#jlvd-vinyl-front[href] { pointer-events: auto; }
#jlvd-vinyl-front .jlvd-3d-front-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#jlvd-vinyl-front .jlvd-release-unofficial { position:absolute; z-index:4; top:13px; left:13px; display:inline-flex; padding:5px 9px; color:#eeeae2; border:1px solid #eeebe4a6; background:#080808dc; font:800 10px/1.1 var(--body); letter-spacing:.09em; }
/* Keep the original 3D front and disc order. The CD disc center is opaque,
   and the silver disc stays physically BEHIND the rear cardboard. */
/* VINYL: 4x dimensional data transcribed from the supplied Artwork.vue configuration. */
#jlvd-vinyl-pose{--rx:-7deg;--ry:-23deg}
#jlvd-vinyl-disc{top:28px;left:22px;width:1204px;height:1204px;transform:translateX(550px) translateY(0) translateZ(0)}
#jlvd-vinyl-face{inset:0;width:1204px;height:1204px;border-radius:50%;transform:rotateY(0) rotateZ(-8deg) translateZ(-4px);background-image:var(--vinyl-surface)!important;background-size:100% 100%;background-repeat:no-repeat;border:0!important;box-shadow:0 24px 58px #0004!important;filter:none!important}
#jlvd-vinyl-face:after{display:none!important;content:'';position:absolute;inset:12px;border-radius:50%;background:conic-gradient(from 44deg,transparent 0 12%,#fff2 15%,transparent 20% 65%,#fff1 70%,transparent 76%);mix-blend-mode:screen}
#jlvd-vinyl-label{top:426px;left:420px;width:408px;height:408px;border-radius:50%;transform:translateX(550px) rotateY(0) rotateZ(81deg) translateZ(-3px);background-image:var(--vinyl-label);background-size:cover;background-position:center;background-color:#101010;border:0;box-shadow:inset 0 0 10px #0005}
#jlvd-vinyl-label:after{content:'';position:absolute;top:50%;left:50%;width:21px;height:21px;transform:translate(-50%,-50%);border-radius:50%;background:#010101;box-shadow:0 0 0 7px #aaa,0 0 0 11px #222}
#jlvd-vinyl-front{top:0;left:0;width:1248px;height:1248px;background-image:var(--vinyl-cover);transform:rotateY(0);box-shadow:0 50px 100px -8px #0007,8px 8px 24px #0005;border:1px solid #fff2}
#jlvd-vinyl-spine{top:0;left:0;width:12px;height:1248px;transform-origin:left center;transform:rotateY(-90deg) translateX(-12px);background:linear-gradient(90deg,#454545,#070707)}
#jlvd-vinyl-slot{top:0;left:1236px;width:12px;height:1248px;transform-origin:right center;transform:rotateY(90deg) translateX(12px);background:#0a0908}
#jlvd-vinyl-spine-top{top:0;left:0;width:1248px;height:12px;transform-origin:center top;transform:rotateX(90deg) translateY(-12px);background:linear-gradient(#343434,#0e0e0e)}
/* CD digipak: original 568 x 504 panel and 494 px disc, with a left-side hinge. */
#jlvd-cd-pose{--rx:-12deg;--ry:-20deg}
#jlvd-cd-back{width:568px;height:504px;transform-origin:left center;transform:translateX(0) translateY(0) translateZ(-24px) rotateY(-.6deg)}
#jlvd-cd-front-group{width:568px;height:504px;transform-origin:left center;transform:rotateY(-20deg);transition:transform 2.3s cubic-bezier(.2,.72,.22,1)}
#jlvd-cd-pose.jlvd-preview-open #jlvd-cd-front-group{transform:rotateY(-36deg)}
#jlvd-cd-back-art{top:0;left:0;width:568px;height:504px;background-image:linear-gradient(90deg,#0007,transparent 33%),var(--cd-inside);transform:translateZ(4px);box-shadow:8px 12px 12px -6px #0009}
#jlvd-cd-back-gradient{top:0;left:0;width:568px;height:504px;transform:translateZ(4.5px);background:linear-gradient(90deg,#0008 0,transparent 45%)}
#jlvd-cd-discgroup{transform:translateX(265px) translateY(7px) translateZ(-9px);width:568px;height:504px}
#jlvd-cd-silver{top:-2px;left:32px;width:494px;height:494px;border-radius:50%;transform:rotateZ(-16deg) translateZ(-6.5px);background-image:var(--cd-surface)!important;background-size:100% 100%;background-repeat:no-repeat;border:0!important;box-shadow:none!important}
#jlvd-cd-label{top:7px;left:41px;width:476px;height:476px;border-radius:50%;transform:rotateZ(23deg) translateZ(-6px);background-image:var(--cd-disc-print);background-position:center;background-size:100% 100%;-webkit-mask-image:radial-gradient(circle at center,transparent 0 9%,#000 9.4% 100%);mask-image:radial-gradient(circle at center,transparent 0 9%,#000 9.4% 100%)}
#jlvd-cd-label:after{display:none!important;content:'';position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 160deg,#fff3,transparent 17%,#0003 34%,transparent 70%,#fff3);pointer-events:none}
#jlvd-cd-hole{display:none!important;top:201px;left:235px;width:88px;height:88px;border-radius:50%;transform:translateZ(-4px);box-shadow:inset 2px 3px 8px #000e;background:radial-gradient(circle,#060606 0 22%,#bbb 24% 36%,#5a6068 39% 55%,#ececec 57% 68%,#12151b 73% 100%)}
#jlvd-cd-front-art{top:0;left:0;width:568px;height:504px;background-image:var(--cd-cover);transform:rotateY(0);box-shadow:0 40px 80px -8px #0008;border:1px solid #fff3}
#jlvd-cd-front-top{top:0;left:0;width:568px;height:4px;transform-origin:center top;transform:rotateX(90deg) translateY(-4px) translateZ(-1px);background:linear-gradient(#444,#111)}
#jlvd-cd-front-slot{top:0;left:564px;width:4px;height:504px;transform-origin:right center;transform:rotateY(90deg) translateX(4px);background:#080808}
#jlvd-cd-back-slot{top:0;left:564px;width:4px;height:504px;transform-origin:right center;transform:rotateZ(180deg) rotateY(-90deg) translateX(4px);background:#090909}
#jlvd-cd-spine{top:0;left:0;width:24px;height:504px;transform-origin:left center;transform:rotateY(-90deg) translateX(-24px);background:linear-gradient(90deg,#777,#080808 35%,#333)}
#jlvd-cd-center-inside{top:0;left:0;width:24px;height:504px;transform-origin:left center;transform:rotateY(90deg);background:#202020}
#jlvd-cd-back-top{top:0;left:0;width:568px;height:4px;transform-origin:center top;transform:rotateZ(180deg) rotateX(-90deg) translateY(-4px);background:#2e2e2e}
/* Repaired CD digipak: disc lies under the rear cardboard face, and its center is opaque. */
#jlvd-cd-disc-center-backing{top:194px;left:228px;width:102px;height:102px;border-radius:50%;transform:translateZ(-8.5px);background:#131519;box-shadow:inset 0 0 0 4px #555,0 0 0 5px #0c0c0d}
#jlvd-cd-back-art{background-color:#131416;background-blend-mode:normal;backface-visibility:hidden}
#jlvd-cd-back-gradient{pointer-events:none}
#jlvd-cd-silver{backface-visibility:hidden;overflow:hidden}
#jlvd-cd-label{backface-visibility:hidden}

@media (max-width: 780px) {
  .vinyl-preview.jlvd-cd-scene { width: 100%; max-width: 480px; min-height: 0; aspect-ratio: 1.14; }
}
@media (max-width: 480px) {
  #jlvd-vinyl-front .jlvd-release-unofficial { top:8px;left:8px;font-size:8px;padding:4px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .jlvd-3d-pose, #jlvd-cd-front-group { transition-duration: .01ms !important; }
}

/* v1.1 Mobile stability: avoid repeated GPU-layer promotion and transitioning
   enormous preserve-3d textures as the browser chrome changes on scroll.
   The ORIGINAL vinyl geometry and viewing angles remain unchanged. */
@media (hover: none), (pointer: coarse) {
  .jlvd-3d-stage--vinyl .jlvd-3d-assembly,
  .jlvd-3d-stage--cd .jlvd-3d-assembly { will-change: auto; }
  .jlvd-3d-stage--vinyl .jlvd-3d-pose,
  .jlvd-3d-stage--cd .jlvd-3d-pose { transition: none; }
  /* The three front-facing vinyl surfaces never show their reverse side.
     Keeping them visible prevents mobile backface-culling flicker. */
  #jlvd-vinyl-face, #jlvd-vinyl-label, #jlvd-vinyl-front {
    -webkit-backface-visibility: visible; backface-visibility: visible;
  }
}


/* Release detail page: swap the flat cover for the same 3D vinyl preview used on home.
   The sticker uploaded in admin is applied as the center label. */
.detail-cover--vinyl {
  position: relative;
  min-height: clamp(340px, 42vw, 520px);
  aspect-ratio: 1 / 1;
  max-width: 610px;
}
.detail-cover--vinyl > .jlvd-3d-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  perspective: 3000px;
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  user-select: none;
  overflow: visible;
  z-index: 1;
  transition: opacity .12s linear;
}
.detail-cover--vinyl .jlvd-3d-assembly { will-change: transform; }
.detail-cover--vinyl .jlvd-3d-stage--vinyl { --spin-duration: 2.35s; }
/* The disc surface includes a baked-in studio highlight: it must NOT rotate.
   Only the separate printed paper label rotates over this stationary surface. */
.detail-cover--vinyl #jlvd-vinyl-disc {
  animation: none;
}
.detail-cover--vinyl #jlvd-vinyl-label {
  animation: jlvd-release-vinyl-label-spin var(--spin-duration) linear infinite;
  animation-play-state: paused;
}
.detail-cover--vinyl .jlvd-3d-stage.is-spinning #jlvd-vinyl-label {
  animation-play-state: running;
}
@keyframes jlvd-release-vinyl-label-spin {
  from { transform: translateX(550px) rotateY(0) rotateZ(81deg) translateZ(-3px); }
  to { transform: translateX(550px) rotateY(0) rotateZ(441deg) translateZ(-3px); }
}
@media (max-width: 780px) {
  .detail-cover--vinyl {
    max-width: 480px;
    min-height: clamp(300px, 72vw, 440px);
    margin-inline: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .detail-cover--vinyl #jlvd-vinyl-label { animation: none !important; }
}
