/* RIS film — home hero video (risautomation.com.au).
   Loaded from <head> (after style.css) so the hero lays out once. Variables come from style.css; fallbacks keep it standalone. */
.hero-film { width: 100%; max-width: 560px; margin: 0 auto; min-width: 0; }
@media (min-width: 960px) { .hero-film { max-width: none; margin: 0 0 0 auto; } }

.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;                 /* reserves the space: the hero never shifts when the poster or video arrives */
  border-radius: var(--radius-lg, 22px);
  overflow: hidden;
  background: var(--charcoal-soft, #1F2937);
  border: 1px solid var(--dark-line, #374151);
  box-shadow: var(--shadow-lg, 0 30px 80px rgb(0 0 0 / .35));
}
/* The poster is a real <img> (high priority, responsive WebP) so the hero image arrives with the page; the video sits on top of it. */
.film-poster, .film-poster img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.film-poster img { object-fit: cover; }
.film-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;              /* until a frame plays, the poster underneath shows through */
}
.film-caption {
  margin: 12px 4px 0;
  font: 500 var(--fs-mono, .75rem)/1.4 var(--font-mono, "DM Mono", ui-monospace, monospace);
  letter-spacing: .04em;
  color: var(--dark-muted, #9CA3AF);
  text-align: center;
}

.film-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-width: var(--tap, 44px);
  height: var(--tap, 44px);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / .18);
  background: rgb(17 24 39 / .72);
  color: #fff;
  font: 500 12px/1 var(--font-mono, "DM Mono", ui-monospace, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: .85;
  transition: opacity .2s ease, background-color .2s ease;
}
.film-toggle:hover,
.film-toggle:focus-visible { opacity: 1; background: rgb(17 24 39 / .92); }
.film-toggle:focus-visible { outline: 2px solid var(--green, #00B060); outline-offset: 2px; }
.film-toggle .ico { width: 10px; height: 12px; display: inline-block; }
.film-toggle[data-state="playing"] .ico { border-left: 3px solid currentColor; border-right: 3px solid currentColor; width: 10px; }
.film-toggle[data-state="paused"] .ico { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.film-toggle[hidden] { display: none; }

@media (max-width: 640px) {
  .film-frame { border-radius: var(--radius, 16px); }
  .film-toggle { right: 10px; bottom: 10px; }
  .film-toggle .lbl { display: none; }
}
