/* Finishing layer — small, reversible touches that ride on top of the
   bundle without fighting the choreography driver (which owns transform,
   opacity and filter inline). Only shadow, border and colour are touched. */

/* ---------- pointer light ---------- */
.pl-spot {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity 1s var(--ease, ease);
  background: radial-gradient(circle 280px at var(--px, 50%) var(--py, 42%),
    rgba(196, 181, 253, .09), rgba(139, 92, 246, .04) 45%, transparent 72%);
  mix-blend-mode: screen;
}
html.pl-has-pointer .pl-spot { opacity: 1; }

/* ---------- card response ---------- */
.cardx { transition: border-color .4s var(--ease, ease), box-shadow .4s var(--ease, ease); }
.cardx:hover {
  border-color: rgba(196, 181, 253, .45);
  box-shadow: 0 34px 80px -26px #000, 0 0 0 1px rgba(196, 181, 253, .16) inset;
}
.cardx--hot:hover { box-shadow: 0 34px 90px -26px #000, 0 0 34px -6px rgba(139, 92, 246, .55) inset; }
.panelx { transition: border-color .4s var(--ease, ease), box-shadow .4s var(--ease, ease); }
.panelx:hover {
  border-color: rgba(196, 181, 253, .42);
  box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(196, 181, 253, .14) inset;
}

/* ---------- gallery position ---------- */
.pl-gal {
  position: fixed; z-index: 44; bottom: 3.4vh; left: 50%; translate: -50% 0;
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid rgba(243, 237, 227, .1); background: rgba(9, 6, 15, .4);
  backdrop-filter: blur(10px);
  font-size: .58rem; letter-spacing: .24em; color: rgba(243, 237, 227, .34);
  direction: ltr; opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease, ease);
}
body[data-jm-scene="5"] .pl-gal { opacity: 1; }
.pl-gal b { font-size: .82rem; font-weight: 600; letter-spacing: .1em; color: rgba(243, 237, 227, .92); }
.pl-gal i {
  display: block; width: 34px; height: 1px;
  background: linear-gradient(90deg, rgba(196, 181, 253, .7), rgba(196, 181, 253, .1));
}

@media (max-width: 760px) {
  .pl-gal { display: none; }
  .pl-spot { display: none; }
}

/* ---------- keyboard & touch affordances ---------- */
/* The rail ticks were 1px-wide spans: invisible to a keyboard user and almost
   impossible to tap. The pseudo-element widens the hit area without touching
   the layout, and the ring is drawn on it, not on the hairline. */
.chrome__tick::before {
  content: ""; position: absolute; inset: -4px -14px; border-radius: 7px;
  transition: background .3s var(--ease, ease);
}
.chrome__tick:hover::before { background: rgba(196, 181, 253, .1); }
.chrome__tick:focus-visible { outline: none; }
.chrome__tick:focus-visible::before {
  outline: 2px solid var(--violet-lt, #c4b5fd); outline-offset: 0;
  background: rgba(196, 181, 253, .16);
}

.scroller:focus-visible { outline: 2px solid rgba(196, 181, 253, .8); outline-offset: -3px; }

.jm-list__row:focus-visible,
.jm-skip:focus-visible,
.jm-launch:focus-visible,
.rec__dot:focus-visible,
.gal:focus-visible,
.fin__replay:focus-visible,
.case__x:focus-visible,
.case__nav button:focus-visible,
.fin__credit:focus-visible {
  outline: 2px solid var(--violet-lt, #c4b5fd); outline-offset: 3px; border-radius: 8px;
}
.gal:focus-visible { outline-offset: -3px; }

/* 16px of text is a 16px tap target; give the credit link a real one. */
.fin__credit {
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 10px 2px; margin-top: 6px;
}

/* ---------- reduced motion: one screen per scene ---------- */
/* Without the scroll choreography each scene is a still frame, so 3.6 screens
   of scroll per scene is 20,000px of nothing. Compress to a single sweep. */
@media (prefers-reduced-motion: reduce) {
  .scene { height: calc(var(--vh) * 1.05) !important; }
  .curtain__panel { display: none !important; }
  .grain, .scanlines { display: none !important; }
}

/* ---------- keyboard focus for the remaining custom controls ---------- */
.chrome__tick:focus-visible,
.jm-step:focus-visible,
.jm-tour:focus-visible,
.jmap__share:focus-visible,
.jm-close:focus-visible,
.jm-list__row:focus-visible,
.jm-node:focus-visible {
  outline: 2px solid var(--violet-lt, #c4b5fd);
  outline-offset: 3px;
}
/* the tick is a 1px rule: keep the line, give the control a real hit area */
.chrome__tick {
  width: 26px; height: 32px;
  background: transparent;
  display: block;
}
.chrome__tick::before {
  content: ""; position: absolute; left: 50%; top: 2px;
  width: 1px; height: 26px; transform: translateX(-50%);
  background: #f3ede32e; transition: background .4s var(--ease);
}
.chrome__tick:after {
  left: 50%; top: 2px; width: 5px; height: 0;
  transform: translateX(-50%);
}
.chrome__tick.is-done::before,
.chrome__tick.is-active::before { background: transparent; }
.chrome__tick:focus-visible { outline-offset: 0; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  .chrome__tick::before { transition: none; }
}
.chrome__tick:after { height: 0; max-height: 26px; }
.chrome__tick.is-done:after, .chrome__tick.is-active:after { height: 26px; }
.chrome__rail { margin-inline-start: -12px; }

/* keep the decorative light layers inside the viewport: no stray scroll area,
   and a much smaller paint budget for the animated grain */
.fx { overflow: clip; }
.grain { inset: -12%; }
