/* ==========================================================================
   Gallery: the work as one long strip of film.
   Sprocket holes, edge markings and frame numbers; scroll or drag to run it,
   click a frame to project it.
   ========================================================================== */

.gl-hero {
  min-height: 70vh;
}

.gl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gl-filter {
  padding: 0.6rem 1rem;
  border: 1px solid var(--paper-faint);
  border-radius: 999px;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-soft);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.gl-filter:hover {
  border-color: var(--paper);
  color: var(--paper);
}

.gl-filter[aria-pressed="true"] {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

/* --- The strip -------------------------------------------------------- */

.gl-reel {
  position: relative;
}

.gl-pin {
  padding: 2rem 0 4rem;
}

.gl-strip-wrap {
  position: relative;
  padding: 34px 0;
  background: #24211c;
}

/* Sprocket holes along both edges */
.gl-strip-wrap::before,
.gl-strip-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background-image: linear-gradient(90deg, transparent 0 8px, #050504 8px 22px, transparent 22px 30px);
  background-size: 30px 12px;
  border-radius: 2px;
  opacity: 0.95;
}

.gl-strip-wrap::before {
  top: 11px;
}

.gl-strip-wrap::after {
  bottom: 11px;
}

.gl-strip {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
}

.gl-frame {
  position: relative;
  flex: none;
  width: min(44vw, 64vh);
}

.gl-frame.is-hidden {
  display: none;
}

.gl-edge {
  position: absolute;
  top: -28px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(214, 161, 92, 0.75);
  pointer-events: none;
}

.gl-shot {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}

.gl-shot .lite-embed__thumb {
  filter: grayscale(0.6) contrast(1.05);
}

.gl-frame:hover .lite-embed__thumb,
.gl-frame:focus-within .lite-embed__thumb {
  filter: none;
}

.gl-shot .lite-embed__play {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.gl-frame:hover .lite-embed__play,
.gl-frame:focus-within .lite-embed__play {
  opacity: 1;
  transform: scale(1);
}

@media (hover: hover) and (pointer: fine) {
  .gl-shot .lite-embed__play {
    display: none;
  }
}

.gl-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 1rem;
  row-gap: 0.35rem;
  padding: 1rem 0 0;
}

.gl-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gl-role,
.gl-note {
  grid-column: 2;
}

.gl-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

.gl-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.gl-role,
.gl-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.gl-note {
  color: var(--accent);
}

.gl-counter {
  margin-top: 1.4rem;
  padding: 0 var(--gutter);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
  font-variant-numeric: tabular-nums;
}

/* Desktop: the page holds still and the strip runs sideways */
@media (min-width: 900px) {
  .dc-anim .gl-pin {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 0;
  }

  .dc-anim .gl-strip {
    width: max-content;
    will-change: transform;
    cursor: grab;
  }

  .dc-anim .gl-strip.is-dragging {
    cursor: grabbing;
  }
}

/* Small screens: the strip runs down the page */
@media (max-width: 899px) {
  .gl-strip-wrap {
    padding: 0 30px;
  }

  .gl-strip-wrap::before,
  .gl-strip-wrap::after {
    top: 0;
    bottom: 0;
    width: 12px;
    height: auto;
    left: 9px;
    right: auto;
    background-image: linear-gradient(180deg, transparent 0 8px, #050504 8px 22px, transparent 22px 30px);
    background-size: 12px 30px;
  }

  .gl-strip-wrap::after {
    left: auto;
    right: 9px;
  }

  .gl-strip {
    flex-direction: column;
    gap: 44px;
    padding: 40px 0;
  }

  .gl-frame {
    width: 100%;
  }

  .gl-title {
    white-space: normal;
  }

  .gl-counter {
    display: none;
  }
}

/* --- Projection room --------------------------------------------------- */

.gl-theatre {
  background: rgba(5, 5, 4, 0.97);
}

.gl-rec {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--rec);
  vertical-align: 1px;
  animation: gl-blink 1.2s steps(2) infinite;
}

@keyframes gl-blink {
  50% { opacity: 0.15; }
}

.gl-screen {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter) var(--gutter);
}

.gl-screen-inner {
  position: relative;
  width: min(100%, calc((100vh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 0 120px rgba(236, 232, 223, 0.08);
}

.gl-screen-inner .lite-embed {
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gl-rec {
    animation: none;
  }
}
