/* The launch film (Cole, 2026-10-16: "copy the way that Natura does it"): a small card in the corner, the film's first
   frame with its title, a play button and "Watch the film"; it opens the film in a dialog, streamed from our own site
   (HLS: native in Safari, hls.js elsewhere). Measured from natura.inc's RingTeaserPreview. */
/* desktop: from the first view it sits where the hero's "See the watch" card was (Cole 10-16: "replace it in place"),
   and moves up above the floating "Reserve yours" button when that appears (.lifted, film.js) */
.film-card { position: fixed; right: clamp(16px, 3vw, 44px); bottom: clamp(16px, 4vh, 40px);
  z-index: 84; width: min(19vw, 360px, 36svh); aspect-ratio: 80 / 41; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: #31302c; color: #faf6ee; cursor: pointer; box-shadow: 0 4px 20px rgba(49, 48, 44, .12);
  opacity: 0; visibility: hidden; pointer-events: none; transform-origin: 100% 100%; transform: scale(.86);
  transition: opacity .45s var(--ease), transform .6s var(--ease), right .4s var(--ease), bottom .4s var(--ease), visibility 0s linear .6s; }
.film-card.on { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
.film-card.lifted { right: max(20px, env(safe-area-inset-right)); bottom: calc(max(20px, env(safe-area-inset-bottom)) + 74px); }
/* out of the way while the hero's headline or a caption it would cover is on screen (film.js) */
.film-card.on.tuck { opacity: 0; pointer-events: none; }
.film-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .53)); }
.film-card .fc-play { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; display: grid; place-items: center; z-index: 1;
  background: rgba(250, 246, 238, .93); color: #31302c; border-radius: 50%; transition: transform .35s var(--ease); }
.film-card:hover .fc-play { transform: scale(1.08); }
.film-card .fc-play svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.film-card .fc-label { position: absolute; left: 18px; bottom: 14px; z-index: 1; font-size: 14px; font-weight: 500; }
.film-card:focus-visible { outline: 3px solid var(--accent, #2AAFCC); outline-offset: 4px; }

.film-dialog { border: 0; margin: auto; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: transparent; overflow: hidden; }
.film-dialog[open] { display: grid; place-items: center; }
.film-dialog::backdrop { background: rgba(24, 24, 22, .85); animation: film-in .42s ease both; }
.film-dialog[data-closing="true"]::backdrop { animation: film-out .42s ease both; }
.film-dialog .fd-player { position: relative; width: min(100%, calc((100svh - 48px) * 1920 / 816)); aspect-ratio: 1920 / 816;
  border-radius: 14px; overflow: hidden; background: #111; animation: film-pop .42s var(--ease) both; }
.film-dialog[data-closing="true"] .fd-player { animation: film-out .42s ease both; }
.film-dialog video { display: block; width: 100%; height: 100%; object-fit: contain; background: #111; }
.film-dialog .fd-close { position: absolute; right: 14px; top: 14px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; padding: 0; border-radius: 50%; color: #faf6ee; background: rgba(49, 48, 44, .81); cursor: pointer; }
.film-dialog .fd-close svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.film-dialog .fd-close:focus-visible { outline: 3px solid var(--accent, #2AAFCC); outline-offset: 3px; }
.film-dialog .fd-error { position: absolute; inset: 45% 20px auto; text-align: center; color: #faf6ee; }
@keyframes film-in { from { opacity: 0; } }
@keyframes film-out { to { opacity: 0; } }
@keyframes film-pop { from { opacity: 0; transform: scale(.97); } }
@media (min-width: 768px) { .film-dialog { padding: 24px; } }

/* phones and tall tablets (Natura): the card sits small at the top right, under the menu, with no label */
@media (max-width: 1100px) and (max-aspect-ratio: 6/5), (max-width: 767px) {
  .film-card, .film-card.lifted { right: max(16px, env(safe-area-inset-right)); top: calc(var(--nav-h) + max(14px, env(safe-area-inset-top))); bottom: auto;
    width: clamp(88px, 25vw, 140px); border-radius: 10px; transform-origin: 100% 0; }
  .film-card .fc-play { width: 32px; height: 32px; }
  .film-card .fc-play svg { width: 17px; height: 17px; }
  .film-card .fc-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .film-card { transform: none; transition: none; }
  .film-dialog::backdrop, .film-dialog .fd-player { animation: none; }
}
