:root {
  --bg: #f6f4ef;
  --ink: #1a1a18;
  --muted: #8a877e;
  --line: #e3e0d6;
  --accent: #9c1c22;
  --surname: #4c4a44;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", -apple-system, sans-serif;
}

/* Films index */

.films {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) 8rem;
}

.work-group {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.work-group + .work-group {
  margin-top: clamp(4rem, 8vw, 6rem);
}

.group-title {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--surname);
  margin-bottom: clamp(1.5rem, 3vw, 2.2rem);
}


.work-list {
  display: flex;
  flex-direction: column;
  gap: clamp(5rem, 12vw, 10rem);
}

/* Fixed to match the Photographs page still-image proportions exactly
   (1100 / 729, the ratio those covers happen to render at), so switching
   between Film and Photographs doesn't feel like a size jump. Ron will
   size her uploaded stills/clips to this box. */
.work {
  position: relative;
  display: block;
  aspect-ratio: 1100 / 729;
  overflow: hidden;
  cursor: pointer;
  background: #1c1b18;
}

.work-still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.work-still--pending {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
}

.work-embed {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.work-embed iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  border: 0;
}

.work:hover .work-still {
  opacity: 0;
}

/* Self-hosted loop clips play continuously as the tile itself — keep them
   visible on hover instead of swapping to the (empty) embed layer. */
.work:hover:has(video) .work-still {
  opacity: 1;
}

.work:hover .work-embed {
  opacity: 1;
}

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.work:hover .work-overlay {
  opacity: 1;
}

.work-caption {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  text-align: center;
}

/* A hollow play triangle, drawn as a real glyph (U+25B7) rather than an
   icon-in-a-circle, so it reads as typography rather than a UI widget. */
.work-play {
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* Fullscreen player */

.player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.player-frame {
  width: 100%;
  height: 100%;
}

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

body.player-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .work-still,
  .work-embed,
  .work-overlay,
  .player-modal {
    transition: none !important;
  }
}
