/* Prism carousel (homepage films). Theme tokens only: works in light and dark. */

.pc {
  --pc-stage: transparent;
  --pc-floor: transparent;
  --pc-chip: rgba(255, 255, 255, .62);
  --pc-chip-ink: #1C1B19;
  --pc-sheen: transparent;
  --pc-pill: rgba(255, 255, 255, .55);
  position: relative;
  margin-top: clamp(28px, 3.5vw, 48px);
}
html[data-theme="dark"] .pc {
  --pc-stage: transparent;
  --pc-floor: transparent;
  --pc-chip: rgba(24, 23, 21, .58);
  --pc-chip-ink: #ECEAE4;
  --pc-sheen: transparent;
  --pc-pill: rgba(255, 255, 255, .12);
}

/* ── Fallback (no JS): a plain scrolling row ── */
.pc__list { list-style: none; margin: 0; padding: 0 0 8px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
.pc__item { flex: 0 0 216px; scroll-snap-align: start; }
.pc__item-link { display: block; color: inherit; text-decoration: none; }
.pc__item img { width: 100%; aspect-ratio: 216 / 304; object-fit: cover; display: block; border-radius: 18px; }
.pc__item-label { display: block; margin-top: 10px; font-size: 15px; color: var(--ed-ink); }
.pc__item-caption { display: block; font-size: 13px; color: var(--ed-muted); }

/* ── Enhanced: the list stays for screen readers and keyboard; a focused link shows as a chip ── */
.pc--on .pc__list { position: absolute; inset: 0; padding: 0; overflow: visible; pointer-events: none; display: block; }
.pc--on .pc__item { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pc--on .pc__item:focus-within {
  width: auto; height: auto; overflow: visible; clip: auto; z-index: 6;
  left: 50%; top: 18px; transform: translateX(-50%); pointer-events: auto;
}
.pc--on .pc__item:focus-within img, .pc--on .pc__item:focus-within .pc__item-caption { display: none; }
.pc--on .pc__item-link:focus-visible {
  display: block; padding: 10px 18px; border-radius: 999px; background: var(--ed-paper); color: var(--ed-ink);
  outline: 2px solid var(--ed-ink); outline-offset: 2px; white-space: nowrap;
}
.pc--on .pc__item-link:focus-visible .pc__item-label { margin: 0; }

.pc__stage {
  position: relative; isolation: isolate; overflow: hidden;
  height: var(--pc-h, 440px); border-radius: 24px; background: var(--pc-stage);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab;
}
.pc__stage.is-dragging { cursor: grabbing; }
.pc__stage::before {           /* pale floor of light */
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, var(--pc-floor), transparent 70%);
  pointer-events: none;
}
.pc__track { position: absolute; inset: 0; z-index: 1; perspective: 1100px; }
.pc__card {
  position: absolute; left: 0; top: 0; width: var(--pc-cw); height: var(--pc-ch);
  border-radius: 18px; overflow: hidden; background: rgb(var(--ed-ink-rgb) / .08);
  backface-visibility: hidden; will-change: transform;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .45);
}
.pc__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.pc__chip {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--pc-chip); color: var(--pc-chip-ink);
  -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
}
.pc__label { margin: 0; font-size: 13px; font-weight: 500; line-height: 1.25; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc__caption { margin: 3px 0 0; font-size: 11px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc__caption:empty { display: none; }

/* Liquid-glass lenses: outer frost + inner lens, masked by a long eased radial fade. */
.pc__lens { position: absolute; top: -20%; height: 140%; width: 60%; z-index: 3; pointer-events: none; }
.pc__lens--l { left: 0; }
.pc__lens--r { right: 0; }
.pc__lens::before, .pc__lens::after { content: ''; position: absolute; inset: 0; }
.pc__lens::before {   /* soft outer frost */
  -webkit-backdrop-filter: blur(5px) saturate(1.25); backdrop-filter: blur(5px) saturate(1.25);
  background: var(--pc-sheen);
  -webkit-mask-image: var(--pc-mask-outer); mask-image: var(--pc-mask-outer);
}
.pc__lens::after {    /* deep inner lens + white sheen */
  -webkit-backdrop-filter: blur(var(--pc-blur, 16px)) saturate(var(--pc-sat, 1.9)); backdrop-filter: blur(var(--pc-blur, 16px)) saturate(var(--pc-sat, 1.9));
  background: linear-gradient(180deg, var(--pc-sheen), transparent 45%, var(--pc-sheen));
  -webkit-mask-image: var(--pc-mask-inner); mask-image: var(--pc-mask-inner);
}

/* Glass pill dots */
.pc__dots {
  position: absolute; left: 50%; bottom: 16px; z-index: 5; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--pc-pill);
  -webkit-backdrop-filter: blur(12px) saturate(1.6); backdrop-filter: blur(12px) saturate(1.6);
}
.pc__dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 999px; }
.pc__dot::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--ed-ink); opacity: .28; transition: width .3s var(--ease-out, ease), opacity .3s; }
.pc__dot[aria-current="true"]::before { width: 18px; opacity: .9; }
.pc__dot[aria-current="true"] { width: 32px; }
.pc__dot:focus-visible { outline: 2px solid var(--ed-ink); outline-offset: 1px; }

@media (max-width: 600px) {
  .pc__stage { border-radius: 18px; }
  .pc__dot { width: 18px; }
  .pc__dot[aria-current="true"] { width: 26px; }
}

/* Full-bleed: the stage runs edge to edge of the screen. */
.ed-section--prism { overflow-x: clip; }
.pc--on .pc__stage { margin-inline: calc(50% - 50vw); border-radius: 0; }

/* The dots float 16px above the stage edge: take that off so the gap below matches the other sections. */
.ed-section--prism { padding-bottom: calc(var(--ed-section) - 16px); }
