@font-face {
  font-family: "a393d9452fa41dd03";
  src: url("../assets/Quicksand-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "af1dcd6101ba846be";
  src: url("../assets/SwirlInsertion.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: #f2f0eb; }
.film-index { max-width: none; --inset: clamp(16px, 3vw, 62px); }
.film-index { padding-top: calc(44px + 2 * min(1.25vw, 21px)); }
.film-index main { padding-top: clamp(8px, 1.6vh, 24px); }
.poster-stage {
  position: relative;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.poster-stage ::selection { background: transparent; }
.poster-row {
  --poster-height: clamp(96px, calc(100svh - 212px), 920px);
  display: flex;
  gap: clamp(12px, 1.3vw, 26px);
  padding: 6px var(--inset) 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--inset);
  scrollbar-width: none;
}
.poster-row::-webkit-scrollbar { display: none; }
.film-card {
  flex: 0 0 calc(var(--poster-height) * 1382 / 2048);
  min-width: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
}
.film-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1382 / 2048;
  object-fit: cover;
  object-position: center;
}
.garden-poster img { object-position: center top; }
.caption { padding: 12px 4px 4px; }
.caption h2 { margin: 0 0 3px; font-size: clamp(17px, 1.4vw, 24px); font-weight: 400; line-height: 1.3; }
.year { color: #a5a39d; font-size: 13px; }
.film-card:focus-visible, .poster-row:focus-visible { outline: 1px solid #bcbab1; outline-offset: -1px; }
.poster-stage::before, .poster-stage::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.poster-stage::before { left: 0; background: linear-gradient(to right, rgb(255 255 255 / 8%), transparent); }
.poster-stage::after { right: 0; background: linear-gradient(to left, rgb(255 255 255 / 8%), transparent); }
.poster-stage[data-slide="left"]::before, .poster-stage[data-slide="right"]::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .home-motion:not(.entrances-initialized) [data-enter],
  .home-motion [data-pending] { opacity: 0 !important; }
}
@media (max-width: 680px) {
  .poster-row { --poster-height: min(127vw, 76svh, max(96px, calc(100svh - 162px))); }
}
@media (prefers-reduced-motion: reduce) {
  .poster-stage::before, .poster-stage::after { transition: none; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .poster-row { padding-top: calc(5px + var(--poster-height) * .025); }
  .film-card img {
    transform-origin: center 60%;
    transition: transform 240ms cubic-bezier(.2,.7,.25,1);
  }
  .film-card:has(+ .film-card:hover) img,
  .film-card:hover + .film-card img { transform: scale(1.012); }
  .film-card:is(:hover, :focus-visible) img { transform: translateY(-2px) scale(1.035); }
}

@media (max-width: 660px) { .film-index { padding-top: 56px; } }

.swipe-hint { display: none; }

@media (min-width: 961px) {
  .film-index { height: 100svh; display: flex; flex-direction: column; }
  .film-index .portfolio-footer { padding-block: 4px 12px; }
  .film-index main { flex: 1; min-height: 0; display: flex; }
  .poster-stage { flex: 1; min-width: 0; container-type: size; }
  /* Keep the caption and hovered poster inside the stage. */
  .poster-row { --poster-height: clamp(40px, calc((100cqh - 72px) / 1.025), 1100px); }
}
@media (max-width: 960px) {
  .film-index .poster-row {
    --film-inset: clamp(12px, 4vw, 28px);
    padding-inline: var(--film-inset);
    gap: clamp(8px, 2.4vw, 16px);
    scroll-padding-inline: var(--film-inset);
  }
  .film-index .film-card {
    /* Fit each original poster above its title and year, with room for the swipe hint. */
    flex-basis: min(89vw, calc(max(110px, 100svh - var(--nav-height, 64px) - var(--caption-space, 112px)) * var(--poster-ratio)));
  }
  .swipe-hint:not([hidden]) {
    display: block;
    margin: 0;
    padding: 0 clamp(12px, 4vw, 28px) 8px;
    color: #b5b3b0;
    font-size: .875rem;
    line-height: 1.4;
    text-align: right;
    transition: opacity .22s ease;
  }
  .swipe-hint.dismissed { opacity: 0; }
}
/* Short landscape shelves need room for titles that wrap onto multiple lines. */
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .film-index .film-card { --caption-space: 164px; }
}
@media (max-width: 960px) and (hover: hover) and (pointer: fine) {
  .film-index .poster-row { scroll-snap-type: none; }
}
@media (prefers-reduced-motion: reduce) {
  .swipe-hint:not([hidden]) { transition: none; }
}
