/* 04 · How it works: the previous site's how-it-works film, played by scroll, with its words (owner, 4 Nov 2026).
   Same layout as there: on wide screens the film fills the height with its subject right of centre and the words sit
   left, over a shade; on phones the square cut sits in the top of the screen and the words sit under it. */
.hfm { position: relative; padding: 0; background: #000; --hf-ring: rgb(240, 40, 36); --hf-walk: rgb(255, 150, 16); --hf-ok: rgb(42, 216, 116);
  --hf-ease: cubic-bezier(.2, .7, .2, 1); }
.hfm-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #000; }
.hfm canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hfm-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 26%, rgba(0,0,0,0) 46%); }

.hfm-beats { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter) calc(44px + env(safe-area-inset-bottom)); }
.hfm-beats::before { content: ""; display: block; min-height: 230px; }
.hfm .beat { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(44px + env(safe-area-inset-bottom)); opacity: 0; transform: translateY(16px);
  pointer-events: none; transition: opacity .5s var(--hf-ease), transform .6s var(--hf-ease); }
.hfm .beat.on { opacity: 1; transform: none; pointer-events: auto; transition-delay: .12s; }
.hfm .label { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--dawn); margin-bottom: 14px; }
.hfm .label.ring { color: var(--hf-ring); } .hfm .label.walk { color: var(--hf-walk); } .hfm .label.ok { color: var(--hf-ok); }
.hfm .label .of { display: inline-flex; gap: 6px; margin-left: 1.1em; vertical-align: middle; }
.hfm .label .of i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .3; }
.hfm .label .of i.on { opacity: 1; }
.hfm .mid { font-size: clamp(30px, 6.4vw, 60px); font-weight: 300; letter-spacing: -.025em; line-height: 1.05; color: var(--text-dark); }
.hfm .sub { margin-top: 14px; font-size: clamp(15px, 3.9vw, 19px); line-height: 1.5; color: rgba(242, 240, 236, .7); max-width: 30em; }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .hfm-shade { background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.75) 28%, rgba(0,0,0,.45) 40%, rgba(0,0,0,0) 58%); }
  .hfm-beats { top: 0; padding: 0; }
  .hfm-beats::before { display: none; }
  .hfm .beat { right: auto; width: 44%; top: 50%; bottom: auto; transform: translateY(calc(-50% + 16px)); text-shadow: 0 1px 22px rgba(0,0,0,.55); }
  .hfm .beat.on { transform: translateY(-50%); }
  .hfm .mid { font-size: clamp(30px, 3.9vw, 56px); }
  .hfm .sub { max-width: min(23em, 34vw); color: rgba(242, 240, 236, .84); }
}
@media (prefers-reduced-motion: reduce) { .hfm .beat { transition: none; } }
