/* Clean variant: no 3D room behind the display. The canvas is transparent, so the display floats on the dot grid,
   lit by a soft glow that takes its colours from the LEDs (--room-left / --room-right, written by next.mjs). */
.hud--clean .room__stage {
  background:
    radial-gradient(38vw 46vh at 62% 52%, rgb(var(--room-left) / .16), transparent 70%),
    radial-gradient(30vw 40vh at 70% 60%, rgb(var(--room-right) / .14), transparent 70%),
    radial-gradient(rgb(255 255 255 / .16) 1.1px, transparent 1.5px) 0 0 / 14px 14px,
    #000;
}
/* fade the grid out toward the edges so the display stays the subject */
.hud--clean .room__stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 75% 70% at 60% 52%, transparent 55%, rgb(0 0 0 / .85) 100%);
}
.hud--clean .room__model { z-index: 1; }
@media (max-width: 760px) {
  .hud--clean .room__stage {
    background:
      radial-gradient(70vw 40vh at 50% 62%, rgb(var(--room-left) / .18), transparent 70%),
      radial-gradient(rgb(255 255 255 / .16) 1.1px, transparent 1.5px) 0 0 / 14px 14px,
      #000;
  }
  .hud--clean .room__stage::before { background: radial-gradient(ellipse 90% 70% at 50% 62%, transparent 55%, rgb(0 0 0 / .85) 100%); }
}

/* ---- The story: the owner's saved CAD versions as a sideways timeline ---- */
.hud .story {
  list-style: none; margin: 0; padding: 0 0 16px; display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; position: relative;
}
.hud .story li { flex: 0 0 min(72vw, 300px); scroll-snap-align: start; position: relative; }
.hud .story figure { margin: 0; border: 1px solid var(--line); background: #0a0b0e; position: relative; }
.hud .story figure::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -8px; height: 1px; background: var(--line-2);
}
.hud .story li::after {
  content: ""; position: absolute; top: -11px; left: 0; width: 7px; height: 7px; background: var(--hud-cyan);
  box-shadow: 0 0 10px var(--hud-cyan);
}
.hud .story li:last-child::after { background: #fff; box-shadow: 0 0 14px #fff; }
.hud .story img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.hud .story figcaption { padding: 12px 14px 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-3, #9aa0aa); }
.hud .story time { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--hud-cyan); margin-bottom: 4px; }
.hud .story figcaption b { display: block; color: var(--ink, #eceef2); font-family: var(--font-display); text-transform: uppercase; font-weight: 900; font-size: 20px; line-height: 1; margin-bottom: 6px; }
.hud .story__note { margin-top: 8px; }
#story .part__head--split > div .say + .say { margin-top: 12px; }

/* ---- Specs at a glance ---- */
.hud .spec-grid { border: 1px solid var(--line); font-size: 13.5px; }
.hud .spec-row { display: grid; grid-template-columns: minmax(110px, .7fr) repeat(3, 1fr); border-top: 1px solid var(--line); }
.hud .spec-row:first-child { border-top: 0; }
.hud .spec-row > span { padding: 12px 14px; line-height: 1.45; border-left: 1px solid var(--line); }
.hud .spec-row > span:first-child { border-left: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--ink-3, #9aa0aa); }
.hud .spec-row small { display: block; font-size: 11px; color: var(--ink-3, #9aa0aa); letter-spacing: .04em; }
.hud .spec-row--head b { font-family: var(--font-display); text-transform: uppercase; font-weight: 900; font-size: 18px; display: block; }
.hud .spec-row--head > span:nth-child(2) { box-shadow: inset 0 2px 0 var(--hud-cyan); }
.hud .spec-shared { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.hud .spec-shared > div { border: 1px solid var(--line); padding: 16px; }
.hud .spec-shared h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--hud-cyan); font-family: var(--font-body); }
.hud .spec-shared p { margin: 0; font-size: 13.5px; line-height: 1.6; }
@media (max-width: 760px) {
  .hud .spec-grid { overflow-x: auto; }
  .hud .spec-row { grid-template-columns: 96px repeat(3, minmax(130px, 1fr)); min-width: 500px; }
  .hud .spec-shared { grid-template-columns: 1fr; }
}

/* ---- Prototype flipbook: every saved version, dragged by a slider ---- */
.hud .proto { max-width: 980px; margin: 0 auto; }
.hud .proto[hidden] { display: none; }
.hud .proto__stage {
  position: relative; border: 1px solid var(--line); background: #0b0c10;
  aspect-ratio: 16 / 10; overflow: hidden;
  background: radial-gradient(ellipse 70% 90% at 50% 40%, #252a31 0%, #1a1e24 55%, #0e1114 100%);
}
.hud .proto__img { position: absolute; inset: 0; margin: auto; height: 100%; aspect-ratio: 1; max-width: 100%; background-repeat: no-repeat; background-color: transparent;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.hud .proto__corner { position: absolute; width: 18px; height: 18px; border: 0 solid var(--hud-tick); }
.hud .proto__corner--tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.hud .proto__corner--br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.hud .proto__hud { position: absolute; top: 22px; left: 26px; margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--ink-3, #9aa0aa); }
.hud .proto__hud b { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(56px, 9vw, 108px); line-height: .9; letter-spacing: 0; color: #fff;
  text-shadow: 0 0 22px rgb(46 230 255 / .35); font-variant-numeric: tabular-nums; }
.hud .proto__of { color: var(--ink-3, #9aa0aa); }
.hud .proto__date { position: absolute; top: 26px; right: 26px; margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--hud-cyan); }
.hud .proto__note { position: absolute; left: 26px; bottom: 22px; max-width: 300px; margin: 0; padding: 12px 14px; border: 1px solid var(--line-2);
  background: rgb(0 0 0 / .72); font-size: 13px; line-height: 1.5; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.hud .proto__note.is-on { opacity: 1; transform: none; }
.hud .proto__note b { display: block; font-family: var(--font-display); text-transform: uppercase; font-weight: 900; font-size: 18px; margin-bottom: 4px; }
.hud .proto__controls { display: flex; align-items: flex-start; gap: 14px; margin-top: 18px; }
.hud .proto__play { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); background: transparent; color: #fff; cursor: pointer; }
.hud .proto__play:hover { border-color: #fff; }
.hud .proto__play .i-pause, .hud .proto.is-playing .proto__play .i-play { display: none; }
.hud .proto.is-playing .proto__play .i-pause { display: block; }
.hud .proto__track { position: relative; flex: 1; padding-top: 12px; height: 56px; }
.hud .proto__range { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 0; background: transparent; position: relative; z-index: 2; cursor: grab; }
.hud .proto__range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--hud-cyan) var(--pos, 0%), var(--line-2) var(--pos, 0%)); }
.hud .proto__range::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--hud-cyan) var(--pos, 0%), var(--line-2) var(--pos, 0%)); }
.hud .proto__range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; background: #fff; border: 0; box-shadow: 0 0 14px var(--hud-cyan); }
.hud .proto__range::-moz-range-thumb { width: 18px; height: 18px; background: #fff; border: 0; border-radius: 0; box-shadow: 0 0 14px var(--hud-cyan); }
.hud .proto__range:focus-visible { outline: 1px solid var(--hud-cyan); outline-offset: 6px; }
.hud .proto__ticks { position: absolute; left: 9px; right: 9px; top: 0; bottom: 0; pointer-events: none; }
.hud .proto__tick { position: absolute; top: 18px; width: 8px; height: 8px; margin-left: -4px; padding: 0; border: 1px solid var(--line-2); background: #000; transform: rotate(45deg); pointer-events: auto; cursor: pointer; }
.hud .proto__tick.is-on { background: var(--hud-cyan); border-color: var(--hud-cyan); box-shadow: 0 0 8px var(--hud-cyan); }
.hud .proto__year { position: absolute; top: 34px; transform: translateX(-2px); padding: 2px 0; border: 0; background: none; color: var(--ink-3, #9aa0aa);
  font: inherit; font-size: 11px; letter-spacing: .12em; pointer-events: auto; cursor: pointer; }
.hud .proto__year:hover { color: #fff; }
.hud .proto__help { margin-top: 6px; }
@media (max-width: 760px) {
  .hud .proto__stage { aspect-ratio: 4 / 5; }
  .hud .proto__img { height: auto; width: 100%; top: 6%; bottom: auto; }
  .hud .proto__note { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .hud .proto__hud { top: 14px; left: 16px; }
  .hud .proto__date { top: 18px; right: 16px; }
  .hud .proto__year--2025 { display: none; }
}

/* ---- Build photos: a wall of the owner's bench photos, and a lightbox ---- */
.hud .gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hud .gal__item { margin: 0; border: 1px solid var(--line); background: #0a0b0e; }
.hud .gal__open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.hud .gal__open img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5 !important; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; filter: saturate(.9); }
.hud .gal__open:hover img, .hud .gal__open:focus-visible img { transform: scale(1.04); filter: none; }
.hud .gal__open:focus-visible { outline: 1px solid var(--hud-cyan); outline-offset: -1px; }
.hud .gal figcaption, .hud .lightbox figcaption { padding: 10px 12px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-3, #9aa0aa); }
.hud .gal time, .hud .lightbox time { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--hud-cyan); }
.hud .gal figcaption b, .hud .lightbox figcaption b { display: block; color: #fff; font-family: var(--font-display); text-transform: uppercase; font-weight: 900; font-size: 17px; margin: 2px 0 2px; }
.hud .lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / .94); color: #fff; }
.hud .lightbox::backdrop { background: rgb(0 0 0 / .7); }
.hud .lightbox__fig { height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 72px 24px; box-sizing: border-box; }
.hud .lightbox__fig img { max-width: 100%; max-height: calc(100% - 90px); object-fit: contain; border: 1px solid var(--line); }
.hud .lightbox figcaption { text-align: center; max-width: 520px; }
.hud .lightbox__btn, .hud .lightbox__close { position: absolute; width: 48px; height: 48px; border: 1px solid var(--line-2); background: rgb(0 0 0 / .5); color: #fff; font-size: 22px; cursor: pointer; }
.hud .lightbox__btn:hover, .hud .lightbox__close:hover { border-color: #fff; }
.hud .lightbox__btn--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.hud .lightbox__btn--next { right: 16px; top: 50%; transform: translateY(-50%); }
.hud .lightbox__close { top: 14px; right: 16px; }
.hud .lightbox__count { position: absolute; top: 26px; left: 20px; margin: 0; font-size: 11px; letter-spacing: .14em; color: var(--ink-3, #9aa0aa); }
@media (max-width: 760px) {
  .hud .gal { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hud .gal figcaption { padding: 8px; font-size: 12px; }
  .hud .gal figcaption b { font-size: 14px; }
  .hud .lightbox__fig { padding: 56px 12px 80px; }
  .hud .lightbox__btn { top: auto; bottom: 16px; transform: none; }
}

/* ---- The opening steps hold: each step's words stay on screen while its showcase plays, then move on ---- */
@media (min-width: 761px) {
  .hud--clean .room__beats .beat:not(.beat--hero) { min-height: 130vh; align-items: flex-start; }
  .hud--clean .room__beats .beat--long:not(.beat--hero) { min-height: 150vh; }
  .hud--clean .room__beats .beat:not(.beat--hero) .beat__copy { position: sticky; top: calc(var(--head, 64px) + 48px); }
}
@media (max-width: 760px) {
  .hud--clean .room--pinned .beat:not(.beat--hero) { min-height: 120vh; min-height: 120svh; }
  .hud--clean .room--pinned .beat--long:not(.beat--hero) { min-height: 140vh; min-height: 140svh; }
}
