/* ALLCUT — Machine Reel, immersive edition (dark, full viewport).
   Opens over /products/ on arrival; X / Esc closes it onto the white catalogue.
   Motion is driven by products-xr.js (transform + opacity only). */

.xr {
  --xr-ground: #0a0a09;
  --xr-text: #f3f2f2;
  --xr-body: rgba(243, 242, 242, .62);
  --xr-muted: rgba(243, 242, 242, .42);
  --xr-faint: rgba(243, 242, 242, .3);
  --xr-hair: rgba(243, 242, 242, .1);
  --xr-chip: rgba(243, 242, 242, .18);
  --xr-strong: rgba(243, 242, 242, .82);
  --xr-red: #f0463a;       /* red for text on the dark ground: 5.4:1 */
  --xr-top: 4.6vh;
  --xr-side: 3.4vw;

  position: fixed; inset: 0; z-index: 200;
  display: block; overflow: hidden;
  background: var(--xr-ground); color: var(--xr-text);
  font-family: var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.xr[hidden] { display: none; }
html.xr-open .xr { display: block; }              /* shown before first paint by the head script */
html.xr-open .site-header, html.xr-open .skip-link { visibility: hidden; }
html.xr-open, html.xr-open body { overflow: hidden; }
.xr ::selection { background: rgba(240, 70, 58, .35); }
.xr:focus { outline: none; }
#pp-title:focus { outline: none; }
.xr :focus-visible { outline: 2px solid var(--xr-red); outline-offset: 3px; }
.xr a { color: inherit; }

/* ── image stack ── */
.xr__stack { position: absolute; left: 25%; right: 27%; top: 0; bottom: 0; pointer-events: none; }
.xr__frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 11vh 1.5vw 15vh; box-sizing: border-box;
  object-fit: contain; object-position: center bottom;
  opacity: 0; visibility: hidden;   /* will-change is set by JS on the 2–3 visible frames only */
}
.xr__ground { position: absolute; left: 30%; right: 32%; bottom: 15vh; height: 1px; background: var(--xr-hair); pointer-events: none; }

/* ── rails ── */
.xr__left, .xr__right { position: absolute; top: 0; bottom: 0; box-sizing: border-box; pointer-events: none; }
.xr__left {
  left: 0; width: 25%; padding: var(--xr-top) 0 var(--xr-top) var(--xr-side);
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--xr-hair);
}
.xr__right {
  right: 0; width: 27%; padding: var(--xr-top) var(--xr-side) var(--xr-top) 0;
  display: flex; flex-direction: column; justify-content: center;
  border-left: 1px solid var(--xr-hair);
}
.xr__left > *, .xr__right > * { pointer-events: auto; }

.xr__head { display: flex; flex-direction: column; gap: 12px; padding-right: 2.4vw; }
.xr__brand img { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: .92; }
.xr__label { margin: 0; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--xr-faint); }
.xr__rule { height: 2px; background: rgba(243, 242, 242, .16); }
.xr__count { margin: 0; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.xr__now { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--xr-red); }
.xr__total { font: 500 11px/1 var(--f-mono); letter-spacing: .16em; color: var(--xr-faint); }

.xr__body { padding-right: 2.4vw; will-change: transform, opacity; }
.xr-info { display: none; flex-direction: column; gap: 16px; }
.xr-info.is-on { display: flex; }
.xr-info__range { display: flex; flex-direction: column; gap: 9px; margin: 0; font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--xr-red); }
.xr-info__range::after { content: ""; height: 2px; background: var(--xr-red); }
.xr-info__name { margin: 0; font-size: clamp(28px, 3vw, 54px); line-height: .94; letter-spacing: -0.025em; font-weight: 800; text-transform: uppercase; text-wrap: balance; }
.xr-info__sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--xr-body); max-width: 30ch; }
.xr-info__tag { display: block; color: var(--xr-muted); }
.xr-info__kf { display: none; }
.xr-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.xr-chip { padding: 5px 7px; border: 1px solid var(--xr-chip); font: 500 10px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--xr-body); }
.xr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.xr-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px;
  font: 600 14px/1 var(--f-sans); white-space: nowrap; border: 1px solid var(--xr-chip);
  transition: background-color .15s, border-color .15s, color .15s;
}
.xr-btn svg { width: 15px; height: 15px; }
.xr .xr-btn--solid { background: var(--xr-text); border-color: var(--xr-text); color: var(--xr-ground); }
.xr .xr-btn--solid:hover { background: #fff; border-color: #fff; }
.xr-btn:not(.xr-btn--solid):hover { border-color: var(--xr-text); }
.xr__hint { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 10px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--xr-faint); transition: opacity .5s; }
.xr__hint::after { content: ""; width: 22px; height: 1px; background: var(--xr-faint); }
.xr.is-touched .xr__hint { opacity: 0; }

/* right rail: specification */
.xr-spec { display: none; }
.xr-spec.is-on { display: block; }
.xr-spec__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.xr-spec__head span { font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--xr-muted); }
.xr-spec__head span + span { color: var(--xr-faint); letter-spacing: .1em; text-align: right; }
.xr-spec__rule { height: 2px; background: var(--xr-strong); }
.xr-spec__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--xr-hair); }
.xr-spec__k { font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--xr-muted); min-width: 0; }
.xr-spec__v { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; text-align: right; font-variant-numeric: tabular-nums; }
.xr-spec__v span { display: block; }
.xr-spec__more { display: inline-flex; gap: 8px; margin-top: 18px; font: 600 14px/1 var(--f-sans); color: var(--xr-text); border-bottom: 1px solid var(--xr-chip); padding-bottom: 4px; transition: border-color .15s; }
.xr-spec__more:hover { border-color: var(--xr-text); }
.xr-spec__more::after { content: "→"; font-family: var(--f-mono); }

/* ── top-right tools ── */
.xr__tools { position: absolute; top: var(--xr-top); right: var(--xr-side); z-index: 3; display: flex; gap: 8px; }
.xr__tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; min-width: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--xr-chip); color: var(--xr-text);
  font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.xr__tool:hover { border-color: var(--xr-text); }
.xr__tool svg { width: 16px; height: 16px; flex: none; }
.xr__tool kbd { font: inherit; padding: 3px 5px; border: 1px solid var(--xr-chip); color: var(--xr-muted); letter-spacing: .06em; }
.xr__close { background: var(--xr-text); color: var(--xr-ground); border-color: var(--xr-text); }
.xr__close:hover { background: #fff; border-color: #fff; }
.xr__close kbd { border-color: rgba(10, 10, 9, .25); color: rgba(10, 10, 9, .6); }
.xr__tool[hidden] { display: none; }

/* ── progress ticks ── */
.xr__bar { position: absolute; left: 25%; right: 27%; bottom: 3.6vh; display: flex; justify-content: center; }
.xr-ticks { display: flex; align-items: flex-end; gap: 10px; }
.xr-ticks__group { display: flex; gap: 3px; }
.xr-tick { width: 9px; height: 18px; padding: 0; border: 0; background: transparent; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.xr-tick::before {
  content: ""; width: 7px; height: 2px; background: rgba(243, 242, 242, .22);
  transition: background-color .3s, transform .35s cubic-bezier(.16, .86, .24, 1); transform-origin: center bottom;
}
.xr-tick:hover::before { background: rgba(243, 242, 242, .6); }
.xr-tick[aria-current="true"]::before { background: var(--xr-red); transform: scaleX(1.5) scaleY(3); }

/* ── smaller desktops ── */
@media (max-width: 1180px) {
  .xr__left { width: 28%; }
  .xr__right { width: 29%; }
  .xr__stack { left: 28%; right: 29%; }
  .xr__bar { left: 28%; right: 29%; }
  .xr-spec__row { padding: 8px 0; }
  .xr-spec__v { font-size: 14px; }
}
@media (max-height: 720px) and (min-width: 900px) {
  .xr-spec__row { padding: 7px 0; }
  .xr-info { gap: 12px; }
  .xr-info__name { font-size: clamp(26px, 2.6vw, 44px); }
}

/* big phones turned sideways (e.g. 932×430): drop the extras so the buttons and specs fit */
@media (max-height: 520px) and (min-width: 900px) {
  .xr__label, .xr__rule, .xr-chips, .xr-info__tag, .xr__hint { display: none; }
  .xr-info { gap: 8px; }
  .xr-info__name { font-size: 26px; }
  .xr-info__sub { font-size: 13px; }
  .xr-btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .xr__right { justify-content: flex-start; padding-top: calc(var(--xr-top) + 56px); }
  .xr-spec__row { padding: 4px 0; }
  .xr-spec__v { font-size: 13px; }
  .xr-spec__more { margin-top: 10px; }
}

/* ── phones & tablets: image on top, facts below, swipe to advance ── */
@media (max-width: 899px) {
  .xr { --xr-top: 14px; --xr-side: 16px; }
  .xr__left { position: absolute; inset: 0; width: auto; padding: 0; border: 0; display: block; pointer-events: none; }
  .xr__head { position: absolute; left: var(--xr-side); top: var(--xr-top); flex-direction: row; align-items: center; gap: 14px; padding: 0; }
  .xr__brand img { height: 20px; }
  .xr__label, .xr__rule { display: none; }
  .xr__now { font-size: 20px; }
  .xr__tools { top: 8px; right: 8px; }
  .xr__tool { height: 40px; min-width: 40px; padding: 0 12px; }
  .xr__tool .xr__tool-text, .xr__tool kbd { display: none; }
  .xr__stack { left: 6%; right: 6%; top: 56px; bottom: auto; height: 40vh; }
  .xr__frame { padding: 2vh 0 1vh; }
  .xr__ground { left: 14%; right: 14%; top: calc(56px + 40vh); bottom: auto; }
  .xr__body { position: absolute; left: var(--xr-side); right: var(--xr-side); top: calc(56px + 40vh + 18px); bottom: 56px; padding: 0; overflow: hidden; }
  .xr-info { gap: 10px; }
  .xr-info__name { font-size: clamp(26px, 8vw, 38px); }
  .xr-info__sub { font-size: 13.5px; max-width: none; }
  .xr-info__kf { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 0; border-top: 1px solid var(--xr-strong); }
  .xr-info__kf div { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--xr-hair); }
  .xr-info__kf dd { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .xr-info__kf dt { margin-top: 3px; font: 500 9.5px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--xr-muted); }
  .xr-chips { display: none; }
  .xr-actions { margin-top: 4px; }
  .xr-btn { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
  .xr__hint { display: none; }
  .xr__right { display: none; }
  .xr__bar { left: 0; right: 0; bottom: 14px; }
  .xr-ticks { gap: 6px; }
  .xr-ticks__group { gap: 1px; }
  .xr-tick { width: 8px; height: 22px; }
  .xr-tick::before { width: 5px; }
}
@media (max-width: 899px) and (max-height: 640px) {
  .xr__stack { height: 34vh; }
  .xr__ground { top: calc(56px + 34vh); }
  .xr__body { top: calc(56px + 34vh + 14px); }
  .xr-info__sub { display: none; }
}
/* phone turned sideways: too short to stack, so facts on the left half, machine on the right half */
@media (max-width: 899px) and (max-height: 500px) and (orientation: landscape) {
  .xr__stack { left: 50%; right: 3%; top: 52px; bottom: 40px; height: auto; }
  .xr__frame { padding: 0; }
  .xr__ground { left: 54%; right: 7%; top: auto; bottom: 40px; }
  .xr__body { top: 60px; bottom: 40px; right: 53%; display: flex; flex-direction: column; justify-content: center; }
  .xr-info { gap: 8px; }
  .xr-info__name { font-size: clamp(22px, 4vw, 30px); }
  .xr-info__kf div { padding: 5px 8px 5px 0; }
  .xr-info__kf dd { font-size: 15px; }
  .xr__bar { bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .xr-tick::before, .xr__hint { transition: none; }
}

/* ── the white page's way back in ── */
.pp-open { display: none; }
.js .pp-open { display: inline-flex; }

/* legacy photos are small: never blow them up more than ~1.35× */
.xr { --xr-pad: 26vh; }
.xr__frame.is-legacy { top: auto; height: min(100%, calc(var(--h) * 1.35 + var(--xr-pad))); }
@media (max-width: 899px) { .xr { --xr-pad: 3vh; } }
.pp-open { margin-top: 24px; }
.pp-open svg { width: 12px; height: 12px; }

/* ── range colour codes in the reel ── */
.xr-info__range { color: var(--rc-lite, var(--xr-red)); }
.xr-info__range::after { background: var(--rc, var(--xr-red)); }
.xr__now { color: var(--rc-lite, var(--xr-red)); transition: color .3s; }
.xr-tick::before { background: color-mix(in srgb, var(--rc, #f3f2f2) 34%, transparent); }
.xr-tick:hover::before { background: color-mix(in srgb, var(--rc, #f3f2f2) 75%, transparent); }
.xr-tick[aria-current="true"]::before { background: var(--rc, var(--xr-red)); }
.xr-spec__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 18px 0 0; }
.xr-spec__links .xr-spec__more { margin-top: 0; }
