/* The Film page (version 3, 2026-11-15).
   The two films lie on a sheet of warm paper as PRINTS, like the prints in the Danish film: no
   phone around them (the black frame looked old), a paper edge, a strip of tape, the title written
   under the picture. The main film is large, the Danish one smaller and a little askew, each with
   a handwritten note. Below them three prints from the front page's afternoon, so the page has
   people on it. Loaded by film.html only; the prints, tape, paper and handwriting are site.css. */

/* ---------- the sheet the films lie on ---------- */
.films {
  margin-top: clamp(28px, 4vw, 52px);
  padding: clamp(76px, 7vw, 100px) clamp(18px, 4vw, 60px) clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr); align-items: center;
  gap: clamp(20px, 5vw, 72px);
}
.film { position: relative; margin: 0; display: grid; gap: 16px; justify-items: center; text-align: center; }
.film figcaption { max-width: 24em; color: var(--muted); }
.film-main { --fw: clamp(250px, 29vw, 350px); }   /* the width of the film itself */
.film-second { --fw: clamp(180px, 20vw, 236px); }
.print-film { width: calc(var(--fw) + 20px); }
.film-main .print-film { transform: rotate(-0.8deg); }
.film-second .print-film { transform: rotate(2.4deg); }
.print-film .tape { width: 104px; height: 30px; top: -15px; }
.frame { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 2px; background: #000; container-type: inline-size; }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.print-film .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; text-align: left; }
.print-film .cap .hand { font-size: clamp(1.3rem, 1.9vw, 1.6rem); }

/* the play button: a paper disc with the film's rust orange in it */
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 253, 248, 0.94); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 253, 248, 0.22);
  display: grid; place-items: center; transition: transform 0.25s var(--ease), opacity 0.25s ease;
}
.play:hover { transform: translate(-50%, -50%) scale(1.07); }
.play svg { width: 32px; height: 32px; fill: #c04008; margin-left: 4px; }
.film-second .play { top: 64%; width: 60px; height: 60px; } /* lower than the middle: the poster's handwritten words stand there */
.film-second .play svg { width: 27px; height: 27px; }
.film.playing .play, .film.ended .play { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, visibility 0s linear 0.25s; } /* hidden for the keyboard too */

/* the handwritten notes: each sits above its own film, so the two can never meet in the middle */
.film .note { position: absolute; z-index: 5; top: -3.3rem; }
.film-main .note { left: calc(50% - var(--fw) / 2 - 8px); transform: rotate(-4deg); flex-direction: row-reverse; align-items: flex-end; }
.film-second .note { right: calc(50% - var(--fw) / 2 - 22px); transform: rotate(3deg); align-items: flex-end; }

/* ---------- when a film has ended ---------- */
.after {
  position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 12px;
  padding: 8%; text-align: center; color: #fff;
  background: rgba(24, 14, 8, 0.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.after[hidden] { display: none; }
.after .hand { color: #ffd7b3; font-size: clamp(2rem, 15cqw, 3.1rem); }
.after .btn { min-height: 44px; }
.after .again { min-height: 44px; padding: 0 10px; border: 0; background: none; color: rgba(255, 255, 255, 0.86); font: inherit; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- the prints: what it looks like when people show up ---------- */
.prints { text-align: center; }
.prints-line { margin: 0 0 clamp(22px, 3vw, 38px); font-size: clamp(2rem, 3.6vw, 2.9rem); }
.print-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(16px, 3.4vw, 44px); padding-bottom: 14px; }
.print-row .print { width: clamp(150px, 22vw, 252px); }
.print-row .p1 { transform: rotate(-3deg); }
.print-row .p2 { transform: rotate(1.6deg) translateY(12px); }
.print-row .p2 .tape { transform: translateX(-50%) rotate(4deg); }
.print-row .p3 { transform: rotate(-1.4deg); }

/* ---------- small screens: one column, the notes sit above their film ---------- */
@media (max-width: 760px) {
  .films { grid-template-columns: 1fr; gap: 56px; padding-top: 34px; }
  .film-main { --fw: min(74vw, 320px); }
  .film-second { --fw: min(56vw, 230px); }
  .film .note { position: static; justify-content: center; transform: rotate(-3deg); margin: 0 0 6px; }
  .film .note svg { display: none; }
  .print-row .print { width: min(62vw, 250px); }
  .print-row .p2 { transform: rotate(1.6deg); }
}

@media (prefers-reduced-motion: reduce) {
  .play { transition: none; }
  .after { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(24, 14, 8, 0.84); }
}
