/* Layout 02 at 1500 × 750: a 728 × 113 wordmark above the centred 858px assembly.
   Keep its starting slot stationary as the instrument settles into its open view. */
#scene {
  --bench-module-width: min(57.2vw, 114.4svh, 1180px);
  --closed-centre: calc(50% + var(--bench-module-width) * .12675);
  --bench-module-center: calc(var(--closed-centre) - var(--tilt, 0) * var(--bench-module-width) * .10);
  --word-gap: clamp(20px, calc(var(--bench-module-width) * .048), 60px);
}

#scene.sticky { min-height: 0; }

#scene .bench-wordmark {
  left: clamp(22px, 3.6vw, 78px);
  width: calc(var(--bench-module-width) * .848);
  top: auto;
  bottom: calc(100% - var(--closed-centre) + var(--bench-module-width) * .25 + var(--word-gap));
  height: calc(var(--bench-module-width) * .1317);
  transform: none;
  opacity: 1;
}

.bestric-lettering {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
}

#scene[data-meter-view="module"] > .bench-wordmark,
#scene[data-meter-view="travel"] > .bench-wordmark { visibility: visible; }

.brand-dock {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, .7vw, 12px);
  flex: none;
  pointer-events: none;
}

.dock-rule {
  width: 1.5px;
  height: 19px;
  background: linear-gradient(to right, #9ca8b4, #e6ebf1 58%, #acb8c2);
  border-radius: 1px;
}
.dock-name { width: 86px; height: 14px; display: inline-block; }
.brand-dock .dock-name img { display: block; width: 100%; height: 100%; }
.catalog-brand { white-space: nowrap; }
.catalog-brand > .brand-dock { display: inline-flex; }
.catalog-brand > strong { font-weight: 600; }

/* The moving screw is a side-on view of the head and shaft. The seat stays
   attached to the lid when the fastener leaves. */
.dock-screw-seat.is-empty .bolt-head,
.dock-screw-seat.is-empty .bolt-shank { visibility: hidden; }
.dock-fastener-flight {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 19;
  pointer-events: none;
}
.dock-fastener-flight .bolt-head {
  inset: 0 auto auto 0;
  width: 12px;
  height: 12px;
  border-color: #8f9ca7;
  background: conic-gradient(from -24deg, #e7eff2, #8c9aa4 20%, #d6dfe6 42%, #f7fafc 53%, #8f9ca4 79%, #e7eff2);
  transform-origin: 50% 50%;
}
.dock-pin {
  position: absolute;
  width: 2px;
  height: 22px;
  left: -1px;
  top: -11px;
  border-radius: 1px;
  background: linear-gradient(90deg, #929fae, #e6ebf0 62%, #adbac5);
}
.dock-thread {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(163deg, #475663 0 1px, transparent 1px 2.5px);
}
.dock-screw-projection { position: absolute; width: 0; height: 0; pointer-events: none; }

@media (max-width: 800px) {
  #scene {
    --bench-module-width: min(74vw, 102svh);
    --reserved-top: 92px;
    --closed-centre: max(52%, calc(var(--reserved-top) + var(--bench-module-width) * .3817 + var(--word-gap)));
    --bench-module-center: var(--closed-centre);
    --word-gap: clamp(24px, 4svh, 38px);
  }
  #scene .bench-wordmark { left: 20px; }
  .dock-name { width: 73px; height: 12px; }
  .dock-rule { height: 17px; }
}
@media (max-width: 600px) {
  #scene { --reserved-top: 118px; }
  #scene .bench-wordmark { left: max(16px, env(safe-area-inset-left)); }
  .dock-name { width: 65px; height: 11px; }
  .dock-rule { height: 15px; }
  .brand-dock { gap: 7px; }
}

@media (min-width: 801px) {
  #scene .scene-controls { bottom: clamp(16px, 3.2svh, 32px); }
}

@media (max-width: 370px) {
  .catalog-header { padding-inline: 12px; gap: 8px; }
  .catalog-header .catalog-brand { gap: 5px; }
  .catalog-header .dock-name { width: 56px; height: 10px; }
  .catalog-header .catalog-home { padding-inline: 9px; white-space: nowrap; }
}

@media (max-height: 550px) and (orientation: landscape) {
  #scene {
    --bench-module-width: min(57.2vw, 93svh);
    --closed-centre: calc(49% + var(--bench-module-width) * .16);
    --word-gap: 18px;
  }
}

@media (max-width: 600px) and (max-height: 480px) and (orientation: landscape) {
  #scene {
    --bench-module-width: min(57.2vw, 82svh);
    --closed-centre: calc(47% + var(--bench-module-width) * .16);
  }
}
