/* The launch film's player, shared by the homepage's film section and /film. Nothing plays until
   someone presses play, and then it plays with sound. The poster is the film's opening frame: the
   blank chat window with the typed prompt. When the film ends, an end screen offers the two
   calls to action and a replay. */
.film-frame {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: #FDFBF7;
  border: 1px solid var(--line, #F0EBE1);
  box-shadow: var(--shadow-lift, 0 4px 10px rgba(43,39,34,.05), 0 22px 44px rgba(43,39,34,.10));
}
.film-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #FDFBF7; }

/* Play: an amber disc and the runtime, in the empty lower half of the poster. */
.film-play {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 0 13%;
  border: 0; margin: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(253,251,247,0) 55%, rgba(253,251,247,.35) 100%);
  font: inherit; color: var(--ink, #2B2722);
}
.film-play-pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 10px 22px 10px 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-lift, 0 22px 44px rgba(43,39,34,.10));
  font-weight: 800; font-size: 17px; letter-spacing: -0.01em;
  transition: transform .25s var(--ease-out, ease-out), box-shadow .25s var(--ease-out, ease-out);
}
.film-play-disc {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple, #A8590F);
}
.film-play-disc svg { width: 18px; height: 18px; margin-left: 3px; fill: #fff; }
.film-time { font-family: var(--mono, ui-monospace, monospace); font-size: 13px; font-weight: 600; color: var(--muted, #6B6357); }
.film-play:hover .film-play-pill { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(43,39,34,.18); }
.film-play:focus-visible { outline: none; }
.film-play:focus-visible .film-play-pill { outline: 3px solid var(--purple, #A8590F); outline-offset: 3px; }

/* The end screen. */
.film-end {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 24px;
  text-align: center;
  background: rgba(253,251,247,.95);
}
.film-end[hidden], .film-play[hidden] { display: none; }
.film-end-line { margin: 0; font-size: clamp(22px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink, #2B2722); }
.film-end-line span { color: var(--purple, #A8590F); }
.film-end-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.film-replay {
  border: 0; background: none; cursor: pointer; padding: 6px 10px;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted, #6B6357);
}
.film-replay:hover { color: var(--purple, #A8590F); }

/* Chapters under the frame (homepage): each starts the film at its time, with sound. */
.film-chapters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.film-chapters button {
  border: 1px solid var(--line, #F0EBE1); border-radius: 999px; padding: 10px 15px; cursor: pointer;
  background: rgba(255,255,255,.75); font: inherit; font-size: 14px; font-weight: 600; line-height: 1; color: var(--ink, #2B2722);
  transition: border-color .2s var(--ease-out, ease-out), background .2s var(--ease-out, ease-out);
}
.film-chapters button:hover { background: #fff; border-color: #E7DFD0; }
.film-chapters button span { margin-left: 6px; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; font-weight: 600; color: var(--muted, #6B6357); }

@media (max-width: 640px) {
  .film-frame { border-radius: 14px; }
  /* On a phone the poster's chat box fills most of the frame, so play sits low and small. */
  .film-play { padding-bottom: 2.5%; }
  .film-play-pill { font-size: 13px; gap: 8px; padding: 5px 12px 5px 5px; }
  .film-play-disc { width: 28px; height: 28px; }
  .film-play-disc svg { width: 12px; height: 12px; }
  .film-time { font-size: 11px; }
  .film-end { gap: 14px; }
  .film-end .btn { padding: 11px 16px; font-size: 14px; }
}
