/* A carton with all six faces, in the same CSS 3D space as the Taste Lab packs. */
.bjorg-turntable {
  position: relative; width: 200px; height: 260px; display: grid; place-items: center;
  pointer-events: auto; cursor: grab; touch-action: none; user-select: none;
  perspective: 850px; border-radius: 20px;
}
.bjorg-turntable:focus-visible { outline: 2px dashed var(--ube); outline-offset: -5px; }
.bjorg-turntable[data-dragging] { cursor: grabbing; }
.bjorg-turntable::before {
  content: ""; position: absolute; bottom: 13px; left: 50%; width: 100px; height: 12px;
  background: #3848313b; border-radius: 50%; transform: translateX(-50%); filter: blur(6px);
}
.bjorg-lift, .bjorg-object { position: relative; width: 91px; height: 216px; transform-style: preserve-3d; }
.bjorg-object { transform: rotateX(-16deg) rotateY(23deg); }
.bjorg-panel {
  position: absolute; inset: 0; margin: auto; display: block;
  backface-visibility: hidden; background-color: #eef0e3;
}
.bjorg-front, .bjorg-back, .bjorg-left, .bjorg-right { overflow: hidden; }
.bjorg-front, .bjorg-back { width: 91px; }
.bjorg-left, .bjorg-right { width: 64px; }
.bjorg-front { transform: translateZ(32px); }
.bjorg-back { transform: rotateY(180deg) translateZ(32px); }
.bjorg-left { transform: rotateY(-90deg) translateZ(45.5px); }
.bjorg-right { transform: rotateY(90deg) translateZ(45.5px); }

/* Reproject the two visible panels of the existing 1200 × 900 pack photo.
   Opposing faces repeat the same artwork, keeping the original label legible. */
.bjorg-front::before, .bjorg-back::before, .bjorg-left::before, .bjorg-right::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 1200px; height: 900px;
  transform-origin: 0 0; background: url("bjorg-matcha-scenario.png") 0 0 / 100% 100% no-repeat;
}
.bjorg-front::before, .bjorg-back::before {
  /* Source corners clockwise from top left: (437,97), (676,112), (672,769), (439,798). */
  transform: matrix3d(.318543363,-.016828798,0,-.000236492859, -.000908826,.268138852,0,-.00003273881, 0,0,1,0, -139.1152934,-18.65528383,0,1);
}
.bjorg-left::before, .bjorg-right::before {
  /* Source corners clockwise from top left: (369,91), (436,97), (437,797), (374,733). */
  transform: matrix3d(2.234374295,-.060305166,0,.00311799962, -.017401669,.673407684,0,-.000226480937, 0,0,1,0, -822.9005629,-39.02749311,0,1);
}
@property --brief-tint {
  syntax: "<number>"; inherits: true; initial-value: 0;
}
.bjorg-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 220px rgb(174 244 134 / var(--brief-tint, 0));
}
.bjorg-left::after, .bjorg-right::after {
  background: linear-gradient(90deg, #27332918, transparent 68%);
}
.bjorg-lid, .bjorg-base { width: 91px; height: 64px; }
.bjorg-base {
  transform: rotateX(-90deg) translateZ(108px); background:
    linear-gradient(32deg, transparent 49%, #c8cbbe 50%, transparent 52%),
    linear-gradient(-32deg, transparent 49%, #c8cbbe 50%, transparent 52%), #e3e4d7;
}
.bjorg-lid {
  transform: rotateX(90deg) translateZ(108px); transform-style: preserve-3d;
  background: linear-gradient(145deg, transparent 0 44%, #e8edb740 45%, transparent 47%),
    linear-gradient(35deg, transparent 0 45%, #48632960 46%, transparent 48%), #80a94e;
}
.bjorg-cap, .bjorg-cap-top {
  position: absolute; width: 30px; height: 30px; border-radius: 50%; background: #e8e7de;
}
.bjorg-cap {
  left: 29px; top: 15px; transform-style: preserve-3d;
  box-shadow: 0 0 0 2px #719250, 1px 1px 1px 3px #42583c66;
}
.bjorg-cap-top {
  inset: 0; transform: translateZ(8px); background: #f8f7ed;
  border: 1px solid #d4d4c8; box-shadow: inset 0 0 0 2px #efeee3; backface-visibility: hidden;
}
.bjorg-cap-wall {
  position: absolute; width: 6.2px; height: 8px; left: 11.9px; top: 15px;
  transform-origin: 50% 0; transform: rotateZ(var(--wall-angle)) translateY(-15px) rotateX(90deg);
  backface-visibility: hidden; background: repeating-linear-gradient(90deg,#d4d5c9 0 1px,#eeeee3 1px 2px);
}
@media (prefers-reduced-motion: no-preference) {
  #brand-cycle.on .bjorg-lift { animation: taste-float 4.8s ease-in-out infinite; }
  #brand-cycle.on .cycle-demo[data-playing="false"] .bjorg-lift,
  #brand-cycle.on .bjorg-turntable[data-dragging] .bjorg-lift { animation-play-state: paused; }
}
